l3lab/ntp-mathlib huggingface dataset:
/-- Finite products of analytic functions are analytic -/
theorem Finset.analyticAt_prod {A : Type*} [NormedCommRing A] [NormedAlgebra 𝕜 A]
    {f : α → E → A} {c : E} (N : Finset α) (h : ∀ n ∈ N, AnalyticAt 𝕜 (f n) c) :
    AnalyticAt 𝕜 (fun z ↦ ∏ n in N, f n z) c := by
  induction' N using Finset.induction with a B aB hB
  · simp only [Finset.prod_empty]
    

Proof state:
case empty
α : Type u_1
𝕜 : Type u_2
inst✝¹⁴ : NontriviallyNormedField 𝕜
E : Type u_3
F : Type u_4
G : Type u_5
H : Type u_6
inst✝¹³ : NormedAddCommGroup E
inst✝¹² : NormedSpace 𝕜 E
inst✝¹¹ : NormedAddCommGroup F
inst✝¹⁰ : NormedSpace 𝕜 F
inst✝⁹ : NormedAddCommGroup G
inst✝⁸ : NormedSpace 𝕜 G
inst✝⁷ : NormedAddCommGroup H
inst✝⁶ : NormedSpace 𝕜 H
𝕝 : Type u_7
inst✝⁵ : NontriviallyNormedField 𝕝
inst✝⁴ : NormedAlgebra 𝕜 𝕝
A✝ : Type u_8
inst✝³ : NormedRing A✝
inst✝² : NormedAlgebra 𝕜 A✝
A : Type u_9
inst✝¹ : NormedCommRing A
inst✝ : NormedAlgebra 𝕜 A
f : α → E → A
c : E
h : ∀ n ∈ ∅, AnalyticAt 𝕜 (f n) c
⊢ AnalyticAt 𝕜 (fun z => 1) c

Next tactic:
exact analyticAt_const
/-- Finite products of analytic functions are analytic -/
theorem Finset.analyticAt_prod {A : Type*} [NormedCommRing A] [NormedAlgebra 𝕜 A]
    {f : α → E → A} {c : E} (N : Finset α) (h : ∀ n ∈ N, AnalyticAt 𝕜 (f n) c) :
    AnalyticAt 𝕜 (fun z ↦ ∏ n in N, f n z) c := by
  induction' N using Finset.induction with a B aB hB
  · simp only [Finset.prod_empty]
    exact analyticAt_const
  · 

Proof state:
case insert
α : Type u_1
𝕜 : Type u_2
inst✝¹⁴ : NontriviallyNormedField 𝕜
E : Type u_3
F : Type u_4
G : Type u_5
H : Type u_6
inst✝¹³ : NormedAddCommGroup E
inst✝¹² : NormedSpace 𝕜 E
inst✝¹¹ : NormedAddCommGroup F
inst✝¹⁰ : NormedSpace 𝕜 F
inst✝⁹ : NormedAddCommGroup G
inst✝⁸ : NormedSpace 𝕜 G
inst✝⁷ : NormedAddCommGroup H
inst✝⁶ : NormedSpace 𝕜 H
𝕝 : Type u_7
inst✝⁵ : NontriviallyNormedField 𝕝
inst✝⁴ : NormedAlgebra 𝕜 𝕝
A✝ : Type u_8
inst✝³ : NormedRing A✝
inst✝² : NormedAlgebra 𝕜 A✝
A : Type u_9
inst✝¹ : NormedCommRing A
inst✝ : NormedAlgebra 𝕜 A
f : α → E → A
c : E
a : α
B : Finset α
aB : a ∉ B
hB : (∀ n ∈ B, AnalyticAt 𝕜 (f n) c) → AnalyticAt 𝕜 (fun z => ∏ n in B, f n z) c
h : ∀ n ∈ insert a B, AnalyticAt 𝕜 (f n) c
⊢ AnalyticAt 𝕜 (fun z => ∏ n in insert a B, f n z) c

Next tactic:
simp_rw [Finset.prod_insert aB]
/-- Finite products of analytic functions are analytic -/
theorem Finset.analyticAt_prod {A : Type*} [NormedCommRing A] [NormedAlgebra 𝕜 A]
    {f : α → E → A} {c : E} (N : Finset α) (h : ∀ n ∈ N, AnalyticAt 𝕜 (f n) c) :
    AnalyticAt 𝕜 (fun z ↦ ∏ n in N, f n z) c := by
  induction' N using Finset.induction with a B aB hB
  · simp only [Finset.prod_empty]
    exact analyticAt_const
  · simp_rw [Finset.prod_insert aB]
    

