l3lab/ntp-mathlib huggingface dataset:
theorem RespectsIso.of_respects_arrow_iso (P : MorphismProperty C)
    (hP : ∀ (f g : Arrow C) (_ : f ≅ g) (_ : P f.hom), P g.hom) : RespectsIso P := by
  constructor
  · intro X Y Z e f hf
    

Proof state:
case left
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.27858, u_1} D
P : MorphismProperty C
hP : ∀ (f g : Arrow C), (f ≅ g) → P f.hom → P g.hom
X Y Z : C
e : X ≅ Y
f : Y ⟶ Z
hf : P f
⊢ P (e.hom ≫ f)

Next tactic:
refine' hP (Arrow.mk f) (Arrow.mk (e.hom ≫ f)) (Arrow.isoMk e.symm (Iso.refl _) _) hf
theorem RespectsIso.of_respects_arrow_iso (P : MorphismProperty C)
    (hP : ∀ (f g : Arrow C) (_ : f ≅ g) (_ : P f.hom), P g.hom) : RespectsIso P := by
  constructor
  · intro X Y Z e f hf
    refine' hP (Arrow.mk f) (Arrow.mk (e.hom ≫ f)) (Arrow.isoMk e.symm (Iso.refl _) _) hf
    

Proof state:
case left
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.27858, u_1} D
P : MorphismProperty C
hP : ∀ (f g : Arrow C), (f ≅ g) → P f.hom → P g.hom
X Y Z : C
e : X ≅ Y
f : Y ⟶ Z
hf : P f
⊢ e.symm.hom ≫ (Arrow.mk (e.hom ≫ f)).hom = (Arrow.mk f).hom ≫ (Iso.refl (Arrow.mk f).right).hom

Next tactic:
dsimp
theorem RespectsIso.of_respects_arrow_iso (P : MorphismProperty C)
    (hP : ∀ (f g : Arrow C) (_ : f ≅ g) (_ : P f.hom), P g.hom) : RespectsIso P := by
  constructor
  · intro X Y Z e f hf
    refine' hP (Arrow.mk f) (Arrow.mk (e.hom ≫ f)) (Arrow.isoMk e.symm (Iso.refl _) _) hf
    dsimp
    

Proof state:
case left
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.27858, u_1} D
P : MorphismProperty C
hP : ∀ (f g : Arrow C), (f ≅ g) → P f.hom → P g.hom
X Y Z : C
e : X ≅ Y
f : Y ⟶ Z
hf : P f
⊢ e.inv ≫ e.hom ≫ f = f ≫ 𝟙 Z

Next tactic:
simp only [Iso.inv_hom_id_assoc, Category.comp_id]
theorem RespectsIso.of_respects_arrow_iso (P : MorphismProperty C)
    (hP : ∀ (f g : Arrow C) (_ : f ≅ g) (_ : P f.hom), P g.hom) : RespectsIso P := by
  constructor
  · intro X Y Z e f hf
    refine' hP (Arrow.mk f) (Arrow.mk (e.hom ≫ f)) (Arrow.isoMk e.symm (Iso.refl _) _) hf
    dsimp
    simp only [Iso.inv_hom_id_assoc, Category.comp_id]
  · 

Proof state:
case right
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.27858, u_1} D
P : MorphismProperty C
hP : ∀ (f g : Arrow C), (f ≅ g) → P f.hom → P g.hom
⊢ ∀ {X Y Z : C} (e : Y ≅ Z) (f : X ⟶ Y), P f → P (f ≫ e.hom)

Next tactic:
intro X Y Z e f hf
theorem RespectsIso.of_respects_arrow_iso (P : MorphismProperty C)
    (hP : ∀ (f g : Arrow C) (_ : f ≅ g) (_ : P f.hom), P g.hom) : RespectsIso P := by
  constructor
  · intro X Y Z e f hf
    refine' hP (Arrow.mk f) (Arrow.mk (e.hom ≫ f)) (Arrow.isoMk e.symm (Iso.refl _) _) hf
    dsimp
    simp only [Iso.inv_hom_id_assoc, Category.comp_id]
  · intro X Y Z e f hf
    

Proof state:
case right
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.27858, u_1} D
P : MorphismProperty C
hP : ∀ (f g : Arrow C), (f ≅ g) → P f.hom → P g.hom
X Y Z : C
e : Y ≅ Z
f : X ⟶ Y
hf : P f
⊢ P (f ≫ e.hom)

