l3lab/ntp-mathlib huggingface dataset:
/-- An auxiliary definition used to define `Ran` and `Ran.adjunction`. -/
@[simps]
def equiv (F : S ⥤ D) [h : ∀ x, HasLimit (diagram ι F x)] (G : L ⥤ D) :
    (G ⟶ loc ι F) ≃ (((whiskeringLeft _ _ _).obj ι).obj G ⟶ F)
    where
  toFun f :=
    { app := fun x => f.app _ ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 _))
      naturality := by
        intro x y ff
        dsimp only [whiskeringLeft]
        simp only [Functor.comp_map, NatTrans.naturality_assoc, loc_map, Category.assoc]
        congr 1
        haveI : HasLimit (StructuredArrow.map (ι.map ff) ⋙ diagram ι F (ι.obj x)) := h _
        erw [limit.pre_π]
        let t : StructuredArrow.mk (𝟙 (ι.obj x)) ⟶
          (StructuredArrow.map (ι.map ff)).obj (StructuredArrow.mk (𝟙 (ι.obj y))) :=
          StructuredArrow.homMk ff ?_
        convert (limit.w (diagram ι F (ι.obj x)) t).symm using 1
        simp }
  invFun f :=
    { app := fun x => limit.lift (diagram ι F x) (cone _ f)
      naturality := by
        

Proof state:
S : Type u₁
L : Type u₂
D : Type u₃
inst✝² : Category.{v₁, u₁} S
inst✝¹ : Category.{v₂, u₂} L
inst✝ : Category.{v₃, u₃} D
ι : S ⥤ L
F : S ⥤ D
h : ∀ (x : L), HasLimit (diagram ι F x)
G : L ⥤ D
f : ((whiskeringLeft S L D).obj ι).obj G ⟶ F
⊢ ∀ ⦃X Y : L⦄ (f_1 : X ⟶ Y),
    G.map f_1 ≫ (fun x => limit.lift (diagram ι F x) (cone x f)) Y =
      (fun x => limit.lift (diagram ι F x) (cone x f)) X ≫ (loc ι F).map f_1

Next tactic:
intro x y ff
/-- An auxiliary definition used to define `Ran` and `Ran.adjunction`. -/
@[simps]
def equiv (F : S ⥤ D) [h : ∀ x, HasLimit (diagram ι F x)] (G : L ⥤ D) :
    (G ⟶ loc ι F) ≃ (((whiskeringLeft _ _ _).obj ι).obj G ⟶ F)
    where
  toFun f :=
    { app := fun x => f.app _ ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 _))
      naturality := by
        intro x y ff
        dsimp only [whiskeringLeft]
        simp only [Functor.comp_map, NatTrans.naturality_assoc, loc_map, Category.assoc]
        congr 1
        haveI : HasLimit (StructuredArrow.map (ι.map ff) ⋙ diagram ι F (ι.obj x)) := h _
        erw [limit.pre_π]
        let t : StructuredArrow.mk (𝟙 (ι.obj x)) ⟶
          (StructuredArrow.map (ι.map ff)).obj (StructuredArrow.mk (𝟙 (ι.obj y))) :=
          StructuredArrow.homMk ff ?_
        convert (limit.w (diagram ι F (ι.obj x)) t).symm using 1
        simp }
  invFun f :=
    { app := fun x => limit.lift (diagram ι F x) (cone _ f)
      naturality := by
        intro x y ff
        

Proof state:
S : Type u₁
L : Type u₂
D : Type u₃
inst✝² : Category.{v₁, u₁} S
inst✝¹ : Category.{v₂, u₂} L
inst✝ : Category.{v₃, u₃} D
ι : S ⥤ L
F : S ⥤ D
h : ∀ (x : L), HasLimit (diagram ι F x)
G : L ⥤ D
f : ((whiskeringLeft S L D).obj ι).obj G ⟶ F
x y : L
ff : x ⟶ y
⊢ G.map ff ≫ (fun x => limit.lift (diagram ι F x) (cone x f)) y =
    (fun x => limit.lift (diagram ι F x) (cone x f)) x ≫ (loc ι F).map ff

Next tactic:
apply limit.hom_ext
/-- An auxiliary definition used to define `Ran` and `Ran.adjunction`. -/
@[simps]
def equiv (F : S ⥤ D) [h : ∀ x, HasLimit (diagram ι F x)] (G : L ⥤ D) :
    (G ⟶ loc ι F) ≃ (((whiskeringLeft _ _ _).obj ι).obj G ⟶ F)
    where
  toFun f :=
    { app := fun x => f.app _ ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 _))
      naturality := by
        intro x y ff
        dsimp only [whiskeringLeft]
        simp only [Functor.comp_map, NatTrans.naturality_assoc, loc_map, Category.assoc]
        congr 1
        haveI : HasLimit (StructuredArrow.map (ι.map ff) ⋙ diagram ι F (ι.obj x)) := h _
        erw [limit.pre_π]
        let t : StructuredArrow.mk (𝟙 (ι.obj x)) ⟶
          (StructuredArrow.map (ι.map ff)).obj (StructuredArrow.mk (𝟙 (ι.obj y))) :=
          StructuredArrow.homMk ff ?_
        convert (limit.w (diagram ι F (ι.obj x)) t).symm using 1
        simp }
  invFun f :=
    { app := fun x => limit.lift (diagram ι F x) (cone _ f)
      naturality := by
        intro x y ff
        apply limit.hom_ext
        

Proof state:
case w
S : Type u₁
L : Type u₂
D : Type u₃
inst✝² : Category.{v₁, u₁} S
inst✝¹ : Category.{v₂, u₂} L
inst✝ : Category.{v₃, u₃} D
ι : S ⥤ L
F : S ⥤ D
h : ∀ (x : L), HasLimit (diagram ι F x)
G : L ⥤ D
f : ((whiskeringLeft S L D).obj ι).obj G ⟶ F
x y : L
ff : x ⟶ y
⊢ ∀ (j : StructuredArrow y ι),
    (G.map ff ≫ (fun x => limit.lift (diagram ι F x) (cone x f)) y) ≫ limit.π (diagram ι F y) j =
      ((fun x => limit.lift (diagram ι F x) (cone x f)) x ≫ (loc ι F).map ff) ≫ limit.π (diagram ι F y) j

Next tactic:
intros j
/-- An auxiliary definition used to define `Ran` and `Ran.adjunction`. -/
@[simps]
def equiv (F : S ⥤ D) [h : ∀ x, HasLimit (diagram ι F x)] (G : L ⥤ D) :
    (G ⟶ loc ι F) ≃ (((whiskeringLeft _ _ _).obj ι).obj G ⟶ F)
    where
  toFun f :=
    { app := fun x => f.app _ ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 _))
      naturality := by
        intro x y ff
        dsimp only [whiskeringLeft]
        simp only [Functor.comp_map, NatTrans.naturality_assoc, loc_map, Category.assoc]
        congr 1
        haveI : HasLimit (StructuredArrow.map (ι.map ff) ⋙ diagram ι F (ι.obj x)) := h _
        erw [limit.pre_π]
        let t : StructuredArrow.mk (𝟙 (ι.obj x)) ⟶
          (StructuredArrow.map (ι.map ff)).obj (StructuredArrow.mk (𝟙 (ι.obj y))) :=
          StructuredArrow.homMk ff ?_
        convert (limit.w (diagram ι F (ι.obj x)) t).symm using 1
        simp }
  invFun f :=
    { app := fun x => limit.lift (diagram ι F x) (cone _ f)
      naturality := by
        intro x y ff
        apply limit.hom_ext
        intros j
        

Proof state:
case w
S : Type u₁
L : Type u₂
D : Type u₃
inst✝² : Category.{v₁, u₁} S
inst✝¹ : Category.{v₂, u₂} L
inst✝ : Category.{v₃, u₃} D
ι : S ⥤ L
F : S ⥤ D
h : ∀ (x : L), HasLimit (diagram ι F x)
G : L ⥤ D
f : ((whiskeringLeft S L D).obj ι).obj G ⟶ F
x y : L
ff : x ⟶ y
j : StructuredArrow y ι
⊢ (G.map ff ≫ (fun x => limit.lift (diagram ι F x) (cone x f)) y) ≫ limit.π (diagram ι F y) j =
    ((fun x => limit.lift (diagram ι F x) (cone x f)) x ≫ (loc ι F).map ff) ≫ limit.π (diagram ι F y) j

Next tactic:
haveI : HasLimit (StructuredArrow.map ff ⋙ diagram ι F x) := h _
/-- An auxiliary definition used to define `Ran` and `Ran.adjunction`. -/
@[simps]
def equiv (F : S ⥤ D) [h : ∀ x, HasLimit (diagram ι F x)] (G : L ⥤ D) :
    (G ⟶ loc ι F) ≃ (((whiskeringLeft _ _ _).obj ι).obj G ⟶ F)
    where
  toFun f :=
    { app := fun x => f.app _ ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 _))
      naturality := by
        intro x y ff
        dsimp only [whiskeringLeft]
        simp only [Functor.comp_map, NatTrans.naturality_assoc, loc_map, Category.assoc]
        congr 1
        haveI : HasLimit (StructuredArrow.map (ι.map ff) ⋙ diagram ι F (ι.obj x)) := h _
        erw [limit.pre_π]
        let t : StructuredArrow.mk (𝟙 (ι.obj x)) ⟶
          (StructuredArrow.map (ι.map ff)).obj (StructuredArrow.mk (𝟙 (ι.obj y))) :=
          StructuredArrow.homMk ff ?_
        convert (limit.w (diagram ι F (ι.obj x)) t).symm using 1
        simp }
  invFun f :=
    { app := fun x => limit.lift (diagram ι F x) (cone _ f)
      naturality := by
        intro x y ff
        apply limit.hom_ext
        intros j
        haveI : HasLimit (StructuredArrow.map ff ⋙ diagram ι F x) := h _
        

Proof state:
case w
S : Type u₁
L : Type u₂
D : Type u₃
inst✝² : Category.{v₁, u₁} S
inst✝¹ : Category.{v₂, u₂} L
inst✝ : Category.{v₃, u₃} D
ι : S ⥤ L
F : S ⥤ D
h : ∀ (x : L), HasLimit (diagram ι F x)
G : L ⥤ D
f : ((whiskeringLeft S L D).obj ι).obj G ⟶ F
x y : L
ff : x ⟶ y
j : StructuredArrow y ι
this : HasLimit (StructuredArrow.map ff ⋙ diagram ι F x)
⊢ (G.map ff ≫ (fun x => limit.lift (diagram ι F x) (cone x f)) y) ≫ limit.π (diagram ι F y) j =
    ((fun x => limit.lift (diagram ι F x) (cone x f)) x ≫ (loc ι F).map ff) ≫ limit.π (diagram ι F y) j

Next tactic:
erw [limit.lift_pre, limit.lift_π, Category.assoc, limit.lift_π (cone _ f) j]
/-- An auxiliary definition used to define `Ran` and `Ran.adjunction`. -/
@[simps]
def equiv (F : S ⥤ D) [h : ∀ x, HasLimit (diagram ι F x)] (G : L ⥤ D) :
    (G ⟶ loc ι F) ≃ (((whiskeringLeft _ _ _).obj ι).obj G ⟶ F)
    where
  toFun f :=
    { app := fun x => f.app _ ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 _))
      naturality := by
        intro x y ff
        dsimp only [whiskeringLeft]
        simp only [Functor.comp_map, NatTrans.naturality_assoc, loc_map, Category.assoc]
        congr 1
        haveI : HasLimit (StructuredArrow.map (ι.map ff) ⋙ diagram ι F (ι.obj x)) := h _
        erw [limit.pre_π]
        let t : StructuredArrow.mk (𝟙 (ι.obj x)) ⟶
          (StructuredArrow.map (ι.map ff)).obj (StructuredArrow.mk (𝟙 (ι.obj y))) :=
          StructuredArrow.homMk ff ?_
        convert (limit.w (diagram ι F (ι.obj x)) t).symm using 1
        simp }
  invFun f :=
    { app := fun x => limit.lift (diagram ι F x) (cone _ f)
      naturality := by
        intro x y ff
        apply limit.hom_ext
        intros j
        haveI : HasLimit (StructuredArrow.map ff ⋙ diagram ι F x) := h _
        erw [limit.lift_pre, limit.lift_π, Category.assoc, limit.lift_π (cone _ f) j]
        

Proof state:
case w
S : Type u₁
L : Type u₂
D : Type u₃
inst✝² : Category.{v₁, u₁} S
inst✝¹ : Category.{v₂, u₂} L
inst✝ : Category.{v₃, u₃} D
ι : S ⥤ L
F : S ⥤ D
h : ∀ (x : L), HasLimit (diagram ι F x)
G : L ⥤ D
f : ((whiskeringLeft S L D).obj ι).obj G ⟶ F
x y : L
ff : x ⟶ y
j : StructuredArrow y ι
this : HasLimit (StructuredArrow.map ff ⋙ diagram ι F x)
⊢ G.map ff ≫ (cone y f).π.app j = (Cone.whisker (StructuredArrow.map ff) (cone x f)).π.app j

Next tactic:
simp
/-- An auxiliary definition used to define `Ran` and `Ran.adjunction`. -/
@[simps]
def equiv (F : S ⥤ D) [h : ∀ x, HasLimit (diagram ι F x)] (G : L ⥤ D) :
    (G ⟶ loc ι F) ≃ (((whiskeringLeft _ _ _).obj ι).obj G ⟶ F)
    where
  toFun f :=
    { app := fun x => f.app _ ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 _))
      naturality := by
        intro x y ff
        dsimp only [whiskeringLeft]
        simp only [Functor.comp_map, NatTrans.naturality_assoc, loc_map, Category.assoc]
        congr 1
        haveI : HasLimit (StructuredArrow.map (ι.map ff) ⋙ diagram ι F (ι.obj x)) := h _
        erw [limit.pre_π]
        let t : StructuredArrow.mk (𝟙 (ι.obj x)) ⟶
          (StructuredArrow.map (ι.map ff)).obj (StructuredArrow.mk (𝟙 (ι.obj y))) :=
          StructuredArrow.homMk ff ?_
        convert (limit.w (diagram ι F (ι.obj x)) t).symm using 1
        simp }
  invFun f :=
    { app := fun x => limit.lift (diagram ι F x) (cone _ f)
      naturality := by
        intro x y ff
        apply limit.hom_ext
        intros j
        haveI : HasLimit (StructuredArrow.map ff ⋙ diagram ι F x) := h _
        erw [limit.lift_pre, limit.lift_π, Category.assoc, limit.lift_π (cone _ f) j]
        simp }
  left_inv := by
    