Proof state:
case insert
α : Type u_1
𝕜 : Type u_2
inst✝¹⁴ : NontriviallyNormedField 𝕜
E : Type u_3
F : Type u_4
G : Type u_5
H : Type u_6
inst✝¹³ : NormedAddCommGroup E
inst✝¹² : NormedSpace 𝕜 E
inst✝¹¹ : NormedAddCommGroup F
inst✝¹⁰ : NormedSpace 𝕜 F
inst✝⁹ : NormedAddCommGroup G
inst✝⁸ : NormedSpace 𝕜 G
inst✝⁷ : NormedAddCommGroup H
inst✝⁶ : NormedSpace 𝕜 H
𝕝 : Type u_7
inst✝⁵ : NontriviallyNormedField 𝕝
inst✝⁴ : NormedAlgebra 𝕜 𝕝
A✝ : Type u_8
inst✝³ : NormedRing A✝
inst✝² : NormedAlgebra 𝕜 A✝
A : Type u_9
inst✝¹ : NormedCommRing A
inst✝ : NormedAlgebra 𝕜 A
f : α → E → A
c : E
a : α
B : Finset α
aB : a ∉ B
hB : (∀ n ∈ B, AnalyticAt 𝕜 (f n) c) → AnalyticAt 𝕜 (fun z => ∏ n in B, f n z) c
h : ∀ n ∈ insert a B, AnalyticAt 𝕜 (f n) c
⊢ AnalyticAt 𝕜 (fun z => f a z * ∏ n in B, f n z) c

Next tactic:
simp only [Finset.mem_insert] at h
/-- Finite products of analytic functions are analytic -/
theorem Finset.analyticAt_prod {A : Type*} [NormedCommRing A] [NormedAlgebra 𝕜 A]
    {f : α → E → A} {c : E} (N : Finset α) (h : ∀ n ∈ N, AnalyticAt 𝕜 (f n) c) :
    AnalyticAt 𝕜 (fun z ↦ ∏ n in N, f n z) c := by
  induction' N using Finset.induction with a B aB hB
  · simp only [Finset.prod_empty]
    exact analyticAt_const
  · simp_rw [Finset.prod_insert aB]
    simp only [Finset.mem_insert] at h
    

Proof state:
case insert
α : Type u_1
𝕜 : Type u_2
inst✝¹⁴ : NontriviallyNormedField 𝕜
E : Type u_3
F : Type u_4
G : Type u_5
H : Type u_6
inst✝¹³ : NormedAddCommGroup E
inst✝¹² : NormedSpace 𝕜 E
inst✝¹¹ : NormedAddCommGroup F
inst✝¹⁰ : NormedSpace 𝕜 F
inst✝⁹ : NormedAddCommGroup G
inst✝⁸ : NormedSpace 𝕜 G
inst✝⁷ : NormedAddCommGroup H
inst✝⁶ : NormedSpace 𝕜 H
𝕝 : Type u_7
inst✝⁵ : NontriviallyNormedField 𝕝
inst✝⁴ : NormedAlgebra 𝕜 𝕝
A✝ : Type u_8
inst✝³ : NormedRing A✝
inst✝² : NormedAlgebra 𝕜 A✝
A : Type u_9
inst✝¹ : NormedCommRing A
inst✝ : NormedAlgebra 𝕜 A
f : α → E → A
c : E
a : α
B : Finset α
aB : a ∉ B
hB : (∀ n ∈ B, AnalyticAt 𝕜 (f n) c) → AnalyticAt 𝕜 (fun z => ∏ n in B, f n z) c
h : ∀ (n : α), n = a ∨ n ∈ B → AnalyticAt 𝕜 (f n) c
⊢ AnalyticAt 𝕜 (fun z => f a z * ∏ n in B, f n z) c