Next tactic:
refine' hP (Arrow.mk f) (Arrow.mk (f ≫ e.hom)) (Arrow.isoMk (Iso.refl _) e _) hf
theorem RespectsIso.of_respects_arrow_iso (P : MorphismProperty C)
    (hP : ∀ (f g : Arrow C) (_ : f ≅ g) (_ : P f.hom), P g.hom) : RespectsIso P := by
  constructor
  · intro X Y Z e f hf
    refine' hP (Arrow.mk f) (Arrow.mk (e.hom ≫ f)) (Arrow.isoMk e.symm (Iso.refl _) _) hf
    dsimp
    simp only [Iso.inv_hom_id_assoc, Category.comp_id]
  · intro X Y Z e f hf
    refine' hP (Arrow.mk f) (Arrow.mk (f ≫ e.hom)) (Arrow.isoMk (Iso.refl _) e _) hf
    

Proof state:
case right
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.27858, u_1} D
P : MorphismProperty C
hP : ∀ (f g : Arrow C), (f ≅ g) → P f.hom → P g.hom
X Y Z : C
e : Y ≅ Z
f : X ⟶ Y
hf : P f
⊢ (Iso.refl (Arrow.mk f).left).hom ≫ (Arrow.mk (f ≫ e.hom)).hom = (Arrow.mk f).hom ≫ e.hom

Next tactic:
dsimp
theorem RespectsIso.of_respects_arrow_iso (P : MorphismProperty C)
    (hP : ∀ (f g : Arrow C) (_ : f ≅ g) (_ : P f.hom), P g.hom) : RespectsIso P := by
  constructor
  · intro X Y Z e f hf
    refine' hP (Arrow.mk f) (Arrow.mk (e.hom ≫ f)) (Arrow.isoMk e.symm (Iso.refl _) _) hf
    dsimp
    simp only [Iso.inv_hom_id_assoc, Category.comp_id]
  · intro X Y Z e f hf
    refine' hP (Arrow.mk f) (Arrow.mk (f ≫ e.hom)) (Arrow.isoMk (Iso.refl _) e _) hf
    dsimp
    

Proof state:
case right
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.27858, u_1} D
P : MorphismProperty C
hP : ∀ (f g : Arrow C), (f ≅ g) → P f.hom → P g.hom
X Y Z : C
e : Y ≅ Z
f : X ⟶ Y
hf : P f
⊢ 𝟙 X ≫ f ≫ e.hom = f ≫ e.hom

Next tactic:
simp only [Category.id_comp]
lemma RespectsIso.isoClosure_eq {P : MorphismProperty C} (hP : P.RespectsIso) :
    P.isoClosure = P := by
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.29996, u_1} D
P : MorphismProperty C
hP : RespectsIso P
⊢ isoClosure P = P

Next tactic:
refine' le_antisymm _ (P.subset_isoClosure)
lemma RespectsIso.isoClosure_eq {P : MorphismProperty C} (hP : P.RespectsIso) :
    P.isoClosure = P := by
  refine' le_antisymm _ (P.subset_isoClosure)
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.29996, u_1} D
P : MorphismProperty C
hP : RespectsIso P
⊢ isoClosure P ≤ P

Next tactic:
intro X Y f ⟨X', Y', f', hf', ⟨e⟩⟩
lemma RespectsIso.isoClosure_eq {P : MorphismProperty C} (hP : P.RespectsIso) :
    P.isoClosure = P := by
  refine' le_antisymm _ (P.subset_isoClosure)
  intro X Y f ⟨X', Y', f', hf', ⟨e⟩⟩
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.29996, u_1} D
P : MorphismProperty C
hP : RespectsIso P
X Y : C
f : X ⟶ Y
X' Y' : C
f' : X' ⟶ Y'
hf' : P f'
e : Arrow.mk f' ≅ Arrow.mk f
⊢ P f

Next tactic:
exact (hP.arrow_mk_iso_iff e).1 hf'
theorem StableUnderBaseChange.mk {P : MorphismProperty C} [HasPullbacks C] (hP₁ : RespectsIso P)
    (hP₂ : ∀ (X Y S : C) (f : X ⟶ S) (g : Y ⟶ S) (_ : P g), P (pullback.fst : pullback f g ⟶ X)) :
    StableUnderBaseChange P := fun X Y Y' S f g f' g' sq hg => by
  

Proof state:
C : Type u
inst✝² : Category.{v, u} C
D : Type u_1
inst✝¹ : Category.{?u.30658, u_1} D
P : MorphismProperty C
inst✝ : HasPullbacks C
hP₁ : RespectsIso P
hP₂ : ∀ (X Y S : C) (f : X ⟶ S) (g : Y ⟶ S), P g → P pullback.fst
X Y Y' S : C
f : X ⟶ S
g : Y ⟶ S
f' : Y' ⟶ Y
g' : Y' ⟶ X
sq : IsPullback f' g' g f
hg : P g
⊢ P g'

