Theorem: AlgebraicGeometry.HasAffineProperty.stableUnderBaseChange
File: Mathlib/AlgebraicGeometry/Morphisms/Basic.lean

Proof steps:
state_before: P : MorphismProperty Scheme
Q : AffineTargetMorphismProperty
inst✝ : HasAffineProperty P Q
X✝ Y✝ : Scheme
f✝ : X✝ ⟶ Y✝
hP' : Q.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : P g
⊢ P (pullback.fst f g)
state_after: P : MorphismProperty Scheme
Q : AffineTargetMorphismProperty
inst✝ : HasAffineProperty P Q
X✝ Y✝ : Scheme
f✝ : X✝ ⟶ Y✝
hP' : Q.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : P g
⊢ ∀ (i : ((S.affineCover.pullbackCover f).pullbackCover (pullback.fst f g)).J),
    P ((S.affineCover.pullbackCover f).pullbackHom (pullback.fst f g) i)
tactic: rw [IsLocalAtTarget.iff_of_openCover (P := P) (S.affineCover.pullbackCover f)]
state_before: P : MorphismProperty Scheme
Q : AffineTargetMorphismProperty
inst✝ : HasAffineProperty P Q
X✝ Y✝ : Scheme
f✝ : X✝ ⟶ Y✝
hP' : Q.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : P g
⊢ ∀ (i : ((S.affineCover.pullbackCover f).pullbackCover (pullback.fst f g)).J),
    P ((S.affineCover.pullbackCover f).pullbackHom (pullback.fst f g) i)
state_after: P : MorphismProperty Scheme
Q : AffineTargetMorphismProperty
inst✝ : HasAffineProperty P Q
X✝ Y✝ : Scheme
f✝ : X✝ ⟶ Y✝
hP' : Q.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : P g
i : ((S.affineCover.pullbackCover f).pullbackCover (pullback.fst f g)).J
⊢ P ((S.affineCover.pullbackCover f).pullbackHom (pullback.fst f g) i)
tactic: intro i
state_before: P : MorphismProperty Scheme
Q : AffineTargetMorphismProperty
inst✝ : HasAffineProperty P Q
X✝ Y✝ : Scheme
f✝ : X✝ ⟶ Y✝
hP' : Q.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : P g
i : ((S.affineCover.pullbackCover f).pullbackCover (pullback.fst f g)).J
⊢ P ((S.affineCover.pullbackCover f).pullbackHom (pullback.fst f g) i)
state_after: P : MorphismProperty Scheme
Q : AffineTargetMorphismProperty
inst✝ : HasAffineProperty P Q
X✝ Y✝ : Scheme
f✝ : X✝ ⟶ Y✝
hP' : Q.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : P g
i : ((S.affineCover.pullbackCover f).pullbackCover (pullback.fst f g)).J
e : pullback (pullback.fst f g) ((S.affineCover.pullbackCover f).map i) ≅
  pullback (pullback.snd f (S.affineCover.map i)) (pullback.fst (S.affineCover.map i) g) :=
  pullbackSymmetry (pullback.fst f g) ((S.affineCover.pullbackCover f).map i) ≪≫
    pullbackRightPullbackFstIso f g ((S.affineCover.pullbackCover f).map i) ≪≫
      asIso
          (pullback.map ((S.affineCover.pullbackCover f).map i ≫ f) g
            (pullback.snd f (S.affineCover.map i) ≫ S.affineCover.map i) g (𝟙 ((S.affineCover.pullbackCover f).obj i))
            (𝟙 Y) (𝟙 S) ⋯ ⋯) ≪≫
        (pullbackRightPullbackFstIso (S.affineCover.map i) g (pullback.snd f (S.affineCover.map i))).symm
⊢ P ((S.affineCover.pullbackCover f).pullbackHom (pullback.fst f g) i)
tactic: let e : pullback (pullback.fst f g) ((S.affineCover.pullbackCover f).map i) ≅
          _ := by
        refine pullbackSymmetry _ _ ≪≫ pullbackRightPullbackFstIso f g _ ≪≫ ?_ ≪≫
          (pullbackRightPullbackFstIso (S.affineCover.map i) g
            (pullback.snd f (S.affineCover.map i))).symm
        exact asIso
          (pullback.map _ _ _ _ (𝟙 _) (𝟙 _) (𝟙 _) (by simpa using pullback.condition) (by simp))