Next tactic:
exact (h a (Or.inl rfl)).mul (hB fun b m ↦ h b (Or.inr m))
/-- A cone over `Ran.diagram ι F x` used to define `Ran`. -/
@[simp]
def cone {F : S ⥤ D} {G : L ⥤ D} (x : L) (f : ι ⋙ G ⟶ F) : Cone (diagram ι F x)
    where
  pt := G.obj x
  π :=
    { app := fun i => G.map i.hom ≫ f.app i.right
      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
G : L ⥤ D
x : L
f : ι ⋙ G ⟶ F
⊢ ∀ ⦃X Y : StructuredArrow x ι⦄ (f_1 : X ⟶ Y),
    ((Functor.const (StructuredArrow x ι)).obj (G.obj x)).map f_1 ≫ (fun i => G.map i.hom ≫ f.app i.right) Y =
      (fun i => G.map i.hom ≫ f.app i.right) X ≫ (diagram ι F x).map f_1

Next tactic:
rintro ⟨⟨il⟩, ir, i⟩ ⟨⟨jl⟩, jr, j⟩ ⟨⟨⟨fl⟩⟩, fr, ff⟩
/-- A cone over `Ran.diagram ι F x` used to define `Ran`. -/
@[simp]
def cone {F : S ⥤ D} {G : L ⥤ D} (x : L) (f : ι ⋙ G ⟶ F) : Cone (diagram ι F x)
    where
  pt := G.obj x
  π :=
    { app := fun i => G.map i.hom ≫ f.app i.right
      naturality := by
        rintro ⟨⟨il⟩, ir, i⟩ ⟨⟨jl⟩, jr, j⟩ ⟨⟨⟨fl⟩⟩, fr, ff⟩
        

Proof state:
case mk.mk.mk.mk.mk.up.up
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
G : L ⥤ D
x : L
f : ι ⋙ G ⟶ F
ir : S
il : PUnit.{1}
i : (Functor.fromPUnit x).obj { as := il } ⟶ ι.obj ir
jr : S
jl : PUnit.{1}
j : (Functor.fromPUnit x).obj { as := jl } ⟶ ι.obj jr
fr : { left := { as := il }, right := ir, hom := i }.right ⟶ { left := { as := jl }, right := jr, hom := j }.right
fl : { left := { as := il }, right := ir, hom := i }.left.as = { left := { as := jl }, right := jr, hom := j }.left.as
ff :
  (Functor.fromPUnit x).map { down := { down := fl } } ≫ { left := { as := jl }, right := jr, hom := j }.hom =
    { left := { as := il }, right := ir, hom := i }.hom ≫ ι.map fr
⊢ ((Functor.const (StructuredArrow x ι)).obj (G.obj x)).map (CommaMorphism.mk { down := { down := fl } } fr) ≫
      (fun i => G.map i.hom ≫ f.app i.right) { left := { as := jl }, right := jr, hom := j } =
    (fun i => G.map i.hom ≫ f.app i.right) { left := { as := il }, right := ir, hom := i } ≫
      (diagram ι F x).map (CommaMorphism.mk { down := { down := fl } } fr)

Next tactic:
dsimp at *
/-- A cone over `Ran.diagram ι F x` used to define `Ran`. -/
@[simp]
def cone {F : S ⥤ D} {G : L ⥤ D} (x : L) (f : ι ⋙ G ⟶ F) : Cone (diagram ι F x)
    where
  pt := G.obj x
  π :=
    { app := fun i => G.map i.hom ≫ f.app i.right
      naturality := by
        rintro ⟨⟨il⟩, ir, i⟩ ⟨⟨jl⟩, jr, j⟩ ⟨⟨⟨fl⟩⟩, fr, ff⟩
        dsimp at *
        

Proof state:
case mk.mk.mk.mk.mk.up.up
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
G : L ⥤ D
x : L
f : ι ⋙ G ⟶ F
ir : S
il : PUnit.{1}
i : (Functor.fromPUnit x).obj { as := il } ⟶ ι.obj ir
jr : S
jl : PUnit.{1}
j : (Functor.fromPUnit x).obj { as := jl } ⟶ ι.obj jr
fr : { left := { as := il }, right := ir, hom := i }.right ⟶ { left := { as := jl }, right := jr, hom := j }.right
fl : { left := { as := il }, right := ir, hom := i }.left.as = { left := { as := jl }, right := jr, hom := j }.left.as
ff :
  (Functor.fromPUnit x).map { down := { down := fl } } ≫ { left := { as := jl }, right := jr, hom := j }.hom =
    { left := { as := il }, right := ir, hom := i }.hom ≫ ι.map fr
⊢ 𝟙 (G.obj x) ≫ G.map j ≫ f.app jr = (G.map i ≫ f.app ir) ≫ F.map fr

Next tactic:
dsimp at ff
/-- A cone over `Ran.diagram ι F x` used to define `Ran`. -/
@[simp]
def cone {F : S ⥤ D} {G : L ⥤ D} (x : L) (f : ι ⋙ G ⟶ F) : Cone (diagram ι F x)
    where
  pt := G.obj x
  π :=
    { app := fun i => G.map i.hom ≫ f.app i.right
      naturality := by
        rintro ⟨⟨il⟩, ir, i⟩ ⟨⟨jl⟩, jr, j⟩ ⟨⟨⟨fl⟩⟩, fr, ff⟩
        dsimp at *
        dsimp at ff
        

Proof state:
case mk.mk.mk.mk.mk.up.up
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
G : L ⥤ D
x : L
f : ι ⋙ G ⟶ F
ir : S
il : PUnit.{1}
i : (Functor.fromPUnit x).obj { as := il } ⟶ ι.obj ir
jr : S
jl : PUnit.{1}
j : (Functor.fromPUnit x).obj { as := jl } ⟶ ι.obj jr
fr : { left := { as := il }, right := ir, hom := i }.right ⟶ { left := { as := jl }, right := jr, hom := j }.right
fl : { left := { as := il }, right := ir, hom := i }.left.as = { left := { as := jl }, right := jr, hom := j }.left.as
ff : 𝟙 x ≫ j = i ≫ ι.map fr
⊢ 𝟙 (G.obj x) ≫ G.map j ≫ f.app jr = (G.map i ≫ f.app ir) ≫ F.map fr

Next tactic:
simp only [Category.id_comp, Category.assoc] at *
/-- A cone over `Ran.diagram ι F x` used to define `Ran`. -/
@[simp]
def cone {F : S ⥤ D} {G : L ⥤ D} (x : L) (f : ι ⋙ G ⟶ F) : Cone (diagram ι F x)
    where
  pt := G.obj x
  π :=
    { app := fun i => G.map i.hom ≫ f.app i.right
      naturality := by
        rintro ⟨⟨il⟩, ir, i⟩ ⟨⟨jl⟩, jr, j⟩ ⟨⟨⟨fl⟩⟩, fr, ff⟩
        dsimp at *
        dsimp at ff
        simp only [Category.id_comp, Category.assoc] at *
        

Proof state:
case mk.mk.mk.mk.mk.up.up
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
G : L ⥤ D
x : L
f : ι ⋙ G ⟶ F
ir : S
il : PUnit.{1}
i : (Functor.fromPUnit x).obj { as := il } ⟶ ι.obj ir
jr : S
jl : PUnit.{1}
j : (Functor.fromPUnit x).obj { as := jl } ⟶ ι.obj jr
fr : { left := { as := il }, right := ir, hom := i }.right ⟶ { left := { as := jl }, right := jr, hom := j }.right
fl : True
ff : j = i ≫ ι.map fr
⊢ G.map j ≫ f.app jr = G.map i ≫ f.app ir ≫ F.map fr

Next tactic:
rw [ff]
/-- A cone over `Ran.diagram ι F x` used to define `Ran`. -/
@[simp]
def cone {F : S ⥤ D} {G : L ⥤ D} (x : L) (f : ι ⋙ G ⟶ F) : Cone (diagram ι F x)
    where
  pt := G.obj x
  π :=
    { app := fun i => G.map i.hom ≫ f.app i.right
      naturality := by
        rintro ⟨⟨il⟩, ir, i⟩ ⟨⟨jl⟩, jr, j⟩ ⟨⟨⟨fl⟩⟩, fr, ff⟩
        dsimp at *
        dsimp at ff
        simp only [Category.id_comp, Category.assoc] at *
        rw [ff]
        

Proof state:
case mk.mk.mk.mk.mk.up.up
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
G : L ⥤ D
x : L
f : ι ⋙ G ⟶ F
ir : S
il : PUnit.{1}
i : (Functor.fromPUnit x).obj { as := il } ⟶ ι.obj ir
jr : S
jl : PUnit.{1}
j : (Functor.fromPUnit x).obj { as := jl } ⟶ ι.obj jr
fr : { left := { as := il }, right := ir, hom := i }.right ⟶ { left := { as := jl }, right := jr, hom := j }.right
fl : True
ff : j = i ≫ ι.map fr
⊢ G.map (i ≫ ι.map fr) ≫ f.app jr = G.map i ≫ f.app ir ≫ F.map fr

Next tactic:
have := f.naturality
/-- A cone over `Ran.diagram ι F x` used to define `Ran`. -/
@[simp]
def cone {F : S ⥤ D} {G : L ⥤ D} (x : L) (f : ι ⋙ G ⟶ F) : Cone (diagram ι F x)
    where
  pt := G.obj x
  π :=
    { app := fun i => G.map i.hom ≫ f.app i.right
      naturality := by
        rintro ⟨⟨il⟩, ir, i⟩ ⟨⟨jl⟩, jr, j⟩ ⟨⟨⟨fl⟩⟩, fr, ff⟩
        dsimp at *
        dsimp at ff
        simp only [Category.id_comp, Category.assoc] at *
        rw [ff]
        have := f.naturality
        

Proof state:
case mk.mk.mk.mk.mk.up.up
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
G : L ⥤ D
x : L
f : ι ⋙ G ⟶ F
ir : S
il : PUnit.{1}
i : (Functor.fromPUnit x).obj { as := il } ⟶ ι.obj ir
jr : S
jl : PUnit.{1}
j : (Functor.fromPUnit x).obj { as := jl } ⟶ ι.obj jr
fr : { left := { as := il }, right := ir, hom := i }.right ⟶ { left := { as := jl }, right := jr, hom := j }.right
fl : True
ff : j = i ≫ ι.map fr
this : ∀ ⦃X Y : S⦄ (f_1 : X ⟶ Y), (ι ⋙ G).map f_1 ≫ f.app Y = f.app X ≫ F.map f_1
⊢ G.map (i ≫ ι.map fr) ≫ f.app jr = G.map i ≫ f.app ir ≫ F.map fr

Next tactic:
aesop_cat
/-- An auxiliary definition used to define `Ran`. -/
@[simps]
def loc (F : S ⥤ D) [h : ∀ x, HasLimit (diagram ι F x)] : L ⥤ D
    where
  obj x := limit (diagram ι F x)
  map {X Y} f :=
    haveI : HasLimit <| StructuredArrow.map f ⋙ diagram ι F X := h Y
    limit.pre (diagram ι F X) (StructuredArrow.map f)
  map_id := 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)
⊢ ∀ (X : L),
    { obj := fun x => limit (diagram ι F x),
            map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map
        (𝟙 X) =
      𝟙
        ({ obj := fun x => limit (diagram ι F x),
              map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.obj
          X)

Next tactic:
intro l
/-- An auxiliary definition used to define `Ran`. -/
@[simps]
def loc (F : S ⥤ D) [h : ∀ x, HasLimit (diagram ι F x)] : L ⥤ D
    where
  obj x := limit (diagram ι F x)
  map {X Y} f :=
    haveI : HasLimit <| StructuredArrow.map f ⋙ diagram ι F X := h Y
    limit.pre (diagram ι F X) (StructuredArrow.map f)
  map_id := by
    intro l
    

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)
l : L
⊢ { obj := fun x => limit (diagram ι F x), map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map
      (𝟙 l) =
    𝟙
      ({ obj := fun x => limit (diagram ι F x),
            map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.obj
        l)

Next tactic:
haveI : HasLimit (StructuredArrow.map (𝟙 _) ⋙ diagram ι F l) := h _
/-- An auxiliary definition used to define `Ran`. -/
@[simps]
def loc (F : S ⥤ D) [h : ∀ x, HasLimit (diagram ι F x)] : L ⥤ D
    where
  obj x := limit (diagram ι F x)
  map {X Y} f :=
    haveI : HasLimit <| StructuredArrow.map f ⋙ diagram ι F X := h Y
    limit.pre (diagram ι F X) (StructuredArrow.map f)
  map_id := by
    intro l
    haveI : HasLimit (StructuredArrow.map (𝟙 _) ⋙ diagram ι F l) := h _
    

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)
l : L
this : HasLimit (StructuredArrow.map (𝟙 l) ⋙ diagram ι F l)
⊢ { obj := fun x => limit (diagram ι F x), map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map
      (𝟙 l) =
    𝟙
      ({ obj := fun x => limit (diagram ι F x),
            map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.obj
        l)

Next tactic:
dsimp
/-- An auxiliary definition used to define `Ran`. -/
@[simps]
def loc (F : S ⥤ D) [h : ∀ x, HasLimit (diagram ι F x)] : L ⥤ D
    where
  obj x := limit (diagram ι F x)
  map {X Y} f :=
    haveI : HasLimit <| StructuredArrow.map f ⋙ diagram ι F X := h Y
    limit.pre (diagram ι F X) (StructuredArrow.map f)
  map_id := by
    intro l
    haveI : HasLimit (StructuredArrow.map (𝟙 _) ⋙ diagram ι F l) := h _
    dsimp
    

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)
l : L
this : HasLimit (StructuredArrow.map (𝟙 l) ⋙ diagram ι F l)
⊢ limit.pre (diagram ι F l) (StructuredArrow.map (𝟙 l)) = 𝟙 (limit (diagram ι F l))

Next tactic:
ext j
/-- An auxiliary definition used to define `Ran`. -/
@[simps]
def loc (F : S ⥤ D) [h : ∀ x, HasLimit (diagram ι F x)] : L ⥤ D
    where
  obj x := limit (diagram ι F x)
  map {X Y} f :=
    haveI : HasLimit <| StructuredArrow.map f ⋙ diagram ι F X := h Y
    limit.pre (diagram ι F X) (StructuredArrow.map f)
  map_id := by
    intro l
    haveI : HasLimit (StructuredArrow.map (𝟙 _) ⋙ diagram ι F l) := h _
    dsimp
    ext 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)
l : L
this : HasLimit (StructuredArrow.map (𝟙 l) ⋙ diagram ι F l)
j : StructuredArrow l ι
⊢ limit.pre (diagram ι F l) (StructuredArrow.map (𝟙 l)) ≫ limit.π (StructuredArrow.map (𝟙 l) ⋙ diagram ι F l) j =
    𝟙 (limit (diagram ι F l)) ≫ limit.π (StructuredArrow.map (𝟙 l) ⋙ diagram ι F l) j

Next tactic:
simp only [Category.id_comp, limit.pre_π]
/-- An auxiliary definition used to define `Ran`. -/
@[simps]
def loc (F : S ⥤ D) [h : ∀ x, HasLimit (diagram ι F x)] : L ⥤ D
    where
  obj x := limit (diagram ι F x)
  map {X Y} f :=
    haveI : HasLimit <| StructuredArrow.map f ⋙ diagram ι F X := h Y
    limit.pre (diagram ι F X) (StructuredArrow.map f)
  map_id := by
    intro l
    haveI : HasLimit (StructuredArrow.map (𝟙 _) ⋙ diagram ι F l) := h _
    dsimp
    ext j
    simp only [Category.id_comp, limit.pre_π]
    

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)
l : L
this : HasLimit (StructuredArrow.map (𝟙 l) ⋙ diagram ι F l)
j : StructuredArrow l ι
⊢ limit.π (diagram ι F l) ((StructuredArrow.map (𝟙 l)).obj j) = limit.π (StructuredArrow.map (𝟙 l) ⋙ diagram ι F l) j

Next tactic:
congr 1
/-- An auxiliary definition used to define `Ran`. -/
@[simps]
def loc (F : S ⥤ D) [h : ∀ x, HasLimit (diagram ι F x)] : L ⥤ D
    where
  obj x := limit (diagram ι F x)
  map {X Y} f :=
    haveI : HasLimit <| StructuredArrow.map f ⋙ diagram ι F X := h Y
    limit.pre (diagram ι F X) (StructuredArrow.map f)
  map_id := by
    intro l
    haveI : HasLimit (StructuredArrow.map (𝟙 _) ⋙ diagram ι F l) := h _
    dsimp
    ext j
    simp only [Category.id_comp, limit.pre_π]
    congr 1
    

Proof state:
case w.h.e_7.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)
l : L
this : HasLimit (StructuredArrow.map (𝟙 l) ⋙ diagram ι F l)
j : StructuredArrow l ι
⊢ (StructuredArrow.map (𝟙 l)).obj j = j

Next tactic:
simp
/-- An auxiliary definition used to define `Ran`. -/
@[simps]
def loc (F : S ⥤ D) [h : ∀ x, HasLimit (diagram ι F x)] : L ⥤ D
    where
  obj x := limit (diagram ι F x)
  map {X Y} f :=
    haveI : HasLimit <| StructuredArrow.map f ⋙ diagram ι F X := h Y
    limit.pre (diagram ι F X) (StructuredArrow.map f)
  map_id := by
    intro l
    haveI : HasLimit (StructuredArrow.map (𝟙 _) ⋙ diagram ι F l) := h _
    dsimp
    ext j
    simp only [Category.id_comp, limit.pre_π]
    congr 1
    simp
  map_comp := 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)
⊢ ∀ {X Y Z : L} (f : X ⟶ Y) (g : Y ⟶ Z),
    { obj := fun x => limit (diagram ι F x),
            map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map
        (f ≫ g) =
      { obj := fun x => limit (diagram ι F x),
              map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map
          f ≫
        { obj := fun x => limit (diagram ι F x),
              map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map
          g

Next tactic:
intro x y z f g
/-- An auxiliary definition used to define `Ran`. -/
@[simps]
def loc (F : S ⥤ D) [h : ∀ x, HasLimit (diagram ι F x)] : L ⥤ D
    where
  obj x := limit (diagram ι F x)
  map {X Y} f :=
    haveI : HasLimit <| StructuredArrow.map f ⋙ diagram ι F X := h Y
    limit.pre (diagram ι F X) (StructuredArrow.map f)
  map_id := by
    intro l
    haveI : HasLimit (StructuredArrow.map (𝟙 _) ⋙ diagram ι F l) := h _
    dsimp
    ext j
    simp only [Category.id_comp, limit.pre_π]
    congr 1
    simp
  map_comp := by
    intro x y z f g
    

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)
x y z : L
f : x ⟶ y
g : y ⟶ z
⊢ { obj := fun x => limit (diagram ι F x), map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map
      (f ≫ g) =
    { obj := fun x => limit (diagram ι F x),
            map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map
        f ≫
      { obj := fun x => limit (diagram ι F x),
            map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map
        g

Next tactic:
apply limit.hom_ext
/-- An auxiliary definition used to define `Ran`. -/
@[simps]
def loc (F : S ⥤ D) [h : ∀ x, HasLimit (diagram ι F x)] : L ⥤ D
    where
  obj x := limit (diagram ι F x)
  map {X Y} f :=
    haveI : HasLimit <| StructuredArrow.map f ⋙ diagram ι F X := h Y
    limit.pre (diagram ι F X) (StructuredArrow.map f)
  map_id := by
    intro l
    haveI : HasLimit (StructuredArrow.map (𝟙 _) ⋙ diagram ι F l) := h _
    dsimp
    ext j
    simp only [Category.id_comp, limit.pre_π]
    congr 1
    simp
  map_comp := by
    intro x y z f g
    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)
x y z : L
f : x ⟶ y
g : y ⟶ z
⊢ ∀ (j : StructuredArrow z ι),
    { obj := fun x => limit (diagram ι F x),
              map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map
          (f ≫ g) ≫
        limit.π (diagram ι F z) j =
      ({ obj := fun x => limit (diagram ι F x),
                map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map
            f ≫
          { obj := fun x => limit (diagram ι F x),
                map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map
            g) ≫
        limit.π (diagram ι F z) j

Next tactic:
intro j
/-- An auxiliary definition used to define `Ran`. -/
@[simps]
def loc (F : S ⥤ D) [h : ∀ x, HasLimit (diagram ι F x)] : L ⥤ D
    where
  obj x := limit (diagram ι F x)
  map {X Y} f :=
    haveI : HasLimit <| StructuredArrow.map f ⋙ diagram ι F X := h Y
    limit.pre (diagram ι F X) (StructuredArrow.map f)
  map_id := by
    intro l
    haveI : HasLimit (StructuredArrow.map (𝟙 _) ⋙ diagram ι F l) := h _
    dsimp
    ext j
    simp only [Category.id_comp, limit.pre_π]
    congr 1
    simp
  map_comp := by
    intro x y z f g
    apply limit.hom_ext
    intro j
    -- Porting note: The fact that we need to add these instances all over the place
    -- is certainly not ideal.
    

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)
x y z : L
f : x ⟶ y
g : y ⟶ z
j : StructuredArrow z ι
⊢ { obj := fun x => limit (diagram ι F x), map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map
        (f ≫ g) ≫
      limit.π (diagram ι F z) j =
    ({ obj := fun x => limit (diagram ι F x),
              map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map
          f ≫
        { obj := fun x => limit (diagram ι F x),
              map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map
          g) ≫
      limit.π (diagram ι F z) j

Next tactic:
haveI : HasLimit (StructuredArrow.map f ⋙ diagram ι F _) := h _