Next tactic:
let e := sq.flip.isoPullback
theorem StableUnderBaseChange.mk {P : MorphismProperty C} [HasPullbacks C] (hP₁ : RespectsIso P)
    (hP₂ : ∀ (X Y S : C) (f : X ⟶ S) (g : Y ⟶ S) (_ : P g), P (pullback.fst : pullback f g ⟶ X)) :
    StableUnderBaseChange P := fun X Y Y' S f g f' g' sq hg => by
  let e := sq.flip.isoPullback
  

Proof state:
C : Type u
inst✝² : Category.{v, u} C
D : Type u_1
inst✝¹ : Category.{?u.30658, u_1} D
P : MorphismProperty C
inst✝ : HasPullbacks C
hP₁ : RespectsIso P
hP₂ : ∀ (X Y S : C) (f : X ⟶ S) (g : Y ⟶ S), P g → P pullback.fst
X Y Y' S : C
f : X ⟶ S
g : Y ⟶ S
f' : Y' ⟶ Y
g' : Y' ⟶ X
sq : IsPullback f' g' g f
hg : P g
e : Y' ≅ pullback f g := IsPullback.isoPullback (_ : IsPullback g' f' f g)
⊢ P g'

Next tactic:
rw [← hP₁.cancel_left_isIso e.inv, sq.flip.isoPullback_inv_fst]
theorem StableUnderBaseChange.mk {P : MorphismProperty C} [HasPullbacks C] (hP₁ : RespectsIso P)
    (hP₂ : ∀ (X Y S : C) (f : X ⟶ S) (g : Y ⟶ S) (_ : P g), P (pullback.fst : pullback f g ⟶ X)) :
    StableUnderBaseChange P := fun X Y Y' S f g f' g' sq hg => by
  let e := sq.flip.isoPullback
  rw [← hP₁.cancel_left_isIso e.inv, sq.flip.isoPullback_inv_fst]
  

Proof state:
C : Type u
inst✝² : Category.{v, u} C
D : Type u_1
inst✝¹ : Category.{?u.30658, u_1} D
P : MorphismProperty C
inst✝ : HasPullbacks C
hP₁ : RespectsIso P
hP₂ : ∀ (X Y S : C) (f : X ⟶ S) (g : Y ⟶ S), P g → P pullback.fst
X Y Y' S : C
f : X ⟶ S
g : Y ⟶ S
f' : Y' ⟶ Y
g' : Y' ⟶ X
sq : IsPullback f' g' g f
hg : P g
e : Y' ≅ pullback f g := IsPullback.isoPullback (_ : IsPullback g' f' f g)
⊢ P pullback.fst

Next tactic:
exact hP₂ _ _ _ f g hg
theorem StableUnderBaseChange.respectsIso {P : MorphismProperty C} (hP : StableUnderBaseChange P) :
    RespectsIso P := by
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.33134, u_1} D
P : MorphismProperty C
hP : StableUnderBaseChange P
⊢ RespectsIso P

Next tactic:
apply RespectsIso.of_respects_arrow_iso
theorem StableUnderBaseChange.respectsIso {P : MorphismProperty C} (hP : StableUnderBaseChange P) :
    RespectsIso P := by
  apply RespectsIso.of_respects_arrow_iso
  

Proof state:
case hP
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.33134, u_1} D
P : MorphismProperty C
hP : StableUnderBaseChange P
⊢ ∀ (f g : Arrow C), (f ≅ g) → P f.hom → P g.hom

Next tactic:
intro f g e
theorem StableUnderBaseChange.respectsIso {P : MorphismProperty C} (hP : StableUnderBaseChange P) :
    RespectsIso P := by
  apply RespectsIso.of_respects_arrow_iso
  intro f g e
  

Proof state:
case hP
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.33134, u_1} D
P : MorphismProperty C
hP : StableUnderBaseChange P
f g : Arrow C
e : f ≅ g
⊢ P f.hom → P g.hom

Next tactic:
exact hP (IsPullback.of_horiz_isIso (CommSq.mk e.inv.w))
theorem StableUnderBaseChange.baseChange_map [HasPullbacks C] {P : MorphismProperty C}
    (hP : StableUnderBaseChange P) {S S' : C} (f : S' ⟶ S) {X Y : Over S} (g : X ⟶ Y)
    (H : P g.left) : P ((baseChange f).map g).left := by
  

