Theorem: AlgebraicGeometry.AffineTargetMorphismProperty.IsLocal.targetAffineLocally_pullback_fst_of_right_of_stableUnderBaseChange
File: Mathlib/AlgebraicGeometry/Morphisms/Basic.lean

tactic: have h01 := (hP.affine_openCover_TFAE (pullback.fst : pullback f g ⟶ X)).out 0 1
state_before: P : AffineTargetMorphismProperty
hP : P.IsLocal
hP' : P.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
inst✝ : IsAffine S
H : P g
⊢ targetAffineLocally P pullback.fst
state_after: P : AffineTargetMorphismProperty
hP : P.IsLocal
hP' : P.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
inst✝ : IsAffine S
H : P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∃ (x : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)), ∀ (i : 𝒰.J), P pullback.snd
⊢ targetAffineLocally P pullback.fst

tactic: rw [h01]
state_before: P : AffineTargetMorphismProperty
hP : P.IsLocal
hP' : P.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
inst✝ : IsAffine S
H : P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∃ (x : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)), ∀ (i : 𝒰.J), P pullback.snd
⊢ targetAffineLocally P pullback.fst
state_after: P : AffineTargetMorphismProperty
hP : P.IsLocal
hP' : P.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
inst✝ : IsAffine S
H : P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∃ (x : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)), ∀ (i : 𝒰.J), P pullback.snd
⊢ ∃ 𝒰, ∃ (x : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)), ∀ (i : 𝒰.J), P pullback.snd

tactic: use X.affineCover, inferInstance
state_before: P : AffineTargetMorphismProperty
hP : P.IsLocal
hP' : P.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
inst✝ : IsAffine S
H : P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∃ (x : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)), ∀ (i : 𝒰.J), P pullback.snd
⊢ ∃ 𝒰, ∃ (x : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)), ∀ (i : 𝒰.J), P pullback.snd
state_after: case h
P : AffineTargetMorphismProperty
hP : P.IsLocal
hP' : P.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
inst✝ : IsAffine S
H : P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∃ (x : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)), ∀ (i : 𝒰.J), P pullback.snd
⊢ ∀ (i : X.affineCover.J), P pullback.snd

tactic: intro i
state_before: case h
P : AffineTargetMorphismProperty
hP : P.IsLocal
hP' : P.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
inst✝ : IsAffine S
H : P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∃ (x : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)), ∀ (i : 𝒰.J), P pullback.snd
⊢ ∀ (i : X.affineCover.J), P pullback.snd
state_after: case h
P : AffineTargetMorphismProperty
hP : P.IsLocal
hP' : P.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
inst✝ : IsAffine S
H : P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∃ (x : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)), ∀ (i : 𝒰.J), P pullback.snd
i : X.affineCover.J
⊢ P pullback.snd

tactic: let e := pullbackSymmetry _ _ ≪≫ pullbackRightPullbackFstIso f g (X.affineCover.map i)
state_before: case h
P : AffineTargetMorphismProperty
hP : P.IsLocal
hP' : P.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
inst✝ : IsAffine S
H : P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∃ (x : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)), ∀ (i : 𝒰.J), P pullback.snd
i : X.affineCover.J
⊢ P pullback.snd
state_after: case h
P : AffineTargetMorphismProperty
hP : P.IsLocal
hP' : P.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
inst✝ : IsAffine S
H : P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∃ (x : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)), ∀ (i : 𝒰.J), P pullback.snd
i : X.affineCover.J
e : pullback pullback.fst (X.affineCover.map i) ≅ pullback (X.affineCover.map i ≫ f) g :=
  pullbackSymmetry pullback.fst (X.affineCover.map i) ≪≫ pullbackRightPullbackFstIso f g (X.affineCover.map i)
⊢ P pullback.snd

tactic: have : e.hom ≫ pullback.fst = pullback.snd := by simp [e]
state_before: case h
P : AffineTargetMorphismProperty
hP : P.IsLocal
hP' : P.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
inst✝ : IsAffine S
H : P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∃ (x : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)), ∀ (i : 𝒰.J), P pullback.snd
i : X.affineCover.J
e : pullback pullback.fst (X.affineCover.map i) ≅ pullback (X.affineCover.map i ≫ f) g :=
  pullbackSymmetry pullback.fst (X.affineCover.map i) ≪≫ pullbackRightPullbackFstIso f g (X.affineCover.map i)
