l3lab/ntp-mathlib huggingface dataset:
instance idReflectsLimits : ReflectsLimitsOfSize.{w, w'} (𝟭 C) where
  reflectsLimitsOfShape {J} 𝒥 :=
    {
      reflectsLimit := fun {K} =>
        ⟨fun {c} h =>
          ⟨fun s => h.lift ⟨s.pt, fun j => s.π.app j, fun j j' f => s.π.naturality f⟩, by
            cases K; rcases c with ⟨_, _, _⟩; intro s j; cases s; exact h.fac _ j, by
            cases K; rcases c with ⟨_, _, _⟩; intro s m w; rcases s with ⟨_, _, _⟩;
              

Proof state:
case mk.mk.mk.mk.mk
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
J✝ : Type w
inst✝ : Category.{w', w} J✝
K : J✝ ⥤ C
J : Type w'
𝒥 : Category.{w, w'} J
toPrefunctor✝ : J ⥤q C
map_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)
map_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g
pt✝¹ : C
app✝¹ : (X : J) → ((Functor.const J).obj pt✝¹).obj X ⟶ (Functor.mk toPrefunctor✝).obj X
naturality✝¹ :
  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), ((Functor.const J).obj pt✝¹).map f ≫ app✝¹ Y = app✝¹ X ≫ (Functor.mk toPrefunctor✝).map f
h : IsLimit ((𝟭 C).mapCone { pt := pt✝¹, π := NatTrans.mk app✝¹ })
pt✝ : C
app✝ : (X : J) → ((Functor.const J).obj pt✝).obj X ⟶ (Functor.mk toPrefunctor✝).obj X
naturality✝ :
  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), ((Functor.const J).obj pt✝).map f ≫ app✝ Y = app✝ X ≫ (Functor.mk toPrefunctor✝).map f
m : { pt := pt✝, π := NatTrans.mk app✝ }.pt ⟶ { pt := pt✝¹, π := NatTrans.mk app✝¹ }.pt
w : ∀ (j : J), m ≫ { pt := pt✝¹, π := NatTrans.mk app✝¹ }.π.app j = { pt := pt✝, π := NatTrans.mk app✝ }.π.app j
⊢ m = (fun s => IsLimit.lift h { pt := s.pt, π := NatTrans.mk fun j => s.π.app j }) { pt := pt✝, π := NatTrans.mk app✝ }

Next tactic:
exact h.uniq _ m w
instance idReflectsColimits : ReflectsColimitsOfSize.{w, w'} (𝟭 C) where
  reflectsColimitsOfShape {J} 𝒥 :=
    {
      reflectsColimit := fun {K} =>
        ⟨fun {c} h =>
          ⟨fun s => h.desc ⟨s.pt, fun j => s.ι.app j, fun j j' f => s.ι.naturality f⟩, by
            

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
J✝ : Type w
inst✝ : Category.{w', w} J✝
K✝ : J✝ ⥤ C
J : Type w'
𝒥 : Category.{w, w'} J
K : J ⥤ C
c : Cocone K
h : IsColimit ((𝟭 C).mapCocone c)
⊢ ∀ (s : Cocone K) (j : J),
    c.ι.app j ≫ (fun s => IsColimit.desc h { pt := s.pt, ι := NatTrans.mk fun j => s.ι.app j }) s = s.ι.app j

Next tactic:
cases K
instance idReflectsColimits : ReflectsColimitsOfSize.{w, w'} (𝟭 C) where
  reflectsColimitsOfShape {J} 𝒥 :=
    {
      reflectsColimit := fun {K} =>
        ⟨fun {c} h =>
          ⟨fun s => h.desc ⟨s.pt, fun j => s.ι.app j, fun j j' f => s.ι.naturality f⟩, by
            cases K; 

Proof state:
case mk
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
J✝ : Type w
inst✝ : Category.{w', w} J✝
K : J✝ ⥤ C
J : Type w'
𝒥 : Category.{w, w'} J
toPrefunctor✝ : J ⥤q C
map_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)
map_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g
c : Cocone (Functor.mk toPrefunctor✝)
h : IsColimit ((𝟭 C).mapCocone c)
⊢ ∀ (s : Cocone (Functor.mk toPrefunctor✝)) (j : J),
    c.ι.app j ≫ (fun s => IsColimit.desc h { pt := s.pt, ι := NatTrans.mk fun j => s.ι.app j }) s = s.ι.app j

Next tactic:
rcases c with ⟨_, _, _⟩
instance idReflectsColimits : ReflectsColimitsOfSize.{w, w'} (𝟭 C) where
  reflectsColimitsOfShape {J} 𝒥 :=
    {
      reflectsColimit := fun {K} =>
        ⟨fun {c} h =>
          ⟨fun s => h.desc ⟨s.pt, fun j => s.ι.app j, fun j j' f => s.ι.naturality f⟩, by
            cases K; rcases c with ⟨_, _, _⟩; 

Proof state:
case mk.mk.mk
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
J✝ : Type w
inst✝ : Category.{w', w} J✝
K : J✝ ⥤ C
J : Type w'
𝒥 : Category.{w, w'} J
toPrefunctor✝ : J ⥤q C
map_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)
map_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g
pt✝ : C
app✝ : (X : J) → (Functor.mk toPrefunctor✝).obj X ⟶ ((Functor.const J).obj pt✝).obj X
naturality✝ :
  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), (Functor.mk toPrefunctor✝).map f ≫ app✝ Y = app✝ X ≫ ((Functor.const J).obj pt✝).map f
h : IsColimit ((𝟭 C).mapCocone { pt := pt✝, ι := NatTrans.mk app✝ })
⊢ ∀ (s : Cocone (Functor.mk toPrefunctor✝)) (j : J),
    { pt := pt✝, ι := NatTrans.mk app✝ }.ι.app j ≫
        (fun s => IsColimit.desc h { pt := s.pt, ι := NatTrans.mk fun j => s.ι.app j }) s =
      s.ι.app j

Next tactic:
intro s j
instance idReflectsColimits : ReflectsColimitsOfSize.{w, w'} (𝟭 C) where
  reflectsColimitsOfShape {J} 𝒥 :=
    {
      reflectsColimit := fun {K} =>
        ⟨fun {c} h =>
          ⟨fun s => h.desc ⟨s.pt, fun j => s.ι.app j, fun j j' f => s.ι.naturality f⟩, by
            cases K; rcases c with ⟨_, _, _⟩; intro s j; 

Proof state:
case mk.mk.mk
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
J✝ : Type w
inst✝ : Category.{w', w} J✝
K : J✝ ⥤ C
J : Type w'
𝒥 : Category.{w, w'} J
toPrefunctor✝ : J ⥤q C
map_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)
map_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g
pt✝ : C
app✝ : (X : J) → (Functor.mk toPrefunctor✝).obj X ⟶ ((Functor.const J).obj pt✝).obj X
naturality✝ :
  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), (Functor.mk toPrefunctor✝).map f ≫ app✝ Y = app✝ X ≫ ((Functor.const J).obj pt✝).map f
h : IsColimit ((𝟭 C).mapCocone { pt := pt✝, ι := NatTrans.mk app✝ })
s : Cocone (Functor.mk toPrefunctor✝)
j : J
⊢ { pt := pt✝, ι := NatTrans.mk app✝ }.ι.app j ≫
      (fun s => IsColimit.desc h { pt := s.pt, ι := NatTrans.mk fun j => s.ι.app j }) s =
    s.ι.app j

Next tactic:
cases s
instance idReflectsColimits : ReflectsColimitsOfSize.{w, w'} (𝟭 C) where
  reflectsColimitsOfShape {J} 𝒥 :=
    {
      reflectsColimit := fun {K} =>
        ⟨fun {c} h =>
          ⟨fun s => h.desc ⟨s.pt, fun j => s.ι.app j, fun j j' f => s.ι.naturality f⟩, by
            cases K; rcases c with ⟨_, _, _⟩; intro s j; cases s; 

Proof state:
case mk.mk.mk.mk
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
J✝ : Type w
inst✝ : Category.{w', w} J✝
K : J✝ ⥤ C
J : Type w'
𝒥 : Category.{w, w'} J
toPrefunctor✝ : J ⥤q C
map_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)
map_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g
pt✝¹ : C
app✝ : (X : J) → (Functor.mk toPrefunctor✝).obj X ⟶ ((Functor.const J).obj pt✝¹).obj X
naturality✝ :
  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), (Functor.mk toPrefunctor✝).map f ≫ app✝ Y = app✝ X ≫ ((Functor.const J).obj pt✝¹).map f
h : IsColimit ((𝟭 C).mapCocone { pt := pt✝¹, ι := NatTrans.mk app✝ })
j : J
pt✝ : C
ι✝ : Functor.mk toPrefunctor✝ ⟶ (Functor.const J).obj pt✝
⊢ { pt := pt✝¹, ι := NatTrans.mk app✝ }.ι.app j ≫
      (fun s => IsColimit.desc h { pt := s.pt, ι := NatTrans.mk fun j => s.ι.app j }) { pt := pt✝, ι := ι✝ } =
    { pt := pt✝, ι := ι✝ }.ι.app j

Next tactic:
exact h.fac _ j
instance idReflectsColimits : ReflectsColimitsOfSize.{w, w'} (𝟭 C) where
  reflectsColimitsOfShape {J} 𝒥 :=
    {
      reflectsColimit := fun {K} =>
        ⟨fun {c} h =>
          ⟨fun s => h.desc ⟨s.pt, fun j => s.ι.app j, fun j j' f => s.ι.naturality f⟩, by
            cases K; rcases c with ⟨_, _, _⟩; intro s j; cases s; exact h.fac _ j, by
            

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
J✝ : Type w
inst✝ : Category.{w', w} J✝
K✝ : J✝ ⥤ C
J : Type w'
𝒥 : Category.{w, w'} J
K : J ⥤ C
c : Cocone K
h : IsColimit ((𝟭 C).mapCocone c)
⊢ ∀ (s : Cocone K) (m : c.pt ⟶ s.pt),
    (∀ (j : J), c.ι.app j ≫ m = s.ι.app j) →
      m = (fun s => IsColimit.desc h { pt := s.pt, ι := NatTrans.mk fun j => s.ι.app j }) s

Next tactic:
cases K
instance idReflectsColimits : ReflectsColimitsOfSize.{w, w'} (𝟭 C) where
  reflectsColimitsOfShape {J} 𝒥 :=
    {
      reflectsColimit := fun {K} =>
        ⟨fun {c} h =>
          ⟨fun s => h.desc ⟨s.pt, fun j => s.ι.app j, fun j j' f => s.ι.naturality f⟩, by
            cases K; rcases c with ⟨_, _, _⟩; intro s j; cases s; exact h.fac _ j, by
            cases K; 

Proof state:
case mk
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
J✝ : Type w
inst✝ : Category.{w', w} J✝
K : J✝ ⥤ C
J : Type w'
𝒥 : Category.{w, w'} J
toPrefunctor✝ : J ⥤q C
map_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)
map_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g
c : Cocone (Functor.mk toPrefunctor✝)
h : IsColimit ((𝟭 C).mapCocone c)
⊢ ∀ (s : Cocone (Functor.mk toPrefunctor✝)) (m : c.pt ⟶ s.pt),
    (∀ (j : J), c.ι.app j ≫ m = s.ι.app j) →
      m = (fun s => IsColimit.desc h { pt := s.pt, ι := NatTrans.mk fun j => s.ι.app j }) s

Next tactic:
rcases c with ⟨_, _, _⟩
instance idReflectsColimits : ReflectsColimitsOfSize.{w, w'} (𝟭 C) where
  reflectsColimitsOfShape {J} 𝒥 :=
    {
      reflectsColimit := fun {K} =>
        ⟨fun {c} h =>
          ⟨fun s => h.desc ⟨s.pt, fun j => s.ι.app j, fun j j' f => s.ι.naturality f⟩, by
            cases K; rcases c with ⟨_, _, _⟩; intro s j; cases s; exact h.fac _ j, by
            cases K; rcases c with ⟨_, _, _⟩; 

Proof state:
case mk.mk.mk
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
J✝ : Type w
inst✝ : Category.{w', w} J✝
K : J✝ ⥤ C
J : Type w'
𝒥 : Category.{w, w'} J
toPrefunctor✝ : J ⥤q C
map_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)
map_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g
pt✝ : C
app✝ : (X : J) → (Functor.mk toPrefunctor✝).obj X ⟶ ((Functor.const J).obj pt✝).obj X
naturality✝ :
  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), (Functor.mk toPrefunctor✝).map f ≫ app✝ Y = app✝ X ≫ ((Functor.const J).obj pt✝).map f
h : IsColimit ((𝟭 C).mapCocone { pt := pt✝, ι := NatTrans.mk app✝ })
⊢ ∀ (s : Cocone (Functor.mk toPrefunctor✝)) (m : { pt := pt✝, ι := NatTrans.mk app✝ }.pt ⟶ s.pt),
    (∀ (j : J), { pt := pt✝, ι := NatTrans.mk app✝ }.ι.app j ≫ m = s.ι.app j) →
      m = (fun s => IsColimit.desc h { pt := s.pt, ι := NatTrans.mk fun j => s.ι.app j }) s

Next tactic:
intro s m w
instance idReflectsColimits : ReflectsColimitsOfSize.{w, w'} (𝟭 C) where
  reflectsColimitsOfShape {J} 𝒥 :=
    {
      reflectsColimit := fun {K} =>
        ⟨fun {c} h =>
          ⟨fun s => h.desc ⟨s.pt, fun j => s.ι.app j, fun j j' f => s.ι.naturality f⟩, by
            cases K; rcases c with ⟨_, _, _⟩; intro s j; cases s; exact h.fac _ j, by
            cases K; rcases c with ⟨_, _, _⟩; intro s m w; 

Proof state:
case mk.mk.mk
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
J✝ : Type w
inst✝ : Category.{w', w} J✝
K : J✝ ⥤ C
J : Type w'
𝒥 : Category.{w, w'} J
toPrefunctor✝ : J ⥤q C
map_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)
map_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g
pt✝ : C
app✝ : (X : J) → (Functor.mk toPrefunctor✝).obj X ⟶ ((Functor.const J).obj pt✝).obj X
naturality✝ :
  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), (Functor.mk toPrefunctor✝).map f ≫ app✝ Y = app✝ X ≫ ((Functor.const J).obj pt✝).map f
h : IsColimit ((𝟭 C).mapCocone { pt := pt✝, ι := NatTrans.mk app✝ })
s : Cocone (Functor.mk toPrefunctor✝)
m : { pt := pt✝, ι := NatTrans.mk app✝ }.pt ⟶ s.pt
w : ∀ (j : J), { pt := pt✝, ι := NatTrans.mk app✝ }.ι.app j ≫ m = s.ι.app j
⊢ m = (fun s => IsColimit.desc h { pt := s.pt, ι := NatTrans.mk fun j => s.ι.app j }) s

Next tactic:
rcases s with ⟨_, _, _⟩
instance idReflectsColimits : ReflectsColimitsOfSize.{w, w'} (𝟭 C) where
  reflectsColimitsOfShape {J} 𝒥 :=
    {
      reflectsColimit := fun {K} =>
        ⟨fun {c} h =>
          ⟨fun s => h.desc ⟨s.pt, fun j => s.ι.app j, fun j j' f => s.ι.naturality f⟩, by
            cases K; rcases c with ⟨_, _, _⟩; intro s j; cases s; exact h.fac _ j, by
            cases K; rcases c with ⟨_, _, _⟩; intro s m w; rcases s with ⟨_, _, _⟩;
              

Proof state:
case mk.mk.mk.mk.mk
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
J✝ : Type w
inst✝ : Category.{w', w} J✝
K : J✝ ⥤ C
J : Type w'
𝒥 : Category.{w, w'} J
toPrefunctor✝ : J ⥤q C
map_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)
map_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g
pt✝¹ : C
app✝¹ : (X : J) → (Functor.mk toPrefunctor✝).obj X ⟶ ((Functor.const J).obj pt✝¹).obj X
naturality✝¹ :
  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), (Functor.mk toPrefunctor✝).map f ≫ app✝¹ Y = app✝¹ X ≫ ((Functor.const J).obj pt✝¹).map f
h : IsColimit ((𝟭 C).mapCocone { pt := pt✝¹, ι := NatTrans.mk app✝¹ })
pt✝ : C
app✝ : (X : J) → (Functor.mk toPrefunctor✝).obj X ⟶ ((Functor.const J).obj pt✝).obj X
naturality✝ :
  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), (Functor.mk toPrefunctor✝).map f ≫ app✝ Y = app✝ X ≫ ((Functor.const J).obj pt✝).map f
m : { pt := pt✝¹, ι := NatTrans.mk app✝¹ }.pt ⟶ { pt := pt✝, ι := NatTrans.mk app✝ }.pt
w : ∀ (j : J), { pt := pt✝¹, ι := NatTrans.mk app✝¹ }.ι.app j ≫ m = { pt := pt✝, ι := NatTrans.mk app✝ }.ι.app j
⊢ m =
    (fun s => IsColimit.desc h { pt := s.pt, ι := NatTrans.mk fun j => s.ι.app j }) { pt := pt✝, ι := NatTrans.mk app✝ }

Next tactic:
exact h.uniq _ m w
/-- If `F ⋙ G` preserves limits for `K`, and `G` reflects limits for `K ⋙ F`,
then `F` preserves limits for `K`. -/
def preservesLimitOfReflectsOfPreserves [PreservesLimit K (F ⋙ G)] [ReflectsLimit (K ⋙ F) G] :
    PreservesLimit K F :=
  ⟨fun h => by
    

Proof state:
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
J : Type w
inst✝² : Category.{w', w} J
K : J ⥤ C
E : Type u₃
ℰ : Category.{v₃, u₃} E
F : C ⥤ D
G : D ⥤ E
inst✝¹ : PreservesLimit K (F ⋙ G)
inst✝ : ReflectsLimit (K ⋙ F) G
c✝ : Cone K
h : IsLimit c✝
⊢ IsLimit (F.mapCone c✝)

Next tactic:
apply isLimitOfReflects G
/-- If `F ⋙ G` preserves limits for `K`, and `G` reflects limits for `K ⋙ F`,
then `F` preserves limits for `K`. -/
def preservesLimitOfReflectsOfPreserves [PreservesLimit K (F ⋙ G)] [ReflectsLimit (K ⋙ F) G] :
    PreservesLimit K F :=
  ⟨fun h => by
    apply isLimitOfReflects G
    

Proof state:
case t
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
J : Type w
inst✝² : Category.{w', w} J
K : J ⥤ C
E : Type u₃
ℰ : Category.{v₃, u₃} E
F : C ⥤ D
G : D ⥤ E
inst✝¹ : PreservesLimit K (F ⋙ G)
inst✝ : ReflectsLimit (K ⋙ F) G
c✝ : Cone K
h : IsLimit c✝
⊢ IsLimit (G.mapCone (F.mapCone c✝))

Next tactic:
apply isLimitOfPreserves (F ⋙ G) h
/-- Transfer reflection of limits along a natural isomorphism in the diagram. -/
def reflectsLimitOfIsoDiagram {K₁ K₂ : J ⥤ C} (F : C ⥤ D) (h : K₁ ≅ K₂) [ReflectsLimit K₁ F] :
    ReflectsLimit K₂ F where
  reflects {c} t := by
    

Proof state:
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
J : Type w
inst✝¹ : Category.{w', w} J
K : J ⥤ C
E : Type u₃
ℰ : Category.{v₃, u₃} E
F✝ : C ⥤ D
G : D ⥤ E
K₁ K₂ : J ⥤ C
F : C ⥤ D
h : K₁ ≅ K₂
inst✝ : ReflectsLimit K₁ F
c : Cone K₂
t : IsLimit (F.mapCone c)
⊢ IsLimit c

Next tactic:
apply IsLimit.postcomposeInvEquiv h c (isLimitOfReflects F _)
/-- Transfer reflection of limits along a natural isomorphism in the diagram. -/
def reflectsLimitOfIsoDiagram {K₁ K₂ : J ⥤ C} (F : C ⥤ D) (h : K₁ ≅ K₂) [ReflectsLimit K₁ F] :
    ReflectsLimit K₂ F where
  reflects {c} t := by
    apply IsLimit.postcomposeInvEquiv h c (isLimitOfReflects F _)
    

Proof state:
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
J : Type w
inst✝¹ : Category.{w', w} J
K : J ⥤ C
E : Type u₃
ℰ : Category.{v₃, u₃} E
F✝ : C ⥤ D
G : D ⥤ E
K₁ K₂ : J ⥤ C
F : C ⥤ D
h : K₁ ≅ K₂
inst✝ : ReflectsLimit K₁ F
c : Cone K₂
t : IsLimit (F.mapCone c)
⊢ IsLimit (F.mapCone ((Cones.postcompose h.inv).obj c))

Next tactic:
apply ((IsLimit.postcomposeInvEquiv (isoWhiskerRight h F : _) _).symm t).ofIsoLimit _
/-- Transfer reflection of limits along a natural isomorphism in the diagram. -/
def reflectsLimitOfIsoDiagram {K₁ K₂ : J ⥤ C} (F : C ⥤ D) (h : K₁ ≅ K₂) [ReflectsLimit K₁ F] :
    ReflectsLimit K₂ F where
  reflects {c} t := by
    apply IsLimit.postcomposeInvEquiv h c (isLimitOfReflects F _)
    apply ((IsLimit.postcomposeInvEquiv (isoWhiskerRight h F : _) _).symm t).ofIsoLimit _
    

Proof state:
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
J : Type w
inst✝¹ : Category.{w', w} J
K : J ⥤ C
E : Type u₃
ℰ : Category.{v₃, u₃} E
F✝ : C ⥤ D
G : D ⥤ E
K₁ K₂ : J ⥤ C
F : C ⥤ D
h : K₁ ≅ K₂
inst✝ : ReflectsLimit K₁ F
c : Cone K₂
t : IsLimit (F.mapCone c)
⊢ (Cones.postcompose (isoWhiskerRight h F).inv).obj (F.mapCone c) ≅ F.mapCone ((Cones.postcompose h.inv).obj c)

Next tactic:
exact Cones.ext (Iso.refl _)
/-- Transfer reflection of limits along an equivalence in the shape. -/
def reflectsLimitsOfShapeOfEquiv {J' : Type w₂} [Category.{w₂'} J'] (e : J ≌ J') (F : C ⥤ D)
    [ReflectsLimitsOfShape J F] : ReflectsLimitsOfShape J' F where
  reflectsLimit {K} :=
    {
      reflects := fun {c} t => by
        

Proof state:
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
J : Type w
inst✝² : Category.{w', w} J
K✝ : J ⥤ C
E : Type u₃
ℰ : Category.{v₃, u₃} E
F✝ : C ⥤ D
G : D ⥤ E
J' : Type w₂
inst✝¹ : Category.{w₂', w₂} J'
e : J ≌ J'
F : C ⥤ D
inst✝ : ReflectsLimitsOfShape J F
K : J' ⥤ C
c : Cone K
t : IsLimit (F.mapCone c)
⊢ IsLimit c

Next tactic:
apply IsLimit.ofWhiskerEquivalence e
/-- Transfer reflection of limits along an equivalence in the shape. -/
def reflectsLimitsOfShapeOfEquiv {J' : Type w₂} [Category.{w₂'} J'] (e : J ≌ J') (F : C ⥤ D)
    [ReflectsLimitsOfShape J F] : ReflectsLimitsOfShape J' F where
  reflectsLimit {K} :=
    {
      reflects := fun {c} t => by
        apply IsLimit.ofWhiskerEquivalence e
        

Proof state:
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
J : Type w
inst✝² : Category.{w', w} J
K✝ : J ⥤ C
E : Type u₃
ℰ : Category.{v₃, u₃} E
F✝ : C ⥤ D
G : D ⥤ E
J' : Type w₂
inst✝¹ : Category.{w₂', w₂} J'
e : J ≌ J'
F : C ⥤ D
inst✝ : ReflectsLimitsOfShape J F
K : J' ⥤ C
c : Cone K
t : IsLimit (F.mapCone c)
⊢ IsLimit (Cone.whisker e.functor c)

Next tactic:
apply isLimitOfReflects F
/-- Transfer reflection of limits along an equivalence in the shape. -/
def reflectsLimitsOfShapeOfEquiv {J' : Type w₂} [Category.{w₂'} J'] (e : J ≌ J') (F : C ⥤ D)
    [ReflectsLimitsOfShape J F] : ReflectsLimitsOfShape J' F where
  reflectsLimit {K} :=
    {
      reflects := fun {c} t => by
        apply IsLimit.ofWhiskerEquivalence e
        apply isLimitOfReflects F
        

Proof state:
case t
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
J : Type w
inst✝² : Category.{w', w} J
K✝ : J ⥤ C
E : Type u₃
ℰ : Category.{v₃, u₃} E
F✝ : C ⥤ D
G : D ⥤ E
J' : Type w₂
inst✝¹ : Category.{w₂', w₂} J'
e : J ≌ J'
F : C ⥤ D
inst✝ : ReflectsLimitsOfShape J F
K : J' ⥤ C
c : Cone K
t : IsLimit (F.mapCone c)
⊢ IsLimit (F.mapCone (Cone.whisker e.functor c))

Next tactic:
apply IsLimit.ofIsoLimit _ (Functor.mapConeWhisker _).symm
/-- Transfer reflection of limits along an equivalence in the shape. -/
def reflectsLimitsOfShapeOfEquiv {J' : Type w₂} [Category.{w₂'} J'] (e : J ≌ J') (F : C ⥤ D)
    [ReflectsLimitsOfShape J F] : ReflectsLimitsOfShape J' F where
  reflectsLimit {K} :=
    {
      reflects := fun {c} t => by
        apply IsLimit.ofWhiskerEquivalence e
        apply isLimitOfReflects F
        apply IsLimit.ofIsoLimit _ (Functor.mapConeWhisker _).symm
        

Proof state:
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
J : Type w
inst✝² : Category.{w', w} J
K✝ : J ⥤ C
E : Type u₃
ℰ : Category.{v₃, u₃} E
F✝ : C ⥤ D
G : D ⥤ E
J' : Type w₂
inst✝¹ : Category.{w₂', w₂} J'
e : J ≌ J'
F : C ⥤ D
inst✝ : ReflectsLimitsOfShape J F
K : J' ⥤ C
c : Cone K
t : IsLimit (F.mapCone c)
⊢ IsLimit (Cone.whisker e.functor (F.mapCone c))

Next tactic:
exact IsLimit.whiskerEquivalence t _
/-- If the limit of `F` exists and `G` preserves it, then if `G` reflects isomorphisms then it
reflects the limit of `F`.
-/ -- Porting note: previous behavior of apply pushed instance holes into hypotheses, this errors
def reflectsLimitOfReflectsIsomorphisms (F : J ⥤ C) (G : C ⥤ D) [ReflectsIsomorphisms G]
    [HasLimit F] [PreservesLimit F G] : ReflectsLimit F G where
  reflects {c} t := by
    

Proof state:
C : Type u₁
inst✝⁵ : Category.{v₁, u₁} C
D : Type u₂
inst✝⁴ : Category.{v₂, u₂} D
J : Type w
inst✝³ : Category.{w', w} J
K : J ⥤ C
E : Type u₃
ℰ : Category.{v₃, u₃} E
F✝ : C ⥤ D
G✝ : D ⥤ E
F : J ⥤ C
G : C ⥤ D
inst✝² : ReflectsIsomorphisms G
inst✝¹ : HasLimit F
inst✝ : PreservesLimit F G
c : Cone F
t : IsLimit (G.mapCone c)
⊢ IsLimit c

Next tactic:
suffices IsIso (IsLimit.lift (limit.isLimit F) c) from by
      apply IsLimit.ofPointIso (limit.isLimit F)
/-- If the limit of `F` exists and `G` preserves it, then if `G` reflects isomorphisms then it
reflects the limit of `F`.
-/ -- Porting note: previous behavior of apply pushed instance holes into hypotheses, this errors
def reflectsLimitOfReflectsIsomorphisms (F : J ⥤ C) (G : C ⥤ D) [ReflectsIsomorphisms G]
    [HasLimit F] [PreservesLimit F G] : ReflectsLimit F G where
  reflects {c} t := by
    suffices IsIso (IsLimit.lift (limit.isLimit F) c) from by
      

Proof state:
C : Type u₁
inst✝⁵ : Category.{v₁, u₁} C
D : Type u₂
inst✝⁴ : Category.{v₂, u₂} D
J : Type w
inst✝³ : Category.{w', w} J
K : J ⥤ C
E : Type u₃
ℰ : Category.{v₃, u₃} E
F✝ : C ⥤ D
G✝ : D ⥤ E
F : J ⥤ C
G : C ⥤ D
inst✝² : ReflectsIsomorphisms G
inst✝¹ : HasLimit F
inst✝ : PreservesLimit F G
c : Cone F
t : IsLimit (G.mapCone c)
this : IsIso (IsLimit.lift (limit.isLimit F) c)
⊢ IsLimit c

Next tactic:
apply IsLimit.ofPointIso (limit.isLimit F)
/-- If the limit of `F` exists and `G` preserves it, then if `G` reflects isomorphisms then it
reflects the limit of `F`.
-/ -- Porting note: previous behavior of apply pushed instance holes into hypotheses, this errors
def reflectsLimitOfReflectsIsomorphisms (F : J ⥤ C) (G : C ⥤ D) [ReflectsIsomorphisms G]
    [HasLimit F] [PreservesLimit F G] : ReflectsLimit F G where
  reflects {c} t := by
    suffices IsIso (IsLimit.lift (limit.isLimit F) c) from by
      apply IsLimit.ofPointIso (limit.isLimit F)
    

Proof state:
C : Type u₁
inst✝⁵ : Category.{v₁, u₁} C
D : Type u₂
inst✝⁴ : Category.{v₂, u₂} D
J : Type w
inst✝³ : Category.{w', w} J
K : J ⥤ C
E : Type u₃
ℰ : Category.{v₃, u₃} E
F✝ : C ⥤ D
G✝ : D ⥤ E
F : J ⥤ C
G : C ⥤ D
inst✝² : ReflectsIsomorphisms G
inst✝¹ : HasLimit F
inst✝ : PreservesLimit F G
c : Cone F
t : IsLimit (G.mapCone c)
⊢ IsIso (IsLimit.lift (limit.isLimit F) c)

Next tactic:
change IsIso ((Cones.forget _).map ((limit.isLimit F).liftConeMorphism c))
/-- If the limit of `F` exists and `G` preserves it, then if `G` reflects isomorphisms then it
reflects the limit of `F`.
-/ -- Porting note: previous behavior of apply pushed instance holes into hypotheses, this errors
def reflectsLimitOfReflectsIsomorphisms (F : J ⥤ C) (G : C ⥤ D) [ReflectsIsomorphisms G]
    [HasLimit F] [PreservesLimit F G] : ReflectsLimit F G where
  reflects {c} t := by
    suffices IsIso (IsLimit.lift (limit.isLimit F) c) from by
      apply IsLimit.ofPointIso (limit.isLimit F)
    change IsIso ((Cones.forget _).map ((limit.isLimit F).liftConeMorphism c))
    

Proof state:
C : Type u₁
inst✝⁵ : Category.{v₁, u₁} C
D : Type u₂
inst✝⁴ : Category.{v₂, u₂} D
J : Type w
inst✝³ : Category.{w', w} J
K : J ⥤ C
E : Type u₃
ℰ : Category.{v₃, u₃} E
F✝ : C ⥤ D
G✝ : D ⥤ E
F : J ⥤ C
G : C ⥤ D
inst✝² : ReflectsIsomorphisms G
inst✝¹ : HasLimit F
inst✝ : PreservesLimit F G
c : Cone F
t : IsLimit (G.mapCone c)
⊢ IsIso ((Cones.forget F).map (IsLimit.liftConeMorphism (limit.isLimit F) c))

Next tactic:
suffices IsIso (IsLimit.liftConeMorphism (limit.isLimit F) c) from by
      apply (Cones.forget F).map_isIso _