Proof state:
S : Type u₁
L : Type u₂
D : Type u₃
inst✝² : Category.{v₁, u₁} S
inst✝¹ : Category.{v₂, u₂} L
inst✝ : Category.{v₃, u₃} D
ι : S ⥤ L
F : S ⥤ D
h : ∀ (x : L), HasLimit (diagram ι F x)
G : L ⥤ D
⊢ Function.LeftInverse (fun f => NatTrans.mk fun x => limit.lift (diagram ι F x) (cone x f)) fun f =>
    NatTrans.mk fun x => f.app (ι.obj x) ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 (ι.obj x)))

Next tactic:
intro x
/-- An auxiliary definition used to define `Ran` and `Ran.adjunction`. -/
@[simps]
def equiv (F : S ⥤ D) [h : ∀ x, HasLimit (diagram ι F x)] (G : L ⥤ D) :
    (G ⟶ loc ι F) ≃ (((whiskeringLeft _ _ _).obj ι).obj G ⟶ F)
    where
  toFun f :=
    { app := fun x => f.app _ ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 _))
      naturality := by
        intro x y ff
        dsimp only [whiskeringLeft]
        simp only [Functor.comp_map, NatTrans.naturality_assoc, loc_map, Category.assoc]
        congr 1
        haveI : HasLimit (StructuredArrow.map (ι.map ff) ⋙ diagram ι F (ι.obj x)) := h _
        erw [limit.pre_π]
        let t : StructuredArrow.mk (𝟙 (ι.obj x)) ⟶
          (StructuredArrow.map (ι.map ff)).obj (StructuredArrow.mk (𝟙 (ι.obj y))) :=
          StructuredArrow.homMk ff ?_
        convert (limit.w (diagram ι F (ι.obj x)) t).symm using 1
        simp }
  invFun f :=
    { app := fun x => limit.lift (diagram ι F x) (cone _ f)
      naturality := by
        intro x y ff
        apply limit.hom_ext
        intros j
        haveI : HasLimit (StructuredArrow.map ff ⋙ diagram ι F x) := h _
        erw [limit.lift_pre, limit.lift_π, Category.assoc, limit.lift_π (cone _ f) j]
        simp }
  left_inv := by
    intro x
    