Proof state:
C : Type u
inst✝² : Category.{v, u} C
D : Type u_1
inst✝¹ : Category.{?u.37457, u_1} D
inst✝ : HasPullbacks C
P : MorphismProperty C
hP : StableUnderBaseChange P
S S' : C
f : S' ⟶ S
X Y : Over S
g : X ⟶ Y
H : P g.left
⊢ P ((baseChange f).map g).left

Next tactic:
let e :=
    pullbackRightPullbackFstIso Y.hom f g.left ≪≫
      pullback.congrHom (g.w.trans (Category.comp_id _)) rfl
theorem StableUnderBaseChange.baseChange_map [HasPullbacks C] {P : MorphismProperty C}
    (hP : StableUnderBaseChange P) {S S' : C} (f : S' ⟶ S) {X Y : Over S} (g : X ⟶ Y)
    (H : P g.left) : P ((baseChange f).map g).left := by
  let e :=
    pullbackRightPullbackFstIso Y.hom f g.left ≪≫
      pullback.congrHom (g.w.trans (Category.comp_id _)) rfl
  

Proof state:
C : Type u
inst✝² : Category.{v, u} C
D : Type u_1
inst✝¹ : Category.{?u.37457, u_1} D
inst✝ : HasPullbacks C
P : MorphismProperty C
hP : StableUnderBaseChange P
S S' : C
f : S' ⟶ S
X Y : Over S
g : X ⟶ Y
H : P g.left
e : pullback g.left pullback.fst ≅ pullback X.hom f :=
  pullbackRightPullbackFstIso Y.hom f g.left ≪≫ pullback.congrHom (_ : (𝟭 C).map g.left ≫ Y.hom = X.hom) (_ : f = f)
⊢ P ((baseChange f).map g).left

Next tactic:
have : e.inv ≫ pullback.snd = ((baseChange f).map g).left := by
    ext <;> dsimp <;> simp
theorem StableUnderBaseChange.baseChange_map [HasPullbacks C] {P : MorphismProperty C}
    (hP : StableUnderBaseChange P) {S S' : C} (f : S' ⟶ S) {X Y : Over S} (g : X ⟶ Y)
    (H : P g.left) : P ((baseChange f).map g).left := by
  let e :=
    pullbackRightPullbackFstIso Y.hom f g.left ≪≫
      pullback.congrHom (g.w.trans (Category.comp_id _)) rfl
  have : e.inv ≫ pullback.snd = ((baseChange f).map g).left := by
    

Proof state:
C : Type u
inst✝² : Category.{v, u} C
D : Type u_1
inst✝¹ : Category.{?u.37457, u_1} D
inst✝ : HasPullbacks C
P : MorphismProperty C
hP : StableUnderBaseChange P
S S' : C
f : S' ⟶ S
X Y : Over S
g : X ⟶ Y
H : P g.left
e : pullback g.left pullback.fst ≅ pullback X.hom f :=
  pullbackRightPullbackFstIso Y.hom f g.left ≪≫ pullback.congrHom (_ : (𝟭 C).map g.left ≫ Y.hom = X.hom) (_ : f = f)
⊢ e.inv ≫ pullback.snd = ((baseChange f).map g).left

Next tactic:
ext
theorem StableUnderBaseChange.baseChange_map [HasPullbacks C] {P : MorphismProperty C}
    (hP : StableUnderBaseChange P) {S S' : C} (f : S' ⟶ S) {X Y : Over S} (g : X ⟶ Y)
    (H : P g.left) : P ((baseChange f).map g).left := by
  let e :=
    pullbackRightPullbackFstIso Y.hom f g.left ≪≫
      pullback.congrHom (g.w.trans (Category.comp_id _)) rfl
  have : e.inv ≫ pullback.snd = ((baseChange f).map g).left := by
    ext <;> 

Proof state:
case h₀
C : Type u
inst✝² : Category.{v, u} C
D : Type u_1
inst✝¹ : Category.{?u.37457, u_1} D
inst✝ : HasPullbacks C
P : MorphismProperty C
hP : StableUnderBaseChange P
S S' : C
f : S' ⟶ S
X Y : Over S
g : X ⟶ Y
H : P g.left
e : pullback g.left pullback.fst ≅ pullback X.hom f :=
  pullbackRightPullbackFstIso Y.hom f g.left ≪≫ pullback.congrHom (_ : (𝟭 C).map g.left ≫ Y.hom = X.hom) (_ : f = f)
