Theorem: RingHom.StableUnderBaseChange.pullback_fst_app_top
File: Mathlib/AlgebraicGeometry/Morphisms/RingHomProperties.lean

Proof steps:
state_before: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : StableUnderBaseChange fun {R S} [CommRing R] [CommRing S] => P
hP' : RespectsIso fun {R S} [CommRing R] [CommRing S] => P
X Y S : Scheme
inst✝² : IsAffine X
inst✝¹ : IsAffine Y
inst✝ : IsAffine S
f : X ⟶ S
g : Y ⟶ S
H : P (Scheme.Hom.app g ⊤)
⊢ P (Scheme.Hom.app (pullback.fst f g) ⊤)
state_after: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : StableUnderBaseChange fun {R S} [CommRing R] [CommRing S] => P
hP' : RespectsIso fun {R S} [CommRing R] [CommRing S] => P
X Y S : Scheme
inst✝² : IsAffine X
inst✝¹ : IsAffine Y
inst✝ : IsAffine S
f : X ⟶ S
g : Y ⟶ S
H : P (Scheme.Hom.app g ⊤)
⊢ P
    (Scheme.Hom.app
      ((PreservesPullback.iso AffineScheme.forgetToScheme (AffineScheme.ofHom f) (AffineScheme.ofHom g)).inv ≫
        AffineScheme.forgetToScheme.map (pullback.fst (AffineScheme.ofHom f) (AffineScheme.ofHom g)))
      ⊤)
tactic: erw [← PreservesPullback.iso_inv_fst AffineScheme.forgetToScheme (AffineScheme.ofHom f)
      (AffineScheme.ofHom g)]
state_before: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : StableUnderBaseChange fun {R S} [CommRing R] [CommRing S] => P
hP' : RespectsIso fun {R S} [CommRing R] [CommRing S] => P
X Y S : Scheme
inst✝² : IsAffine X
inst✝¹ : IsAffine Y
inst✝ : IsAffine S
f : X ⟶ S
g : Y ⟶ S
H : P (Scheme.Hom.app g ⊤)
⊢ P
    (Scheme.Hom.app
      ((PreservesPullback.iso AffineScheme.forgetToScheme (AffineScheme.ofHom f) (AffineScheme.ofHom g)).inv ≫
        AffineScheme.forgetToScheme.map (pullback.fst (AffineScheme.ofHom f) (AffineScheme.ofHom g)))
      ⊤)