Proof state:
S : Type u₁
L : Type u₂
D : Type u₃
inst✝² : Category.{v₁, u₁} S
inst✝¹ : Category.{v₂, u₂} L
inst✝ : Category.{v₃, u₃} D
ι : S ⥤ L
F : S ⥤ D
h : ∀ (x : L), HasLimit (diagram ι F x)
G : L ⥤ D
x : G ⟶ loc ι F
⊢ (fun f => NatTrans.mk fun x => limit.lift (diagram ι F x) (cone x f))
      ((fun f =>
          NatTrans.mk fun x => f.app (ι.obj x) ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 (ι.obj x))))
        x) =
    x

Next tactic:
ext k
/-- An auxiliary definition used to define `Ran` and `Ran.adjunction`. -/
@[simps]
def equiv (F : S ⥤ D) [h : ∀ x, HasLimit (diagram ι F x)] (G : L ⥤ D) :
    (G ⟶ loc ι F) ≃ (((whiskeringLeft _ _ _).obj ι).obj G ⟶ F)
    where
  toFun f :=
    { app := fun x => f.app _ ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 _))
      naturality := by
        intro x y ff
        dsimp only [whiskeringLeft]
        simp only [Functor.comp_map, NatTrans.naturality_assoc, loc_map, Category.assoc]
        congr 1
        haveI : HasLimit (StructuredArrow.map (ι.map ff) ⋙ diagram ι F (ι.obj x)) := h _
        erw [limit.pre_π]
        let t : StructuredArrow.mk (𝟙 (ι.obj x)) ⟶
          (StructuredArrow.map (ι.map ff)).obj (StructuredArrow.mk (𝟙 (ι.obj y))) :=
          StructuredArrow.homMk ff ?_
        convert (limit.w (diagram ι F (ι.obj x)) t).symm using 1
        simp }
  invFun f :=
    { app := fun x => limit.lift (diagram ι F x) (cone _ f)
      naturality := by
        intro x y ff
        apply limit.hom_ext
        intros j
        haveI : HasLimit (StructuredArrow.map ff ⋙ diagram ι F x) := h _
        erw [limit.lift_pre, limit.lift_π, Category.assoc, limit.lift_π (cone _ f) j]
        simp }
  left_inv := by
    intro x
    ext k
    