⊢ (e.inv ≫ pullback.snd) ≫ pullback.fst = ((baseChange f).map g).left ≫ pullback.fst

Next tactic:
dsimp
theorem StableUnderBaseChange.baseChange_map [HasPullbacks C] {P : MorphismProperty C}
    (hP : StableUnderBaseChange P) {S S' : C} (f : S' ⟶ S) {X Y : Over S} (g : X ⟶ Y)
    (H : P g.left) : P ((baseChange f).map g).left := by
  let e :=
    pullbackRightPullbackFstIso Y.hom f g.left ≪≫
      pullback.congrHom (g.w.trans (Category.comp_id _)) rfl
  have : e.inv ≫ pullback.snd = ((baseChange f).map g).left := by
    ext <;> 

Proof state:
case h₁
C : Type u
inst✝² : Category.{v, u} C
D : Type u_1
inst✝¹ : Category.{?u.37457, u_1} D
inst✝ : HasPullbacks C
P : MorphismProperty C
hP : StableUnderBaseChange P
S S' : C
f : S' ⟶ S
X Y : Over S
g : X ⟶ Y
H : P g.left
e : pullback g.left pullback.fst ≅ pullback X.hom f :=
  pullbackRightPullbackFstIso Y.hom f g.left ≪≫ pullback.congrHom (_ : (𝟭 C).map g.left ≫ Y.hom = X.hom) (_ : f = f)
⊢ (e.inv ≫ pullback.snd) ≫ pullback.snd = ((baseChange f).map g).left ≫ pullback.snd

Next tactic:
dsimp
theorem StableUnderBaseChange.baseChange_map [HasPullbacks C] {P : MorphismProperty C}
    (hP : StableUnderBaseChange P) {S S' : C} (f : S' ⟶ S) {X Y : Over S} (g : X ⟶ Y)
    (H : P g.left) : P ((baseChange f).map g).left := by
  let e :=
    pullbackRightPullbackFstIso Y.hom f g.left ≪≫
      pullback.congrHom (g.w.trans (Category.comp_id _)) rfl
  have : e.inv ≫ pullback.snd = ((baseChange f).map g).left := by
    ext <;> dsimp <;> 

Proof state:
case h₀
C : Type u
inst✝² : Category.{v, u} C
D : Type u_1
inst✝¹ : Category.{?u.37457, u_1} D
inst✝ : HasPullbacks C
P : MorphismProperty C
hP : StableUnderBaseChange P
S S' : C
f : S' ⟶ S
X Y : Over S
g : X ⟶ Y
H : P g.left
e : pullback g.left pullback.fst ≅ pullback X.hom f :=
  pullbackRightPullbackFstIso Y.hom f g.left ≪≫ pullback.congrHom (_ : (𝟭 C).map g.left ≫ Y.hom = X.hom) (_ : f = f)
⊢ (((pullback.congrHom (_ : g.left ≫ Y.hom = X.hom) (_ : f = f)).inv ≫
          (pullbackRightPullbackFstIso Y.hom f g.left).inv) ≫
        pullback.snd) ≫
      pullback.fst =
    pullback.map X.hom f Y.hom f g.left (𝟙 S') (𝟙 S) (_ : X.hom ≫ 𝟙 S = g.left ≫ Y.hom) (_ : f ≫ 𝟙 S = 𝟙 S' ≫ f) ≫
      pullback.fst

Next tactic:
simp
theorem StableUnderBaseChange.baseChange_map [HasPullbacks C] {P : MorphismProperty C}
    (hP : StableUnderBaseChange P) {S S' : C} (f : S' ⟶ S) {X Y : Over S} (g : X ⟶ Y)
    (H : P g.left) : P ((baseChange f).map g).left := by
  let e :=
    pullbackRightPullbackFstIso Y.hom f g.left ≪≫
      pullback.congrHom (g.w.trans (Category.comp_id _)) rfl
  have : e.inv ≫ pullback.snd = ((baseChange f).map g).left := by
    ext <;> dsimp <;> 

Proof state:
case h₁
C : Type u
inst✝² : Category.{v, u} C
D : Type u_1
inst✝¹ : Category.{?u.37457, u_1} D
inst✝ : HasPullbacks C
P : MorphismProperty C
hP : StableUnderBaseChange P
S S' : C
f : S' ⟶ S
X Y : Over S
g : X ⟶ Y
H : P g.left
e : pullback g.left pullback.fst ≅ pullback X.hom f :=
  pullbackRightPullbackFstIso Y.hom f g.left ≪≫ pullback.congrHom (_ : (𝟭 C).map g.left ≫ Y.hom = X.hom) (_ : f = f)