state_after: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : StableUnderBaseChange fun {R S} [CommRing R] [CommRing S] => P
hP' : RespectsIso fun {R S} [CommRing R] [CommRing S] => P
X Y S : Scheme
inst✝² : IsAffine X
inst✝¹ : IsAffine Y
inst✝ : IsAffine S
f : X ⟶ S
g : Y ⟶ S
H : P (Scheme.Hom.app g ⊤)
⊢ P (Scheme.Hom.app (pullback.fst (AffineScheme.ofHom f) (AffineScheme.ofHom g)) ⊤)
tactic: rw [Scheme.comp_app, hP'.cancel_right_isIso, AffineScheme.forgetToScheme_map]
state_before: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : StableUnderBaseChange fun {R S} [CommRing R] [CommRing S] => P
hP' : RespectsIso fun {R S} [CommRing R] [CommRing S] => P
X Y S : Scheme
inst✝² : IsAffine X
inst✝¹ : IsAffine Y
inst✝ : IsAffine S
f : X ⟶ S
g : Y ⟶ S
H : P (Scheme.Hom.app g ⊤)
⊢ P (Scheme.Hom.app (pullback.fst (AffineScheme.ofHom f) (AffineScheme.ofHom g)) ⊤)
state_after: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : StableUnderBaseChange fun {R S} [CommRing R] [CommRing S] => P
hP' : RespectsIso fun {R S} [CommRing R] [CommRing S] => P
X Y S : Scheme
inst✝² : IsAffine X
inst✝¹ : IsAffine Y
inst✝ : IsAffine S
f : X ⟶ S
g : Y ⟶ S
H : P (Scheme.Hom.app g ⊤)
this :
  ((PreservesPullback.iso AffineScheme.Γ.rightOp (AffineScheme.ofHom f) (AffineScheme.ofHom g)).hom ≫
        pullback.fst (AffineScheme.Γ.rightOp.map (AffineScheme.ofHom f))
          (AffineScheme.Γ.rightOp.map (AffineScheme.ofHom g))).unop =
    (AffineScheme.Γ.rightOp.map (pullback.fst (AffineScheme.ofHom f) (AffineScheme.ofHom g))).unop
⊢ P (Scheme.Hom.app (pullback.fst (AffineScheme.ofHom f) (AffineScheme.ofHom g)) ⊤)
tactic: have := congr_arg Quiver.Hom.unop
      (PreservesPullback.iso_hom_fst AffineScheme.Γ.rightOp (AffineScheme.ofHom f)
        (AffineScheme.ofHom g))
state_before: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : StableUnderBaseChange fun {R S} [CommRing R] [CommRing S] => P
hP' : RespectsIso fun {R S} [CommRing R] [CommRing S] => P
X Y S : Scheme
inst✝² : IsAffine X
inst✝¹ : IsAffine Y
inst✝ : IsAffine S
f : X ⟶ S
g : Y ⟶ S
H : P (Scheme.Hom.app g ⊤)
this :
  ((PreservesPullback.iso AffineScheme.Γ.rightOp (AffineScheme.ofHom f) (AffineScheme.ofHom g)).hom ≫
        pullback.fst (AffineScheme.Γ.rightOp.map (AffineScheme.ofHom f))
          (AffineScheme.Γ.rightOp.map (AffineScheme.ofHom g))).unop =
    (AffineScheme.Γ.rightOp.map (pullback.fst (AffineScheme.ofHom f) (AffineScheme.ofHom g))).unop
⊢ P (Scheme.Hom.app (pullback.fst (AffineScheme.ofHom f) (AffineScheme.ofHom g)) ⊤)
state_after: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : StableUnderBaseChange fun {R S} [CommRing R] [CommRing S] => P
hP' : RespectsIso fun {R S} [CommRing R] [CommRing S] => P
X Y S : Scheme
inst✝² : IsAffine X
inst✝¹ : IsAffine Y
inst✝ : IsAffine S
f : X ⟶ S
g : Y ⟶ S
H : P (Scheme.Hom.app g ⊤)
this :
  (pullback.fst (Scheme.Hom.app (AffineScheme.ofHom f) ⊤).op (Scheme.Hom.app (AffineScheme.ofHom g) ⊤).op).unop ≫
      (PreservesPullback.iso (AffineScheme.forgetToScheme.op ⋙ Scheme.Γ).rightOp (AffineScheme.ofHom f)
            (AffineScheme.ofHom g)).hom.unop =
    Scheme.Hom.app (pullback.fst (AffineScheme.ofHom f) (AffineScheme.ofHom g)) ⊤
⊢ P (Scheme.Hom.app (pullback.fst (AffineScheme.ofHom f) (AffineScheme.ofHom g)) ⊤)
tactic: simp only [AffineScheme.Γ, Functor.rightOp_obj, Functor.comp_obj, Functor.op_obj, unop_comp,
    AffineScheme.forgetToScheme_obj, Scheme.Γ_obj, Functor.rightOp_map, Functor.comp_map,
    Functor.op_map, Quiver.Hom.unop_op, AffineScheme.forgetToScheme_map, Scheme.Γ_map] at this
state_before: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : StableUnderBaseChange fun {R S} [CommRing R] [CommRing S] => P
hP' : RespectsIso fun {R S} [CommRing R] [CommRing S] => P
X Y S : Scheme
inst✝² : IsAffine X
inst✝¹ : IsAffine Y
inst✝ : IsAffine S
f : X ⟶ S
g : Y ⟶ S
H : P (Scheme.Hom.app g ⊤)
this :
  (pullback.fst (Scheme.Hom.app (AffineScheme.ofHom f) ⊤).op (Scheme.Hom.app (AffineScheme.ofHom g) ⊤).op).unop ≫
      (PreservesPullback.iso (AffineScheme.forgetToScheme.op ⋙ Scheme.Γ).rightOp (AffineScheme.ofHom f)
            (AffineScheme.ofHom g)).hom.unop =
    Scheme.Hom.app (pullback.fst (AffineScheme.ofHom f) (AffineScheme.ofHom g)) ⊤
⊢ P (Scheme.Hom.app (pullback.fst (AffineScheme.ofHom f) (AffineScheme.ofHom g)) ⊤)
state_after: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : StableUnderBaseChange fun {R S} [CommRing R] [CommRing S] => P
hP' : RespectsIso fun {R S} [CommRing R] [CommRing S] => P
X Y S : Scheme
inst✝² : IsAffine X
inst✝¹ : IsAffine Y
inst✝ : IsAffine S
f : X ⟶ S
g : Y ⟶ S
H : P (Scheme.Hom.app g ⊤)
this :
  (pullback.fst (Scheme.Hom.app (AffineScheme.ofHom f) ⊤).op (Scheme.Hom.app (AffineScheme.ofHom g) ⊤).op).unop ≫
      (PreservesPullback.iso (AffineScheme.forgetToScheme.op ⋙ Scheme.Γ).rightOp (AffineScheme.ofHom f)
            (AffineScheme.ofHom g)).hom.unop =
    Scheme.Hom.app (pullback.fst (AffineScheme.ofHom f) (AffineScheme.ofHom g)) ⊤
⊢ P (pushout.inl (Scheme.Hom.app (AffineScheme.ofHom f) ⊤) (Scheme.Hom.app (AffineScheme.ofHom g) ⊤))
tactic: rw [← this, hP'.cancel_right_isIso, ← pushoutIsoUnopPullback_inl_hom, hP'.cancel_right_isIso]
state_before: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : StableUnderBaseChange fun {R S} [CommRing R] [CommRing S] => P
hP' : RespectsIso fun {R S} [CommRing R] [CommRing S] => P
X Y S : Scheme
inst✝² : IsAffine X
inst✝¹ : IsAffine Y
inst✝ : IsAffine S
f : X ⟶ S
g : Y ⟶ S
H : P (Scheme.Hom.app g ⊤)
this :
  (pullback.fst (Scheme.Hom.app (AffineScheme.ofHom f) ⊤).op (Scheme.Hom.app (AffineScheme.ofHom g) ⊤).op).unop ≫
      (PreservesPullback.iso (AffineScheme.forgetToScheme.op ⋙ Scheme.Γ).rightOp (AffineScheme.ofHom f)
            (AffineScheme.ofHom g)).hom.unop =
    Scheme.Hom.app (pullback.fst (AffineScheme.ofHom f) (AffineScheme.ofHom g)) ⊤
⊢ P (pushout.inl (Scheme.Hom.app (AffineScheme.ofHom f) ⊤) (Scheme.Hom.app (AffineScheme.ofHom g) ⊤))
state_after: no goals
tactic: exact hP.pushout_inl _ hP' _ _ H