Proof state:
case w.h
S : Type u₁
L : Type u₂
D : Type u₃
inst✝² : Category.{v₁, u₁} S
inst✝¹ : Category.{v₂, u₂} L
inst✝ : Category.{v₃, u₃} D
ι : S ⥤ L
F : S ⥤ D
h : ∀ (x : L), HasLimit (diagram ι F x)
G : L ⥤ D
x : G ⟶ loc ι F
k : L
⊢ ((fun f => NatTrans.mk fun x => limit.lift (diagram ι F x) (cone x f))
          ((fun f =>
              NatTrans.mk fun x => f.app (ι.obj x) ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 (ι.obj x))))
            x)).app
      k =
    x.app k

Next tactic:
apply limit.hom_ext
/-- An auxiliary definition used to define `Ran` and `Ran.adjunction`. -/
@[simps]
def equiv (F : S ⥤ D) [h : ∀ x, HasLimit (diagram ι F x)] (G : L ⥤ D) :
    (G ⟶ loc ι F) ≃ (((whiskeringLeft _ _ _).obj ι).obj G ⟶ F)
    where
  toFun f :=
    { app := fun x => f.app _ ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 _))
      naturality := by
        intro x y ff
        dsimp only [whiskeringLeft]
        simp only [Functor.comp_map, NatTrans.naturality_assoc, loc_map, Category.assoc]
        congr 1
        haveI : HasLimit (StructuredArrow.map (ι.map ff) ⋙ diagram ι F (ι.obj x)) := h _
        erw [limit.pre_π]
        let t : StructuredArrow.mk (𝟙 (ι.obj x)) ⟶
          (StructuredArrow.map (ι.map ff)).obj (StructuredArrow.mk (𝟙 (ι.obj y))) :=
          StructuredArrow.homMk ff ?_
        convert (limit.w (diagram ι F (ι.obj x)) t).symm using 1
        simp }
  invFun f :=
    { app := fun x => limit.lift (diagram ι F x) (cone _ f)
      naturality := by
        intro x y ff
        apply limit.hom_ext
        intros j
        haveI : HasLimit (StructuredArrow.map ff ⋙ diagram ι F x) := h _
        erw [limit.lift_pre, limit.lift_π, Category.assoc, limit.lift_π (cone _ f) j]
        simp }
  left_inv := by
    intro x
    ext k
    apply limit.hom_ext
    