state_before: P : MorphismProperty Scheme
Q : AffineTargetMorphismProperty
inst✝ : HasAffineProperty P Q
X✝ Y✝ : Scheme
f✝ : X✝ ⟶ Y✝
hP' : Q.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : P g
i : ((S.affineCover.pullbackCover f).pullbackCover (pullback.fst f g)).J
e : pullback (pullback.fst f g) ((S.affineCover.pullbackCover f).map i) ≅
  pullback (pullback.snd f (S.affineCover.map i)) (pullback.fst (S.affineCover.map i) g) :=
  pullbackSymmetry (pullback.fst f g) ((S.affineCover.pullbackCover f).map i) ≪≫
    pullbackRightPullbackFstIso f g ((S.affineCover.pullbackCover f).map i) ≪≫
      asIso
          (pullback.map ((S.affineCover.pullbackCover f).map i ≫ f) g
            (pullback.snd f (S.affineCover.map i) ≫ S.affineCover.map i) g (𝟙 ((S.affineCover.pullbackCover f).obj i))
            (𝟙 Y) (𝟙 S) ⋯ ⋯) ≪≫
        (pullbackRightPullbackFstIso (S.affineCover.map i) g (pullback.snd f (S.affineCover.map i))).symm
⊢ P ((S.affineCover.pullbackCover f).pullbackHom (pullback.fst f g) i)
state_after: P : MorphismProperty Scheme
Q : AffineTargetMorphismProperty
inst✝ : HasAffineProperty P Q
X✝ Y✝ : Scheme
f✝ : X✝ ⟶ Y✝
hP' : Q.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : P g
i : ((S.affineCover.pullbackCover f).pullbackCover (pullback.fst f g)).J
e : pullback (pullback.fst f g) ((S.affineCover.pullbackCover f).map i) ≅
  pullback (pullback.snd f (S.affineCover.map i)) (pullback.fst (S.affineCover.map i) g) :=
  pullbackSymmetry (pullback.fst f g) ((S.affineCover.pullbackCover f).map i) ≪≫
    pullbackRightPullbackFstIso f g ((S.affineCover.pullbackCover f).map i) ≪≫
      asIso
          (pullback.map ((S.affineCover.pullbackCover f).map i ≫ f) g
            (pullback.snd f (S.affineCover.map i) ≫ S.affineCover.map i) g (𝟙 ((S.affineCover.pullbackCover f).obj i))
            (𝟙 Y) (𝟙 S) ⋯ ⋯) ≪≫
        (pullbackRightPullbackFstIso (S.affineCover.map i) g (pullback.snd f (S.affineCover.map i))).symm
this :
  e.hom ≫ pullback.fst (pullback.snd f (S.affineCover.map i)) (pullback.fst (S.affineCover.map i) g) =
    (S.affineCover.pullbackCover f).pullbackHom (pullback.fst f g) i
⊢ P ((S.affineCover.pullbackCover f).pullbackHom (pullback.fst f g) i)
tactic: have : e.hom ≫ pullback.fst _ _ =
          (S.affineCover.pullbackCover f).pullbackHom (pullback.fst _ _) i := by
        simp [e, Scheme.OpenCover.pullbackHom]
state_before: P : MorphismProperty Scheme
Q : AffineTargetMorphismProperty
inst✝ : HasAffineProperty P Q
X✝ Y✝ : Scheme
f✝ : X✝ ⟶ Y✝
hP' : Q.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : P g
i : ((S.affineCover.pullbackCover f).pullbackCover (pullback.fst f g)).J
e : pullback (pullback.fst f g) ((S.affineCover.pullbackCover f).map i) ≅
  pullback (pullback.snd f (S.affineCover.map i)) (pullback.fst (S.affineCover.map i) g) :=
  pullbackSymmetry (pullback.fst f g) ((S.affineCover.pullbackCover f).map i) ≪≫
    pullbackRightPullbackFstIso f g ((S.affineCover.pullbackCover f).map i) ≪≫
      asIso
          (pullback.map ((S.affineCover.pullbackCover f).map i ≫ f) g
            (pullback.snd f (S.affineCover.map i) ≫ S.affineCover.map i) g (𝟙 ((S.affineCover.pullbackCover f).obj i))
            (𝟙 Y) (𝟙 S) ⋯ ⋯) ≪≫
        (pullbackRightPullbackFstIso (S.affineCover.map i) g (pullback.snd f (S.affineCover.map i))).symm
this :
  e.hom ≫ pullback.fst (pullback.snd f (S.affineCover.map i)) (pullback.fst (S.affineCover.map i) g) =
    (S.affineCover.pullbackCover f).pullbackHom (pullback.fst f g) i