⊢ (((pullback.congrHom (_ : g.left ≫ Y.hom = X.hom) (_ : f = f)).inv ≫
          (pullbackRightPullbackFstIso Y.hom f g.left).inv) ≫
        pullback.snd) ≫
      pullback.snd =
    pullback.map X.hom f Y.hom f g.left (𝟙 S') (𝟙 S) (_ : X.hom ≫ 𝟙 S = g.left ≫ Y.hom) (_ : f ≫ 𝟙 S = 𝟙 S' ≫ f) ≫
      pullback.snd

Next tactic:
simp
theorem StableUnderBaseChange.baseChange_map [HasPullbacks C] {P : MorphismProperty C}
    (hP : StableUnderBaseChange P) {S S' : C} (f : S' ⟶ S) {X Y : Over S} (g : X ⟶ Y)
    (H : P g.left) : P ((baseChange f).map g).left := by
  let e :=
    pullbackRightPullbackFstIso Y.hom f g.left ≪≫
      pullback.congrHom (g.w.trans (Category.comp_id _)) rfl
  have : e.inv ≫ pullback.snd = ((baseChange f).map g).left := by
    ext <;> dsimp <;> simp
  

Proof state:
C : Type u
inst✝² : Category.{v, u} C
D : Type u_1
inst✝¹ : Category.{?u.37457, u_1} D
inst✝ : HasPullbacks C
P : MorphismProperty C
hP : StableUnderBaseChange P
S S' : C
f : S' ⟶ S
X Y : Over S
g : X ⟶ Y
H : P g.left
e : pullback g.left pullback.fst ≅ pullback X.hom f :=
  pullbackRightPullbackFstIso Y.hom f g.left ≪≫ pullback.congrHom (_ : (𝟭 C).map g.left ≫ Y.hom = X.hom) (_ : f = f)
this : e.inv ≫ pullback.snd = ((baseChange f).map g).left
⊢ P ((baseChange f).map g).left

Next tactic:
rw [← this, hP.respectsIso.cancel_left_isIso]
theorem StableUnderBaseChange.baseChange_map [HasPullbacks C] {P : MorphismProperty C}
    (hP : StableUnderBaseChange P) {S S' : C} (f : S' ⟶ S) {X Y : Over S} (g : X ⟶ Y)
    (H : P g.left) : P ((baseChange f).map g).left := by
  let e :=
    pullbackRightPullbackFstIso Y.hom f g.left ≪≫
      pullback.congrHom (g.w.trans (Category.comp_id _)) rfl
  have : e.inv ≫ pullback.snd = ((baseChange f).map g).left := by
    ext <;> dsimp <;> simp
  rw [← this, hP.respectsIso.cancel_left_isIso]
  

Proof state:
C : Type u
inst✝² : Category.{v, u} C
D : Type u_1
inst✝¹ : Category.{?u.37457, u_1} D
inst✝ : HasPullbacks C
P : MorphismProperty C
hP : StableUnderBaseChange P
S S' : C
f : S' ⟶ S
X Y : Over S
g : X ⟶ Y
H : P g.left
e : pullback g.left pullback.fst ≅ pullback X.hom f :=
  pullbackRightPullbackFstIso Y.hom f g.left ≪≫ pullback.congrHom (_ : (𝟭 C).map g.left ≫ Y.hom = X.hom) (_ : f = f)
this : e.inv ≫ pullback.snd = ((baseChange f).map g).left
⊢ P pullback.snd