Proof state:
case w.h.w
S : Type u₁
L : Type u₂
D : Type u₃
inst✝² : Category.{v₁, u₁} S
inst✝¹ : Category.{v₂, u₂} L
inst✝ : Category.{v₃, u₃} D
ι : S ⥤ L
F : S ⥤ D
h : ∀ (x : L), HasLimit (diagram ι F x)
G : L ⥤ D
x : G ⟶ loc ι F
k : L
⊢ ∀ (j : StructuredArrow k ι),
    ((fun f => NatTrans.mk fun x => limit.lift (diagram ι F x) (cone x f))
              ((fun f =>
                  NatTrans.mk fun x =>
                    f.app (ι.obj x) ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 (ι.obj x))))
                x)).app
          k ≫
        limit.π (diagram ι F k) j =
      x.app k ≫ limit.π (diagram ι F k) j

Next tactic:
intros j
/-- An auxiliary definition used to define `Ran` and `Ran.adjunction`. -/
@[simps]
def equiv (F : S ⥤ D) [h : ∀ x, HasLimit (diagram ι F x)] (G : L ⥤ D) :
    (G ⟶ loc ι F) ≃ (((whiskeringLeft _ _ _).obj ι).obj G ⟶ F)
    where
  toFun f :=
    { app := fun x => f.app _ ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 _))
      naturality := by
        intro x y ff
        dsimp only [whiskeringLeft]
        simp only [Functor.comp_map, NatTrans.naturality_assoc, loc_map, Category.assoc]
        congr 1
        haveI : HasLimit (StructuredArrow.map (ι.map ff) ⋙ diagram ι F (ι.obj x)) := h _
        erw [limit.pre_π]
        let t : StructuredArrow.mk (𝟙 (ι.obj x)) ⟶
          (StructuredArrow.map (ι.map ff)).obj (StructuredArrow.mk (𝟙 (ι.obj y))) :=
          StructuredArrow.homMk ff ?_
        convert (limit.w (diagram ι F (ι.obj x)) t).symm using 1
        simp }
  invFun f :=
    { app := fun x => limit.lift (diagram ι F x) (cone _ f)
      naturality := by
        intro x y ff
        apply limit.hom_ext
        intros j
        haveI : HasLimit (StructuredArrow.map ff ⋙ diagram ι F x) := h _
        erw [limit.lift_pre, limit.lift_π, Category.assoc, limit.lift_π (cone _ f) j]
        simp }
  left_inv := by
    intro x
    ext k
    apply limit.hom_ext
    intros j
    