⊢ P ((S.affineCover.pullbackCover f).pullbackHom (pullback.fst f g) i)
state_after: P : MorphismProperty Scheme
Q : AffineTargetMorphismProperty
inst✝ : HasAffineProperty P Q
X✝ Y✝ : Scheme
f✝ : X✝ ⟶ Y✝
hP' : Q.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : P g
i : ((S.affineCover.pullbackCover f).pullbackCover (pullback.fst f g)).J
e : pullback (pullback.fst f g) ((S.affineCover.pullbackCover f).map i) ≅
  pullback (pullback.snd f (S.affineCover.map i)) (pullback.fst (S.affineCover.map i) g) :=
  pullbackSymmetry (pullback.fst f g) ((S.affineCover.pullbackCover f).map i) ≪≫
    pullbackRightPullbackFstIso f g ((S.affineCover.pullbackCover f).map i) ≪≫
      asIso
          (pullback.map ((S.affineCover.pullbackCover f).map i ≫ f) g
            (pullback.snd f (S.affineCover.map i) ≫ S.affineCover.map i) g (𝟙 ((S.affineCover.pullbackCover f).obj i))
            (𝟙 Y) (𝟙 S) ⋯ ⋯) ≪≫
        (pullbackRightPullbackFstIso (S.affineCover.map i) g (pullback.snd f (S.affineCover.map i))).symm
this :
  e.hom ≫ pullback.fst (pullback.snd f (S.affineCover.map i)) (pullback.fst (S.affineCover.map i) g) =
    (S.affineCover.pullbackCover f).pullbackHom (pullback.fst f g) i
⊢ P (pullback.fst (pullback.snd f (S.affineCover.map i)) (pullback.fst (S.affineCover.map i) g))
tactic: rw [← this, P.cancel_left_of_respectsIso]
state_before: P : MorphismProperty Scheme
Q : AffineTargetMorphismProperty
inst✝ : HasAffineProperty P Q
X✝ Y✝ : Scheme
f✝ : X✝ ⟶ Y✝
hP' : Q.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : P g
i : ((S.affineCover.pullbackCover f).pullbackCover (pullback.fst f g)).J
e : pullback (pullback.fst f g) ((S.affineCover.pullbackCover f).map i) ≅
  pullback (pullback.snd f (S.affineCover.map i)) (pullback.fst (S.affineCover.map i) g) :=
  pullbackSymmetry (pullback.fst f g) ((S.affineCover.pullbackCover f).map i) ≪≫
    pullbackRightPullbackFstIso f g ((S.affineCover.pullbackCover f).map i) ≪≫
      asIso
          (pullback.map ((S.affineCover.pullbackCover f).map i ≫ f) g
            (pullback.snd f (S.affineCover.map i) ≫ S.affineCover.map i) g (𝟙 ((S.affineCover.pullbackCover f).obj i))
            (𝟙 Y) (𝟙 S) ⋯ ⋯) ≪≫
        (pullbackRightPullbackFstIso (S.affineCover.map i) g (pullback.snd f (S.affineCover.map i))).symm
this :
  e.hom ≫ pullback.fst (pullback.snd f (S.affineCover.map i)) (pullback.fst (S.affineCover.map i) g) =
    (S.affineCover.pullbackCover f).pullbackHom (pullback.fst f g) i
⊢ P (pullback.fst (pullback.snd f (S.affineCover.map i)) (pullback.fst (S.affineCover.map i) g))
state_after: case H
P : MorphismProperty Scheme
Q : AffineTargetMorphismProperty
inst✝ : HasAffineProperty P Q
X✝ Y✝ : Scheme
f✝ : X✝ ⟶ Y✝
hP' : Q.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : P g
i : ((S.affineCover.pullbackCover f).pullbackCover (pullback.fst f g)).J
e : pullback (pullback.fst f g) ((S.affineCover.pullbackCover f).map i) ≅
  pullback (pullback.snd f (S.affineCover.map i)) (pullback.fst (S.affineCover.map i) g) :=
  pullbackSymmetry (pullback.fst f g) ((S.affineCover.pullbackCover f).map i) ≪≫
    pullbackRightPullbackFstIso f g ((S.affineCover.pullbackCover f).map i) ≪≫
      asIso
          (pullback.map ((S.affineCover.pullbackCover f).map i ≫ f) g
            (pullback.snd f (S.affineCover.map i) ≫ S.affineCover.map i) g (𝟙 ((S.affineCover.pullbackCover f).obj i))
            (𝟙 Y) (𝟙 S) ⋯ ⋯) ≪≫
        (pullbackRightPullbackFstIso (S.affineCover.map i) g (pullback.snd f (S.affineCover.map i))).symm