Next tactic:
exact hP.snd _ _ H
theorem StableUnderBaseChange.pullback_map [HasPullbacks C] {P : MorphismProperty C}
    (hP : StableUnderBaseChange P) (hP' : StableUnderComposition P) {S X X' Y Y' : C} {f : X ⟶ S}
    {g : Y ⟶ S} {f' : X' ⟶ S} {g' : Y' ⟶ S} {i₁ : X ⟶ X'} {i₂ : Y ⟶ Y'} (h₁ : P i₁) (h₂ : P i₂)
    (e₁ : f = i₁ ≫ f') (e₂ : g = i₂ ≫ g') :
    P (pullback.map f g f' g' i₁ i₂ (𝟙 _) ((Category.comp_id _).trans e₁)
        ((Category.comp_id _).trans e₂)) := by
  

Proof state:
C : Type u
inst✝² : Category.{v, u} C
D : Type u_1
inst✝¹ : Category.{?u.51933, u_1} D
inst✝ : HasPullbacks C
P : MorphismProperty C
hP : StableUnderBaseChange P
hP' : StableUnderComposition P
S X X' Y Y' : C
f : X ⟶ S
g : Y ⟶ S
f' : X' ⟶ S
g' : Y' ⟶ S
i₁ : X ⟶ X'
i₂ : Y ⟶ Y'
h₁ : P i₁
h₂ : P i₂
e₁ : f = i₁ ≫ f'
e₂ : g = i₂ ≫ g'
⊢ P (pullback.map f g f' g' i₁ i₂ (𝟙 S) (_ : f ≫ 𝟙 S = i₁ ≫ f') (_ : g ≫ 𝟙 S = i₂ ≫ g'))

Next tactic:
have :
    pullback.map f g f' g' i₁ i₂ (𝟙 _) ((Category.comp_id _).trans e₁)
        ((Category.comp_id _).trans e₂) =
      ((pullbackSymmetry _ _).hom ≫
          ((baseChange _).map (Over.homMk _ e₂.symm : Over.mk g ⟶ Over.mk g')).left) ≫
        (pullbackSymmetry _ _).hom ≫
          ((baseChange g').map (Over.homMk _ e₁.symm : Over.mk f ⟶ Over.mk f')).left :=
    by ext <;> dsimp <;> simp
theorem StableUnderBaseChange.pullback_map [HasPullbacks C] {P : MorphismProperty C}
    (hP : StableUnderBaseChange P) (hP' : StableUnderComposition P) {S X X' Y Y' : C} {f : X ⟶ S}
    {g : Y ⟶ S} {f' : X' ⟶ S} {g' : Y' ⟶ S} {i₁ : X ⟶ X'} {i₂ : Y ⟶ Y'} (h₁ : P i₁) (h₂ : P i₂)
    (e₁ : f = i₁ ≫ f') (e₂ : g = i₂ ≫ g') :
    P (pullback.map f g f' g' i₁ i₂ (𝟙 _) ((Category.comp_id _).trans e₁)
        ((Category.comp_id _).trans e₂)) := by
  have :
    pullback.map f g f' g' i₁ i₂ (𝟙 _) ((Category.comp_id _).trans e₁)
        ((Category.comp_id _).trans e₂) =
      ((pullbackSymmetry _ _).hom ≫
          ((baseChange _).map (Over.homMk _ e₂.symm : Over.mk g ⟶ Over.mk g')).left) ≫
        (pullbackSymmetry _ _).hom ≫
          ((baseChange g').map (Over.homMk _ e₁.symm : Over.mk f ⟶ Over.mk f')).left :=
    by 

Proof state:
C : Type u
inst✝² : Category.{v, u} C
D : Type u_1
inst✝¹ : Category.{?u.51933, u_1} D
inst✝ : HasPullbacks C
P : MorphismProperty C
hP : StableUnderBaseChange P
hP' : StableUnderComposition P
S X X' Y Y' : C
f : X ⟶ S
g : Y ⟶ S
f' : X' ⟶ S
g' : Y' ⟶ S
i₁ : X ⟶ X'
i₂ : Y ⟶ Y'
h₁ : P i₁
h₂ : P i₂
e₁ : f = i₁ ≫ f'
e₂ : g = i₂ ≫ g'
⊢ pullback.map f g f' g' i₁ i₂ (𝟙 S) (_ : f ≫ 𝟙 S = i₁ ≫ f') (_ : g ≫ 𝟙 S = i₂ ≫ g') =
    ((pullbackSymmetry (Over.mk f).hom (Over.mk g).hom).hom ≫ ((baseChange (Over.mk f).hom).map (Over.homMk i₂)).left) ≫
      (pullbackSymmetry (Over.mk g').hom (Over.mk f).hom).hom ≫ ((baseChange g').map (Over.homMk i₁)).left

Next tactic:
ext
theorem StableUnderBaseChange.pullback_map [HasPullbacks C] {P : MorphismProperty C}
    (hP : StableUnderBaseChange P) (hP' : StableUnderComposition P) {S X X' Y Y' : C} {f : X ⟶ S}
    {g : Y ⟶ S} {f' : X' ⟶ S} {g' : Y' ⟶ S} {i₁ : X ⟶ X'} {i₂ : Y ⟶ Y'} (h₁ : P i₁) (h₂ : P i₂)
    (e₁ : f = i₁ ≫ f') (e₂ : g = i₂ ≫ g') :
    P (pullback.map f g f' g' i₁ i₂ (𝟙 _) ((Category.comp_id _).trans e₁)
        ((Category.comp_id _).trans e₂)) := by
  have :
    pullback.map f g f' g' i₁ i₂ (𝟙 _) ((Category.comp_id _).trans e₁)
        ((Category.comp_id _).trans e₂) =
      ((pullbackSymmetry _ _).hom ≫
          ((baseChange _).map (Over.homMk _ e₂.symm : Over.mk g ⟶ Over.mk g')).left) ≫
        (pullbackSymmetry _ _).hom ≫
          ((baseChange g').map (Over.homMk _ e₁.symm : Over.mk f ⟶ Over.mk f')).left :=
    by ext <;> 

Proof state:
case h₀
C : Type u
inst✝² : Category.{v, u} C
D : Type u_1
inst✝¹ : Category.{?u.51933, u_1} D
inst✝ : HasPullbacks C
P : MorphismProperty C
hP : StableUnderBaseChange P
hP' : StableUnderComposition P
S X X' Y Y' : C
f : X ⟶ S
g : Y ⟶ S
f' : X' ⟶ S
g' : Y' ⟶ S
i₁ : X ⟶ X'
i₂ : Y ⟶ Y'
h₁ : P i₁
h₂ : P i₂
e₁ : f = i₁ ≫ f'
e₂ : g = i₂ ≫ g'
⊢ pullback.map f g f' g' i₁ i₂ (𝟙 S) (_ : f ≫ 𝟙 S = i₁ ≫ f') (_ : g ≫ 𝟙 S = i₂ ≫ g') ≫ pullback.fst =
    (((pullbackSymmetry (Over.mk f).hom (Over.mk g).hom).hom ≫
          ((baseChange (Over.mk f).hom).map (Over.homMk i₂)).left) ≫
        (pullbackSymmetry (Over.mk g').hom (Over.mk f).hom).hom ≫ ((baseChange g').map (Over.homMk i₁)).left) ≫
      pullback.fst

Next tactic:
dsimp
theorem StableUnderBaseChange.pullback_map [HasPullbacks C] {P : MorphismProperty C}
    (hP : StableUnderBaseChange P) (hP' : StableUnderComposition P) {S X X' Y Y' : C} {f : X ⟶ S}
    {g : Y ⟶ S} {f' : X' ⟶ S} {g' : Y' ⟶ S} {i₁ : X ⟶ X'} {i₂ : Y ⟶ Y'} (h₁ : P i₁) (h₂ : P i₂)
    (e₁ : f = i₁ ≫ f') (e₂ : g = i₂ ≫ g') :
    P (pullback.map f g f' g' i₁ i₂ (𝟙 _) ((Category.comp_id _).trans e₁)
        ((Category.comp_id _).trans e₂)) := by
  have :
    pullback.map f g f' g' i₁ i₂ (𝟙 _) ((Category.comp_id _).trans e₁)
        ((Category.comp_id _).trans e₂) =
      ((pullbackSymmetry _ _).hom ≫
          ((baseChange _).map (Over.homMk _ e₂.symm : Over.mk g ⟶ Over.mk g')).left) ≫
        (pullbackSymmetry _ _).hom ≫
          ((baseChange g').map (Over.homMk _ e₁.symm : Over.mk f ⟶ Over.mk f')).left :=
    by ext <;> 

Proof state:
case h₁
C : Type u
inst✝² : Category.{v, u} C
D : Type u_1
inst✝¹ : Category.{?u.51933, u_1} D
inst✝ : HasPullbacks C
P : MorphismProperty C
hP : StableUnderBaseChange P
hP' : StableUnderComposition P
S X X' Y Y' : C
f : X ⟶ S
g : Y ⟶ S
f' : X' ⟶ S
g' : Y' ⟶ S
i₁ : X ⟶ X'
i₂ : Y ⟶ Y'
h₁ : P i₁
h₂ : P i₂
e₁ : f = i₁ ≫ f'
e₂ : g = i₂ ≫ g'
⊢ pullback.map f g f' g' i₁ i₂ (𝟙 S) (_ : f ≫ 𝟙 S = i₁ ≫ f') (_ : g ≫ 𝟙 S = i₂ ≫ g') ≫ pullback.snd =
    (((pullbackSymmetry (Over.mk f).hom (Over.mk g).hom).hom ≫
          ((baseChange (Over.mk f).hom).map (Over.homMk i₂)).left) ≫
        (pullbackSymmetry (Over.mk g').hom (Over.mk f).hom).hom ≫ ((baseChange g').map (Over.homMk i₁)).left) ≫
      pullback.snd

Next tactic:
dsimp