Proof state:
case w.h.w
S : Type u₁
L : Type u₂
D : Type u₃
inst✝² : Category.{v₁, u₁} S
inst✝¹ : Category.{v₂, u₂} L
inst✝ : Category.{v₃, u₃} D
ι : S ⥤ L
F : S ⥤ D
h : ∀ (x : L), HasLimit (diagram ι F x)
G : L ⥤ D
x : G ⟶ loc ι F
k : L
j : StructuredArrow k ι
⊢ ((fun f => NatTrans.mk fun x => limit.lift (diagram ι F x) (cone x f))
            ((fun f =>
                NatTrans.mk fun x =>
                  f.app (ι.obj x) ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 (ι.obj x))))
              x)).app
        k ≫
      limit.π (diagram ι F k) j =
    x.app k ≫ limit.π (diagram ι F k) j

Next tactic:
dsimp only [cone]
/-- An auxiliary definition used to define `Ran` and `Ran.adjunction`. -/
@[simps]
def equiv (F : S ⥤ D) [h : ∀ x, HasLimit (diagram ι F x)] (G : L ⥤ D) :
    (G ⟶ loc ι F) ≃ (((whiskeringLeft _ _ _).obj ι).obj G ⟶ F)
    where
  toFun f :=
    { app := fun x => f.app _ ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 _))
      naturality := by
        intro x y ff
        dsimp only [whiskeringLeft]
        simp only [Functor.comp_map, NatTrans.naturality_assoc, loc_map, Category.assoc]
        congr 1
        haveI : HasLimit (StructuredArrow.map (ι.map ff) ⋙ diagram ι F (ι.obj x)) := h _
        erw [limit.pre_π]
        let t : StructuredArrow.mk (𝟙 (ι.obj x)) ⟶
          (StructuredArrow.map (ι.map ff)).obj (StructuredArrow.mk (𝟙 (ι.obj y))) :=
          StructuredArrow.homMk ff ?_
        convert (limit.w (diagram ι F (ι.obj x)) t).symm using 1
        simp }
  invFun f :=
    { app := fun x => limit.lift (diagram ι F x) (cone _ f)
      naturality := by
        intro x y ff
        apply limit.hom_ext
        intros j
        haveI : HasLimit (StructuredArrow.map ff ⋙ diagram ι F x) := h _
        erw [limit.lift_pre, limit.lift_π, Category.assoc, limit.lift_π (cone _ f) j]
        simp }
  left_inv := by
    intro x
    ext k
    apply limit.hom_ext
    intros j
    dsimp only [cone]
    