this :
  e.hom ≫ pullback.fst (pullback.snd f (S.affineCover.map i)) (pullback.fst (S.affineCover.map i) g) =
    (S.affineCover.pullbackCover f).pullbackHom (pullback.fst f g) i
⊢ Q (pullback.fst (S.affineCover.map i) g)
tactic: apply HasAffineProperty.pullback_fst_of_right hP'
state_before: case H
P : MorphismProperty Scheme
Q : AffineTargetMorphismProperty
inst✝ : HasAffineProperty P Q
X✝ Y✝ : Scheme
f✝ : X✝ ⟶ Y✝
hP' : Q.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : P g
i : ((S.affineCover.pullbackCover f).pullbackCover (pullback.fst f g)).J
e : pullback (pullback.fst f g) ((S.affineCover.pullbackCover f).map i) ≅
  pullback (pullback.snd f (S.affineCover.map i)) (pullback.fst (S.affineCover.map i) g) :=
  pullbackSymmetry (pullback.fst f g) ((S.affineCover.pullbackCover f).map i) ≪≫
    pullbackRightPullbackFstIso f g ((S.affineCover.pullbackCover f).map i) ≪≫
      asIso
          (pullback.map ((S.affineCover.pullbackCover f).map i ≫ f) g
            (pullback.snd f (S.affineCover.map i) ≫ S.affineCover.map i) g (𝟙 ((S.affineCover.pullbackCover f).obj i))
            (𝟙 Y) (𝟙 S) ⋯ ⋯) ≪≫
        (pullbackRightPullbackFstIso (S.affineCover.map i) g (pullback.snd f (S.affineCover.map i))).symm
this :
  e.hom ≫ pullback.fst (pullback.snd f (S.affineCover.map i)) (pullback.fst (S.affineCover.map i) g) =
    (S.affineCover.pullbackCover f).pullbackHom (pullback.fst f g) i
⊢ Q (pullback.fst (S.affineCover.map i) g)
state_after: case H
P : MorphismProperty Scheme
Q : AffineTargetMorphismProperty
inst✝ : HasAffineProperty P Q
X✝ Y✝ : Scheme
f✝ : X✝ ⟶ Y✝
hP' : Q.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : P g
i : ((S.affineCover.pullbackCover f).pullbackCover (pullback.fst f g)).J
e : pullback (pullback.fst f g) ((S.affineCover.pullbackCover f).map i) ≅
  pullback (pullback.snd f (S.affineCover.map i)) (pullback.fst (S.affineCover.map i) g) :=
  pullbackSymmetry (pullback.fst f g) ((S.affineCover.pullbackCover f).map i) ≪≫
    pullbackRightPullbackFstIso f g ((S.affineCover.pullbackCover f).map i) ≪≫
      asIso
          (pullback.map ((S.affineCover.pullbackCover f).map i ≫ f) g
            (pullback.snd f (S.affineCover.map i) ≫ S.affineCover.map i) g (𝟙 ((S.affineCover.pullbackCover f).obj i))
            (𝟙 Y) (𝟙 S) ⋯ ⋯) ≪≫
        (pullbackRightPullbackFstIso (S.affineCover.map i) g (pullback.snd f (S.affineCover.map i))).symm
this✝ :
  e.hom ≫ pullback.fst (pullback.snd f (S.affineCover.map i)) (pullback.fst (S.affineCover.map i) g) =
    (S.affineCover.pullbackCover f).pullbackHom (pullback.fst f g) i
this : Q.IsLocal := isLocal_affineProperty P
⊢ Q (pullback.fst (S.affineCover.map i) g)
tactic: letI := isLocal_affineProperty P
state_before: case H
P : MorphismProperty Scheme
Q : AffineTargetMorphismProperty
inst✝ : HasAffineProperty P Q
X✝ Y✝ : Scheme
f✝ : X✝ ⟶ Y✝
hP' : Q.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : P g
i : ((S.affineCover.pullbackCover f).pullbackCover (pullback.fst f g)).J
e : pullback (pullback.fst f g) ((S.affineCover.pullbackCover f).map i) ≅
  pullback (pullback.snd f (S.affineCover.map i)) (pullback.fst (S.affineCover.map i) g) :=
  pullbackSymmetry (pullback.fst f g) ((S.affineCover.pullbackCover f).map i) ≪≫
    pullbackRightPullbackFstIso f g ((S.affineCover.pullbackCover f).map i) ≪≫
      asIso
          (pullback.map ((S.affineCover.pullbackCover f).map i ≫ f) g
            (pullback.snd f (S.affineCover.map i) ≫ S.affineCover.map i) g (𝟙 ((S.affineCover.pullbackCover f).obj i))
            (𝟙 Y) (𝟙 S) ⋯ ⋯) ≪≫
        (pullbackRightPullbackFstIso (S.affineCover.map i) g (pullback.snd f (S.affineCover.map i))).symm