⊢ P pullback.snd
state_after: case h
P : AffineTargetMorphismProperty
hP : P.IsLocal
hP' : P.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
inst✝ : IsAffine S
H : P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∃ (x : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)), ∀ (i : 𝒰.J), P pullback.snd
i : X.affineCover.J
e : pullback pullback.fst (X.affineCover.map i) ≅ pullback (X.affineCover.map i ≫ f) g :=
  pullbackSymmetry pullback.fst (X.affineCover.map i) ≪≫ pullbackRightPullbackFstIso f g (X.affineCover.map i)
this : e.hom ≫ pullback.fst = pullback.snd
⊢ P pullback.snd

tactic: rw [← this, affine_cancel_left_isIso hP.1]
state_before: case h
P : AffineTargetMorphismProperty
hP : P.IsLocal
hP' : P.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
inst✝ : IsAffine S
H : P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∃ (x : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)), ∀ (i : 𝒰.J), P pullback.snd
i : X.affineCover.J
e : pullback pullback.fst (X.affineCover.map i) ≅ pullback (X.affineCover.map i ≫ f) g :=
  pullbackSymmetry pullback.fst (X.affineCover.map i) ≪≫ pullbackRightPullbackFstIso f g (X.affineCover.map i)
this : e.hom ≫ pullback.fst = pullback.snd
⊢ P pullback.snd
state_after: case h
P : AffineTargetMorphismProperty
hP : P.IsLocal
hP' : P.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
inst✝ : IsAffine S
H : P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∃ (x : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)), ∀ (i : 𝒰.J), P pullback.snd
i : X.affineCover.J
e : pullback pullback.fst (X.affineCover.map i) ≅ pullback (X.affineCover.map i ≫ f) g :=
  pullbackSymmetry pullback.fst (X.affineCover.map i) ≪≫ pullbackRightPullbackFstIso f g (X.affineCover.map i)
this : e.hom ≫ pullback.fst = pullback.snd
⊢ P pullback.fst

tactic: apply hP'
state_before: case h
P : AffineTargetMorphismProperty
hP : P.IsLocal
hP' : P.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
inst✝ : IsAffine S
H : P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∃ (x : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)), ∀ (i : 𝒰.J), P pullback.snd
i : X.affineCover.J
e : pullback pullback.fst (X.affineCover.map i) ≅ pullback (X.affineCover.map i ≫ f) g :=
  pullbackSymmetry pullback.fst (X.affineCover.map i) ≪≫ pullbackRightPullbackFstIso f g (X.affineCover.map i)
this : e.hom ≫ pullback.fst = pullback.snd
⊢ P pullback.fst
state_after: case h.a
P : AffineTargetMorphismProperty
hP : P.IsLocal
hP' : P.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
inst✝ : IsAffine S
H : P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∃ (x : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)), ∀ (i : 𝒰.J), P pullback.snd
i : X.affineCover.J
e : pullback pullback.fst (X.affineCover.map i) ≅ pullback (X.affineCover.map i ≫ f) g :=
  pullbackSymmetry pullback.fst (X.affineCover.map i) ≪≫ pullbackRightPullbackFstIso f g (X.affineCover.map i)
this : e.hom ≫ pullback.fst = pullback.snd
⊢ P g

tactic: assumption
state_before: case h.a
P : AffineTargetMorphismProperty
hP : P.IsLocal
hP' : P.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
inst✝ : IsAffine S
H : P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∃ (x : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)), ∀ (i : 𝒰.J), P pullback.snd
i : X.affineCover.J
e : pullback pullback.fst (X.affineCover.map i) ≅ pullback (X.affineCover.map i ≫ f) g :=
  pullbackSymmetry pullback.fst (X.affineCover.map i) ≪≫ pullbackRightPullbackFstIso f g (X.affineCover.map i)
this : e.hom ≫ pullback.fst = pullback.snd
⊢ P g
state_after: no goals

tactic: simp [e]
state_before: P : AffineTargetMorphismProperty
hP : P.IsLocal
hP' : P.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
inst✝ : IsAffine S
H : P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∃ (x : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)), ∀ (i : 𝒰.J), P pullback.snd
i : X.affineCover.J
e : pullback pullback.fst (X.affineCover.map i) ≅ pullback (X.affineCover.map i ≫ f) g :=
  pullbackSymmetry pullback.fst (X.affineCover.map i) ≪≫ pullbackRightPullbackFstIso f g (X.affineCover.map i)
⊢ e.hom ≫ pullback.fst = pullback.snd
state_after: no goals