Proof state:
case w.h.w
S : Type u₁
L : Type u₂
D : Type u₃
inst✝² : Category.{v₁, u₁} S
inst✝¹ : Category.{v₂, u₂} L
inst✝ : Category.{v₃, u₃} D
ι : S ⥤ L
F : S ⥤ D
h : ∀ (x : L), HasLimit (diagram ι F x)
G : L ⥤ D
x : G ⟶ loc ι F
k : L
j : StructuredArrow k ι
⊢ limit.lift (diagram ι F k)
        { pt := G.obj k,
          π :=
            NatTrans.mk fun i =>
              G.map i.hom ≫
                x.app (ι.obj i.right) ≫
                  limit.π (diagram ι F (ι.obj i.right)) (StructuredArrow.mk (𝟙 (ι.obj i.right))) } ≫
      limit.π (diagram ι F k) j =
    x.app k ≫ limit.π (diagram ι F k) j

Next tactic:
rw [limit.lift_π]
/-- An auxiliary definition used to define `Ran` and `Ran.adjunction`. -/
@[simps]
def equiv (F : S ⥤ D) [h : ∀ x, HasLimit (diagram ι F x)] (G : L ⥤ D) :
    (G ⟶ loc ι F) ≃ (((whiskeringLeft _ _ _).obj ι).obj G ⟶ F)
    where
  toFun f :=
    { app := fun x => f.app _ ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 _))
      naturality := by
        intro x y ff
        dsimp only [whiskeringLeft]
        simp only [Functor.comp_map, NatTrans.naturality_assoc, loc_map, Category.assoc]
        congr 1
        haveI : HasLimit (StructuredArrow.map (ι.map ff) ⋙ diagram ι F (ι.obj x)) := h _
        erw [limit.pre_π]
        let t : StructuredArrow.mk (𝟙 (ι.obj x)) ⟶
          (StructuredArrow.map (ι.map ff)).obj (StructuredArrow.mk (𝟙 (ι.obj y))) :=
          StructuredArrow.homMk ff ?_
        convert (limit.w (diagram ι F (ι.obj x)) t).symm using 1
        simp }
  invFun f :=
    { app := fun x => limit.lift (diagram ι F x) (cone _ f)
      naturality := by
        intro x y ff
        apply limit.hom_ext
        intros j
        haveI : HasLimit (StructuredArrow.map ff ⋙ diagram ι F x) := h _
        erw [limit.lift_pre, limit.lift_π, Category.assoc, limit.lift_π (cone _ f) j]
        simp }
  left_inv := by
    intro x
    ext k
    apply limit.hom_ext
    intros j
    dsimp only [cone]
    rw [limit.lift_π]
    

Proof state:
case w.h.w
S : Type u₁
L : Type u₂
D : Type u₃
inst✝² : Category.{v₁, u₁} S
inst✝¹ : Category.{v₂, u₂} L
inst✝ : Category.{v₃, u₃} D
ι : S ⥤ L
F : S ⥤ D
h : ∀ (x : L), HasLimit (diagram ι F x)
G : L ⥤ D
x : G ⟶ loc ι F
k : L
j : StructuredArrow k ι
⊢ { pt := G.obj k,
            π :=
              NatTrans.mk fun i =>
                G.map i.hom ≫
                  x.app (ι.obj i.right) ≫
                    limit.π (diagram ι F (ι.obj i.right)) (StructuredArrow.mk (𝟙 (ι.obj i.right))) }.π.app
      j =
    x.app k ≫ limit.π (diagram ι F k) j

Next tactic:
simp only [NatTrans.naturality_assoc, loc_map]