this✝ :
  e.hom ≫ pullback.fst (pullback.snd f (S.affineCover.map i)) (pullback.fst (S.affineCover.map i) g) =
    (S.affineCover.pullbackCover f).pullbackHom (pullback.fst f g) i
this : Q.IsLocal := isLocal_affineProperty P
⊢ Q (pullback.fst (S.affineCover.map i) g)
state_after: case H
P : MorphismProperty Scheme
Q : AffineTargetMorphismProperty
inst✝ : HasAffineProperty P Q
X✝ Y✝ : Scheme
f✝ : X✝ ⟶ Y✝
hP' : Q.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : P g
i : ((S.affineCover.pullbackCover f).pullbackCover (pullback.fst f g)).J
e : pullback (pullback.fst f g) ((S.affineCover.pullbackCover f).map i) ≅
  pullback (pullback.snd f (S.affineCover.map i)) (pullback.fst (S.affineCover.map i) g) :=
  pullbackSymmetry (pullback.fst f g) ((S.affineCover.pullbackCover f).map i) ≪≫
    pullbackRightPullbackFstIso f g ((S.affineCover.pullbackCover f).map i) ≪≫
      asIso
          (pullback.map ((S.affineCover.pullbackCover f).map i ≫ f) g
            (pullback.snd f (S.affineCover.map i) ≫ S.affineCover.map i) g (𝟙 ((S.affineCover.pullbackCover f).obj i))
            (𝟙 Y) (𝟙 S) ⋯ ⋯) ≪≫
        (pullbackRightPullbackFstIso (S.affineCover.map i) g (pullback.snd f (S.affineCover.map i))).symm
this✝ :
  e.hom ≫ pullback.fst (pullback.snd f (S.affineCover.map i)) (pullback.fst (S.affineCover.map i) g) =
    (S.affineCover.pullbackCover f).pullbackHom (pullback.fst f g) i
this : Q.IsLocal := isLocal_affineProperty P
⊢ Q (pullback.snd g (S.affineCover.map i))
tactic: rw [← pullbackSymmetry_hom_comp_snd, Q.cancel_left_of_respectsIso]
state_before: case H
P : MorphismProperty Scheme
Q : AffineTargetMorphismProperty
inst✝ : HasAffineProperty P Q
X✝ Y✝ : Scheme
f✝ : X✝ ⟶ Y✝
hP' : Q.StableUnderBaseChange
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : P g
i : ((S.affineCover.pullbackCover f).pullbackCover (pullback.fst f g)).J
e : pullback (pullback.fst f g) ((S.affineCover.pullbackCover f).map i) ≅
  pullback (pullback.snd f (S.affineCover.map i)) (pullback.fst (S.affineCover.map i) g) :=
  pullbackSymmetry (pullback.fst f g) ((S.affineCover.pullbackCover f).map i) ≪≫
    pullbackRightPullbackFstIso f g ((S.affineCover.pullbackCover f).map i) ≪≫
      asIso
          (pullback.map ((S.affineCover.pullbackCover f).map i ≫ f) g
            (pullback.snd f (S.affineCover.map i) ≫ S.affineCover.map i) g (𝟙 ((S.affineCover.pullbackCover f).obj i))
            (𝟙 Y) (𝟙 S) ⋯ ⋯) ≪≫
        (pullbackRightPullbackFstIso (S.affineCover.map i) g (pullback.snd f (S.affineCover.map i))).symm
this✝ :
  e.hom ≫ pullback.fst (pullback.snd f (S.affineCover.map i)) (pullback.fst (S.affineCover.map i) g) =
    (S.affineCover.pullbackCover f).pullbackHom (pullback.fst f g) i
this : Q.IsLocal := isLocal_affineProperty P
⊢ Q (pullback.snd g (S.affineCover.map i))
state_after: no goals
tactic: apply of_isPullback (.of_hasPullback _ _) H