[GOAL]
P : AffineTargetMorphismProperty
X Y : Scheme
f : X ⟶ Y
i : IsAffine Y
⊢ toProperty P f ↔ P f
[PROOFSTEP]
delta AffineTargetMorphismProperty.toProperty
[GOAL]
P : AffineTargetMorphismProperty
X Y : Scheme
f : X ⟶ Y
i : IsAffine Y
⊢ (∃ h, P f) ↔ P f
[PROOFSTEP]
simp [*]
[GOAL]
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (AffineTargetMorphismProperty.toProperty P)
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
inst✝¹ : IsIso f
inst✝ : IsAffine Z
⊢ P (f ≫ g) ↔ P g
[PROOFSTEP]
rw [← P.toProperty_apply, ← P.toProperty_apply, hP.cancel_left_isIso]
[GOAL]
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (AffineTargetMorphismProperty.toProperty P)
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
inst✝² : IsIso g
inst✝¹ : IsAffine Z
inst✝ : IsAffine Y
⊢ P (f ≫ g) ↔ P f
[PROOFSTEP]
rw [← P.toProperty_apply, ← P.toProperty_apply, hP.cancel_right_isIso]
[GOAL]
P : AffineTargetMorphismProperty
h₁ : ∀ {X Y Z : Scheme} (e : X ≅ Y) (f : Y ⟶ Z) [inst : IsAffine Z], P f → P (e.hom ≫ f)
h₂ : ∀ {X Y Z : Scheme} (e : Y ≅ Z) (f : X ⟶ Y) [h : IsAffine Y], P f → P (f ≫ e.hom)
⊢ MorphismProperty.RespectsIso (toProperty P)
[PROOFSTEP]
constructor
[GOAL]
case left
P : AffineTargetMorphismProperty
h₁ : ∀ {X Y Z : Scheme} (e : X ≅ Y) (f : Y ⟶ Z) [inst : IsAffine Z], P f → P (e.hom ≫ f)
h₂ : ∀ {X Y Z : Scheme} (e : Y ≅ Z) (f : X ⟶ Y) [h : IsAffine Y], P f → P (f ≫ e.hom)
⊢ ∀ {X Y Z : Scheme} (e : X ≅ Y) (f : Y ⟶ Z), toProperty P f → toProperty P (e.hom ≫ f)
[PROOFSTEP]
rintro X Y Z e f ⟨a, h⟩
[GOAL]
case left.intro
P : AffineTargetMorphismProperty
h₁ : ∀ {X Y Z : Scheme} (e : X ≅ Y) (f : Y ⟶ Z) [inst : IsAffine Z], P f → P (e.hom ≫ f)
h₂ : ∀ {X Y Z : Scheme} (e : Y ≅ Z) (f : X ⟶ Y) [h : IsAffine Y], P f → P (f ≫ e.hom)
X Y Z : Scheme
e : X ≅ Y
f : Y ⟶ Z
a : IsAffine Z
h : P f
⊢ toProperty P (e.hom ≫ f)
[PROOFSTEP]
exact ⟨a, h₁ e f h⟩
[GOAL]
case right
P : AffineTargetMorphismProperty
h₁ : ∀ {X Y Z : Scheme} (e : X ≅ Y) (f : Y ⟶ Z) [inst : IsAffine Z], P f → P (e.hom ≫ f)
h₂ : ∀ {X Y Z : Scheme} (e : Y ≅ Z) (f : X ⟶ Y) [h : IsAffine Y], P f → P (f ≫ e.hom)
⊢ ∀ {X Y Z : Scheme} (e : Y ≅ Z) (f : X ⟶ Y), toProperty P f → toProperty P (f ≫ e.hom)
[PROOFSTEP]
rintro X Y Z e f ⟨a, h⟩
[GOAL]
case right.intro
P : AffineTargetMorphismProperty
h₁ : ∀ {X Y Z : Scheme} (e : X ≅ Y) (f : Y ⟶ Z) [inst : IsAffine Z], P f → P (e.hom ≫ f)
h₂ : ∀ {X Y Z : Scheme} (e : Y ≅ Z) (f : X ⟶ Y) [h : IsAffine Y], P f → P (f ≫ e.hom)
X Y Z : Scheme
e : Y ≅ Z
f : X ⟶ Y
a : IsAffine Y
h : P f
⊢ toProperty P (f ≫ e.hom)
[PROOFSTEP]
exact ⟨isAffineOfIso e.inv, h₂ e f h⟩
[GOAL]
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (AffineTargetMorphismProperty.toProperty P)
⊢ MorphismProperty.RespectsIso (targetAffineLocally P)
[PROOFSTEP]
constructor
[GOAL]
case left
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (AffineTargetMorphismProperty.toProperty P)
⊢ ∀ {X Y Z : Scheme} (e : X ≅ Y) (f : Y ⟶ Z), targetAffineLocally P f → targetAffineLocally P (e.hom ≫ f)
[PROOFSTEP]
introv H U
[GOAL]
case left
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (AffineTargetMorphismProperty.toProperty P)
X Y Z : Scheme
e : X ≅ Y
f : Y ⟶ Z
H : targetAffineLocally P f
U : ↑(Scheme.affineOpens Z)
⊢ P ((e.hom ≫ f) ∣_ ↑U)
[PROOFSTEP]
haveI : IsAffine _ := U.prop
[GOAL]
case left
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (AffineTargetMorphismProperty.toProperty P)
X Y Z : Scheme
e : X ≅ Y
f : Y ⟶ Z
H : targetAffineLocally P f
U : ↑(Scheme.affineOpens Z)
this : IsAffine (Scheme.restrict Z (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
⊢ P ((e.hom ≫ f) ∣_ ↑U)
[PROOFSTEP]
rw [morphismRestrict_comp, affine_cancel_left_isIso hP]
[GOAL]
case left
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (AffineTargetMorphismProperty.toProperty P)
X Y Z : Scheme
e : X ≅ Y
f : Y ⟶ Z
H : targetAffineLocally P f
U : ↑(Scheme.affineOpens Z)
this : IsAffine (Scheme.restrict Z (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
⊢ P (f ∣_ ↑U)
[PROOFSTEP]
exact H U
[GOAL]
case right
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (AffineTargetMorphismProperty.toProperty P)
⊢ ∀ {X Y Z : Scheme} (e : Y ≅ Z) (f : X ⟶ Y), targetAffineLocally P f → targetAffineLocally P (f ≫ e.hom)
[PROOFSTEP]
introv H
[GOAL]
case right
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (AffineTargetMorphismProperty.toProperty P)
X Y Z : Scheme
e : Y ≅ Z
f : X ⟶ Y
H : targetAffineLocally P f
⊢ targetAffineLocally P (f ≫ e.hom)
[PROOFSTEP]
rintro ⟨U, hU : IsAffineOpen U⟩
[GOAL]
case right.mk
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (AffineTargetMorphismProperty.toProperty P)
X Y Z : Scheme
e : Y ≅ Z
f : X ⟶ Y
H : targetAffineLocally P f
U : Opens ↑↑Z.toPresheafedSpace
hU : IsAffineOpen U
⊢ P ((f ≫ e.hom) ∣_ ↑{ val := U, property := hU })
[PROOFSTEP]
dsimp
[GOAL]
case right.mk
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (AffineTargetMorphismProperty.toProperty P)
X Y Z : Scheme
e : Y ≅ Z
f : X ⟶ Y
H : targetAffineLocally P f
U : Opens ↑↑Z.toPresheafedSpace
hU : IsAffineOpen U
⊢ P ((f ≫ e.hom) ∣_ U)
[PROOFSTEP]
haveI : IsAffine _ := hU
[GOAL]
case right.mk
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (AffineTargetMorphismProperty.toProperty P)
X Y Z : Scheme
e : Y ≅ Z
f : X ⟶ Y
H : targetAffineLocally P f
U : Opens ↑↑Z.toPresheafedSpace
hU : IsAffineOpen U
this : IsAffine (Scheme.restrict Z (_ : OpenEmbedding ↑(Opens.inclusion U)))
⊢ P ((f ≫ e.hom) ∣_ U)
[PROOFSTEP]
haveI : IsAffine _ := hU.map_isIso e.hom
[GOAL]
case right.mk
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (AffineTargetMorphismProperty.toProperty P)
X Y Z : Scheme
e : Y ≅ Z
f : X ⟶ Y
H : targetAffineLocally P f
U : Opens ↑↑Z.toPresheafedSpace
hU : IsAffineOpen U
this✝ : IsAffine (Scheme.restrict Z (_ : OpenEmbedding ↑(Opens.inclusion U)))
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map e.hom.val.base).obj U))))
⊢ P ((f ≫ e.hom) ∣_ U)
[PROOFSTEP]
rw [morphismRestrict_comp, affine_cancel_right_isIso hP]
[GOAL]
case right.mk
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (AffineTargetMorphismProperty.toProperty P)
X Y Z : Scheme
e : Y ≅ Z
f : X ⟶ Y
H : targetAffineLocally P f
U : Opens ↑↑Z.toPresheafedSpace
hU : IsAffineOpen U
this✝ : IsAffine (Scheme.restrict Z (_ : OpenEmbedding ↑(Opens.inclusion U)))
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map e.hom.val.base).obj U))))
⊢ P (f ∣_ (Opens.map e.hom.val.base).obj U)
[PROOFSTEP]
exact H ⟨(Opens.map e.hom.val.base).obj U, hU.map_isIso e.hom⟩
[GOAL]
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
⊢ targetAffineLocally P f
[PROOFSTEP]
classical
let S i :=
  (⟨⟨Set.range (𝒰.map i).1.base, (𝒰.IsOpen i).base_open.open_range⟩, rangeIsAffineOpenOfOpenImmersion (𝒰.map i)⟩ :
    Y.affineOpens)
intro U
apply of_affine_open_cover (P := _) U (Set.range S)
· intro U r h
  haveI : IsAffine _ := U.2
  have := hP.2 (f ∣_ U.1)
  replace this := this (Y.presheaf.map (eqToHom U.1.openEmbedding_obj_top).op r) h
  haveI i1 : IsAffine (Y.restrict (Scheme.affineBasicOpen Y r).1.openEmbedding) := (Scheme.affineBasicOpen Y r).2
  haveI i2 :
    IsAffine
      ((Y.restrict U.1.openEmbedding).restrict
        ((Y.restrict U.1.openEmbedding).basicOpen <|
            (Y.presheaf.map (eqToHom U.1.openEmbedding_obj_top).op r)).openEmbedding) :=
    IsAffineOpen.basicOpenIsAffine (X := Y.restrict U.1.openEmbedding) (topIsAffineOpen _) _
  rw [← P.toProperty_apply] at this ⊢
  exact (hP.1.arrow_mk_iso_iff (morphismRestrictRestrictBasicOpen f _ r)).mp this
· intro U s hs H
  haveI : IsAffine _ := U.2
  apply hP.3 (f ∣_ U.1) (s.image (Y.presheaf.map (eqToHom U.1.openEmbedding_obj_top).op))
  · apply_fun Ideal.comap (Y.presheaf.map (eqToHom U.1.openEmbedding_obj_top.symm).op) at hs
    rw [Ideal.comap_top] at hs
    rw [← hs]
    simp only [eqToHom_op, eqToHom_map, Finset.coe_image]
    have :
      ∀ {R S : CommRingCat} (e : S = R) (s : Set S),
        Ideal.span (eqToHom e '' s) = Ideal.comap (eqToHom e.symm) (Ideal.span s) :=
      by
      intro _ _ e _
      subst e
      simp only [eqToHom_refl, id_apply, Set.image_id']
        -- Porting note : Lean didn't see `𝟙 _` is just ring hom id
      exact (Ideal.comap_id _).symm
    apply this
  · rintro ⟨r, hr⟩
    obtain ⟨r, hr', rfl⟩ := Finset.mem_image.mp hr
    specialize
      H
        ⟨r, hr'⟩
          -- Porting note : the following 2 instances was not necessary
    haveI i1 : IsAffine (Y.restrict (Scheme.affineBasicOpen Y r).1.openEmbedding) := (Scheme.affineBasicOpen Y r).2
    haveI i2 :
      IsAffine
        ((Y.restrict U.1.openEmbedding).restrict
          ((Y.restrict U.1.openEmbedding).basicOpen <|
              (Y.presheaf.map (eqToHom U.1.openEmbedding_obj_top).op r)).openEmbedding) :=
      IsAffineOpen.basicOpenIsAffine (X := Y.restrict U.1.openEmbedding) (topIsAffineOpen _) _
    rw [← P.toProperty_apply] at H ⊢
    exact (hP.1.arrow_mk_iso_iff (morphismRestrictRestrictBasicOpen f _ r)).mpr H
· rw [Set.eq_univ_iff_forall]
  simp only [Set.mem_iUnion]
  intro x
  exact ⟨⟨_, ⟨𝒰.f x, rfl⟩⟩, 𝒰.Covers x⟩
· rintro ⟨_, i, rfl⟩
  specialize h𝒰 i
  haveI i1 : IsAffine (Y.restrict (S i).1.openEmbedding) := (S i).2
  rw [← P.toProperty_apply] at h𝒰 ⊢
  exact (hP.1.arrow_mk_iso_iff (morphismRestrictOpensRange f _)).mpr h𝒰
[GOAL]
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
⊢ targetAffineLocally P f
[PROOFSTEP]
let S i :=
  (⟨⟨Set.range (𝒰.map i).1.base, (𝒰.IsOpen i).base_open.open_range⟩, rangeIsAffineOpenOfOpenImmersion (𝒰.map i)⟩ :
    Y.affineOpens)
[GOAL]
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
⊢ targetAffineLocally P f
[PROOFSTEP]
intro U
[GOAL]
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U : ↑(Scheme.affineOpens Y)
⊢ P (f ∣_ ↑U)
[PROOFSTEP]
apply of_affine_open_cover (P := _) U (Set.range S)
[GOAL]
case hP₁
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U : ↑(Scheme.affineOpens Y)
⊢ ∀ (U : ↑(Scheme.affineOpens Y)) (f_1 : ↑(Y.presheaf.obj (op ↑U))),
    P (f ∣_ ↑U) → P (f ∣_ ↑(Scheme.affineBasicOpen Y f_1))
[PROOFSTEP]
intro U r h
[GOAL]
case hP₁
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U✝ U : ↑(Scheme.affineOpens Y)
r : ↑(Y.presheaf.obj (op ↑U))
h : P (f ∣_ ↑U)
⊢ P (f ∣_ ↑(Scheme.affineBasicOpen Y r))
[PROOFSTEP]
haveI : IsAffine _ := U.2
[GOAL]
case hP₁
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U✝ U : ↑(Scheme.affineOpens Y)
r : ↑(Y.presheaf.obj (op ↑U))
h : P (f ∣_ ↑U)
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
⊢ P (f ∣_ ↑(Scheme.affineBasicOpen Y r))
[PROOFSTEP]
have := hP.2 (f ∣_ U.1)
[GOAL]
case hP₁
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U✝ U : ↑(Scheme.affineOpens Y)
r : ↑(Y.presheaf.obj (op ↑U))
h : P (f ∣_ ↑U)
this✝ : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
this :
  ∀
    (r :
      ↑((Scheme.restrict Y
                      (_ :
                        OpenEmbedding
                          ↑(Opens.inclusion ↑U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj
          (op ⊤))),
    P (f ∣_ ↑U) → P (f ∣_ ↑U ∣_ Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))) r)
⊢ P (f ∣_ ↑(Scheme.affineBasicOpen Y r))
[PROOFSTEP]
replace this := this (Y.presheaf.map (eqToHom U.1.openEmbedding_obj_top).op r) h
[GOAL]
case hP₁
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U✝ U : ↑(Scheme.affineOpens Y)
r : ↑(Y.presheaf.obj (op ↑U))
h : P (f ∣_ ↑U)
this✝ : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
this :
  P
    (f ∣_ ↑U ∣_
      Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
        (↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r))
⊢ P (f ∣_ ↑(Scheme.affineBasicOpen Y r))
[PROOFSTEP]
haveI i1 : IsAffine (Y.restrict (Scheme.affineBasicOpen Y r).1.openEmbedding) := (Scheme.affineBasicOpen Y r).2
[GOAL]
case hP₁
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U✝ U : ↑(Scheme.affineOpens Y)
r : ↑(Y.presheaf.obj (op ↑U))
h : P (f ∣_ ↑U)
this✝ : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
this :
  P
    (f ∣_ ↑U ∣_
      Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
        (↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r))
i1 : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑(Scheme.affineBasicOpen Y r))))
⊢ P (f ∣_ ↑(Scheme.affineBasicOpen Y r))
[PROOFSTEP]
haveI i2 :
  IsAffine
    ((Y.restrict U.1.openEmbedding).restrict
      ((Y.restrict U.1.openEmbedding).basicOpen <|
          (Y.presheaf.map (eqToHom U.1.openEmbedding_obj_top).op r)).openEmbedding) :=
  IsAffineOpen.basicOpenIsAffine (X := Y.restrict U.1.openEmbedding) (topIsAffineOpen _) _
[GOAL]
case hP₁
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U✝ U : ↑(Scheme.affineOpens Y)
r : ↑(Y.presheaf.obj (op ↑U))
h : P (f ∣_ ↑U)
this✝ : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
this :
  P
    (f ∣_ ↑U ∣_
      Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
        (↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r))
i1 : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑(Scheme.affineBasicOpen Y r))))
i2 :
  IsAffine
    (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
      (_ :
        OpenEmbedding
          ↑(Opens.inclusion
              (Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
                (↑(Y.presheaf.map
                      (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)
                  r)))))
⊢ P (f ∣_ ↑(Scheme.affineBasicOpen Y r))
[PROOFSTEP]
rw [← P.toProperty_apply] at this ⊢
[GOAL]
case hP₁
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U✝ U : ↑(Scheme.affineOpens Y)
r : ↑(Y.presheaf.obj (op ↑U))
h : P (f ∣_ ↑U)
this✝ : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
this :
  AffineTargetMorphismProperty.toProperty P
    (f ∣_ ↑U ∣_
      Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
        (↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r))
i1 : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑(Scheme.affineBasicOpen Y r))))
i2 :
  IsAffine
    (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
      (_ :
        OpenEmbedding
          ↑(Opens.inclusion
              (Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
                (↑(Y.presheaf.map
                      (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)
                  r)))))
⊢ AffineTargetMorphismProperty.toProperty P (f ∣_ ↑(Scheme.affineBasicOpen Y r))
[PROOFSTEP]
exact (hP.1.arrow_mk_iso_iff (morphismRestrictRestrictBasicOpen f _ r)).mp this
[GOAL]
case hP₂
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U : ↑(Scheme.affineOpens Y)
⊢ ∀ (U : ↑(Scheme.affineOpens Y)) (s : Finset ↑(Y.presheaf.obj (op ↑U))),
    Ideal.span ↑s = ⊤ → (∀ (f_1 : { x // x ∈ s }), P (f ∣_ ↑(Scheme.affineBasicOpen Y ↑f_1))) → P (f ∣_ ↑U)
[PROOFSTEP]
intro U s hs H
[GOAL]
case hP₂
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U✝ U : ↑(Scheme.affineOpens Y)
s : Finset ↑(Y.presheaf.obj (op ↑U))
hs : Ideal.span ↑s = ⊤
H : ∀ (f_1 : { x // x ∈ s }), P (f ∣_ ↑(Scheme.affineBasicOpen Y ↑f_1))
⊢ P (f ∣_ ↑U)
[PROOFSTEP]
haveI : IsAffine _ := U.2
[GOAL]
case hP₂
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U✝ U : ↑(Scheme.affineOpens Y)
s : Finset ↑(Y.presheaf.obj (op ↑U))
hs : Ideal.span ↑s = ⊤
H : ∀ (f_1 : { x // x ∈ s }), P (f ∣_ ↑(Scheme.affineBasicOpen Y ↑f_1))
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
⊢ P (f ∣_ ↑U)
[PROOFSTEP]
apply hP.3 (f ∣_ U.1) (s.image (Y.presheaf.map (eqToHom U.1.openEmbedding_obj_top).op))
[GOAL]
case hP₂.x
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U✝ U : ↑(Scheme.affineOpens Y)
s : Finset ↑(Y.presheaf.obj (op ↑U))
hs : Ideal.span ↑s = ⊤
H : ∀ (f_1 : { x // x ∈ s }), P (f ∣_ ↑(Scheme.affineBasicOpen Y ↑f_1))
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
⊢ Ideal.span
      ↑(Finset.image
          (↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op))
          s) =
    ⊤
[PROOFSTEP]
apply_fun Ideal.comap (Y.presheaf.map (eqToHom U.1.openEmbedding_obj_top.symm).op) at hs
[GOAL]
case hP₂.x
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U✝ U : ↑(Scheme.affineOpens Y)
s : Finset ↑(Y.presheaf.obj (op ↑U))
H : ∀ (f_1 : { x // x ∈ s }), P (f ∣_ ↑(Scheme.affineBasicOpen Y ↑f_1))
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
hs :
  Ideal.comap (Y.presheaf.map (eqToHom (_ : ↑U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤)).op)
      (Ideal.span ↑s) =
    Ideal.comap (Y.presheaf.map (eqToHom (_ : ↑U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤)).op)
      ⊤
⊢ Ideal.span
      ↑(Finset.image
          (↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op))
          s) =
    ⊤
[PROOFSTEP]
rw [Ideal.comap_top] at hs
[GOAL]
case hP₂.x
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U✝ U : ↑(Scheme.affineOpens Y)
s : Finset ↑(Y.presheaf.obj (op ↑U))
H : ∀ (f_1 : { x // x ∈ s }), P (f ∣_ ↑(Scheme.affineBasicOpen Y ↑f_1))
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
hs :
  Ideal.comap (Y.presheaf.map (eqToHom (_ : ↑U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤)).op)
      (Ideal.span ↑s) =
    ⊤
⊢ Ideal.span
      ↑(Finset.image
          (↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op))
          s) =
    ⊤
[PROOFSTEP]
rw [← hs]
[GOAL]
case hP₂.x
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U✝ U : ↑(Scheme.affineOpens Y)
s : Finset ↑(Y.presheaf.obj (op ↑U))
H : ∀ (f_1 : { x // x ∈ s }), P (f ∣_ ↑(Scheme.affineBasicOpen Y ↑f_1))
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
hs :
  Ideal.comap (Y.presheaf.map (eqToHom (_ : ↑U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤)).op)
      (Ideal.span ↑s) =
    ⊤
⊢ Ideal.span
      ↑(Finset.image
          (↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op))
          s) =
    Ideal.comap (Y.presheaf.map (eqToHom (_ : ↑U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤)).op)
      (Ideal.span ↑s)
[PROOFSTEP]
simp only [eqToHom_op, eqToHom_map, Finset.coe_image]
[GOAL]
case hP₂.x
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U✝ U : ↑(Scheme.affineOpens Y)
s : Finset ↑(Y.presheaf.obj (op ↑U))
H : ∀ (f_1 : { x // x ∈ s }), P (f ∣_ ↑(Scheme.affineBasicOpen Y ↑f_1))
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
hs :
  Ideal.comap (Y.presheaf.map (eqToHom (_ : ↑U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤)).op)
      (Ideal.span ↑s) =
    ⊤
⊢ Ideal.span
      (↑(eqToHom
            (_ :
              Y.presheaf.obj (op ↑U) =
                Y.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤)))) ''
        ↑s) =
    Ideal.comap
      (eqToHom
        (_ :
          Y.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤)) =
            Y.presheaf.obj (op ↑U)))
      (Ideal.span ↑s)
[PROOFSTEP]
have :
  ∀ {R S : CommRingCat} (e : S = R) (s : Set S),
    Ideal.span (eqToHom e '' s) = Ideal.comap (eqToHom e.symm) (Ideal.span s) :=
  by
  intro _ _ e _
  subst e
  simp only [eqToHom_refl, id_apply, Set.image_id']
    -- Porting note : Lean didn't see `𝟙 _` is just ring hom id
  exact (Ideal.comap_id _).symm
[GOAL]
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U✝ U : ↑(Scheme.affineOpens Y)
s : Finset ↑(Y.presheaf.obj (op ↑U))
H : ∀ (f_1 : { x // x ∈ s }), P (f ∣_ ↑(Scheme.affineBasicOpen Y ↑f_1))
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
hs :
  Ideal.comap (Y.presheaf.map (eqToHom (_ : ↑U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤)).op)
      (Ideal.span ↑s) =
    ⊤
⊢ ∀ {R S : CommRingCat} (e : S = R) (s : Set ↑S),
    Ideal.span (↑(eqToHom e) '' s) = Ideal.comap (eqToHom (_ : R = S)) (Ideal.span s)
[PROOFSTEP]
intro _ _ e _
[GOAL]
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U✝ U : ↑(Scheme.affineOpens Y)
s : Finset ↑(Y.presheaf.obj (op ↑U))
H : ∀ (f_1 : { x // x ∈ s }), P (f ∣_ ↑(Scheme.affineBasicOpen Y ↑f_1))
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
hs :
  Ideal.comap (Y.presheaf.map (eqToHom (_ : ↑U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤)).op)
      (Ideal.span ↑s) =
    ⊤
R✝ S✝ : CommRingCat
e : S✝ = R✝
s✝ : Set ↑S✝
⊢ Ideal.span (↑(eqToHom e) '' s✝) = Ideal.comap (eqToHom (_ : R✝ = S✝)) (Ideal.span s✝)
[PROOFSTEP]
subst e
[GOAL]
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U✝ U : ↑(Scheme.affineOpens Y)
s : Finset ↑(Y.presheaf.obj (op ↑U))
H : ∀ (f_1 : { x // x ∈ s }), P (f ∣_ ↑(Scheme.affineBasicOpen Y ↑f_1))
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
hs :
  Ideal.comap (Y.presheaf.map (eqToHom (_ : ↑U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤)).op)
      (Ideal.span ↑s) =
    ⊤
S✝ : CommRingCat
s✝ : Set ↑S✝
⊢ Ideal.span (↑(eqToHom (_ : S✝ = S✝)) '' s✝) = Ideal.comap (eqToHom (_ : S✝ = S✝)) (Ideal.span s✝)
[PROOFSTEP]
simp only [eqToHom_refl, id_apply, Set.image_id']
  -- Porting note : Lean didn't see `𝟙 _` is just ring hom id
[GOAL]
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U✝ U : ↑(Scheme.affineOpens Y)
s : Finset ↑(Y.presheaf.obj (op ↑U))
H : ∀ (f_1 : { x // x ∈ s }), P (f ∣_ ↑(Scheme.affineBasicOpen Y ↑f_1))
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
hs :
  Ideal.comap (Y.presheaf.map (eqToHom (_ : ↑U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤)).op)
      (Ideal.span ↑s) =
    ⊤
S✝ : CommRingCat
s✝ : Set ↑S✝
⊢ Ideal.span s✝ = Ideal.comap (𝟙 S✝) (Ideal.span s✝)
[PROOFSTEP]
exact (Ideal.comap_id _).symm
[GOAL]
case hP₂.x
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U✝ U : ↑(Scheme.affineOpens Y)
s : Finset ↑(Y.presheaf.obj (op ↑U))
H : ∀ (f_1 : { x // x ∈ s }), P (f ∣_ ↑(Scheme.affineBasicOpen Y ↑f_1))
this✝ : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
hs :
  Ideal.comap (Y.presheaf.map (eqToHom (_ : ↑U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤)).op)
      (Ideal.span ↑s) =
    ⊤
this :
  ∀ {R S : CommRingCat} (e : S = R) (s : Set ↑S),
    Ideal.span (↑(eqToHom e) '' s) = Ideal.comap (eqToHom (_ : R = S)) (Ideal.span s)
⊢ Ideal.span
      (↑(eqToHom
            (_ :
              Y.presheaf.obj (op ↑U) =
                Y.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤)))) ''
        ↑s) =
    Ideal.comap
      (eqToHom
        (_ :
          Y.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤)) =
            Y.presheaf.obj (op ↑U)))
      (Ideal.span ↑s)
[PROOFSTEP]
apply this
[GOAL]
case hP₂.a
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U✝ U : ↑(Scheme.affineOpens Y)
s : Finset ↑(Y.presheaf.obj (op ↑U))
hs : Ideal.span ↑s = ⊤
H : ∀ (f_1 : { x // x ∈ s }), P (f ∣_ ↑(Scheme.affineBasicOpen Y ↑f_1))
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
⊢ ∀
    (r :
      { x //
        x ∈
          Finset.image
            (↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op))
            s }),
    P (f ∣_ ↑U ∣_ Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))) ↑r)
[PROOFSTEP]
rintro ⟨r, hr⟩
[GOAL]
case hP₂.a.mk
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U✝ U : ↑(Scheme.affineOpens Y)
s : Finset ↑(Y.presheaf.obj (op ↑U))
hs : Ideal.span ↑s = ⊤
H : ∀ (f_1 : { x // x ∈ s }), P (f ∣_ ↑(Scheme.affineBasicOpen Y ↑f_1))
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
r :
  ↑((Scheme.restrict Y
                  (_ :
                    OpenEmbedding
                      ↑(Opens.inclusion ↑U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj
      (op ⊤))
hr :
  r ∈
    Finset.image
      (↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)) s
⊢ P
    (f ∣_ ↑U ∣_
      Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))) ↑{ val := r, property := hr })
[PROOFSTEP]
obtain ⟨r, hr', rfl⟩ := Finset.mem_image.mp hr
[GOAL]
case hP₂.a.mk.intro.intro
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U✝ U : ↑(Scheme.affineOpens Y)
s : Finset ↑(Y.presheaf.obj (op ↑U))
hs : Ideal.span ↑s = ⊤
H : ∀ (f_1 : { x // x ∈ s }), P (f ∣_ ↑(Scheme.affineBasicOpen Y ↑f_1))
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
r : (forget CommRingCat).obj (Y.presheaf.obj (op ↑U))
hr' : r ∈ s
hr :
  ↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r ∈
    Finset.image
      (↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)) s
⊢ P
    (f ∣_ ↑U ∣_
      Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
        ↑{
            val :=
              ↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)
                r,
            property := hr })
[PROOFSTEP]
specialize
  H
    ⟨r, hr'⟩
      -- Porting note : the following 2 instances was not necessary
[GOAL]
case hP₂.a.mk.intro.intro
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U✝ U : ↑(Scheme.affineOpens Y)
s : Finset ↑(Y.presheaf.obj (op ↑U))
hs : Ideal.span ↑s = ⊤
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
r : (forget CommRingCat).obj (Y.presheaf.obj (op ↑U))
hr' : r ∈ s
hr :
  ↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r ∈
    Finset.image
      (↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)) s
H : P (f ∣_ ↑(Scheme.affineBasicOpen Y ↑{ val := r, property := hr' }))
⊢ P
    (f ∣_ ↑U ∣_
      Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
        ↑{
            val :=
              ↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)
                r,
            property := hr })
[PROOFSTEP]
haveI i1 : IsAffine (Y.restrict (Scheme.affineBasicOpen Y r).1.openEmbedding) := (Scheme.affineBasicOpen Y r).2
[GOAL]
case hP₂.a.mk.intro.intro
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U✝ U : ↑(Scheme.affineOpens Y)
s : Finset ↑(Y.presheaf.obj (op ↑U))
hs : Ideal.span ↑s = ⊤
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
r : (forget CommRingCat).obj (Y.presheaf.obj (op ↑U))
hr' : r ∈ s
hr :
  ↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r ∈
    Finset.image
      (↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)) s
H : P (f ∣_ ↑(Scheme.affineBasicOpen Y ↑{ val := r, property := hr' }))
i1 : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑(Scheme.affineBasicOpen Y r))))
⊢ P
    (f ∣_ ↑U ∣_
      Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
        ↑{
            val :=
              ↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)
                r,
            property := hr })
[PROOFSTEP]
haveI i2 :
  IsAffine
    ((Y.restrict U.1.openEmbedding).restrict
      ((Y.restrict U.1.openEmbedding).basicOpen <|
          (Y.presheaf.map (eqToHom U.1.openEmbedding_obj_top).op r)).openEmbedding) :=
  IsAffineOpen.basicOpenIsAffine (X := Y.restrict U.1.openEmbedding) (topIsAffineOpen _) _
[GOAL]
case hP₂.a.mk.intro.intro
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U✝ U : ↑(Scheme.affineOpens Y)
s : Finset ↑(Y.presheaf.obj (op ↑U))
hs : Ideal.span ↑s = ⊤
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
r : (forget CommRingCat).obj (Y.presheaf.obj (op ↑U))
hr' : r ∈ s
hr :
  ↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r ∈
    Finset.image
      (↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)) s
H : P (f ∣_ ↑(Scheme.affineBasicOpen Y ↑{ val := r, property := hr' }))
i1 : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑(Scheme.affineBasicOpen Y r))))
i2 :
  IsAffine
    (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
      (_ :
        OpenEmbedding
          ↑(Opens.inclusion
              (Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
                (↑(Y.presheaf.map
                      (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)
                  r)))))
⊢ P
    (f ∣_ ↑U ∣_
      Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
        ↑{
            val :=
              ↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)
                r,
            property := hr })
[PROOFSTEP]
rw [← P.toProperty_apply] at H ⊢
[GOAL]
case hP₂.a.mk.intro.intro
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U✝ U : ↑(Scheme.affineOpens Y)
s : Finset ↑(Y.presheaf.obj (op ↑U))
hs : Ideal.span ↑s = ⊤
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
r : (forget CommRingCat).obj (Y.presheaf.obj (op ↑U))
hr' : r ∈ s
hr :
  ↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r ∈
    Finset.image
      (↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)) s
H : AffineTargetMorphismProperty.toProperty P (f ∣_ ↑(Scheme.affineBasicOpen Y ↑{ val := r, property := hr' }))
i1 : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑(Scheme.affineBasicOpen Y r))))
i2 :
  IsAffine
    (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
      (_ :
        OpenEmbedding
          ↑(Opens.inclusion
              (Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
                (↑(Y.presheaf.map
                      (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)
                  r)))))
⊢ AffineTargetMorphismProperty.toProperty P
    (f ∣_ ↑U ∣_
      Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))
        ↑{
            val :=
              ↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)
                r,
            property := hr })
[PROOFSTEP]
exact (hP.1.arrow_mk_iso_iff (morphismRestrictRestrictBasicOpen f _ r)).mpr H
[GOAL]
case hS
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U : ↑(Scheme.affineOpens Y)
⊢ ⋃ (i : ↑(Set.range S)), ↑↑↑i = Set.univ
[PROOFSTEP]
rw [Set.eq_univ_iff_forall]
[GOAL]
case hS
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U : ↑(Scheme.affineOpens Y)
⊢ ∀ (x : ↑↑Y.toPresheafedSpace), x ∈ ⋃ (i : ↑(Set.range S)), ↑↑↑i
[PROOFSTEP]
simp only [Set.mem_iUnion]
[GOAL]
case hS
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U : ↑(Scheme.affineOpens Y)
⊢ ∀ (x : ↑↑Y.toPresheafedSpace), ∃ i, x ∈ ↑↑↑i
[PROOFSTEP]
intro x
[GOAL]
case hS
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U : ↑(Scheme.affineOpens Y)
x : ↑↑Y.toPresheafedSpace
⊢ ∃ i, x ∈ ↑↑↑i
[PROOFSTEP]
exact ⟨⟨_, ⟨𝒰.f x, rfl⟩⟩, 𝒰.Covers x⟩
[GOAL]
case hS'
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U : ↑(Scheme.affineOpens Y)
⊢ ∀ (U : ↑(Set.range S)), P (f ∣_ ↑↑U)
[PROOFSTEP]
rintro ⟨_, i, rfl⟩
[GOAL]
case hS'.mk.intro
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
h𝒰 : ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 f).J), P pullback.snd
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U : ↑(Scheme.affineOpens Y)
i : 𝒰.J
⊢ P (f ∣_ ↑↑{ val := S i, property := (_ : ∃ y, S y = S i) })
[PROOFSTEP]
specialize h𝒰 i
[GOAL]
case hS'.mk.intro
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U : ↑(Scheme.affineOpens Y)
i : 𝒰.J
h𝒰 : P pullback.snd
⊢ P (f ∣_ ↑↑{ val := S i, property := (_ : ∃ y, S y = S i) })
[PROOFSTEP]
haveI i1 : IsAffine (Y.restrict (S i).1.openEmbedding) := (S i).2
[GOAL]
case hS'.mk.intro
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U : ↑(Scheme.affineOpens Y)
i : 𝒰.J
h𝒰 : P pullback.snd
i1 : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑(S i))))
⊢ P (f ∣_ ↑↑{ val := S i, property := (_ : ∃ y, S y = S i) })
[PROOFSTEP]
rw [← P.toProperty_apply] at h𝒰 ⊢
[GOAL]
case hS'.mk.intro
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
S : 𝒰.J → { x // x ∈ Scheme.affineOpens Y } :=
  fun i =>
    {
      val :=
        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,
          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },
      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }
U : ↑(Scheme.affineOpens Y)
i : 𝒰.J
h𝒰 : AffineTargetMorphismProperty.toProperty P pullback.snd
i1 : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑(S i))))
⊢ AffineTargetMorphismProperty.toProperty P (f ∣_ ↑↑{ val := S i, property := (_ : ∃ y, S y = S i) })
[PROOFSTEP]
exact (hP.1.arrow_mk_iso_iff (morphismRestrictOpensRange f _)).mpr h𝒰
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
⊢ TFAE
    [targetAffineLocally P f, ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd,
      ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd,
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd,
      ∃ ι U x hU', ∀ (i : ι), P (f ∣_ U i)]
[PROOFSTEP]
tfae_have 1 → 4
[GOAL]
case tfae_1_to_4
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
⊢ targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
[PROOFSTEP]
intro H U g h₁ h₂
[GOAL]
case tfae_1_to_4
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
H : targetAffineLocally P f
U : Scheme
g : U ⟶ Y
h₁ : IsAffine U
h₂ : IsOpenImmersion g
⊢ P pullback.snd
[PROOFSTEP]
set U' : Opens _ := ⟨_, h₂.base_open.open_range⟩
[GOAL]
case tfae_1_to_4
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
H : targetAffineLocally P f
U : Scheme
g : U ⟶ Y
h₁ : IsAffine U
h₂ : IsOpenImmersion g
U' : Opens ((forget TopCat).obj ↑Y.toPresheafedSpace) :=
  { carrier := Set.range ↑g.val.base, is_open' := (_ : IsOpen (Set.range ↑g.val.base)) }
⊢ P pullback.snd
[PROOFSTEP]
replace H := H ⟨U', rangeIsAffineOpenOfOpenImmersion g⟩
[GOAL]
case tfae_1_to_4
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
U : Scheme
g : U ⟶ Y
h₁ : IsAffine U
h₂ : IsOpenImmersion g
U' : Opens ((forget TopCat).obj ↑Y.toPresheafedSpace) :=
  { carrier := Set.range ↑g.val.base, is_open' := (_ : IsOpen (Set.range ↑g.val.base)) }
H : P (f ∣_ ↑{ val := U', property := (_ : IsAffineOpen (Scheme.Hom.opensRange g)) })
⊢ P pullback.snd
[PROOFSTEP]
haveI i1 : IsAffine (Y.restrict U'.openEmbedding) := rangeIsAffineOpenOfOpenImmersion g
[GOAL]
case tfae_1_to_4
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
U : Scheme
g : U ⟶ Y
h₁ : IsAffine U
h₂ : IsOpenImmersion g
U' : Opens ((forget TopCat).obj ↑Y.toPresheafedSpace) :=
  { carrier := Set.range ↑g.val.base, is_open' := (_ : IsOpen (Set.range ↑g.val.base)) }
H : P (f ∣_ ↑{ val := U', property := (_ : IsAffineOpen (Scheme.Hom.opensRange g)) })
i1 : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U')))
⊢ P pullback.snd
[PROOFSTEP]
rw [← P.toProperty_apply] at H ⊢
[GOAL]
case tfae_1_to_4
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
U : Scheme
g : U ⟶ Y
h₁ : IsAffine U
h₂ : IsOpenImmersion g
U' : Opens ((forget TopCat).obj ↑Y.toPresheafedSpace) :=
  { carrier := Set.range ↑g.val.base, is_open' := (_ : IsOpen (Set.range ↑g.val.base)) }
H : toProperty P (f ∣_ ↑{ val := U', property := (_ : IsAffineOpen (Scheme.Hom.opensRange g)) })
i1 : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U')))
⊢ toProperty P pullback.snd
[PROOFSTEP]
rwa [← hP.1.arrow_mk_iso_iff (morphismRestrictOpensRange f _)]
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
⊢ TFAE
    [targetAffineLocally P f, ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd,
      ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd,
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd,
      ∃ ι U x hU', ∀ (i : ι), P (f ∣_ U i)]
[PROOFSTEP]
tfae_have 4 → 3
[GOAL]
case tfae_4_to_3
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
⊢ (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
[PROOFSTEP]
intro H 𝒰 h𝒰 i
[GOAL]
case tfae_4_to_3
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
H : ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
𝒰 : Scheme.OpenCover Y
h𝒰 : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
i : 𝒰.J
⊢ P pullback.snd
[PROOFSTEP]
apply H
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
⊢ TFAE
    [targetAffineLocally P f, ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd,
      ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd,
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd,
      ∃ ι U x hU', ∀ (i : ι), P (f ∣_ U i)]
[PROOFSTEP]
tfae_have 3 → 2
[GOAL]
case tfae_3_to_2
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
⊢ (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
[PROOFSTEP]
exact fun H => ⟨Y.affineCover, inferInstance, H Y.affineCover⟩
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
⊢ TFAE
    [targetAffineLocally P f, ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd,
      ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd,
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd,
      ∃ ι U x hU', ∀ (i : ι), P (f ∣_ U i)]
[PROOFSTEP]
tfae_have 2 → 1
[GOAL]
case tfae_2_to_1
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
⊢ (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
[PROOFSTEP]
rintro ⟨𝒰, h𝒰, H⟩
[GOAL]
case tfae_2_to_1.intro.intro
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
𝒰 : Scheme.OpenCover Y
h𝒰 : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
H : ∀ (i : 𝒰.J), P pullback.snd
⊢ targetAffineLocally P f
[PROOFSTEP]
exact targetAffineLocallyOfOpenCover hP f 𝒰 H
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
⊢ TFAE
    [targetAffineLocally P f, ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd,
      ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd,
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd,
      ∃ ι U x hU', ∀ (i : ι), P (f ∣_ U i)]
[PROOFSTEP]
tfae_have 5 → 2
[GOAL]
case tfae_5_to_2
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
⊢ (∃ ι U x hU', ∀ (i : ι), P (f ∣_ U i)) → ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
[PROOFSTEP]
rintro ⟨ι, U, hU, hU', H⟩
[GOAL]
case tfae_5_to_2.intro.intro.intro.intro
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
hU' : ∀ (i : ι), IsAffineOpen (U i)
H : ∀ (i : ι), P (f ∣_ U i)
⊢ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
[PROOFSTEP]
refine' ⟨Y.openCoverOfSuprEqTop U hU, hU', _⟩
[GOAL]
case tfae_5_to_2.intro.intro.intro.intro
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
hU' : ∀ (i : ι), IsAffineOpen (U i)
H : ∀ (i : ι), P (f ∣_ U i)
⊢ ∀ (i : (Scheme.openCoverOfSuprEqTop Y U hU).J), P pullback.snd
[PROOFSTEP]
intro i
[GOAL]
case tfae_5_to_2.intro.intro.intro.intro
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
hU' : ∀ (i : ι), IsAffineOpen (U i)
H : ∀ (i : ι), P (f ∣_ U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
⊢ P pullback.snd
[PROOFSTEP]
specialize H i
[GOAL]
case tfae_5_to_2.intro.intro.intro.intro
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
hU' : ∀ (i : ι), IsAffineOpen (U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
H : P (f ∣_ U i)
⊢ P pullback.snd
[PROOFSTEP]
haveI i2 : IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfSuprEqTop Y U hU) i) := hU' i
[GOAL]
case tfae_5_to_2.intro.intro.intro.intro
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
hU' : ∀ (i : ι), IsAffineOpen (U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
H : P (f ∣_ U i)
i2 : IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfSuprEqTop Y U hU) i)
⊢ P pullback.snd
[PROOFSTEP]
haveI i3 : IsAffine (Y.restrict (U i).openEmbedding) := hU' i
[GOAL]
case tfae_5_to_2.intro.intro.intro.intro
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
hU' : ∀ (i : ι), IsAffineOpen (U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
H : P (f ∣_ U i)
i2 : IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfSuprEqTop Y U hU) i)
i3 : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (U i))))
⊢ P pullback.snd
[PROOFSTEP]
rw [← P.toProperty_apply, ← hP.1.arrow_mk_iso_iff (morphismRestrictOpensRange f _)]
[GOAL]
case tfae_5_to_2.intro.intro.intro.intro
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
hU' : ∀ (i : ι), IsAffineOpen (U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
H : P (f ∣_ U i)
i2 : IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfSuprEqTop Y U hU) i)
i3 : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (U i))))
⊢ toProperty P (f ∣_ Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i))
[PROOFSTEP]
rw [← P.toProperty_apply] at H
[GOAL]
case tfae_5_to_2.intro.intro.intro.intro
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
hU' : ∀ (i : ι), IsAffineOpen (U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
H : toProperty P (f ∣_ U i)
i2 : IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfSuprEqTop Y U hU) i)
i3 : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (U i))))
⊢ toProperty P (f ∣_ Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i))
[PROOFSTEP]
convert H
[GOAL]
case h.e'_2.h.e'_1.h.e'_6.h.e'_6
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
hU' : ∀ (i : ι), IsAffineOpen (U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
H : toProperty P (f ∣_ U i)
i2 : IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfSuprEqTop Y U hU) i)
i3 : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (U i))))
⊢ Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i) = U i
case h.e'_2.h.e'_3.e'_2.h.e'_6
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
hU' : ∀ (i : ι), IsAffineOpen (U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
H : toProperty P (f ∣_ U i)
i2 : IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfSuprEqTop Y U hU) i)
i3 : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (U i))))
e_1✝ :
  (Opens.toTopCat ↑X.toPresheafedSpace).obj
      ((Opens.map f.val.base).obj
        (Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i))) =
    (Opens.toTopCat ↑X.toPresheafedSpace).obj ((Opens.map f.val.base).obj (U i))
⊢ Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i) = U i
case h.e'_3.h.e'_1.h.e'_6
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
hU' : ∀ (i : ι), IsAffineOpen (U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
H : toProperty P (f ∣_ U i)
i2 : IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfSuprEqTop Y U hU) i)
i3 : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (U i))))
⊢ Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i) = U i
case h.e'_3.h.e'_3.e'_2
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
hU' : ∀ (i : ι), IsAffineOpen (U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
H : toProperty P (f ∣_ U i)
i2 : IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfSuprEqTop Y U hU) i)
i3 : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (U i))))
e_1✝ :
  (Opens.toTopCat ↑Y.toPresheafedSpace).obj
      (Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i)) =
    (Opens.toTopCat ↑Y.toPresheafedSpace).obj (U i)
⊢ Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i) = U i
case h.e'_4.e'_4
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
hU' : ∀ (i : ι), IsAffineOpen (U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
H : toProperty P (f ∣_ U i)
i2 : IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfSuprEqTop Y U hU) i)
i3 : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (U i))))
e_2✝ :
  Scheme.restrict X
      (_ :
        OpenEmbedding
          ↑(Opens.inclusion
              ((Opens.map f.val.base).obj
                (Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i))))) =
    Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (U i))))
e_3✝ :
  Scheme.restrict Y
      (_ :
        OpenEmbedding
          ↑(Opens.inclusion (Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i)))) =
    Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (U i)))
⊢ Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i) = U i
[PROOFSTEP]
all_goals ext1; exact Subtype.range_coe
[GOAL]
case h.e'_2.h.e'_1.h.e'_6.h.e'_6
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
hU' : ∀ (i : ι), IsAffineOpen (U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
H : toProperty P (f ∣_ U i)
i2 : IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfSuprEqTop Y U hU) i)
i3 : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (U i))))
⊢ Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i) = U i
[PROOFSTEP]
ext1
[GOAL]
case h.e'_2.h.e'_1.h.e'_6.h.e'_6.h
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
hU' : ∀ (i : ι), IsAffineOpen (U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
H : toProperty P (f ∣_ U i)
i2 : IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfSuprEqTop Y U hU) i)
i3 : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (U i))))
⊢ ↑(Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i)) = ↑(U i)
[PROOFSTEP]
exact Subtype.range_coe
[GOAL]
case h.e'_2.h.e'_3.e'_2.h.e'_6
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
hU' : ∀ (i : ι), IsAffineOpen (U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
H : toProperty P (f ∣_ U i)
i2 : IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfSuprEqTop Y U hU) i)
i3 : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (U i))))
e_1✝ :
  (Opens.toTopCat ↑X.toPresheafedSpace).obj
      ((Opens.map f.val.base).obj
        (Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i))) =
    (Opens.toTopCat ↑X.toPresheafedSpace).obj ((Opens.map f.val.base).obj (U i))
⊢ Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i) = U i
[PROOFSTEP]
ext1
[GOAL]
case h.e'_2.h.e'_3.e'_2.h.e'_6.h
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
hU' : ∀ (i : ι), IsAffineOpen (U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
H : toProperty P (f ∣_ U i)
i2 : IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfSuprEqTop Y U hU) i)
i3 : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (U i))))
e_1✝ :
  (Opens.toTopCat ↑X.toPresheafedSpace).obj
      ((Opens.map f.val.base).obj
        (Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i))) =
    (Opens.toTopCat ↑X.toPresheafedSpace).obj ((Opens.map f.val.base).obj (U i))
⊢ ↑(Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i)) = ↑(U i)
[PROOFSTEP]
exact Subtype.range_coe
[GOAL]
case h.e'_3.h.e'_1.h.e'_6
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
hU' : ∀ (i : ι), IsAffineOpen (U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
H : toProperty P (f ∣_ U i)
i2 : IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfSuprEqTop Y U hU) i)
i3 : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (U i))))
⊢ Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i) = U i
[PROOFSTEP]
ext1
[GOAL]
case h.e'_3.h.e'_1.h.e'_6.h
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
hU' : ∀ (i : ι), IsAffineOpen (U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
H : toProperty P (f ∣_ U i)
i2 : IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfSuprEqTop Y U hU) i)
i3 : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (U i))))
⊢ ↑(Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i)) = ↑(U i)
[PROOFSTEP]
exact Subtype.range_coe
[GOAL]
case h.e'_3.h.e'_3.e'_2
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
hU' : ∀ (i : ι), IsAffineOpen (U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
H : toProperty P (f ∣_ U i)
i2 : IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfSuprEqTop Y U hU) i)
i3 : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (U i))))
e_1✝ :
  (Opens.toTopCat ↑Y.toPresheafedSpace).obj
      (Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i)) =
    (Opens.toTopCat ↑Y.toPresheafedSpace).obj (U i)
⊢ Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i) = U i
[PROOFSTEP]
ext1
[GOAL]
case h.e'_3.h.e'_3.e'_2.h
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
hU' : ∀ (i : ι), IsAffineOpen (U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
H : toProperty P (f ∣_ U i)
i2 : IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfSuprEqTop Y U hU) i)
i3 : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (U i))))
e_1✝ :
  (Opens.toTopCat ↑Y.toPresheafedSpace).obj
      (Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i)) =
    (Opens.toTopCat ↑Y.toPresheafedSpace).obj (U i)
⊢ ↑(Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i)) = ↑(U i)
[PROOFSTEP]
exact Subtype.range_coe
[GOAL]
case h.e'_4.e'_4
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
hU' : ∀ (i : ι), IsAffineOpen (U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
H : toProperty P (f ∣_ U i)
i2 : IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfSuprEqTop Y U hU) i)
i3 : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (U i))))
e_2✝ :
  Scheme.restrict X
      (_ :
        OpenEmbedding
          ↑(Opens.inclusion
              ((Opens.map f.val.base).obj
                (Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i))))) =
    Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (U i))))
e_3✝ :
  Scheme.restrict Y
      (_ :
        OpenEmbedding
          ↑(Opens.inclusion (Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i)))) =
    Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (U i)))
⊢ Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i) = U i
[PROOFSTEP]
ext1
[GOAL]
case h.e'_4.e'_4.h
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
hU' : ∀ (i : ι), IsAffineOpen (U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
H : toProperty P (f ∣_ U i)
i2 : IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfSuprEqTop Y U hU) i)
i3 : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (U i))))
e_2✝ :
  Scheme.restrict X
      (_ :
        OpenEmbedding
          ↑(Opens.inclusion
              ((Opens.map f.val.base).obj
                (Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i))))) =
    Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (U i))))
e_3✝ :
  Scheme.restrict Y
      (_ :
        OpenEmbedding
          ↑(Opens.inclusion (Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i)))) =
    Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (U i)))
⊢ ↑(Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i)) = ↑(U i)
[PROOFSTEP]
exact Subtype.range_coe
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
tfae_5_to_2 : (∃ ι U x hU', ∀ (i : ι), P (f ∣_ U i)) → ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
⊢ TFAE
    [targetAffineLocally P f, ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd,
      ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd,
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd,
      ∃ ι U x hU', ∀ (i : ι), P (f ∣_ U i)]
[PROOFSTEP]
tfae_have 1 → 5
[GOAL]
case tfae_1_to_5
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
tfae_5_to_2 : (∃ ι U x hU', ∀ (i : ι), P (f ∣_ U i)) → ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
⊢ targetAffineLocally P f → ∃ ι U x hU', ∀ (i : ι), P (f ∣_ U i)
[PROOFSTEP]
intro H
[GOAL]
case tfae_1_to_5
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
tfae_5_to_2 : (∃ ι U x hU', ∀ (i : ι), P (f ∣_ U i)) → ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
H : targetAffineLocally P f
⊢ ∃ ι U x hU', ∀ (i : ι), P (f ∣_ U i)
[PROOFSTEP]
refine
  ⟨Y.carrier, fun x => (Scheme.Hom.opensRange <| Y.affineCover.map x), ?_, fun i => rangeIsAffineOpenOfOpenImmersion _,
    ?_⟩
[GOAL]
case tfae_1_to_5.refine_1
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
tfae_5_to_2 : (∃ ι U x hU', ∀ (i : ι), P (f ∣_ U i)) → ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
H : targetAffineLocally P f
⊢ ⨆ (x : ↑↑Y.toPresheafedSpace), Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.affineCover Y) x) = ⊤
[PROOFSTEP]
rw [eq_top_iff]
[GOAL]
case tfae_1_to_5.refine_1
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
tfae_5_to_2 : (∃ ι U x hU', ∀ (i : ι), P (f ∣_ U i)) → ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
H : targetAffineLocally P f
⊢ ⊤ ≤ ⨆ (x : ↑↑Y.toPresheafedSpace), Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.affineCover Y) x)
[PROOFSTEP]
intro x _
[GOAL]
case tfae_1_to_5.refine_1
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
tfae_5_to_2 : (∃ ι U x hU', ∀ (i : ι), P (f ∣_ U i)) → ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
H : targetAffineLocally P f
x : ↑↑Y.toPresheafedSpace
a✝ : x ∈ ↑⊤
⊢ x ∈ ↑(⨆ (x : ↑↑Y.toPresheafedSpace), Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.affineCover Y) x))
[PROOFSTEP]
erw [Opens.mem_iSup]
[GOAL]
case tfae_1_to_5.refine_1
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
tfae_5_to_2 : (∃ ι U x hU', ∀ (i : ι), P (f ∣_ U i)) → ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
H : targetAffineLocally P f
x : ↑↑Y.toPresheafedSpace
a✝ : x ∈ ↑⊤
⊢ ∃ i, x ∈ Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.affineCover Y) i)
[PROOFSTEP]
exact ⟨x, Y.affineCover.Covers x⟩
[GOAL]
case tfae_1_to_5.refine_2
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
tfae_5_to_2 : (∃ ι U x hU', ∀ (i : ι), P (f ∣_ U i)) → ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
H : targetAffineLocally P f
⊢ ∀ (i : ↑↑Y.toPresheafedSpace),
    P (f ∣_ (fun x => Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.affineCover Y) x)) i)
[PROOFSTEP]
intro i
[GOAL]
case tfae_1_to_5.refine_2
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
tfae_5_to_2 : (∃ ι U x hU', ∀ (i : ι), P (f ∣_ U i)) → ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
H : targetAffineLocally P f
i : ↑↑Y.toPresheafedSpace
⊢ P (f ∣_ (fun x => Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.affineCover Y) x)) i)
[PROOFSTEP]
exact H ⟨_, rangeIsAffineOpenOfOpenImmersion _⟩
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  targetAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f
tfae_5_to_2 : (∃ ι U x hU', ∀ (i : ι), P (f ∣_ U i)) → ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
tfae_1_to_5 : targetAffineLocally P f → ∃ ι U x hU', ∀ (i : ι), P (f ∣_ U i)
⊢ TFAE
    [targetAffineLocally P f, ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd,
      ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd,
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd,
      ∃ ι U x hU', ∀ (i : ι), P (f ∣_ U i)]
[PROOFSTEP]
tfae_finish
[GOAL]
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
H :
  ∀ {X Y : Scheme} (f : X ⟶ Y),
    (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) →
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
⊢ IsLocal P
[PROOFSTEP]
refine' ⟨hP, _, _⟩
[GOAL]
case refine'_1
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
H :
  ∀ {X Y : Scheme} (f : X ⟶ Y),
    (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) →
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
⊢ ∀ {X Y : Scheme} [inst : IsAffine Y] (f : X ⟶ Y) (r : ↑(Y.presheaf.obj (op ⊤))), P f → P (f ∣_ Scheme.basicOpen Y r)
[PROOFSTEP]
introv h
[GOAL]
case refine'_1
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
H :
  ∀ {X Y : Scheme} (f : X ⟶ Y),
    (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) →
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
X Y : Scheme
inst✝ : IsAffine Y
f : X ⟶ Y
r : ↑(Y.presheaf.obj (op ⊤))
h : P f
⊢ P (f ∣_ Scheme.basicOpen Y r)
[PROOFSTEP]
haveI : IsAffine _ := (topIsAffineOpen Y).basicOpenIsAffine r
[GOAL]
case refine'_1
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
H :
  ∀ {X Y : Scheme} (f : X ⟶ Y),
    (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) →
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
X Y : Scheme
inst✝ : IsAffine Y
f : X ⟶ Y
r : ↑(Y.presheaf.obj (op ⊤))
h : P f
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))
⊢ P (f ∣_ Scheme.basicOpen Y r)
[PROOFSTEP]
delta morphismRestrict
[GOAL]
case refine'_1
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
H :
  ∀ {X Y : Scheme} (f : X ⟶ Y),
    (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) →
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
X Y : Scheme
inst✝ : IsAffine Y
f : X ⟶ Y
r : ↑(Y.presheaf.obj (op ⊤))
h : P f
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))
⊢ P ((pullbackRestrictIsoRestrict f (Scheme.basicOpen Y r)).inv ≫ pullback.snd)
[PROOFSTEP]
rw [affine_cancel_left_isIso hP]
[GOAL]
case refine'_1
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
H :
  ∀ {X Y : Scheme} (f : X ⟶ Y),
    (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) →
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
X Y : Scheme
inst✝ : IsAffine Y
f : X ⟶ Y
r : ↑(Y.presheaf.obj (op ⊤))
h : P f
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))
⊢ P pullback.snd
[PROOFSTEP]
refine' @H _ _ f ⟨Scheme.openCoverOfIsIso (𝟙 Y), _, _⟩ _ (Y.ofRestrict _) _ _
[GOAL]
case refine'_1.refine'_1
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
H :
  ∀ {X Y : Scheme} (f : X ⟶ Y),
    (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) →
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
X Y : Scheme
inst✝ : IsAffine Y
f : X ⟶ Y
r : ↑(Y.presheaf.obj (op ⊤))
h : P f
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))
⊢ ∀ (i : (Scheme.openCoverOfIsIso (𝟙 Y)).J), IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfIsIso (𝟙 Y)) i)
[PROOFSTEP]
intro i
[GOAL]
case refine'_1.refine'_1
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
H :
  ∀ {X Y : Scheme} (f : X ⟶ Y),
    (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) →
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
X Y : Scheme
inst✝ : IsAffine Y
f : X ⟶ Y
r : ↑(Y.presheaf.obj (op ⊤))
h : P f
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))
i : (Scheme.openCoverOfIsIso (𝟙 Y)).J
⊢ IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfIsIso (𝟙 Y)) i)
[PROOFSTEP]
dsimp
[GOAL]
case refine'_1.refine'_1
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
H :
  ∀ {X Y : Scheme} (f : X ⟶ Y),
    (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) →
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
X Y : Scheme
inst✝ : IsAffine Y
f : X ⟶ Y
r : ↑(Y.presheaf.obj (op ⊤))
h : P f
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))
i : (Scheme.openCoverOfIsIso (𝟙 Y)).J
⊢ IsAffine Y
[PROOFSTEP]
infer_instance
[GOAL]
case refine'_1.refine'_2
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
H :
  ∀ {X Y : Scheme} (f : X ⟶ Y),
    (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) →
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
X Y : Scheme
inst✝ : IsAffine Y
f : X ⟶ Y
r : ↑(Y.presheaf.obj (op ⊤))
h : P f
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))
⊢ ∀ (i : (Scheme.openCoverOfIsIso (𝟙 Y)).J), P pullback.snd
[PROOFSTEP]
intro i
[GOAL]
case refine'_1.refine'_2
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
H :
  ∀ {X Y : Scheme} (f : X ⟶ Y),
    (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) →
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
X Y : Scheme
inst✝ : IsAffine Y
f : X ⟶ Y
r : ↑(Y.presheaf.obj (op ⊤))
h : P f
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))
i : (Scheme.openCoverOfIsIso (𝟙 Y)).J
⊢ P pullback.snd
[PROOFSTEP]
dsimp
[GOAL]
case refine'_1.refine'_2
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
H :
  ∀ {X Y : Scheme} (f : X ⟶ Y),
    (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) →
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
X Y : Scheme
inst✝ : IsAffine Y
f : X ⟶ Y
r : ↑(Y.presheaf.obj (op ⊤))
h : P f
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))
i : (Scheme.openCoverOfIsIso (𝟙 Y)).J
⊢ P pullback.snd
[PROOFSTEP]
rwa [← Category.comp_id pullback.snd, ← pullback.condition, affine_cancel_left_isIso hP]
[GOAL]
case refine'_2
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
H :
  ∀ {X Y : Scheme} (f : X ⟶ Y),
    (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) →
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
⊢ ∀ {X Y : Scheme} [inst : IsAffine Y] (f : X ⟶ Y) (s : Finset ↑(Y.presheaf.obj (op ⊤))),
    Ideal.span ↑s = ⊤ → (∀ (r : { x // x ∈ s }), P (f ∣_ Scheme.basicOpen Y ↑r)) → P f
[PROOFSTEP]
introv hs hs'
[GOAL]
case refine'_2
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
H :
  ∀ {X Y : Scheme} (f : X ⟶ Y),
    (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) →
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
X Y : Scheme
inst✝ : IsAffine Y
f : X ⟶ Y
s : Finset ↑(Y.presheaf.obj (op ⊤))
hs : Ideal.span ↑s = ⊤
hs' : ∀ (r : { x // x ∈ s }), P (f ∣_ Scheme.basicOpen Y ↑r)
⊢ P f
[PROOFSTEP]
replace hs := ((topIsAffineOpen Y).basicOpen_union_eq_self_iff _).mpr hs
[GOAL]
case refine'_2
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
H :
  ∀ {X Y : Scheme} (f : X ⟶ Y),
    (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) →
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
X Y : Scheme
inst✝ : IsAffine Y
f : X ⟶ Y
s : Finset ↑(Y.presheaf.obj (op ⊤))
hs' : ∀ (r : { x // x ∈ s }), P (f ∣_ Scheme.basicOpen Y ↑r)
hs : ⨆ (f : ↑↑s), Scheme.basicOpen Y ↑f = ⊤
⊢ P f
[PROOFSTEP]
have := H f ⟨Y.openCoverOfSuprEqTop _ hs, ?_, ?_⟩ (𝟙 _)
[GOAL]
case refine'_2.refine_3
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
H :
  ∀ {X Y : Scheme} (f : X ⟶ Y),
    (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) →
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
X Y : Scheme
inst✝ : IsAffine Y
f : X ⟶ Y
s : Finset ↑(Y.presheaf.obj (op ⊤))
hs' : ∀ (r : { x // x ∈ s }), P (f ∣_ Scheme.basicOpen Y ↑r)
hs : ⨆ (f : ↑↑s), Scheme.basicOpen Y ↑f = ⊤
this : P pullback.snd
⊢ P f
case refine'_2.refine_1
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
H :
  ∀ {X Y : Scheme} (f : X ⟶ Y),
    (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) →
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
X Y : Scheme
inst✝ : IsAffine Y
f : X ⟶ Y
s : Finset ↑(Y.presheaf.obj (op ⊤))
hs' : ∀ (r : { x // x ∈ s }), P (f ∣_ Scheme.basicOpen Y ↑r)
hs : ⨆ (f : ↑↑s), Scheme.basicOpen Y ↑f = ⊤
⊢ ∀ (i : (Scheme.openCoverOfSuprEqTop Y (fun i => Scheme.basicOpen Y ↑i) hs).J),
    IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfSuprEqTop Y (fun i => Scheme.basicOpen Y ↑i) hs) i)
case refine'_2.refine_2
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
H :
  ∀ {X Y : Scheme} (f : X ⟶ Y),
    (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) →
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
X Y : Scheme
inst✝ : IsAffine Y
f : X ⟶ Y
s : Finset ↑(Y.presheaf.obj (op ⊤))
hs' : ∀ (r : { x // x ∈ s }), P (f ∣_ Scheme.basicOpen Y ↑r)
hs : ⨆ (f : ↑↑s), Scheme.basicOpen Y ↑f = ⊤
⊢ ∀ (i : (Scheme.openCoverOfSuprEqTop Y (fun i => Scheme.basicOpen Y ↑i) hs).J), P pullback.snd
[PROOFSTEP]
rwa [← Category.comp_id pullback.snd, ← pullback.condition, affine_cancel_left_isIso hP] at this
[GOAL]
case refine'_2.refine_1
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
H :
  ∀ {X Y : Scheme} (f : X ⟶ Y),
    (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) →
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
X Y : Scheme
inst✝ : IsAffine Y
f : X ⟶ Y
s : Finset ↑(Y.presheaf.obj (op ⊤))
hs' : ∀ (r : { x // x ∈ s }), P (f ∣_ Scheme.basicOpen Y ↑r)
hs : ⨆ (f : ↑↑s), Scheme.basicOpen Y ↑f = ⊤
⊢ ∀ (i : (Scheme.openCoverOfSuprEqTop Y (fun i => Scheme.basicOpen Y ↑i) hs).J),
    IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfSuprEqTop Y (fun i => Scheme.basicOpen Y ↑i) hs) i)
[PROOFSTEP]
intro i
[GOAL]
case refine'_2.refine_1
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
H :
  ∀ {X Y : Scheme} (f : X ⟶ Y),
    (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) →
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
X Y : Scheme
inst✝ : IsAffine Y
f : X ⟶ Y
s : Finset ↑(Y.presheaf.obj (op ⊤))
hs' : ∀ (r : { x // x ∈ s }), P (f ∣_ Scheme.basicOpen Y ↑r)
hs : ⨆ (f : ↑↑s), Scheme.basicOpen Y ↑f = ⊤
i : (Scheme.openCoverOfSuprEqTop Y (fun i => Scheme.basicOpen Y ↑i) hs).J
⊢ IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfSuprEqTop Y (fun i => Scheme.basicOpen Y ↑i) hs) i)
[PROOFSTEP]
exact (topIsAffineOpen Y).basicOpenIsAffine _
[GOAL]
case refine'_2.refine_2
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
H :
  ∀ {X Y : Scheme} (f : X ⟶ Y),
    (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) →
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
X Y : Scheme
inst✝ : IsAffine Y
f : X ⟶ Y
s : Finset ↑(Y.presheaf.obj (op ⊤))
hs' : ∀ (r : { x // x ∈ s }), P (f ∣_ Scheme.basicOpen Y ↑r)
hs : ⨆ (f : ↑↑s), Scheme.basicOpen Y ↑f = ⊤
⊢ ∀ (i : (Scheme.openCoverOfSuprEqTop Y (fun i => Scheme.basicOpen Y ↑i) hs).J), P pullback.snd
[PROOFSTEP]
rintro (i : s)
[GOAL]
case refine'_2.refine_2
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
H :
  ∀ {X Y : Scheme} (f : X ⟶ Y),
    (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) →
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
X Y : Scheme
inst✝ : IsAffine Y
f : X ⟶ Y
s : Finset ↑(Y.presheaf.obj (op ⊤))
hs' : ∀ (r : { x // x ∈ s }), P (f ∣_ Scheme.basicOpen Y ↑r)
hs : ⨆ (f : ↑↑s), Scheme.basicOpen Y ↑f = ⊤
i : { x // x ∈ s }
⊢ P pullback.snd
[PROOFSTEP]
specialize hs' i
[GOAL]
case refine'_2.refine_2
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
H :
  ∀ {X Y : Scheme} (f : X ⟶ Y),
    (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) →
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
X Y : Scheme
inst✝ : IsAffine Y
f : X ⟶ Y
s : Finset ↑(Y.presheaf.obj (op ⊤))
hs : ⨆ (f : ↑↑s), Scheme.basicOpen Y ↑f = ⊤
i : { x // x ∈ s }
hs' : P (f ∣_ Scheme.basicOpen Y ↑i)
⊢ P pullback.snd
[PROOFSTEP]
haveI : IsAffine _ := (topIsAffineOpen Y).basicOpenIsAffine i.1
[GOAL]
case refine'_2.refine_2
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
H :
  ∀ {X Y : Scheme} (f : X ⟶ Y),
    (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) →
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
X Y : Scheme
inst✝ : IsAffine Y
f : X ⟶ Y
s : Finset ↑(Y.presheaf.obj (op ⊤))
hs : ⨆ (f : ↑↑s), Scheme.basicOpen Y ↑f = ⊤
i : { x // x ∈ s }
hs' : P (f ∣_ Scheme.basicOpen Y ↑i)
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y ↑i))))
⊢ P pullback.snd
[PROOFSTEP]
delta morphismRestrict at hs'
[GOAL]
case refine'_2.refine_2
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
H :
  ∀ {X Y : Scheme} (f : X ⟶ Y),
    (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) →
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
X Y : Scheme
inst✝ : IsAffine Y
f : X ⟶ Y
s : Finset ↑(Y.presheaf.obj (op ⊤))
hs : ⨆ (f : ↑↑s), Scheme.basicOpen Y ↑f = ⊤
i : { x // x ∈ s }
hs' : P ((pullbackRestrictIsoRestrict f (Scheme.basicOpen Y ↑i)).inv ≫ pullback.snd)
this : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y ↑i))))
⊢ P pullback.snd
[PROOFSTEP]
rwa [affine_cancel_left_isIso hP] at hs'
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h𝒰 : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
⊢ targetAffineLocally P f ↔ ∀ (i : 𝒰.J), P pullback.snd
[PROOFSTEP]
refine'
  ⟨fun H =>
    let h := ((hP.affine_openCover_TFAE f).out 0 2).mp H;
    _,
    fun H =>
    let h := ((hP.affine_openCover_TFAE f).out 1 0).mp;
    _⟩
[GOAL]
case refine'_1
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h𝒰 : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
H : targetAffineLocally P f
h : ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J), P pullback.snd :=
  Iff.mp (List.TFAE.out (affine_openCover_TFAE hP f) 0 2) H
⊢ ∀ (i : 𝒰.J), P pullback.snd
[PROOFSTEP]
exact fun i => h 𝒰 i
[GOAL]
case refine'_2
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h𝒰 : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
H : ∀ (i : 𝒰.J), P pullback.snd
h : (∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd) → targetAffineLocally P f :=
  (List.TFAE.out (affine_openCover_TFAE hP f) 1 0).mp
⊢ targetAffineLocally P f
[PROOFSTEP]
exact h ⟨𝒰, inferInstance, H⟩
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
inst✝ : IsAffine Y
⊢ targetAffineLocally P f ↔ P f
[PROOFSTEP]
haveI : ∀ i, IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfIsIso (𝟙 Y)) i) := fun i => by dsimp; infer_instance
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
inst✝ : IsAffine Y
i : (Scheme.openCoverOfIsIso (𝟙 Y)).J
⊢ IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfIsIso (𝟙 Y)) i)
[PROOFSTEP]
dsimp
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
inst✝ : IsAffine Y
i : (Scheme.openCoverOfIsIso (𝟙 Y)).J
⊢ IsAffine Y
[PROOFSTEP]
infer_instance
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
inst✝ : IsAffine Y
this : ∀ (i : (Scheme.openCoverOfIsIso (𝟙 Y)).J), IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfIsIso (𝟙 Y)) i)
⊢ targetAffineLocally P f ↔ P f
[PROOFSTEP]
rw [hP.affine_openCover_iff f (Scheme.openCoverOfIsIso (𝟙 Y))]
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
inst✝ : IsAffine Y
this : ∀ (i : (Scheme.openCoverOfIsIso (𝟙 Y)).J), IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfIsIso (𝟙 Y)) i)
⊢ (∀ (i : (Scheme.openCoverOfIsIso (𝟙 Y)).J), P pullback.snd) ↔ P f
[PROOFSTEP]
trans P (pullback.snd : pullback f (𝟙 _) ⟶ _)
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
inst✝ : IsAffine Y
this : ∀ (i : (Scheme.openCoverOfIsIso (𝟙 Y)).J), IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfIsIso (𝟙 Y)) i)
⊢ (∀ (i : (Scheme.openCoverOfIsIso (𝟙 Y)).J), P pullback.snd) ↔ P pullback.snd
[PROOFSTEP]
exact ⟨fun H => H PUnit.unit, fun H _ => H⟩
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
inst✝ : IsAffine Y
this : ∀ (i : (Scheme.openCoverOfIsIso (𝟙 Y)).J), IsAffine (Scheme.OpenCover.obj (Scheme.openCoverOfIsIso (𝟙 Y)) i)
⊢ P pullback.snd ↔ P f
[PROOFSTEP]
rw [← Category.comp_id pullback.snd, ← pullback.condition, affine_cancel_left_isIso hP.1]
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
⊢ PropertyIsLocalAtTarget (targetAffineLocally P)
[PROOFSTEP]
constructor
[GOAL]
case RespectsIso
P : AffineTargetMorphismProperty
hP : IsLocal P
⊢ MorphismProperty.RespectsIso (targetAffineLocally P)
[PROOFSTEP]
exact targetAffineLocally_respectsIso hP.1
[GOAL]
case restrict
P : AffineTargetMorphismProperty
hP : IsLocal P
⊢ ∀ {X Y : Scheme} (f : X ⟶ Y) (U : Opens ↑↑Y.toPresheafedSpace),
    targetAffineLocally P f → targetAffineLocally P (f ∣_ U)
[PROOFSTEP]
intro X Y f U H V
[GOAL]
case restrict
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
U : Opens ↑↑Y.toPresheafedSpace
H : targetAffineLocally P f
V : ↑(Scheme.affineOpens (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))))
⊢ P (f ∣_ U ∣_ ↑V)
[PROOFSTEP]
rw [← P.toProperty_apply (i := V.2), hP.1.arrow_mk_iso_iff (morphismRestrictRestrict f _ _)]
[GOAL]
case restrict
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
U : Opens ↑↑Y.toPresheafedSpace
H : targetAffineLocally P f
V : ↑(Scheme.affineOpens (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))))
⊢ toProperty P (f ∣_ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ↑V)
[PROOFSTEP]
convert H ⟨_, IsAffineOpen.imageIsOpenImmersion V.2 (Y.ofRestrict _)⟩
[GOAL]
case a
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
U : Opens ↑↑Y.toPresheafedSpace
H : targetAffineLocally P f
V : ↑(Scheme.affineOpens (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))))
⊢ toProperty P (f ∣_ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ↑V) ↔
    P
      (f ∣_
        ↑{ val := (Scheme.Hom.opensFunctor (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).obj ↑V,
            property :=
              (_ :
                IsAffineOpen
                  ((Scheme.Hom.opensFunctor (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).obj ↑V)) })
[PROOFSTEP]
rw [← P.toProperty_apply (i := IsAffineOpen.imageIsOpenImmersion V.2 (Y.ofRestrict _))]
[GOAL]
case of_openCover
P : AffineTargetMorphismProperty
hP : IsLocal P
⊢ ∀ {X Y : Scheme} (f : X ⟶ Y) (𝒰 : Scheme.OpenCover Y),
    (∀ (i : 𝒰.J), targetAffineLocally P pullback.snd) → targetAffineLocally P f
[PROOFSTEP]
rintro X Y f 𝒰 h𝒰
[GOAL]
case of_openCover
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h𝒰 : ∀ (i : 𝒰.J), targetAffineLocally P pullback.snd
⊢ targetAffineLocally P f
[PROOFSTEP]
have h01 := (hP.affine_openCover_TFAE f).out 0 1
[GOAL]
case of_openCover
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h𝒰 : ∀ (i : 𝒰.J), targetAffineLocally P pullback.snd
h01 : targetAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
⊢ targetAffineLocally P f
[PROOFSTEP]
rw [h01]
[GOAL]
case of_openCover
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h𝒰 : ∀ (i : 𝒰.J), targetAffineLocally P pullback.snd
h01 : targetAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
⊢ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
[PROOFSTEP]
refine' ⟨𝒰.bind fun _ => Scheme.affineCover _, _, _⟩
[GOAL]
case of_openCover.refine'_1
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h𝒰 : ∀ (i : 𝒰.J), targetAffineLocally P pullback.snd
h01 : targetAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
⊢ ∀ (i : (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)).J),
    IsAffine (Scheme.OpenCover.obj (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)) i)
[PROOFSTEP]
intro i
[GOAL]
case of_openCover.refine'_1
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h𝒰 : ∀ (i : 𝒰.J), targetAffineLocally P pullback.snd
h01 : targetAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
i : (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)).J
⊢ IsAffine (Scheme.OpenCover.obj (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)) i)
[PROOFSTEP]
dsimp [Scheme.OpenCover.bind]
[GOAL]
case of_openCover.refine'_1
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h𝒰 : ∀ (i : 𝒰.J), targetAffineLocally P pullback.snd
h01 : targetAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
i : (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)).J
⊢ IsAffine (Scheme.OpenCover.obj (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd)
[PROOFSTEP]
infer_instance
[GOAL]
case of_openCover.refine'_2
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h𝒰 : ∀ (i : 𝒰.J), targetAffineLocally P pullback.snd
h01 : targetAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
⊢ ∀ (i : (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)).J), P pullback.snd
[PROOFSTEP]
intro i
[GOAL]
case of_openCover.refine'_2
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h𝒰 : ∀ (i : 𝒰.J), targetAffineLocally P pullback.snd
h01 : targetAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
i : (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)).J
⊢ P pullback.snd
[PROOFSTEP]
specialize
  h𝒰
    i.1
      -- Porting note : rewrite `[(hP.affine_openCover_TFAE pullback.snd).out 0 1` directly
            -- complains about metavariables
[GOAL]
case of_openCover.refine'_2
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h01 : targetAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
i : (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)).J
h𝒰 : targetAffineLocally P pullback.snd
⊢ P pullback.snd
[PROOFSTEP]
have h02 := (hP.affine_openCover_TFAE (pullback.snd : pullback f (𝒰.map i.fst) ⟶ _)).out 0 2
[GOAL]
case of_openCover.refine'_2
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h01 : targetAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
i : (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)).J
h𝒰 : targetAffineLocally P pullback.snd
h02 :
  targetAffineLocally P pullback.snd ↔
    ∀ (𝒰_1 : Scheme.OpenCover (Scheme.OpenCover.obj 𝒰 i.fst))
      [inst : ∀ (i_1 : 𝒰_1.J), IsAffine (Scheme.OpenCover.obj 𝒰_1 i_1)] (i_1 : 𝒰_1.J), P pullback.snd
⊢ P pullback.snd
[PROOFSTEP]
rw [h02] at h𝒰
[GOAL]
case of_openCover.refine'_2
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h01 : targetAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
i : (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)).J
h𝒰 :
  ∀ (𝒰_1 : Scheme.OpenCover (Scheme.OpenCover.obj 𝒰 i.fst))
    [inst : ∀ (i_1 : 𝒰_1.J), IsAffine (Scheme.OpenCover.obj 𝒰_1 i_1)] (i_1 : 𝒰_1.J), P pullback.snd
h02 :
  targetAffineLocally P pullback.snd ↔
    ∀ (𝒰_1 : Scheme.OpenCover (Scheme.OpenCover.obj 𝒰 i.fst))
      [inst : ∀ (i_1 : 𝒰_1.J), IsAffine (Scheme.OpenCover.obj 𝒰_1 i_1)] (i_1 : 𝒰_1.J), P pullback.snd
⊢ P pullback.snd
[PROOFSTEP]
specialize h𝒰 (Scheme.affineCover _) i.2
[GOAL]
case of_openCover.refine'_2
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h01 : targetAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
i : (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)).J
h02 :
  targetAffineLocally P pullback.snd ↔
    ∀ (𝒰_1 : Scheme.OpenCover (Scheme.OpenCover.obj 𝒰 i.fst))
      [inst : ∀ (i_1 : 𝒰_1.J), IsAffine (Scheme.OpenCover.obj 𝒰_1 i_1)] (i_1 : 𝒰_1.J), P pullback.snd
h𝒰 : P pullback.snd
⊢ P pullback.snd
[PROOFSTEP]
let e :
  pullback f ((𝒰.obj i.fst).affineCover.map i.snd ≫ 𝒰.map i.fst) ⟶
    pullback (pullback.snd : pullback f (𝒰.map i.fst) ⟶ _) ((𝒰.obj i.fst).affineCover.map i.snd) :=
  by
  refine' (pullbackSymmetry _ _).hom ≫ _
  refine' (pullbackRightPullbackFstIso _ _ _).inv ≫ _
  refine' (pullbackSymmetry _ _).hom ≫ _
  refine' pullback.map _ _ _ _ (pullbackSymmetry _ _).hom (𝟙 _) (𝟙 _) _ _ <;>
    simp only [Category.comp_id, Category.id_comp, pullbackSymmetry_hom_comp_snd]
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h01 : targetAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
i : (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)).J
h02 :
  targetAffineLocally P pullback.snd ↔
    ∀ (𝒰_1 : Scheme.OpenCover (Scheme.OpenCover.obj 𝒰 i.fst))
      [inst : ∀ (i_1 : 𝒰_1.J), IsAffine (Scheme.OpenCover.obj 𝒰_1 i_1)] (i_1 : 𝒰_1.J), P pullback.snd
h𝒰 : P pullback.snd
⊢ pullback f
      (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd ≫ Scheme.OpenCover.map 𝒰 i.fst) ⟶
    pullback pullback.snd (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd)
[PROOFSTEP]
refine' (pullbackSymmetry _ _).hom ≫ _
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h01 : targetAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
i : (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)).J
h02 :
  targetAffineLocally P pullback.snd ↔
    ∀ (𝒰_1 : Scheme.OpenCover (Scheme.OpenCover.obj 𝒰 i.fst))
      [inst : ∀ (i_1 : 𝒰_1.J), IsAffine (Scheme.OpenCover.obj 𝒰_1 i_1)] (i_1 : 𝒰_1.J), P pullback.snd
h𝒰 : P pullback.snd
⊢ pullback
      (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd ≫ Scheme.OpenCover.map 𝒰 i.fst)
      f ⟶
    pullback pullback.snd (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd)
[PROOFSTEP]
refine' (pullbackRightPullbackFstIso _ _ _).inv ≫ _
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h01 : targetAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
i : (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)).J
h02 :
  targetAffineLocally P pullback.snd ↔
    ∀ (𝒰_1 : Scheme.OpenCover (Scheme.OpenCover.obj 𝒰 i.fst))
      [inst : ∀ (i_1 : 𝒰_1.J), IsAffine (Scheme.OpenCover.obj 𝒰_1 i_1)] (i_1 : 𝒰_1.J), P pullback.snd
h𝒰 : P pullback.snd
⊢ pullback (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd) pullback.fst ⟶
    pullback pullback.snd (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd)
[PROOFSTEP]
refine' (pullbackSymmetry _ _).hom ≫ _
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h01 : targetAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
i : (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)).J
h02 :
  targetAffineLocally P pullback.snd ↔
    ∀ (𝒰_1 : Scheme.OpenCover (Scheme.OpenCover.obj 𝒰 i.fst))
      [inst : ∀ (i_1 : 𝒰_1.J), IsAffine (Scheme.OpenCover.obj 𝒰_1 i_1)] (i_1 : 𝒰_1.J), P pullback.snd
h𝒰 : P pullback.snd
⊢ pullback pullback.fst (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd) ⟶
    pullback pullback.snd (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd)
[PROOFSTEP]
refine' pullback.map _ _ _ _ (pullbackSymmetry _ _).hom (𝟙 _) (𝟙 _) _ _
[GOAL]
case refine'_1
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h01 : targetAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
i : (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)).J
h02 :
  targetAffineLocally P pullback.snd ↔
    ∀ (𝒰_1 : Scheme.OpenCover (Scheme.OpenCover.obj 𝒰 i.fst))
      [inst : ∀ (i_1 : 𝒰_1.J), IsAffine (Scheme.OpenCover.obj 𝒰_1 i_1)] (i_1 : 𝒰_1.J), P pullback.snd
h𝒰 : P pullback.snd
⊢ pullback.fst ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i.fst) =
    (pullbackSymmetry (Scheme.OpenCover.map 𝒰 i.fst) f).hom ≫ pullback.snd
[PROOFSTEP]
simp only [Category.comp_id, Category.id_comp, pullbackSymmetry_hom_comp_snd]
[GOAL]
case refine'_2
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h01 : targetAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
i : (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)).J
h02 :
  targetAffineLocally P pullback.snd ↔
    ∀ (𝒰_1 : Scheme.OpenCover (Scheme.OpenCover.obj 𝒰 i.fst))
      [inst : ∀ (i_1 : 𝒰_1.J), IsAffine (Scheme.OpenCover.obj 𝒰_1 i_1)] (i_1 : 𝒰_1.J), P pullback.snd
h𝒰 : P pullback.snd
⊢ Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i.fst) =
    𝟙 (Scheme.OpenCover.obj (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd) ≫
      Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd
[PROOFSTEP]
simp only [Category.comp_id, Category.id_comp, pullbackSymmetry_hom_comp_snd]
[GOAL]
case of_openCover.refine'_2
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h01 : targetAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
i : (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)).J
h02 :
  targetAffineLocally P pullback.snd ↔
    ∀ (𝒰_1 : Scheme.OpenCover (Scheme.OpenCover.obj 𝒰 i.fst))
      [inst : ∀ (i_1 : 𝒰_1.J), IsAffine (Scheme.OpenCover.obj 𝒰_1 i_1)] (i_1 : 𝒰_1.J), P pullback.snd
h𝒰 : P pullback.snd
e : pullback f
    (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd ≫ Scheme.OpenCover.map 𝒰 i.fst) ⟶
  pullback pullback.snd (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd) :=
  (pullbackSymmetry f
        (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd ≫
          Scheme.OpenCover.map 𝒰 i.fst)).hom ≫
    (pullbackRightPullbackFstIso (Scheme.OpenCover.map 𝒰 i.fst) f
          (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd)).inv ≫
      (pullbackSymmetry (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd)
            pullback.fst).hom ≫
        pullback.map pullback.fst (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd)
          pullback.snd (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd)
          (pullbackSymmetry (Scheme.OpenCover.map 𝒰 i.fst) f).hom
          (𝟙 (Scheme.OpenCover.obj (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd))
          (𝟙 (Scheme.OpenCover.obj 𝒰 i.fst))
          (_ :
            pullback.fst ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i.fst) =
              (pullbackSymmetry (Scheme.OpenCover.map 𝒰 i.fst) f).hom ≫ pullback.snd)
          (_ :
            Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd ≫
                𝟙 (Scheme.OpenCover.obj 𝒰 i.fst) =
              𝟙 (Scheme.OpenCover.obj (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd) ≫
                Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd)
⊢ P pullback.snd
[PROOFSTEP]
rw [← affine_cancel_left_isIso hP.1 e] at h𝒰
[GOAL]
case of_openCover.refine'_2
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h01 : targetAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
i : (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)).J
h02 :
  targetAffineLocally P pullback.snd ↔
    ∀ (𝒰_1 : Scheme.OpenCover (Scheme.OpenCover.obj 𝒰 i.fst))
      [inst : ∀ (i_1 : 𝒰_1.J), IsAffine (Scheme.OpenCover.obj 𝒰_1 i_1)] (i_1 : 𝒰_1.J), P pullback.snd
e : pullback f
    (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd ≫ Scheme.OpenCover.map 𝒰 i.fst) ⟶
  pullback pullback.snd (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd) :=
  (pullbackSymmetry f
        (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd ≫
          Scheme.OpenCover.map 𝒰 i.fst)).hom ≫
    (pullbackRightPullbackFstIso (Scheme.OpenCover.map 𝒰 i.fst) f
          (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd)).inv ≫
      (pullbackSymmetry (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd)
            pullback.fst).hom ≫
        pullback.map pullback.fst (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd)
          pullback.snd (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd)
          (pullbackSymmetry (Scheme.OpenCover.map 𝒰 i.fst) f).hom
          (𝟙 (Scheme.OpenCover.obj (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd))
          (𝟙 (Scheme.OpenCover.obj 𝒰 i.fst))
          (_ :
            pullback.fst ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i.fst) =
              (pullbackSymmetry (Scheme.OpenCover.map 𝒰 i.fst) f).hom ≫ pullback.snd)
          (_ :
            Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd ≫
                𝟙 (Scheme.OpenCover.obj 𝒰 i.fst) =
              𝟙 (Scheme.OpenCover.obj (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd) ≫
                Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd)
h𝒰 : P (e ≫ pullback.snd)
⊢ P pullback.snd
[PROOFSTEP]
convert h𝒰 using 1
[GOAL]
case h.e'_3.h
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h01 : targetAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
i : (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)).J
h02 :
  targetAffineLocally P pullback.snd ↔
    ∀ (𝒰_1 : Scheme.OpenCover (Scheme.OpenCover.obj 𝒰 i.fst))
      [inst : ∀ (i_1 : 𝒰_1.J), IsAffine (Scheme.OpenCover.obj 𝒰_1 i_1)] (i_1 : 𝒰_1.J), P pullback.snd
e : pullback f
    (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd ≫ Scheme.OpenCover.map 𝒰 i.fst) ⟶
  pullback pullback.snd (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd) :=
  (pullbackSymmetry f
        (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd ≫
          Scheme.OpenCover.map 𝒰 i.fst)).hom ≫
    (pullbackRightPullbackFstIso (Scheme.OpenCover.map 𝒰 i.fst) f
          (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd)).inv ≫
      (pullbackSymmetry (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd)
            pullback.fst).hom ≫
        pullback.map pullback.fst (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd)
          pullback.snd (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd)
          (pullbackSymmetry (Scheme.OpenCover.map 𝒰 i.fst) f).hom
          (𝟙 (Scheme.OpenCover.obj (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd))
          (𝟙 (Scheme.OpenCover.obj 𝒰 i.fst))
          (_ :
            pullback.fst ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i.fst) =
              (pullbackSymmetry (Scheme.OpenCover.map 𝒰 i.fst) f).hom ≫ pullback.snd)
          (_ :
            Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd ≫
                𝟙 (Scheme.OpenCover.obj 𝒰 i.fst) =
              𝟙 (Scheme.OpenCover.obj (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd) ≫
                Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd)
h𝒰 : P (e ≫ pullback.snd)
e_1✝ :
  pullback f (Scheme.OpenCover.map (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)) i) =
    pullback f
      (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd ≫ Scheme.OpenCover.map 𝒰 i.fst)
e_2✝ :
  Scheme.OpenCover.obj (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)) i =
    Scheme.OpenCover.obj (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd
⊢ pullback.snd = e ≫ pullback.snd
[PROOFSTEP]
simp
[GOAL]
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
⊢ TFAE
    [P f, ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd, ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd,
      ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U),
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd, ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)]
[PROOFSTEP]
tfae_have 2 → 1
[GOAL]
case tfae_2_to_1
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
⊢ (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
[PROOFSTEP]
rintro ⟨𝒰, H⟩
[GOAL]
case tfae_2_to_1.intro
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
H : ∀ (i : 𝒰.J), P pullback.snd
⊢ P f
[PROOFSTEP]
exact hP.3 f 𝒰 H
[GOAL]
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
⊢ TFAE
    [P f, ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd, ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd,
      ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U),
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd, ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)]
[PROOFSTEP]
tfae_have 1 → 4
[GOAL]
case tfae_1_to_4
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
⊢ P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
[PROOFSTEP]
intro H U
[GOAL]
case tfae_1_to_4
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
H : P f
U : Opens ↑↑Y.toPresheafedSpace
⊢ P (f ∣_ U)
[PROOFSTEP]
exact hP.2 f U H
[GOAL]
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
⊢ TFAE
    [P f, ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd, ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd,
      ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U),
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd, ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)]
[PROOFSTEP]
tfae_have 4 → 3
[GOAL]
case tfae_4_to_3
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
⊢ (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
[PROOFSTEP]
intro H 𝒰 i
[GOAL]
case tfae_4_to_3
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
H : ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
𝒰 : Scheme.OpenCover Y
i : 𝒰.J
⊢ P pullback.snd
[PROOFSTEP]
rw [← hP.1.arrow_mk_iso_iff (morphismRestrictOpensRange f _)]
[GOAL]
case tfae_4_to_3
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
H : ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
𝒰 : Scheme.OpenCover Y
i : 𝒰.J
⊢ P (f ∣_ Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))
[PROOFSTEP]
exact H <| Scheme.Hom.opensRange (𝒰.map i)
[GOAL]
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
⊢ TFAE
    [P f, ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd, ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd,
      ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U),
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd, ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)]
[PROOFSTEP]
tfae_have 3 → 2
[GOAL]
case tfae_3_to_2
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
⊢ (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
[PROOFSTEP]
exact fun H => ⟨Y.affineCover, H Y.affineCover⟩
[GOAL]
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
⊢ TFAE
    [P f, ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd, ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd,
      ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U),
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd, ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)]
[PROOFSTEP]
tfae_have 4 → 5
[GOAL]
case tfae_4_to_5
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
⊢ (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
[PROOFSTEP]
intro H U g hg
[GOAL]
case tfae_4_to_5
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
H : ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
U : Scheme
g : U ⟶ Y
hg : IsOpenImmersion g
⊢ P pullback.snd
[PROOFSTEP]
rw [← hP.1.arrow_mk_iso_iff (morphismRestrictOpensRange f _)]
[GOAL]
case tfae_4_to_5
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
H : ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
U : Scheme
g : U ⟶ Y
hg : IsOpenImmersion g
⊢ P (f ∣_ Scheme.Hom.opensRange g)
[PROOFSTEP]
apply H
[GOAL]
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
tfae_4_to_5 :
  (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
⊢ TFAE
    [P f, ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd, ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd,
      ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U),
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd, ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)]
[PROOFSTEP]
tfae_have 5 → 4
[GOAL]
case tfae_5_to_4
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
tfae_4_to_5 :
  (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
⊢ (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd) →
    ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
[PROOFSTEP]
intro H U
[GOAL]
case tfae_5_to_4
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
tfae_4_to_5 :
  (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
H : ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
U : Opens ↑↑Y.toPresheafedSpace
⊢ P (f ∣_ U)
[PROOFSTEP]
erw [hP.1.cancel_left_isIso]
[GOAL]
case tfae_5_to_4
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
tfae_4_to_5 :
  (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
H : ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
U : Opens ↑↑Y.toPresheafedSpace
⊢ P pullback.snd
[PROOFSTEP]
apply H
[GOAL]
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
tfae_4_to_5 :
  (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
tfae_5_to_4 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd) →
    ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
⊢ TFAE
    [P f, ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd, ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd,
      ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U),
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd, ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)]
[PROOFSTEP]
tfae_have 4 → 6
[GOAL]
case tfae_4_to_6
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
tfae_4_to_5 :
  (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
tfae_5_to_4 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd) →
    ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
⊢ (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)
[PROOFSTEP]
intro H
[GOAL]
case tfae_4_to_6
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
tfae_4_to_5 :
  (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
tfae_5_to_4 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd) →
    ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
H : ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
⊢ ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)
[PROOFSTEP]
exact ⟨PUnit, fun _ => ⊤, ciSup_const, fun _ => H _⟩
[GOAL]
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
tfae_4_to_5 :
  (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
tfae_5_to_4 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd) →
    ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_6 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)
⊢ TFAE
    [P f, ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd, ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd,
      ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U),
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd, ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)]
[PROOFSTEP]
tfae_have 6 → 2
[GOAL]
case tfae_6_to_2
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
tfae_4_to_5 :
  (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
tfae_5_to_4 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd) →
    ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_6 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)
⊢ (∃ ι U x, ∀ (i : ι), P (f ∣_ U i)) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
[PROOFSTEP]
rintro ⟨ι, U, hU, H⟩
[GOAL]
case tfae_6_to_2.intro.intro.intro
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
tfae_4_to_5 :
  (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
tfae_5_to_4 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd) →
    ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_6 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
H : ∀ (i : ι), P (f ∣_ U i)
⊢ ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
[PROOFSTEP]
refine' ⟨Y.openCoverOfSuprEqTop U hU, _⟩
[GOAL]
case tfae_6_to_2.intro.intro.intro
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
tfae_4_to_5 :
  (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
tfae_5_to_4 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd) →
    ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_6 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
H : ∀ (i : ι), P (f ∣_ U i)
⊢ ∀ (i : (Scheme.openCoverOfSuprEqTop Y U hU).J), P pullback.snd
[PROOFSTEP]
intro i
[GOAL]
case tfae_6_to_2.intro.intro.intro
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
tfae_4_to_5 :
  (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
tfae_5_to_4 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd) →
    ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_6 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
H : ∀ (i : ι), P (f ∣_ U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
⊢ P pullback.snd
[PROOFSTEP]
rw [← hP.1.arrow_mk_iso_iff (morphismRestrictOpensRange f _)]
[GOAL]
case tfae_6_to_2.intro.intro.intro
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
tfae_4_to_5 :
  (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
tfae_5_to_4 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd) →
    ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_6 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
H : ∀ (i : ι), P (f ∣_ U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
⊢ P (f ∣_ Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i))
[PROOFSTEP]
convert H i
[GOAL]
case h.e'_1.h.e'_1.h.e'_6.h.e'_6
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
tfae_4_to_5 :
  (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
tfae_5_to_4 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd) →
    ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_6 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
H : ∀ (i : ι), P (f ∣_ U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
⊢ Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i) = U i
case h.e'_1.h.e'_3.e'_2.h.e'_6
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
tfae_4_to_5 :
  (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
tfae_5_to_4 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd) →
    ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_6 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
H : ∀ (i : ι), P (f ∣_ U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
e_1✝ :
  (Opens.toTopCat ↑X.toPresheafedSpace).obj
      ((Opens.map f.val.base).obj
        (Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i))) =
    (Opens.toTopCat ↑X.toPresheafedSpace).obj ((Opens.map f.val.base).obj (U i))
⊢ Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i) = U i
case h.e'_2.h.e'_1.h.e'_6
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
tfae_4_to_5 :
  (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
tfae_5_to_4 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd) →
    ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_6 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
H : ∀ (i : ι), P (f ∣_ U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
⊢ Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i) = U i
case h.e'_2.h.e'_3.e'_2
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
tfae_4_to_5 :
  (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
tfae_5_to_4 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd) →
    ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_6 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
H : ∀ (i : ι), P (f ∣_ U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
e_1✝ :
  (Opens.toTopCat ↑Y.toPresheafedSpace).obj
      (Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i)) =
    (Opens.toTopCat ↑Y.toPresheafedSpace).obj (U i)
⊢ Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i) = U i
case h.e'_3.e'_4
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
tfae_4_to_5 :
  (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
tfae_5_to_4 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd) →
    ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_6 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
H : ∀ (i : ι), P (f ∣_ U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
e_1✝ :
  Scheme.restrict X
      (_ :
        OpenEmbedding
          ↑(Opens.inclusion
              ((Opens.map f.val.base).obj
                (Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i))))) =
    Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (U i))))
e_2✝ :
  Scheme.restrict Y
      (_ :
        OpenEmbedding
          ↑(Opens.inclusion (Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i)))) =
    Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (U i)))
⊢ Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i) = U i
[PROOFSTEP]
all_goals ext1; exact Subtype.range_coe
[GOAL]
case h.e'_1.h.e'_1.h.e'_6.h.e'_6
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
tfae_4_to_5 :
  (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
tfae_5_to_4 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd) →
    ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_6 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
H : ∀ (i : ι), P (f ∣_ U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
⊢ Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i) = U i
[PROOFSTEP]
ext1
[GOAL]
case h.e'_1.h.e'_1.h.e'_6.h.e'_6.h
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
tfae_4_to_5 :
  (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
tfae_5_to_4 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd) →
    ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_6 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
H : ∀ (i : ι), P (f ∣_ U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
⊢ ↑(Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i)) = ↑(U i)
[PROOFSTEP]
exact Subtype.range_coe
[GOAL]
case h.e'_1.h.e'_3.e'_2.h.e'_6
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
tfae_4_to_5 :
  (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
tfae_5_to_4 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd) →
    ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_6 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
H : ∀ (i : ι), P (f ∣_ U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
e_1✝ :
  (Opens.toTopCat ↑X.toPresheafedSpace).obj
      ((Opens.map f.val.base).obj
        (Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i))) =
    (Opens.toTopCat ↑X.toPresheafedSpace).obj ((Opens.map f.val.base).obj (U i))
⊢ Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i) = U i
[PROOFSTEP]
ext1
[GOAL]
case h.e'_1.h.e'_3.e'_2.h.e'_6.h
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
tfae_4_to_5 :
  (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
tfae_5_to_4 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd) →
    ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_6 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
H : ∀ (i : ι), P (f ∣_ U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
e_1✝ :
  (Opens.toTopCat ↑X.toPresheafedSpace).obj
      ((Opens.map f.val.base).obj
        (Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i))) =
    (Opens.toTopCat ↑X.toPresheafedSpace).obj ((Opens.map f.val.base).obj (U i))
⊢ ↑(Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i)) = ↑(U i)
[PROOFSTEP]
exact Subtype.range_coe
[GOAL]
case h.e'_2.h.e'_1.h.e'_6
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
tfae_4_to_5 :
  (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
tfae_5_to_4 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd) →
    ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_6 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
H : ∀ (i : ι), P (f ∣_ U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
⊢ Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i) = U i
[PROOFSTEP]
ext1
[GOAL]
case h.e'_2.h.e'_1.h.e'_6.h
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
tfae_4_to_5 :
  (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
tfae_5_to_4 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd) →
    ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_6 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
H : ∀ (i : ι), P (f ∣_ U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
⊢ ↑(Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i)) = ↑(U i)
[PROOFSTEP]
exact Subtype.range_coe
[GOAL]
case h.e'_2.h.e'_3.e'_2
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
tfae_4_to_5 :
  (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
tfae_5_to_4 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd) →
    ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_6 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
H : ∀ (i : ι), P (f ∣_ U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
e_1✝ :
  (Opens.toTopCat ↑Y.toPresheafedSpace).obj
      (Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i)) =
    (Opens.toTopCat ↑Y.toPresheafedSpace).obj (U i)
⊢ Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i) = U i
[PROOFSTEP]
ext1
[GOAL]
case h.e'_2.h.e'_3.e'_2.h
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
tfae_4_to_5 :
  (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
tfae_5_to_4 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd) →
    ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_6 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
H : ∀ (i : ι), P (f ∣_ U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
e_1✝ :
  (Opens.toTopCat ↑Y.toPresheafedSpace).obj
      (Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i)) =
    (Opens.toTopCat ↑Y.toPresheafedSpace).obj (U i)
⊢ ↑(Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i)) = ↑(U i)
[PROOFSTEP]
exact Subtype.range_coe
[GOAL]
case h.e'_3.e'_4
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
tfae_4_to_5 :
  (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
tfae_5_to_4 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd) →
    ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_6 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
H : ∀ (i : ι), P (f ∣_ U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
e_1✝ :
  Scheme.restrict X
      (_ :
        OpenEmbedding
          ↑(Opens.inclusion
              ((Opens.map f.val.base).obj
                (Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i))))) =
    Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (U i))))
e_2✝ :
  Scheme.restrict Y
      (_ :
        OpenEmbedding
          ↑(Opens.inclusion (Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i)))) =
    Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (U i)))
⊢ Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i) = U i
[PROOFSTEP]
ext1
[GOAL]
case h.e'_3.e'_4.h
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
tfae_4_to_5 :
  (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
tfae_5_to_4 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd) →
    ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_6 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)
ι : Type u
U : ι → Opens ↑↑Y.toPresheafedSpace
hU : iSup U = ⊤
H : ∀ (i : ι), P (f ∣_ U i)
i : (Scheme.openCoverOfSuprEqTop Y U hU).J
e_1✝ :
  Scheme.restrict X
      (_ :
        OpenEmbedding
          ↑(Opens.inclusion
              ((Opens.map f.val.base).obj
                (Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i))))) =
    Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (U i))))
e_2✝ :
  Scheme.restrict Y
      (_ :
        OpenEmbedding
          ↑(Opens.inclusion (Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i)))) =
    Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (U i)))
⊢ ↑(Scheme.Hom.opensRange (Scheme.OpenCover.map (Scheme.openCoverOfSuprEqTop Y U hU) i)) = ↑(U i)
[PROOFSTEP]
exact Subtype.range_coe
[GOAL]
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
tfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f
tfae_1_to_4 : P f → ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_3 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd
tfae_3_to_2 : (∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
tfae_4_to_5 :
  (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd
tfae_5_to_4 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd) →
    ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)
tfae_4_to_6 : (∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U)) → ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)
tfae_6_to_2 : (∃ ι U x, ∀ (i : ι), P (f ∣_ U i)) → ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd
⊢ TFAE
    [P f, ∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd, ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd,
      ∀ (U : Opens ↑↑Y.toPresheafedSpace), P (f ∣_ U),
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsOpenImmersion g], P pullback.snd, ∃ ι U x, ∀ (i : ι), P (f ∣_ U i)]
[PROOFSTEP]
tfae_finish
[GOAL]
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
⊢ P f ↔ ∀ (i : 𝒰.J), P pullback.snd
[PROOFSTEP]
refine
  ⟨fun H =>
    let h := ((hP.openCover_TFAE f).out 0 2).mp H;
    fun i => ?_,
    fun H =>
    let h := ((hP.openCover_TFAE f).out 1 0).mp;
    ?_⟩
[GOAL]
case refine_1
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
H : P f
h : ∀ (𝒰 : Scheme.OpenCover Y) (i : 𝒰.J), P pullback.snd := Iff.mp (List.TFAE.out (openCover_TFAE hP f) 0 2) H
i : 𝒰.J
⊢ P pullback.snd
[PROOFSTEP]
exact h 𝒰 i
[GOAL]
case refine_2
P : MorphismProperty Scheme
hP : PropertyIsLocalAtTarget P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
H : ∀ (i : 𝒰.J), P pullback.snd
h : (∃ 𝒰, ∀ (i : 𝒰.J), P pullback.snd) → P f := (List.TFAE.out (openCover_TFAE hP f) 1 0).mp
⊢ P f
[PROOFSTEP]
exact h ⟨𝒰, H⟩
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
hP' : StableUnderBaseChange P
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
inst✝ : IsAffine S
H : P g
⊢ targetAffineLocally P pullback.fst
[PROOFSTEP]
have h01 := (hP.affine_openCover_TFAE (pullback.fst : pullback f g ⟶ X)).out 0 1
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
hP' : StableUnderBaseChange P
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
inst✝ : IsAffine S
H : P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
⊢ targetAffineLocally P pullback.fst
[PROOFSTEP]
rw [h01]
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
hP' : StableUnderBaseChange P
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
inst✝ : IsAffine S
H : P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
⊢ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
[PROOFSTEP]
use X.affineCover, inferInstance
[GOAL]
case h
P : AffineTargetMorphismProperty
hP : IsLocal P
hP' : StableUnderBaseChange P
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
inst✝ : IsAffine S
H : P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
⊢ ∀ (i : (Scheme.affineCover X).J), P pullback.snd
[PROOFSTEP]
intro i
[GOAL]
case h
P : AffineTargetMorphismProperty
hP : IsLocal P
hP' : StableUnderBaseChange P
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
inst✝ : IsAffine S
H : P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
i : (Scheme.affineCover X).J
⊢ P pullback.snd
[PROOFSTEP]
let e := pullbackSymmetry _ _ ≪≫ pullbackRightPullbackFstIso f g (X.affineCover.map i)
[GOAL]
case h
P : AffineTargetMorphismProperty
hP : IsLocal P
hP' : StableUnderBaseChange P
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
inst✝ : IsAffine S
H : P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
i : (Scheme.affineCover X).J
e : pullback pullback.fst (Scheme.OpenCover.map (Scheme.affineCover X) i) ≅
  pullback (Scheme.OpenCover.map (Scheme.affineCover X) i ≫ f) g :=
  pullbackSymmetry pullback.fst (Scheme.OpenCover.map (Scheme.affineCover X) i) ≪≫
    pullbackRightPullbackFstIso f g (Scheme.OpenCover.map (Scheme.affineCover X) i)
⊢ P pullback.snd
[PROOFSTEP]
have : e.hom ≫ pullback.fst = pullback.snd := by simp
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
hP' : StableUnderBaseChange P
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
inst✝ : IsAffine S
H : P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
i : (Scheme.affineCover X).J
e : pullback pullback.fst (Scheme.OpenCover.map (Scheme.affineCover X) i) ≅
  pullback (Scheme.OpenCover.map (Scheme.affineCover X) i ≫ f) g :=
  pullbackSymmetry pullback.fst (Scheme.OpenCover.map (Scheme.affineCover X) i) ≪≫
    pullbackRightPullbackFstIso f g (Scheme.OpenCover.map (Scheme.affineCover X) i)
⊢ e.hom ≫ pullback.fst = pullback.snd
[PROOFSTEP]
simp
[GOAL]
case h
P : AffineTargetMorphismProperty
hP : IsLocal P
hP' : StableUnderBaseChange P
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
inst✝ : IsAffine S
H : P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
i : (Scheme.affineCover X).J
e : pullback pullback.fst (Scheme.OpenCover.map (Scheme.affineCover X) i) ≅
  pullback (Scheme.OpenCover.map (Scheme.affineCover X) i ≫ f) g :=
  pullbackSymmetry pullback.fst (Scheme.OpenCover.map (Scheme.affineCover X) i) ≪≫
    pullbackRightPullbackFstIso f g (Scheme.OpenCover.map (Scheme.affineCover X) i)
this : e.hom ≫ pullback.fst = pullback.snd
⊢ P pullback.snd
[PROOFSTEP]
rw [← this, affine_cancel_left_isIso hP.1]
[GOAL]
case h
P : AffineTargetMorphismProperty
hP : IsLocal P
hP' : StableUnderBaseChange P
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
inst✝ : IsAffine S
H : P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
i : (Scheme.affineCover X).J
e : pullback pullback.fst (Scheme.OpenCover.map (Scheme.affineCover X) i) ≅
  pullback (Scheme.OpenCover.map (Scheme.affineCover X) i ≫ f) g :=
  pullbackSymmetry pullback.fst (Scheme.OpenCover.map (Scheme.affineCover X) i) ≪≫
    pullbackRightPullbackFstIso f g (Scheme.OpenCover.map (Scheme.affineCover X) i)
this : e.hom ≫ pullback.fst = pullback.snd
⊢ P pullback.fst
[PROOFSTEP]
apply hP'
[GOAL]
case h.a
P : AffineTargetMorphismProperty
hP : IsLocal P
hP' : StableUnderBaseChange P
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
inst✝ : IsAffine S
H : P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P pullback.snd
i : (Scheme.affineCover X).J
e : pullback pullback.fst (Scheme.OpenCover.map (Scheme.affineCover X) i) ≅
  pullback (Scheme.OpenCover.map (Scheme.affineCover X) i ≫ f) g :=
  pullbackSymmetry pullback.fst (Scheme.OpenCover.map (Scheme.affineCover X) i) ≪≫
    pullbackRightPullbackFstIso f g (Scheme.OpenCover.map (Scheme.affineCover X) i)
this : e.hom ≫ pullback.fst = pullback.snd
⊢ P g
[PROOFSTEP]
assumption
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
hP' : StableUnderBaseChange P
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : targetAffineLocally P g
⊢ targetAffineLocally P pullback.fst
[PROOFSTEP]
have h01 := (hP.targetAffineLocallyIsLocal.openCover_TFAE (pullback.fst : pullback f g ⟶ X)).out 0 1
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
hP' : StableUnderBaseChange P
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : targetAffineLocally P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∀ (i : 𝒰.J), targetAffineLocally P pullback.snd
⊢ targetAffineLocally P pullback.fst
[PROOFSTEP]
rw [h01]
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
hP' : StableUnderBaseChange P
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : targetAffineLocally P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∀ (i : 𝒰.J), targetAffineLocally P pullback.snd
⊢ ∃ 𝒰, ∀ (i : 𝒰.J), targetAffineLocally P pullback.snd
[PROOFSTEP]
use S.affineCover.pullbackCover f
[GOAL]
case h
P : AffineTargetMorphismProperty
hP : IsLocal P
hP' : StableUnderBaseChange P
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : targetAffineLocally P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∀ (i : 𝒰.J), targetAffineLocally P pullback.snd
⊢ ∀ (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f).J), targetAffineLocally P pullback.snd
[PROOFSTEP]
intro i
[GOAL]
case h
P : AffineTargetMorphismProperty
hP : IsLocal P
hP' : StableUnderBaseChange P
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : targetAffineLocally P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∀ (i : 𝒰.J), targetAffineLocally P pullback.snd
i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f).J
⊢ targetAffineLocally P pullback.snd
[PROOFSTEP]
have h03 := (hP.affine_openCover_TFAE g).out 0 3
[GOAL]
case h
P : AffineTargetMorphismProperty
hP : IsLocal P
hP' : StableUnderBaseChange P
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : targetAffineLocally P g
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∀ (i : 𝒰.J), targetAffineLocally P pullback.snd
i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f).J
h03 :
  targetAffineLocally P g ↔
    ∀ {U : Scheme} (g_1 : U ⟶ S) [inst : IsAffine U] [inst_1 : IsOpenImmersion g_1], P pullback.snd
⊢ targetAffineLocally P pullback.snd
[PROOFSTEP]
rw [h03] at H
[GOAL]
case h
P : AffineTargetMorphismProperty
hP : IsLocal P
hP' : StableUnderBaseChange P
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : ∀ {U : Scheme} (g_1 : U ⟶ S) [inst : IsAffine U] [inst_1 : IsOpenImmersion g_1], P pullback.snd
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∀ (i : 𝒰.J), targetAffineLocally P pullback.snd
i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f).J
h03 :
  targetAffineLocally P g ↔
    ∀ {U : Scheme} (g_1 : U ⟶ S) [inst : IsAffine U] [inst_1 : IsOpenImmersion g_1], P pullback.snd
⊢ targetAffineLocally P pullback.snd
[PROOFSTEP]
let e : pullback (pullback.fst : pullback f g ⟶ _) ((S.affineCover.pullbackCover f).map i) ≅ _ :=
  by
  refine'
    pullbackSymmetry _ _ ≪≫
      pullbackRightPullbackFstIso f g _ ≪≫
        _ ≪≫
          (pullbackRightPullbackFstIso (S.affineCover.map i) g
              (pullback.snd : pullback f (S.affineCover.map i) ⟶ _)).symm
  exact asIso (pullback.map _ _ _ _ (𝟙 _) (𝟙 _) (𝟙 _) (by simpa using pullback.condition) (by simp))
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
hP' : StableUnderBaseChange P
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : ∀ {U : Scheme} (g_1 : U ⟶ S) [inst : IsAffine U] [inst_1 : IsOpenImmersion g_1], P pullback.snd
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∀ (i : 𝒰.J), targetAffineLocally P pullback.snd
i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f).J
h03 :
  targetAffineLocally P g ↔
    ∀ {U : Scheme} (g_1 : U ⟶ S) [inst : IsAffine U] [inst_1 : IsOpenImmersion g_1], P pullback.snd
⊢ pullback pullback.fst (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i) ≅ ?m.95921
[PROOFSTEP]
refine'
  pullbackSymmetry _ _ ≪≫
    pullbackRightPullbackFstIso f g _ ≪≫
      _ ≪≫
        (pullbackRightPullbackFstIso (S.affineCover.map i) g (pullback.snd : pullback f (S.affineCover.map i) ⟶ _)).symm
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
hP' : StableUnderBaseChange P
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : ∀ {U : Scheme} (g_1 : U ⟶ S) [inst : IsAffine U] [inst_1 : IsOpenImmersion g_1], P pullback.snd
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∀ (i : 𝒰.J), targetAffineLocally P pullback.snd
i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f).J
h03 :
  targetAffineLocally P g ↔
    ∀ {U : Scheme} (g_1 : U ⟶ S) [inst : IsAffine U] [inst_1 : IsOpenImmersion g_1], P pullback.snd
⊢ pullback (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i ≫ f) g ≅
    pullback (pullback.snd ≫ Scheme.OpenCover.map (Scheme.affineCover S) i) g
[PROOFSTEP]
exact asIso (pullback.map _ _ _ _ (𝟙 _) (𝟙 _) (𝟙 _) (by simpa using pullback.condition) (by simp))
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
hP' : StableUnderBaseChange P
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : ∀ {U : Scheme} (g_1 : U ⟶ S) [inst : IsAffine U] [inst_1 : IsOpenImmersion g_1], P pullback.snd
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∀ (i : 𝒰.J), targetAffineLocally P pullback.snd
i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f).J
h03 :
  targetAffineLocally P g ↔
    ∀ {U : Scheme} (g_1 : U ⟶ S) [inst : IsAffine U] [inst_1 : IsOpenImmersion g_1], P pullback.snd
⊢ (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i ≫ f) ≫ 𝟙 S =
    𝟙 (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i) ≫
      pullback.snd ≫ Scheme.OpenCover.map (Scheme.affineCover S) i
[PROOFSTEP]
simpa using pullback.condition
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
hP' : StableUnderBaseChange P
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : ∀ {U : Scheme} (g_1 : U ⟶ S) [inst : IsAffine U] [inst_1 : IsOpenImmersion g_1], P pullback.snd
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∀ (i : 𝒰.J), targetAffineLocally P pullback.snd
i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f).J
h03 :
  targetAffineLocally P g ↔
    ∀ {U : Scheme} (g_1 : U ⟶ S) [inst : IsAffine U] [inst_1 : IsOpenImmersion g_1], P pullback.snd
⊢ g ≫ 𝟙 S = 𝟙 Y ≫ g
[PROOFSTEP]
simp
[GOAL]
case h
P : AffineTargetMorphismProperty
hP : IsLocal P
hP' : StableUnderBaseChange P
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : ∀ {U : Scheme} (g_1 : U ⟶ S) [inst : IsAffine U] [inst_1 : IsOpenImmersion g_1], P pullback.snd
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∀ (i : 𝒰.J), targetAffineLocally P pullback.snd
i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f).J
h03 :
  targetAffineLocally P g ↔
    ∀ {U : Scheme} (g_1 : U ⟶ S) [inst : IsAffine U] [inst_1 : IsOpenImmersion g_1], P pullback.snd
e : pullback pullback.fst (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i) ≅
  pullback pullback.snd pullback.fst :=
  pullbackSymmetry pullback.fst (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i) ≪≫
    pullbackRightPullbackFstIso f g
        (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i) ≪≫
      asIso
          (pullback.map (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i ≫ f) g
            (pullback.snd ≫ Scheme.OpenCover.map (Scheme.affineCover S) i) g
            (𝟙 (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i)) (𝟙 Y) (𝟙 S)
            (_ :
              (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i ≫ f) ≫ 𝟙 S =
                𝟙 (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i) ≫
                  pullback.snd ≫ Scheme.OpenCover.map (Scheme.affineCover S) i)
            (_ : g ≫ 𝟙 S = 𝟙 Y ≫ g)) ≪≫
        (pullbackRightPullbackFstIso (Scheme.OpenCover.map (Scheme.affineCover S) i) g pullback.snd).symm
⊢ targetAffineLocally P pullback.snd
[PROOFSTEP]
have : e.hom ≫ pullback.fst = pullback.snd := by simp
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
hP' : StableUnderBaseChange P
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : ∀ {U : Scheme} (g_1 : U ⟶ S) [inst : IsAffine U] [inst_1 : IsOpenImmersion g_1], P pullback.snd
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∀ (i : 𝒰.J), targetAffineLocally P pullback.snd
i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f).J
h03 :
  targetAffineLocally P g ↔
    ∀ {U : Scheme} (g_1 : U ⟶ S) [inst : IsAffine U] [inst_1 : IsOpenImmersion g_1], P pullback.snd
e : pullback pullback.fst (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i) ≅
  pullback pullback.snd pullback.fst :=
  pullbackSymmetry pullback.fst (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i) ≪≫
    pullbackRightPullbackFstIso f g
        (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i) ≪≫
      asIso
          (pullback.map (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i ≫ f) g
            (pullback.snd ≫ Scheme.OpenCover.map (Scheme.affineCover S) i) g
            (𝟙 (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i)) (𝟙 Y) (𝟙 S)
            (_ :
              (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i ≫ f) ≫ 𝟙 S =
                𝟙 (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i) ≫
                  pullback.snd ≫ Scheme.OpenCover.map (Scheme.affineCover S) i)
            (_ : g ≫ 𝟙 S = 𝟙 Y ≫ g)) ≪≫
        (pullbackRightPullbackFstIso (Scheme.OpenCover.map (Scheme.affineCover S) i) g pullback.snd).symm
⊢ e.hom ≫ pullback.fst = pullback.snd
[PROOFSTEP]
simp
[GOAL]
case h
P : AffineTargetMorphismProperty
hP : IsLocal P
hP' : StableUnderBaseChange P
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : ∀ {U : Scheme} (g_1 : U ⟶ S) [inst : IsAffine U] [inst_1 : IsOpenImmersion g_1], P pullback.snd
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∀ (i : 𝒰.J), targetAffineLocally P pullback.snd
i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f).J
h03 :
  targetAffineLocally P g ↔
    ∀ {U : Scheme} (g_1 : U ⟶ S) [inst : IsAffine U] [inst_1 : IsOpenImmersion g_1], P pullback.snd
e : pullback pullback.fst (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i) ≅
  pullback pullback.snd pullback.fst :=
  pullbackSymmetry pullback.fst (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i) ≪≫
    pullbackRightPullbackFstIso f g
        (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i) ≪≫
      asIso
          (pullback.map (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i ≫ f) g
            (pullback.snd ≫ Scheme.OpenCover.map (Scheme.affineCover S) i) g
            (𝟙 (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i)) (𝟙 Y) (𝟙 S)
            (_ :
              (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i ≫ f) ≫ 𝟙 S =
                𝟙 (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i) ≫
                  pullback.snd ≫ Scheme.OpenCover.map (Scheme.affineCover S) i)
            (_ : g ≫ 𝟙 S = 𝟙 Y ≫ g)) ≪≫
        (pullbackRightPullbackFstIso (Scheme.OpenCover.map (Scheme.affineCover S) i) g pullback.snd).symm
this : e.hom ≫ pullback.fst = pullback.snd
⊢ targetAffineLocally P pullback.snd
[PROOFSTEP]
rw [← this, (targetAffineLocally_respectsIso hP.1).cancel_left_isIso]
[GOAL]
case h
P : AffineTargetMorphismProperty
hP : IsLocal P
hP' : StableUnderBaseChange P
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : ∀ {U : Scheme} (g_1 : U ⟶ S) [inst : IsAffine U] [inst_1 : IsOpenImmersion g_1], P pullback.snd
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∀ (i : 𝒰.J), targetAffineLocally P pullback.snd
i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f).J
h03 :
  targetAffineLocally P g ↔
    ∀ {U : Scheme} (g_1 : U ⟶ S) [inst : IsAffine U] [inst_1 : IsOpenImmersion g_1], P pullback.snd
e : pullback pullback.fst (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i) ≅
  pullback pullback.snd pullback.fst :=
  pullbackSymmetry pullback.fst (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i) ≪≫
    pullbackRightPullbackFstIso f g
        (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i) ≪≫
      asIso
          (pullback.map (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i ≫ f) g
            (pullback.snd ≫ Scheme.OpenCover.map (Scheme.affineCover S) i) g
            (𝟙 (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i)) (𝟙 Y) (𝟙 S)
            (_ :
              (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i ≫ f) ≫ 𝟙 S =
                𝟙 (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i) ≫
                  pullback.snd ≫ Scheme.OpenCover.map (Scheme.affineCover S) i)
            (_ : g ≫ 𝟙 S = 𝟙 Y ≫ g)) ≪≫
        (pullbackRightPullbackFstIso (Scheme.OpenCover.map (Scheme.affineCover S) i) g pullback.snd).symm
this : e.hom ≫ pullback.fst = pullback.snd
⊢ targetAffineLocally P pullback.fst
[PROOFSTEP]
apply hP.targetAffineLocallyPullbackFstOfRightOfStableUnderBaseChange hP'
[GOAL]
case h.H
P : AffineTargetMorphismProperty
hP : IsLocal P
hP' : StableUnderBaseChange P
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : ∀ {U : Scheme} (g_1 : U ⟶ S) [inst : IsAffine U] [inst_1 : IsOpenImmersion g_1], P pullback.snd
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∀ (i : 𝒰.J), targetAffineLocally P pullback.snd
i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f).J
h03 :
  targetAffineLocally P g ↔
    ∀ {U : Scheme} (g_1 : U ⟶ S) [inst : IsAffine U] [inst_1 : IsOpenImmersion g_1], P pullback.snd
e : pullback pullback.fst (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i) ≅
  pullback pullback.snd pullback.fst :=
  pullbackSymmetry pullback.fst (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i) ≪≫
    pullbackRightPullbackFstIso f g
        (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i) ≪≫
      asIso
          (pullback.map (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i ≫ f) g
            (pullback.snd ≫ Scheme.OpenCover.map (Scheme.affineCover S) i) g
            (𝟙 (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i)) (𝟙 Y) (𝟙 S)
            (_ :
              (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i ≫ f) ≫ 𝟙 S =
                𝟙 (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i) ≫
                  pullback.snd ≫ Scheme.OpenCover.map (Scheme.affineCover S) i)
            (_ : g ≫ 𝟙 S = 𝟙 Y ≫ g)) ≪≫
        (pullbackRightPullbackFstIso (Scheme.OpenCover.map (Scheme.affineCover S) i) g pullback.snd).symm
this : e.hom ≫ pullback.fst = pullback.snd
⊢ P pullback.fst
[PROOFSTEP]
rw [← pullbackSymmetry_hom_comp_snd, affine_cancel_left_isIso hP.1]
[GOAL]
case h.H
P : AffineTargetMorphismProperty
hP : IsLocal P
hP' : StableUnderBaseChange P
X Y S : Scheme
f : X ⟶ S
g : Y ⟶ S
H : ∀ {U : Scheme} (g_1 : U ⟶ S) [inst : IsAffine U] [inst_1 : IsOpenImmersion g_1], P pullback.snd
h01 : targetAffineLocally P pullback.fst ↔ ∃ 𝒰, ∀ (i : 𝒰.J), targetAffineLocally P pullback.snd
i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f).J
h03 :
  targetAffineLocally P g ↔
    ∀ {U : Scheme} (g_1 : U ⟶ S) [inst : IsAffine U] [inst_1 : IsOpenImmersion g_1], P pullback.snd
e : pullback pullback.fst (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i) ≅
  pullback pullback.snd pullback.fst :=
  pullbackSymmetry pullback.fst (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i) ≪≫
    pullbackRightPullbackFstIso f g
        (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i) ≪≫
      asIso
          (pullback.map (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i ≫ f) g
            (pullback.snd ≫ Scheme.OpenCover.map (Scheme.affineCover S) i) g
            (𝟙 (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i)) (𝟙 Y) (𝟙 S)
            (_ :
              (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i ≫ f) ≫ 𝟙 S =
                𝟙 (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) f) i) ≫
                  pullback.snd ≫ Scheme.OpenCover.map (Scheme.affineCover S) i)
            (_ : g ≫ 𝟙 S = 𝟙 Y ≫ g)) ≪≫
        (pullbackRightPullbackFstIso (Scheme.OpenCover.map (Scheme.affineCover S) i) g pullback.snd).symm
this : e.hom ≫ pullback.fst = pullback.snd
⊢ P pullback.snd
[PROOFSTEP]
apply H
[GOAL]
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
⊢ MorphismProperty.RespectsIso (toProperty (diagonal P))
[PROOFSTEP]
delta AffineTargetMorphismProperty.diagonal
[GOAL]
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
⊢ MorphismProperty.RespectsIso
    (toProperty fun {X x} f x_1 =>
      ∀ {U₁ U₂ : Scheme} (f₁ : U₁ ⟶ X) (f₂ : U₂ ⟶ X) [inst : IsAffine U₁] [inst_1 : IsAffine U₂]
        [inst_2 : IsOpenImmersion f₁] [inst_3 : IsOpenImmersion f₂], P (pullback.mapDesc f₁ f₂ f))
[PROOFSTEP]
apply AffineTargetMorphismProperty.respectsIso_mk
[GOAL]
case h₁
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
⊢ ∀ {X Y Z : Scheme} (e : X ≅ Y) (f : Y ⟶ Z) [inst : IsAffine Z],
    (∀ {U₁ U₂ : Scheme} (f₁ : U₁ ⟶ Y) (f₂ : U₂ ⟶ Y) [inst_1 : IsAffine U₁] [inst_2 : IsAffine U₂]
        [inst_3 : IsOpenImmersion f₁] [inst_4 : IsOpenImmersion f₂], P (pullback.mapDesc f₁ f₂ f)) →
      ∀ {U₁ U₂ : Scheme} (f₁ : U₁ ⟶ X) (f₂ : U₂ ⟶ X) [inst_1 : IsAffine U₁] [inst_2 : IsAffine U₂]
        [inst_3 : IsOpenImmersion f₁] [inst_4 : IsOpenImmersion f₂], P (pullback.mapDesc f₁ f₂ (e.hom ≫ f))
[PROOFSTEP]
introv H _ _
[GOAL]
case h₁
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
X Y Z : Scheme
e : X ≅ Y
f : Y ⟶ Z
inst✝⁴ : IsAffine Z
H :
  ∀ {U₁ U₂ : Scheme} (f₁ : U₁ ⟶ Y) (f₂ : U₂ ⟶ Y) [inst : IsAffine U₁] [inst_1 : IsAffine U₂]
    [inst_2 : IsOpenImmersion f₁] [inst_3 : IsOpenImmersion f₂], P (pullback.mapDesc f₁ f₂ f)
U₁ U₂ : Scheme
f₁ : U₁ ⟶ X
f₂ : U₂ ⟶ X
inst✝³ : IsAffine U₁
inst✝² : IsAffine U₂
inst✝¹ : IsOpenImmersion f₁
inst✝ : IsOpenImmersion f₂
⊢ P (pullback.mapDesc f₁ f₂ (e.hom ≫ f))
[PROOFSTEP]
rw [pullback.mapDesc_comp, affine_cancel_left_isIso hP, affine_cancel_right_isIso hP]
  -- Porting note : add the following two instances
[GOAL]
case h₁
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
X Y Z : Scheme
e : X ≅ Y
f : Y ⟶ Z
inst✝⁴ : IsAffine Z
H :
  ∀ {U₁ U₂ : Scheme} (f₁ : U₁ ⟶ Y) (f₂ : U₂ ⟶ Y) [inst : IsAffine U₁] [inst_1 : IsAffine U₂]
    [inst_2 : IsOpenImmersion f₁] [inst_3 : IsOpenImmersion f₂], P (pullback.mapDesc f₁ f₂ f)
U₁ U₂ : Scheme
f₁ : U₁ ⟶ X
f₂ : U₂ ⟶ X
inst✝³ : IsAffine U₁
inst✝² : IsAffine U₂
inst✝¹ : IsOpenImmersion f₁
inst✝ : IsOpenImmersion f₂
⊢ P (pullback.mapDesc (f₁ ≫ e.hom) (f₂ ≫ e.hom) f)
[PROOFSTEP]
have i1 : IsOpenImmersion (f₁ ≫ e.hom) := PresheafedSpace.IsOpenImmersion.comp _ _
[GOAL]
case h₁
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
X Y Z : Scheme
e : X ≅ Y
f : Y ⟶ Z
inst✝⁴ : IsAffine Z
H :
  ∀ {U₁ U₂ : Scheme} (f₁ : U₁ ⟶ Y) (f₂ : U₂ ⟶ Y) [inst : IsAffine U₁] [inst_1 : IsAffine U₂]
    [inst_2 : IsOpenImmersion f₁] [inst_3 : IsOpenImmersion f₂], P (pullback.mapDesc f₁ f₂ f)
U₁ U₂ : Scheme
f₁ : U₁ ⟶ X
f₂ : U₂ ⟶ X
inst✝³ : IsAffine U₁
inst✝² : IsAffine U₂
inst✝¹ : IsOpenImmersion f₁
inst✝ : IsOpenImmersion f₂
i1 : IsOpenImmersion (f₁ ≫ e.hom)
⊢ P (pullback.mapDesc (f₁ ≫ e.hom) (f₂ ≫ e.hom) f)
[PROOFSTEP]
have i2 : IsOpenImmersion (f₂ ≫ e.hom) := PresheafedSpace.IsOpenImmersion.comp _ _
[GOAL]
case h₁
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
X Y Z : Scheme
e : X ≅ Y
f : Y ⟶ Z
inst✝⁴ : IsAffine Z
H :
  ∀ {U₁ U₂ : Scheme} (f₁ : U₁ ⟶ Y) (f₂ : U₂ ⟶ Y) [inst : IsAffine U₁] [inst_1 : IsAffine U₂]
    [inst_2 : IsOpenImmersion f₁] [inst_3 : IsOpenImmersion f₂], P (pullback.mapDesc f₁ f₂ f)
U₁ U₂ : Scheme
f₁ : U₁ ⟶ X
f₂ : U₂ ⟶ X
inst✝³ : IsAffine U₁
inst✝² : IsAffine U₂
inst✝¹ : IsOpenImmersion f₁
inst✝ : IsOpenImmersion f₂
i1 : IsOpenImmersion (f₁ ≫ e.hom)
i2 : IsOpenImmersion (f₂ ≫ e.hom)
⊢ P (pullback.mapDesc (f₁ ≫ e.hom) (f₂ ≫ e.hom) f)
[PROOFSTEP]
apply H
[GOAL]
case h₂
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
⊢ ∀ {X Y Z : Scheme} (e : Y ≅ Z) (f : X ⟶ Y) [h : IsAffine Y],
    (∀ {U₁ U₂ : Scheme} (f₁ : U₁ ⟶ X) (f₂ : U₂ ⟶ X) [inst : IsAffine U₁] [inst_1 : IsAffine U₂]
        [inst_2 : IsOpenImmersion f₁] [inst_3 : IsOpenImmersion f₂], P (pullback.mapDesc f₁ f₂ f)) →
      ∀ {U₁ U₂ : Scheme} (f₁ : U₁ ⟶ X) (f₂ : U₂ ⟶ X) [inst : IsAffine U₁] [inst_1 : IsAffine U₂]
        [inst_2 : IsOpenImmersion f₁] [inst_3 : IsOpenImmersion f₂], P (pullback.mapDesc f₁ f₂ (f ≫ e.hom))
[PROOFSTEP]
introv H _ _
  -- Porting note : add the following two instances
[GOAL]
case h₂
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
X Y Z : Scheme
e : Y ≅ Z
f : X ⟶ Y
h : IsAffine Y
H :
  ∀ {U₁ U₂ : Scheme} (f₁ : U₁ ⟶ X) (f₂ : U₂ ⟶ X) [inst : IsAffine U₁] [inst_1 : IsAffine U₂]
    [inst_2 : IsOpenImmersion f₁] [inst_3 : IsOpenImmersion f₂], P (pullback.mapDesc f₁ f₂ f)
U₁ U₂ : Scheme
f₁ : U₁ ⟶ X
f₂ : U₂ ⟶ X
inst✝³ : IsAffine U₁
inst✝² : IsAffine U₂
inst✝¹ : IsOpenImmersion f₁
inst✝ : IsOpenImmersion f₂
⊢ P (pullback.mapDesc f₁ f₂ (f ≫ e.hom))
[PROOFSTEP]
have _ : IsAffine Z := isAffineOfIso e.inv
[GOAL]
case h₂
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
X Y Z : Scheme
e : Y ≅ Z
f : X ⟶ Y
h : IsAffine Y
H :
  ∀ {U₁ U₂ : Scheme} (f₁ : U₁ ⟶ X) (f₂ : U₂ ⟶ X) [inst : IsAffine U₁] [inst_1 : IsAffine U₂]
    [inst_2 : IsOpenImmersion f₁] [inst_3 : IsOpenImmersion f₂], P (pullback.mapDesc f₁ f₂ f)
U₁ U₂ : Scheme
f₁ : U₁ ⟶ X
f₂ : U₂ ⟶ X
inst✝³ : IsAffine U₁
inst✝² : IsAffine U₂
inst✝¹ : IsOpenImmersion f₁
inst✝ : IsOpenImmersion f₂
x✝ : IsAffine Z
⊢ P (pullback.mapDesc f₁ f₂ (f ≫ e.hom))
[PROOFSTEP]
rw [pullback.mapDesc_comp, affine_cancel_right_isIso hP]
[GOAL]
case h₂
P : AffineTargetMorphismProperty
hP : MorphismProperty.RespectsIso (toProperty P)
X Y Z : Scheme
e : Y ≅ Z
f : X ⟶ Y
h : IsAffine Y
H :
  ∀ {U₁ U₂ : Scheme} (f₁ : U₁ ⟶ X) (f₂ : U₂ ⟶ X) [inst : IsAffine U₁] [inst_1 : IsAffine U₂]
    [inst_2 : IsOpenImmersion f₁] [inst_3 : IsOpenImmersion f₂], P (pullback.mapDesc f₁ f₂ f)
U₁ U₂ : Scheme
f₁ : U₁ ⟶ X
f₂ : U₂ ⟶ X
inst✝³ : IsAffine U₁
inst✝² : IsAffine U₂
inst✝¹ : IsOpenImmersion f₁
inst✝ : IsOpenImmersion f₂
x✝ : IsAffine Z
⊢ P (pullback.mapDesc f₁ f₂ f)
[PROOFSTEP]
apply H
[GOAL]
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
𝒰' : (i : 𝒰.J) → Scheme.OpenCover (pullback f (Scheme.OpenCover.map 𝒰 i))
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine (Scheme.OpenCover.obj (𝒰' i) j)
h𝒰' :
  ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
    P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)
⊢ MorphismProperty.diagonal (targetAffineLocally P) f
[PROOFSTEP]
let 𝒱 :=
  (Scheme.Pullback.openCoverOfBase 𝒰 f f).bind fun i =>
    Scheme.Pullback.openCoverOfLeftRight.{u} (𝒰' i) (𝒰' i) pullback.snd pullback.snd
[GOAL]
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
𝒰' : (i : 𝒰.J) → Scheme.OpenCover (pullback f (Scheme.OpenCover.map 𝒰 i))
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine (Scheme.OpenCover.obj (𝒰' i) j)
h𝒰' :
  ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
    P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)
𝒱 : Scheme.OpenCover (pullback f f) :=
  Scheme.OpenCover.bind (Scheme.Pullback.openCoverOfBase 𝒰 f f) fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
⊢ MorphismProperty.diagonal (targetAffineLocally P) f
[PROOFSTEP]
have i1 : ∀ i, IsAffine (𝒱.obj i) := fun i => by dsimp; infer_instance
[GOAL]
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
𝒰' : (i : 𝒰.J) → Scheme.OpenCover (pullback f (Scheme.OpenCover.map 𝒰 i))
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine (Scheme.OpenCover.obj (𝒰' i) j)
h𝒰' :
  ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
    P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)
𝒱 : Scheme.OpenCover (pullback f f) :=
  Scheme.OpenCover.bind (Scheme.Pullback.openCoverOfBase 𝒰 f f) fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i : 𝒱.J
⊢ IsAffine (Scheme.OpenCover.obj 𝒱 i)
[PROOFSTEP]
dsimp
[GOAL]
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
𝒰' : (i : 𝒰.J) → Scheme.OpenCover (pullback f (Scheme.OpenCover.map 𝒰 i))
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine (Scheme.OpenCover.obj (𝒰' i) j)
h𝒰' :
  ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
    P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)
𝒱 : Scheme.OpenCover (pullback f f) :=
  Scheme.OpenCover.bind (Scheme.Pullback.openCoverOfBase 𝒰 f f) fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i : 𝒱.J
⊢ IsAffine
    (pullback (Scheme.OpenCover.map (𝒰' i.fst) i.snd.fst ≫ pullback.snd)
      (Scheme.OpenCover.map (𝒰' i.fst) i.snd.snd ≫ pullback.snd))
[PROOFSTEP]
infer_instance
[GOAL]
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
𝒰' : (i : 𝒰.J) → Scheme.OpenCover (pullback f (Scheme.OpenCover.map 𝒰 i))
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine (Scheme.OpenCover.obj (𝒰' i) j)
h𝒰' :
  ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
    P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)
𝒱 : Scheme.OpenCover (pullback f f) :=
  Scheme.OpenCover.bind (Scheme.Pullback.openCoverOfBase 𝒰 f f) fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (Scheme.OpenCover.obj 𝒱 i)
⊢ MorphismProperty.diagonal (targetAffineLocally P) f
[PROOFSTEP]
refine' (hP.affine_openCover_iff _ _).mpr _
[GOAL]
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
𝒰' : (i : 𝒰.J) → Scheme.OpenCover (pullback f (Scheme.OpenCover.map 𝒰 i))
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine (Scheme.OpenCover.obj (𝒰' i) j)
h𝒰' :
  ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
    P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)
𝒱 : Scheme.OpenCover (pullback f f) :=
  Scheme.OpenCover.bind (Scheme.Pullback.openCoverOfBase 𝒰 f f) fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (Scheme.OpenCover.obj 𝒱 i)
⊢ ∀ (i : 𝒱.J), P pullback.snd
[PROOFSTEP]
rintro ⟨i, j, k⟩
[GOAL]
case mk.mk
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
𝒰' : (i : 𝒰.J) → Scheme.OpenCover (pullback f (Scheme.OpenCover.map 𝒰 i))
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine (Scheme.OpenCover.obj (𝒰' i) j)
h𝒰' :
  ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
    P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)
𝒱 : Scheme.OpenCover (pullback f f) :=
  Scheme.OpenCover.bind (Scheme.Pullback.openCoverOfBase 𝒰 f f) fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (Scheme.OpenCover.obj 𝒱 i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
⊢ P pullback.snd
[PROOFSTEP]
dsimp
[GOAL]
case mk.mk
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
𝒰' : (i : 𝒰.J) → Scheme.OpenCover (pullback f (Scheme.OpenCover.map 𝒰 i))
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine (Scheme.OpenCover.obj (𝒰' i) j)
h𝒰' :
  ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
    P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)
𝒱 : Scheme.OpenCover (pullback f f) :=
  Scheme.OpenCover.bind (Scheme.Pullback.openCoverOfBase 𝒰 f f) fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (Scheme.OpenCover.obj 𝒱 i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
⊢ P pullback.snd
[PROOFSTEP]
convert (affine_cancel_left_isIso hP.1 (pullbackDiagonalMapIso _ _ ((𝒰' i).map j) ((𝒰' i).map k)).inv pullback.snd).mp _
[GOAL]
case h.e'_1.h.e'_7
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
𝒰' : (i : 𝒰.J) → Scheme.OpenCover (pullback f (Scheme.OpenCover.map 𝒰 i))
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine (Scheme.OpenCover.obj (𝒰' i) j)
h𝒰' :
  ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
    P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)
𝒱 : Scheme.OpenCover (pullback f f) :=
  Scheme.OpenCover.bind (Scheme.Pullback.openCoverOfBase 𝒰 f f) fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (Scheme.OpenCover.obj 𝒱 i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
⊢ pullback.map (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd)
        pullback.snd pullback.snd (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k)
        (𝟙 (Scheme.OpenCover.obj 𝒰 i))
        (_ :
          (Scheme.OpenCover.map (𝒰' i) (j, k).fst ≫ pullback.snd) ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i) =
            Scheme.OpenCover.map (𝒰' i) (j, k).fst ≫ pullback.snd)
        (_ :
          (Scheme.OpenCover.map (𝒰' i) (j, k).snd ≫ pullback.snd) ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i) =
            Scheme.OpenCover.map (𝒰' i) (j, k).snd ≫ pullback.snd) ≫
      pullback.map pullback.snd pullback.snd f f pullback.fst pullback.fst (Scheme.OpenCover.map 𝒰 i)
        (_ : pullback.snd ≫ Scheme.OpenCover.map 𝒰 i = pullback.fst ≫ f)
        (_ : pullback.snd ≫ Scheme.OpenCover.map 𝒰 i = pullback.fst ≫ f) =
    pullback.map (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd) f f
      (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.fst) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.fst)
      (Scheme.OpenCover.map 𝒰 i)
      (_ :
        (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i =
          (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.fst) ≫ f)
      (_ :
        (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i =
          (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.fst) ≫ f)
case h.e'_3.e'_7
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
𝒰' : (i : 𝒰.J) → Scheme.OpenCover (pullback f (Scheme.OpenCover.map 𝒰 i))
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine (Scheme.OpenCover.obj (𝒰' i) j)
h𝒰' :
  ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
    P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)
𝒱 : Scheme.OpenCover (pullback f f) :=
  Scheme.OpenCover.bind (Scheme.Pullback.openCoverOfBase 𝒰 f f) fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (Scheme.OpenCover.obj 𝒱 i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
e_1✝ :
  pullback (pullback.diagonal f)
      (pullback.map (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd)
          pullback.snd pullback.snd (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k)
          (𝟙 (Scheme.OpenCover.obj 𝒰 i))
          (_ :
            (Scheme.OpenCover.map (𝒰' i) (j, k).fst ≫ pullback.snd) ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i) =
              Scheme.OpenCover.map (𝒰' i) (j, k).fst ≫ pullback.snd)
          (_ :
            (Scheme.OpenCover.map (𝒰' i) (j, k).snd ≫ pullback.snd) ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i) =
              Scheme.OpenCover.map (𝒰' i) (j, k).snd ≫ pullback.snd) ≫
        pullback.map pullback.snd pullback.snd f f pullback.fst pullback.fst (Scheme.OpenCover.map 𝒰 i)
          (_ : pullback.snd ≫ Scheme.OpenCover.map 𝒰 i = pullback.fst ≫ f)
          (_ : pullback.snd ≫ Scheme.OpenCover.map 𝒰 i = pullback.fst ≫ f)) =
    pullback (pullback.diagonal f)
      (pullback.map (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd) f f
        (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.fst) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.fst)
        (Scheme.OpenCover.map 𝒰 i)
        (_ :
          (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i =
            (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.fst) ≫ f)
        (_ :
          (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i =
            (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.fst) ≫ f))
⊢ pullback.map (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd)
        pullback.snd pullback.snd (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k)
        (𝟙 (Scheme.OpenCover.obj 𝒰 i))
        (_ :
          (Scheme.OpenCover.map (𝒰' i) (j, k).fst ≫ pullback.snd) ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i) =
            Scheme.OpenCover.map (𝒰' i) (j, k).fst ≫ pullback.snd)
        (_ :
          (Scheme.OpenCover.map (𝒰' i) (j, k).snd ≫ pullback.snd) ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i) =
            Scheme.OpenCover.map (𝒰' i) (j, k).snd ≫ pullback.snd) ≫
      pullback.map pullback.snd pullback.snd f f pullback.fst pullback.fst (Scheme.OpenCover.map 𝒰 i)
        (_ : pullback.snd ≫ Scheme.OpenCover.map 𝒰 i = pullback.fst ≫ f)
        (_ : pullback.snd ≫ Scheme.OpenCover.map 𝒰 i = pullback.fst ≫ f) =
    pullback.map (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd) f f
      (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.fst) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.fst)
      (Scheme.OpenCover.map 𝒰 i)
      (_ :
        (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i =
          (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.fst) ≫ f)
      (_ :
        (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i =
          (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.fst) ≫ f)
case mk.mk
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
𝒰' : (i : 𝒰.J) → Scheme.OpenCover (pullback f (Scheme.OpenCover.map 𝒰 i))
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine (Scheme.OpenCover.obj (𝒰' i) j)
h𝒰' :
  ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
    P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)
𝒱 : Scheme.OpenCover (pullback f f) :=
  Scheme.OpenCover.bind (Scheme.Pullback.openCoverOfBase 𝒰 f f) fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (Scheme.OpenCover.obj 𝒱 i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
⊢ P
    ((pullbackDiagonalMapIso f (Scheme.OpenCover.map 𝒰 i) (Scheme.OpenCover.map (𝒰' i) j)
          (Scheme.OpenCover.map (𝒰' i) k)).inv ≫
      pullback.snd)
[PROOFSTEP]
pick_goal 3
[GOAL]
case mk.mk
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
𝒰' : (i : 𝒰.J) → Scheme.OpenCover (pullback f (Scheme.OpenCover.map 𝒰 i))
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine (Scheme.OpenCover.obj (𝒰' i) j)
h𝒰' :
  ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
    P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)
𝒱 : Scheme.OpenCover (pullback f f) :=
  Scheme.OpenCover.bind (Scheme.Pullback.openCoverOfBase 𝒰 f f) fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (Scheme.OpenCover.obj 𝒱 i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
⊢ P
    ((pullbackDiagonalMapIso f (Scheme.OpenCover.map 𝒰 i) (Scheme.OpenCover.map (𝒰' i) j)
          (Scheme.OpenCover.map (𝒰' i) k)).inv ≫
      pullback.snd)
[PROOFSTEP]
convert h𝒰' i j k
[GOAL]
case h.e'_3
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
𝒰' : (i : 𝒰.J) → Scheme.OpenCover (pullback f (Scheme.OpenCover.map 𝒰 i))
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine (Scheme.OpenCover.obj (𝒰' i) j)
h𝒰' :
  ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
    P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)
𝒱 : Scheme.OpenCover (pullback f f) :=
  Scheme.OpenCover.bind (Scheme.Pullback.openCoverOfBase 𝒰 f f) fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (Scheme.OpenCover.obj 𝒱 i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
⊢ (pullbackDiagonalMapIso f (Scheme.OpenCover.map 𝒰 i) (Scheme.OpenCover.map (𝒰' i) j)
          (Scheme.OpenCover.map (𝒰' i) k)).inv ≫
      pullback.snd =
    pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd
[PROOFSTEP]
apply pullback.hom_ext
[GOAL]
case h.e'_3.h₀
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
𝒰' : (i : 𝒰.J) → Scheme.OpenCover (pullback f (Scheme.OpenCover.map 𝒰 i))
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine (Scheme.OpenCover.obj (𝒰' i) j)
h𝒰' :
  ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
    P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)
𝒱 : Scheme.OpenCover (pullback f f) :=
  Scheme.OpenCover.bind (Scheme.Pullback.openCoverOfBase 𝒰 f f) fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (Scheme.OpenCover.obj 𝒱 i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
⊢ ((pullbackDiagonalMapIso f (Scheme.OpenCover.map 𝒰 i) (Scheme.OpenCover.map (𝒰' i) j)
            (Scheme.OpenCover.map (𝒰' i) k)).inv ≫
        pullback.snd) ≫
      pullback.fst =
    pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd ≫ pullback.fst
[PROOFSTEP]
simp
[GOAL]
case h.e'_3.h₁
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
𝒰' : (i : 𝒰.J) → Scheme.OpenCover (pullback f (Scheme.OpenCover.map 𝒰 i))
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine (Scheme.OpenCover.obj (𝒰' i) j)
h𝒰' :
  ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
    P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)
𝒱 : Scheme.OpenCover (pullback f f) :=
  Scheme.OpenCover.bind (Scheme.Pullback.openCoverOfBase 𝒰 f f) fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (Scheme.OpenCover.obj 𝒱 i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
⊢ ((pullbackDiagonalMapIso f (Scheme.OpenCover.map 𝒰 i) (Scheme.OpenCover.map (𝒰' i) j)
            (Scheme.OpenCover.map (𝒰' i) k)).inv ≫
        pullback.snd) ≫
      pullback.snd =
    pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd ≫ pullback.snd
[PROOFSTEP]
simp
[GOAL]
case h.e'_1.h.e'_7
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
𝒰' : (i : 𝒰.J) → Scheme.OpenCover (pullback f (Scheme.OpenCover.map 𝒰 i))
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine (Scheme.OpenCover.obj (𝒰' i) j)
h𝒰' :
  ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
    P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)
𝒱 : Scheme.OpenCover (pullback f f) :=
  Scheme.OpenCover.bind (Scheme.Pullback.openCoverOfBase 𝒰 f f) fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (Scheme.OpenCover.obj 𝒱 i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
⊢ pullback.map (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd)
        pullback.snd pullback.snd (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k)
        (𝟙 (Scheme.OpenCover.obj 𝒰 i))
        (_ :
          (Scheme.OpenCover.map (𝒰' i) (j, k).fst ≫ pullback.snd) ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i) =
            Scheme.OpenCover.map (𝒰' i) (j, k).fst ≫ pullback.snd)
        (_ :
          (Scheme.OpenCover.map (𝒰' i) (j, k).snd ≫ pullback.snd) ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i) =
            Scheme.OpenCover.map (𝒰' i) (j, k).snd ≫ pullback.snd) ≫
      pullback.map pullback.snd pullback.snd f f pullback.fst pullback.fst (Scheme.OpenCover.map 𝒰 i)
        (_ : pullback.snd ≫ Scheme.OpenCover.map 𝒰 i = pullback.fst ≫ f)
        (_ : pullback.snd ≫ Scheme.OpenCover.map 𝒰 i = pullback.fst ≫ f) =
    pullback.map (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd) f f
      (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.fst) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.fst)
      (Scheme.OpenCover.map 𝒰 i)
      (_ :
        (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i =
          (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.fst) ≫ f)
      (_ :
        (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i =
          (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.fst) ≫ f)
case h.e'_3.e'_7
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
𝒰' : (i : 𝒰.J) → Scheme.OpenCover (pullback f (Scheme.OpenCover.map 𝒰 i))
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine (Scheme.OpenCover.obj (𝒰' i) j)
h𝒰' :
  ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
    P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)
𝒱 : Scheme.OpenCover (pullback f f) :=
  Scheme.OpenCover.bind (Scheme.Pullback.openCoverOfBase 𝒰 f f) fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (Scheme.OpenCover.obj 𝒱 i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
e_1✝ :
  pullback (pullback.diagonal f)
      (pullback.map (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd)
          pullback.snd pullback.snd (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k)
          (𝟙 (Scheme.OpenCover.obj 𝒰 i))
          (_ :
            (Scheme.OpenCover.map (𝒰' i) (j, k).fst ≫ pullback.snd) ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i) =
              Scheme.OpenCover.map (𝒰' i) (j, k).fst ≫ pullback.snd)
          (_ :
            (Scheme.OpenCover.map (𝒰' i) (j, k).snd ≫ pullback.snd) ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i) =
              Scheme.OpenCover.map (𝒰' i) (j, k).snd ≫ pullback.snd) ≫
        pullback.map pullback.snd pullback.snd f f pullback.fst pullback.fst (Scheme.OpenCover.map 𝒰 i)
          (_ : pullback.snd ≫ Scheme.OpenCover.map 𝒰 i = pullback.fst ≫ f)
          (_ : pullback.snd ≫ Scheme.OpenCover.map 𝒰 i = pullback.fst ≫ f)) =
    pullback (pullback.diagonal f)
      (pullback.map (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd) f f
        (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.fst) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.fst)
        (Scheme.OpenCover.map 𝒰 i)
        (_ :
          (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i =
            (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.fst) ≫ f)
        (_ :
          (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i =
            (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.fst) ≫ f))
⊢ pullback.map (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd)
        pullback.snd pullback.snd (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k)
        (𝟙 (Scheme.OpenCover.obj 𝒰 i))
        (_ :
          (Scheme.OpenCover.map (𝒰' i) (j, k).fst ≫ pullback.snd) ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i) =
            Scheme.OpenCover.map (𝒰' i) (j, k).fst ≫ pullback.snd)
        (_ :
          (Scheme.OpenCover.map (𝒰' i) (j, k).snd ≫ pullback.snd) ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i) =
            Scheme.OpenCover.map (𝒰' i) (j, k).snd ≫ pullback.snd) ≫
      pullback.map pullback.snd pullback.snd f f pullback.fst pullback.fst (Scheme.OpenCover.map 𝒰 i)
        (_ : pullback.snd ≫ Scheme.OpenCover.map 𝒰 i = pullback.fst ≫ f)
        (_ : pullback.snd ≫ Scheme.OpenCover.map 𝒰 i = pullback.fst ≫ f) =
    pullback.map (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd) f f
      (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.fst) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.fst)
      (Scheme.OpenCover.map 𝒰 i)
      (_ :
        (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i =
          (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.fst) ≫ f)
      (_ :
        (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i =
          (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.fst) ≫ f)
[PROOFSTEP]
all_goals
  apply pullback.hom_ext <;>
    simp only [Category.assoc, pullback.lift_fst, pullback.lift_snd, pullback.lift_fst_assoc, pullback.lift_snd_assoc]
[GOAL]
case h.e'_1.h.e'_7
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
𝒰' : (i : 𝒰.J) → Scheme.OpenCover (pullback f (Scheme.OpenCover.map 𝒰 i))
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine (Scheme.OpenCover.obj (𝒰' i) j)
h𝒰' :
  ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
    P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)
𝒱 : Scheme.OpenCover (pullback f f) :=
  Scheme.OpenCover.bind (Scheme.Pullback.openCoverOfBase 𝒰 f f) fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (Scheme.OpenCover.obj 𝒱 i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
⊢ pullback.map (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd)
        pullback.snd pullback.snd (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k)
        (𝟙 (Scheme.OpenCover.obj 𝒰 i))
        (_ :
          (Scheme.OpenCover.map (𝒰' i) (j, k).fst ≫ pullback.snd) ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i) =
            Scheme.OpenCover.map (𝒰' i) (j, k).fst ≫ pullback.snd)
        (_ :
          (Scheme.OpenCover.map (𝒰' i) (j, k).snd ≫ pullback.snd) ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i) =
            Scheme.OpenCover.map (𝒰' i) (j, k).snd ≫ pullback.snd) ≫
      pullback.map pullback.snd pullback.snd f f pullback.fst pullback.fst (Scheme.OpenCover.map 𝒰 i)
        (_ : pullback.snd ≫ Scheme.OpenCover.map 𝒰 i = pullback.fst ≫ f)
        (_ : pullback.snd ≫ Scheme.OpenCover.map 𝒰 i = pullback.fst ≫ f) =
    pullback.map (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd) f f
      (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.fst) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.fst)
      (Scheme.OpenCover.map 𝒰 i)
      (_ :
        (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i =
          (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.fst) ≫ f)
      (_ :
        (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i =
          (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.fst) ≫ f)
[PROOFSTEP]
apply pullback.hom_ext
[GOAL]
case h.e'_1.h.e'_7.h₀
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
𝒰' : (i : 𝒰.J) → Scheme.OpenCover (pullback f (Scheme.OpenCover.map 𝒰 i))
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine (Scheme.OpenCover.obj (𝒰' i) j)
h𝒰' :
  ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
    P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)
𝒱 : Scheme.OpenCover (pullback f f) :=
  Scheme.OpenCover.bind (Scheme.Pullback.openCoverOfBase 𝒰 f f) fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (Scheme.OpenCover.obj 𝒱 i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
⊢ (pullback.map (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd)
          pullback.snd pullback.snd (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k)
          (𝟙 (Scheme.OpenCover.obj 𝒰 i))
          (_ :
            (Scheme.OpenCover.map (𝒰' i) (j, k).fst ≫ pullback.snd) ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i) =
              Scheme.OpenCover.map (𝒰' i) (j, k).fst ≫ pullback.snd)
          (_ :
            (Scheme.OpenCover.map (𝒰' i) (j, k).snd ≫ pullback.snd) ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i) =
              Scheme.OpenCover.map (𝒰' i) (j, k).snd ≫ pullback.snd) ≫
        pullback.map pullback.snd pullback.snd f f pullback.fst pullback.fst (Scheme.OpenCover.map 𝒰 i)
          (_ : pullback.snd ≫ Scheme.OpenCover.map 𝒰 i = pullback.fst ≫ f)
          (_ : pullback.snd ≫ Scheme.OpenCover.map 𝒰 i = pullback.fst ≫ f)) ≫
      pullback.fst =
    pullback.map (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd) f f
        (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.fst) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.fst)
        (Scheme.OpenCover.map 𝒰 i)
        (_ :
          (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i =
            (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.fst) ≫ f)
        (_ :
          (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i =
            (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.fst) ≫ f) ≫
      pullback.fst
[PROOFSTEP]
simp only [Category.assoc, pullback.lift_fst, pullback.lift_snd, pullback.lift_fst_assoc, pullback.lift_snd_assoc]
[GOAL]
case h.e'_1.h.e'_7.h₁
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
𝒰' : (i : 𝒰.J) → Scheme.OpenCover (pullback f (Scheme.OpenCover.map 𝒰 i))
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine (Scheme.OpenCover.obj (𝒰' i) j)
h𝒰' :
  ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
    P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)
𝒱 : Scheme.OpenCover (pullback f f) :=
  Scheme.OpenCover.bind (Scheme.Pullback.openCoverOfBase 𝒰 f f) fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (Scheme.OpenCover.obj 𝒱 i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
⊢ (pullback.map (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd)
          pullback.snd pullback.snd (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k)
          (𝟙 (Scheme.OpenCover.obj 𝒰 i))
          (_ :
            (Scheme.OpenCover.map (𝒰' i) (j, k).fst ≫ pullback.snd) ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i) =
              Scheme.OpenCover.map (𝒰' i) (j, k).fst ≫ pullback.snd)
          (_ :
            (Scheme.OpenCover.map (𝒰' i) (j, k).snd ≫ pullback.snd) ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i) =
              Scheme.OpenCover.map (𝒰' i) (j, k).snd ≫ pullback.snd) ≫
        pullback.map pullback.snd pullback.snd f f pullback.fst pullback.fst (Scheme.OpenCover.map 𝒰 i)
          (_ : pullback.snd ≫ Scheme.OpenCover.map 𝒰 i = pullback.fst ≫ f)
          (_ : pullback.snd ≫ Scheme.OpenCover.map 𝒰 i = pullback.fst ≫ f)) ≫
      pullback.snd =
    pullback.map (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd) f f
        (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.fst) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.fst)
        (Scheme.OpenCover.map 𝒰 i)
        (_ :
          (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i =
            (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.fst) ≫ f)
        (_ :
          (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i =
            (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.fst) ≫ f) ≫
      pullback.snd
[PROOFSTEP]
simp only [Category.assoc, pullback.lift_fst, pullback.lift_snd, pullback.lift_fst_assoc, pullback.lift_snd_assoc]
[GOAL]
case h.e'_3.e'_7
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
𝒰' : (i : 𝒰.J) → Scheme.OpenCover (pullback f (Scheme.OpenCover.map 𝒰 i))
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine (Scheme.OpenCover.obj (𝒰' i) j)
h𝒰' :
  ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
    P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)
𝒱 : Scheme.OpenCover (pullback f f) :=
  Scheme.OpenCover.bind (Scheme.Pullback.openCoverOfBase 𝒰 f f) fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (Scheme.OpenCover.obj 𝒱 i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
e_1✝ :
  pullback (pullback.diagonal f)
      (pullback.map (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd)
          pullback.snd pullback.snd (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k)
          (𝟙 (Scheme.OpenCover.obj 𝒰 i))
          (_ :
            (Scheme.OpenCover.map (𝒰' i) (j, k).fst ≫ pullback.snd) ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i) =
              Scheme.OpenCover.map (𝒰' i) (j, k).fst ≫ pullback.snd)
          (_ :
            (Scheme.OpenCover.map (𝒰' i) (j, k).snd ≫ pullback.snd) ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i) =
              Scheme.OpenCover.map (𝒰' i) (j, k).snd ≫ pullback.snd) ≫
        pullback.map pullback.snd pullback.snd f f pullback.fst pullback.fst (Scheme.OpenCover.map 𝒰 i)
          (_ : pullback.snd ≫ Scheme.OpenCover.map 𝒰 i = pullback.fst ≫ f)
          (_ : pullback.snd ≫ Scheme.OpenCover.map 𝒰 i = pullback.fst ≫ f)) =
    pullback (pullback.diagonal f)
      (pullback.map (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd) f f
        (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.fst) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.fst)
        (Scheme.OpenCover.map 𝒰 i)
        (_ :
          (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i =
            (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.fst) ≫ f)
        (_ :
          (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i =
            (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.fst) ≫ f))
⊢ pullback.map (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd)
        pullback.snd pullback.snd (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k)
        (𝟙 (Scheme.OpenCover.obj 𝒰 i))
        (_ :
          (Scheme.OpenCover.map (𝒰' i) (j, k).fst ≫ pullback.snd) ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i) =
            Scheme.OpenCover.map (𝒰' i) (j, k).fst ≫ pullback.snd)
        (_ :
          (Scheme.OpenCover.map (𝒰' i) (j, k).snd ≫ pullback.snd) ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i) =
            Scheme.OpenCover.map (𝒰' i) (j, k).snd ≫ pullback.snd) ≫
      pullback.map pullback.snd pullback.snd f f pullback.fst pullback.fst (Scheme.OpenCover.map 𝒰 i)
        (_ : pullback.snd ≫ Scheme.OpenCover.map 𝒰 i = pullback.fst ≫ f)
        (_ : pullback.snd ≫ Scheme.OpenCover.map 𝒰 i = pullback.fst ≫ f) =
    pullback.map (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd) f f
      (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.fst) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.fst)
      (Scheme.OpenCover.map 𝒰 i)
      (_ :
        (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i =
          (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.fst) ≫ f)
      (_ :
        (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i =
          (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.fst) ≫ f)
[PROOFSTEP]
apply pullback.hom_ext
[GOAL]
case h.e'_3.e'_7.h₀
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
𝒰' : (i : 𝒰.J) → Scheme.OpenCover (pullback f (Scheme.OpenCover.map 𝒰 i))
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine (Scheme.OpenCover.obj (𝒰' i) j)
h𝒰' :
  ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
    P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)
𝒱 : Scheme.OpenCover (pullback f f) :=
  Scheme.OpenCover.bind (Scheme.Pullback.openCoverOfBase 𝒰 f f) fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (Scheme.OpenCover.obj 𝒱 i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
e_1✝ :
  pullback (pullback.diagonal f)
      (pullback.map (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd)
          pullback.snd pullback.snd (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k)
          (𝟙 (Scheme.OpenCover.obj 𝒰 i))
          (_ :
            (Scheme.OpenCover.map (𝒰' i) (j, k).fst ≫ pullback.snd) ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i) =
              Scheme.OpenCover.map (𝒰' i) (j, k).fst ≫ pullback.snd)
          (_ :
            (Scheme.OpenCover.map (𝒰' i) (j, k).snd ≫ pullback.snd) ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i) =
              Scheme.OpenCover.map (𝒰' i) (j, k).snd ≫ pullback.snd) ≫
        pullback.map pullback.snd pullback.snd f f pullback.fst pullback.fst (Scheme.OpenCover.map 𝒰 i)
          (_ : pullback.snd ≫ Scheme.OpenCover.map 𝒰 i = pullback.fst ≫ f)
          (_ : pullback.snd ≫ Scheme.OpenCover.map 𝒰 i = pullback.fst ≫ f)) =
    pullback (pullback.diagonal f)
      (pullback.map (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd) f f
        (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.fst) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.fst)
        (Scheme.OpenCover.map 𝒰 i)
        (_ :
          (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i =
            (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.fst) ≫ f)
        (_ :
          (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i =
            (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.fst) ≫ f))
⊢ (pullback.map (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd)
          pullback.snd pullback.snd (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k)
          (𝟙 (Scheme.OpenCover.obj 𝒰 i))
          (_ :
            (Scheme.OpenCover.map (𝒰' i) (j, k).fst ≫ pullback.snd) ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i) =
              Scheme.OpenCover.map (𝒰' i) (j, k).fst ≫ pullback.snd)
          (_ :
            (Scheme.OpenCover.map (𝒰' i) (j, k).snd ≫ pullback.snd) ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i) =
              Scheme.OpenCover.map (𝒰' i) (j, k).snd ≫ pullback.snd) ≫
        pullback.map pullback.snd pullback.snd f f pullback.fst pullback.fst (Scheme.OpenCover.map 𝒰 i)
          (_ : pullback.snd ≫ Scheme.OpenCover.map 𝒰 i = pullback.fst ≫ f)
          (_ : pullback.snd ≫ Scheme.OpenCover.map 𝒰 i = pullback.fst ≫ f)) ≫
      pullback.fst =
    pullback.map (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd) f f
        (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.fst) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.fst)
        (Scheme.OpenCover.map 𝒰 i)
        (_ :
          (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i =
            (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.fst) ≫ f)
        (_ :
          (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i =
            (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.fst) ≫ f) ≫
      pullback.fst
[PROOFSTEP]
simp only [Category.assoc, pullback.lift_fst, pullback.lift_snd, pullback.lift_fst_assoc, pullback.lift_snd_assoc]
[GOAL]
case h.e'_3.e'_7.h₁
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
inst✝¹ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
𝒰' : (i : 𝒰.J) → Scheme.OpenCover (pullback f (Scheme.OpenCover.map 𝒰 i))
inst✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine (Scheme.OpenCover.obj (𝒰' i) j)
h𝒰' :
  ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
    P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)
𝒱 : Scheme.OpenCover (pullback f f) :=
  Scheme.OpenCover.bind (Scheme.Pullback.openCoverOfBase 𝒰 f f) fun i =>
    Scheme.Pullback.openCoverOfLeftRight (𝒰' i) (𝒰' i) pullback.snd pullback.snd
i1 : ∀ (i : 𝒱.J), IsAffine (Scheme.OpenCover.obj 𝒱 i)
i : (Scheme.Pullback.openCoverOfBase 𝒰 f f).J
j k : (𝒰' i).J
e_1✝ :
  pullback (pullback.diagonal f)
      (pullback.map (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd)
          pullback.snd pullback.snd (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k)
          (𝟙 (Scheme.OpenCover.obj 𝒰 i))
          (_ :
            (Scheme.OpenCover.map (𝒰' i) (j, k).fst ≫ pullback.snd) ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i) =
              Scheme.OpenCover.map (𝒰' i) (j, k).fst ≫ pullback.snd)
          (_ :
            (Scheme.OpenCover.map (𝒰' i) (j, k).snd ≫ pullback.snd) ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i) =
              Scheme.OpenCover.map (𝒰' i) (j, k).snd ≫ pullback.snd) ≫
        pullback.map pullback.snd pullback.snd f f pullback.fst pullback.fst (Scheme.OpenCover.map 𝒰 i)
          (_ : pullback.snd ≫ Scheme.OpenCover.map 𝒰 i = pullback.fst ≫ f)
          (_ : pullback.snd ≫ Scheme.OpenCover.map 𝒰 i = pullback.fst ≫ f)) =
    pullback (pullback.diagonal f)
      (pullback.map (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd) f f
        (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.fst) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.fst)
        (Scheme.OpenCover.map 𝒰 i)
        (_ :
          (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i =
            (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.fst) ≫ f)
        (_ :
          (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i =
            (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.fst) ≫ f))
⊢ (pullback.map (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd)
          pullback.snd pullback.snd (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k)
          (𝟙 (Scheme.OpenCover.obj 𝒰 i))
          (_ :
            (Scheme.OpenCover.map (𝒰' i) (j, k).fst ≫ pullback.snd) ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i) =
              Scheme.OpenCover.map (𝒰' i) (j, k).fst ≫ pullback.snd)
          (_ :
            (Scheme.OpenCover.map (𝒰' i) (j, k).snd ≫ pullback.snd) ≫ 𝟙 (Scheme.OpenCover.obj 𝒰 i) =
              Scheme.OpenCover.map (𝒰' i) (j, k).snd ≫ pullback.snd) ≫
        pullback.map pullback.snd pullback.snd f f pullback.fst pullback.fst (Scheme.OpenCover.map 𝒰 i)
          (_ : pullback.snd ≫ Scheme.OpenCover.map 𝒰 i = pullback.fst ≫ f)
          (_ : pullback.snd ≫ Scheme.OpenCover.map 𝒰 i = pullback.fst ≫ f)) ≫
      pullback.snd =
    pullback.map (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd) f f
        (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.fst) (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.fst)
        (Scheme.OpenCover.map 𝒰 i)
        (_ :
          (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i =
            (Scheme.OpenCover.map (𝒰' i) j ≫ pullback.fst) ≫ f)
        (_ :
          (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i =
            (Scheme.OpenCover.map (𝒰' i) k ≫ pullback.fst) ≫ f) ≫
      pullback.snd
[PROOFSTEP]
simp only [Category.assoc, pullback.lift_fst, pullback.lift_snd, pullback.lift_fst_assoc, pullback.lift_snd_assoc]
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y U : Scheme
f : X ⟶ Y
g : U ⟶ Y
inst✝¹ : IsAffine U
inst✝ : IsOpenImmersion g
H : MorphismProperty.diagonal (targetAffineLocally P) f
⊢ diagonal P pullback.snd
[PROOFSTEP]
rintro U V f₁ f₂ hU hV hf₁ hf₂
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y U✝ : Scheme
f : X ⟶ Y
g : U✝ ⟶ Y
inst✝¹ : IsAffine U✝
inst✝ : IsOpenImmersion g
H : MorphismProperty.diagonal (targetAffineLocally P) f
U V : Scheme
f₁ : U ⟶ pullback f g
f₂ : V ⟶ pullback f g
hU : IsAffine U
hV : IsAffine V
hf₁ : IsOpenImmersion f₁
hf₂ : IsOpenImmersion f₂
⊢ P (pullback.mapDesc f₁ f₂ pullback.snd)
[PROOFSTEP]
replace H := ((hP.affine_openCover_TFAE (pullback.diagonal f)).out 0 3).mp H
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y U✝ : Scheme
f : X ⟶ Y
g : U✝ ⟶ Y
inst✝¹ : IsAffine U✝
inst✝ : IsOpenImmersion g
U V : Scheme
f₁ : U ⟶ pullback f g
f₂ : V ⟶ pullback f g
hU : IsAffine U
hV : IsAffine V
hf₁ : IsOpenImmersion f₁
hf₂ : IsOpenImmersion f₂
H : ∀ {U : Scheme} (g : U ⟶ pullback.diagonalObj f) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
⊢ P (pullback.mapDesc f₁ f₂ pullback.snd)
[PROOFSTEP]
let g₁ :=
  pullback.map (f₁ ≫ pullback.snd) (f₂ ≫ pullback.snd) f f (f₁ ≫ pullback.fst) (f₂ ≫ pullback.fst) g
    (by rw [Category.assoc, Category.assoc, pullback.condition])
    (by rw [Category.assoc, Category.assoc, pullback.condition])
      -- Porting note : added this instance
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y U✝ : Scheme
f : X ⟶ Y
g : U✝ ⟶ Y
inst✝¹ : IsAffine U✝
inst✝ : IsOpenImmersion g
U V : Scheme
f₁ : U ⟶ pullback f g
f₂ : V ⟶ pullback f g
hU : IsAffine U
hV : IsAffine V
hf₁ : IsOpenImmersion f₁
hf₂ : IsOpenImmersion f₂
H : ∀ {U : Scheme} (g : U ⟶ pullback.diagonalObj f) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
⊢ (f₁ ≫ pullback.snd) ≫ g = (f₁ ≫ pullback.fst) ≫ f
[PROOFSTEP]
rw [Category.assoc, Category.assoc, pullback.condition]
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y U✝ : Scheme
f : X ⟶ Y
g : U✝ ⟶ Y
inst✝¹ : IsAffine U✝
inst✝ : IsOpenImmersion g
U V : Scheme
f₁ : U ⟶ pullback f g
f₂ : V ⟶ pullback f g
hU : IsAffine U
hV : IsAffine V
hf₁ : IsOpenImmersion f₁
hf₂ : IsOpenImmersion f₂
H : ∀ {U : Scheme} (g : U ⟶ pullback.diagonalObj f) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
⊢ (f₂ ≫ pullback.snd) ≫ g = (f₂ ≫ pullback.fst) ≫ f
[PROOFSTEP]
rw [Category.assoc, Category.assoc, pullback.condition]
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y U✝ : Scheme
f : X ⟶ Y
g : U✝ ⟶ Y
inst✝¹ : IsAffine U✝
inst✝ : IsOpenImmersion g
U V : Scheme
f₁ : U ⟶ pullback f g
f₂ : V ⟶ pullback f g
hU : IsAffine U
hV : IsAffine V
hf₁ : IsOpenImmersion f₁
hf₂ : IsOpenImmersion f₂
H : ∀ {U : Scheme} (g : U ⟶ pullback.diagonalObj f) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
g₁ : pullback (f₁ ≫ pullback.snd) (f₂ ≫ pullback.snd) ⟶ pullback f f :=
  pullback.map (f₁ ≫ pullback.snd) (f₂ ≫ pullback.snd) f f (f₁ ≫ pullback.fst) (f₂ ≫ pullback.fst) g
    (_ : (f₁ ≫ pullback.snd) ≫ g = (f₁ ≫ pullback.fst) ≫ f) (_ : (f₂ ≫ pullback.snd) ≫ g = (f₂ ≫ pullback.fst) ≫ f)
⊢ P (pullback.mapDesc f₁ f₂ pullback.snd)
[PROOFSTEP]
haveI hg₁ : IsOpenImmersion g₁ :=
  by
  apply (config := { allowSynthFailures := true }) Scheme.pullback_map_isOpenImmersion
  · exact PresheafedSpace.IsOpenImmersion.comp (hf := hf₁) _
  · exact PresheafedSpace.IsOpenImmersion.comp (hf := hf₂) _
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y U✝ : Scheme
f : X ⟶ Y
g : U✝ ⟶ Y
inst✝¹ : IsAffine U✝
inst✝ : IsOpenImmersion g
U V : Scheme
f₁ : U ⟶ pullback f g
f₂ : V ⟶ pullback f g
hU : IsAffine U
hV : IsAffine V
hf₁ : IsOpenImmersion f₁
hf₂ : IsOpenImmersion f₂
H : ∀ {U : Scheme} (g : U ⟶ pullback.diagonalObj f) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
g₁ : pullback (f₁ ≫ pullback.snd) (f₂ ≫ pullback.snd) ⟶ pullback f f :=
  pullback.map (f₁ ≫ pullback.snd) (f₂ ≫ pullback.snd) f f (f₁ ≫ pullback.fst) (f₂ ≫ pullback.fst) g
    (_ : (f₁ ≫ pullback.snd) ≫ g = (f₁ ≫ pullback.fst) ≫ f) (_ : (f₂ ≫ pullback.snd) ≫ g = (f₂ ≫ pullback.fst) ≫ f)
⊢ IsOpenImmersion g₁
[PROOFSTEP]
apply (config := { allowSynthFailures := true }) Scheme.pullback_map_isOpenImmersion
[GOAL]
case inst
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y U✝ : Scheme
f : X ⟶ Y
g : U✝ ⟶ Y
inst✝¹ : IsAffine U✝
inst✝ : IsOpenImmersion g
U V : Scheme
f₁ : U ⟶ pullback f g
f₂ : V ⟶ pullback f g
hU : IsAffine U
hV : IsAffine V
hf₁ : IsOpenImmersion f₁
hf₂ : IsOpenImmersion f₂
H : ∀ {U : Scheme} (g : U ⟶ pullback.diagonalObj f) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
g₁ : pullback (f₁ ≫ pullback.snd) (f₂ ≫ pullback.snd) ⟶ pullback f f :=
  pullback.map (f₁ ≫ pullback.snd) (f₂ ≫ pullback.snd) f f (f₁ ≫ pullback.fst) (f₂ ≫ pullback.fst) g
    (_ : (f₁ ≫ pullback.snd) ≫ g = (f₁ ≫ pullback.fst) ≫ f) (_ : (f₂ ≫ pullback.snd) ≫ g = (f₂ ≫ pullback.fst) ≫ f)
⊢ IsOpenImmersion (f₁ ≫ pullback.fst)
[PROOFSTEP]
exact PresheafedSpace.IsOpenImmersion.comp (hf := hf₁) _
[GOAL]
case inst
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y U✝ : Scheme
f : X ⟶ Y
g : U✝ ⟶ Y
inst✝¹ : IsAffine U✝
inst✝ : IsOpenImmersion g
U V : Scheme
f₁ : U ⟶ pullback f g
f₂ : V ⟶ pullback f g
hU : IsAffine U
hV : IsAffine V
hf₁ : IsOpenImmersion f₁
hf₂ : IsOpenImmersion f₂
H : ∀ {U : Scheme} (g : U ⟶ pullback.diagonalObj f) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
g₁ : pullback (f₁ ≫ pullback.snd) (f₂ ≫ pullback.snd) ⟶ pullback f f :=
  pullback.map (f₁ ≫ pullback.snd) (f₂ ≫ pullback.snd) f f (f₁ ≫ pullback.fst) (f₂ ≫ pullback.fst) g
    (_ : (f₁ ≫ pullback.snd) ≫ g = (f₁ ≫ pullback.fst) ≫ f) (_ : (f₂ ≫ pullback.snd) ≫ g = (f₂ ≫ pullback.fst) ≫ f)
⊢ IsOpenImmersion (f₂ ≫ pullback.fst)
[PROOFSTEP]
exact PresheafedSpace.IsOpenImmersion.comp (hf := hf₂) _
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y U✝ : Scheme
f : X ⟶ Y
g : U✝ ⟶ Y
inst✝¹ : IsAffine U✝
inst✝ : IsOpenImmersion g
U V : Scheme
f₁ : U ⟶ pullback f g
f₂ : V ⟶ pullback f g
hU : IsAffine U
hV : IsAffine V
hf₁ : IsOpenImmersion f₁
hf₂ : IsOpenImmersion f₂
H : ∀ {U : Scheme} (g : U ⟶ pullback.diagonalObj f) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], P pullback.snd
g₁ : pullback (f₁ ≫ pullback.snd) (f₂ ≫ pullback.snd) ⟶ pullback f f :=
  pullback.map (f₁ ≫ pullback.snd) (f₂ ≫ pullback.snd) f f (f₁ ≫ pullback.fst) (f₂ ≫ pullback.fst) g
    (_ : (f₁ ≫ pullback.snd) ≫ g = (f₁ ≫ pullback.fst) ≫ f) (_ : (f₂ ≫ pullback.snd) ≫ g = (f₂ ≫ pullback.fst) ≫ f)
hg₁ : IsOpenImmersion g₁
⊢ P (pullback.mapDesc f₁ f₂ pullback.snd)
[PROOFSTEP]
specialize H g₁
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y U✝ : Scheme
f : X ⟶ Y
g : U✝ ⟶ Y
inst✝¹ : IsAffine U✝
inst✝ : IsOpenImmersion g
U V : Scheme
f₁ : U ⟶ pullback f g
f₂ : V ⟶ pullback f g
hU : IsAffine U
hV : IsAffine V
hf₁ : IsOpenImmersion f₁
hf₂ : IsOpenImmersion f₂
g₁ : pullback (f₁ ≫ pullback.snd) (f₂ ≫ pullback.snd) ⟶ pullback f f :=
  pullback.map (f₁ ≫ pullback.snd) (f₂ ≫ pullback.snd) f f (f₁ ≫ pullback.fst) (f₂ ≫ pullback.fst) g
    (_ : (f₁ ≫ pullback.snd) ≫ g = (f₁ ≫ pullback.fst) ≫ f) (_ : (f₂ ≫ pullback.snd) ≫ g = (f₂ ≫ pullback.fst) ≫ f)
hg₁ : IsOpenImmersion g₁
H : P pullback.snd
⊢ P (pullback.mapDesc f₁ f₂ pullback.snd)
[PROOFSTEP]
rw [← affine_cancel_left_isIso hP.1 (pullbackDiagonalMapIso f _ f₁ f₂).hom]
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y U✝ : Scheme
f : X ⟶ Y
g : U✝ ⟶ Y
inst✝¹ : IsAffine U✝
inst✝ : IsOpenImmersion g
U V : Scheme
f₁ : U ⟶ pullback f g
f₂ : V ⟶ pullback f g
hU : IsAffine U
hV : IsAffine V
hf₁ : IsOpenImmersion f₁
hf₂ : IsOpenImmersion f₂
g₁ : pullback (f₁ ≫ pullback.snd) (f₂ ≫ pullback.snd) ⟶ pullback f f :=
  pullback.map (f₁ ≫ pullback.snd) (f₂ ≫ pullback.snd) f f (f₁ ≫ pullback.fst) (f₂ ≫ pullback.fst) g
    (_ : (f₁ ≫ pullback.snd) ≫ g = (f₁ ≫ pullback.fst) ≫ f) (_ : (f₂ ≫ pullback.snd) ≫ g = (f₂ ≫ pullback.fst) ≫ f)
hg₁ : IsOpenImmersion g₁
H : P pullback.snd
⊢ P ((pullbackDiagonalMapIso f g f₁ f₂).hom ≫ pullback.mapDesc f₁ f₂ pullback.snd)
[PROOFSTEP]
convert H
[GOAL]
case h.e'_3
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y U✝ : Scheme
f : X ⟶ Y
g : U✝ ⟶ Y
inst✝¹ : IsAffine U✝
inst✝ : IsOpenImmersion g
U V : Scheme
f₁ : U ⟶ pullback f g
f₂ : V ⟶ pullback f g
hU : IsAffine U
hV : IsAffine V
hf₁ : IsOpenImmersion f₁
hf₂ : IsOpenImmersion f₂
g₁ : pullback (f₁ ≫ pullback.snd) (f₂ ≫ pullback.snd) ⟶ pullback f f :=
  pullback.map (f₁ ≫ pullback.snd) (f₂ ≫ pullback.snd) f f (f₁ ≫ pullback.fst) (f₂ ≫ pullback.fst) g
    (_ : (f₁ ≫ pullback.snd) ≫ g = (f₁ ≫ pullback.fst) ≫ f) (_ : (f₂ ≫ pullback.snd) ≫ g = (f₂ ≫ pullback.fst) ≫ f)
hg₁ : IsOpenImmersion g₁
H : P pullback.snd
⊢ (pullbackDiagonalMapIso f g f₁ f₂).hom ≫ pullback.mapDesc f₁ f₂ pullback.snd = pullback.snd
[PROOFSTEP]
apply pullback.hom_ext
[GOAL]
case h.e'_3.h₀
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y U✝ : Scheme
f : X ⟶ Y
g : U✝ ⟶ Y
inst✝¹ : IsAffine U✝
inst✝ : IsOpenImmersion g
U V : Scheme
f₁ : U ⟶ pullback f g
f₂ : V ⟶ pullback f g
hU : IsAffine U
hV : IsAffine V
hf₁ : IsOpenImmersion f₁
hf₂ : IsOpenImmersion f₂
g₁ : pullback (f₁ ≫ pullback.snd) (f₂ ≫ pullback.snd) ⟶ pullback f f :=
  pullback.map (f₁ ≫ pullback.snd) (f₂ ≫ pullback.snd) f f (f₁ ≫ pullback.fst) (f₂ ≫ pullback.fst) g
    (_ : (f₁ ≫ pullback.snd) ≫ g = (f₁ ≫ pullback.fst) ≫ f) (_ : (f₂ ≫ pullback.snd) ≫ g = (f₂ ≫ pullback.fst) ≫ f)
hg₁ : IsOpenImmersion g₁
H : P pullback.snd
⊢ ((pullbackDiagonalMapIso f g f₁ f₂).hom ≫ pullback.mapDesc f₁ f₂ pullback.snd) ≫ pullback.fst =
    pullback.snd ≫ pullback.fst
[PROOFSTEP]
simp only [Category.assoc, pullback.lift_fst, pullback.lift_snd, pullback.lift_fst_assoc, pullback.lift_snd_assoc,
  Category.comp_id, pullbackDiagonalMapIso_hom_fst, pullbackDiagonalMapIso_hom_snd]
[GOAL]
case h.e'_3.h₁
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y U✝ : Scheme
f : X ⟶ Y
g : U✝ ⟶ Y
inst✝¹ : IsAffine U✝
inst✝ : IsOpenImmersion g
U V : Scheme
f₁ : U ⟶ pullback f g
f₂ : V ⟶ pullback f g
hU : IsAffine U
hV : IsAffine V
hf₁ : IsOpenImmersion f₁
hf₂ : IsOpenImmersion f₂
g₁ : pullback (f₁ ≫ pullback.snd) (f₂ ≫ pullback.snd) ⟶ pullback f f :=
  pullback.map (f₁ ≫ pullback.snd) (f₂ ≫ pullback.snd) f f (f₁ ≫ pullback.fst) (f₂ ≫ pullback.fst) g
    (_ : (f₁ ≫ pullback.snd) ≫ g = (f₁ ≫ pullback.fst) ≫ f) (_ : (f₂ ≫ pullback.snd) ≫ g = (f₂ ≫ pullback.fst) ≫ f)
hg₁ : IsOpenImmersion g₁
H : P pullback.snd
⊢ ((pullbackDiagonalMapIso f g f₁ f₂).hom ≫ pullback.mapDesc f₁ f₂ pullback.snd) ≫ pullback.snd =
    pullback.snd ≫ pullback.snd
[PROOFSTEP]
simp only [Category.assoc, pullback.lift_fst, pullback.lift_snd, pullback.lift_fst_assoc, pullback.lift_snd_assoc,
  Category.comp_id, pullbackDiagonalMapIso_hom_fst, pullbackDiagonalMapIso_hom_snd]
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
⊢ TFAE
    [MorphismProperty.diagonal (targetAffineLocally P) f, ∃ 𝒰 x, ∀ (i : 𝒰.J), diagonal P pullback.snd,
      ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),
        diagonal P pullback.snd,
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd,
      ∃ 𝒰 x 𝒰' x_1,
        ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
          P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)]
[PROOFSTEP]
tfae_have 1 → 4
[GOAL]
case tfae_1_to_4
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
⊢ MorphismProperty.diagonal (targetAffineLocally P) f →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd
[PROOFSTEP]
introv H hU hg _ _
[GOAL]
case tfae_1_to_4
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
H : MorphismProperty.diagonal (targetAffineLocally P) f
U : Scheme
g : U ⟶ Y
inst✝⁴ : IsAffine U
hU : IsOpenImmersion g
hg U₂ : Scheme
f₁ : hg ⟶ pullback f g
f₂ : U₂ ⟶ pullback f g
inst✝³ : IsAffine hg
inst✝² : IsAffine U₂
inst✝¹ : IsOpenImmersion f₁
inst✝ : IsOpenImmersion f₂
⊢ P (pullback.mapDesc f₁ f₂ pullback.snd)
[PROOFSTEP]
apply P.diagonalOfTargetAffineLocally
[GOAL]
case tfae_1_to_4.hP
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
H : MorphismProperty.diagonal (targetAffineLocally P) f
U : Scheme
g : U ⟶ Y
inst✝⁴ : IsAffine U
hU : IsOpenImmersion g
hg U₂ : Scheme
f₁ : hg ⟶ pullback f g
f₂ : U₂ ⟶ pullback f g
inst✝³ : IsAffine hg
inst✝² : IsAffine U₂
inst✝¹ : IsOpenImmersion f₁
inst✝ : IsOpenImmersion f₂
⊢ IsLocal P
[PROOFSTEP]
assumption
[GOAL]
case tfae_1_to_4.H
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
H : MorphismProperty.diagonal (targetAffineLocally P) f
U : Scheme
g : U ⟶ Y
inst✝⁴ : IsAffine U
hU : IsOpenImmersion g
hg U₂ : Scheme
f₁ : hg ⟶ pullback f g
f₂ : U₂ ⟶ pullback f g
inst✝³ : IsAffine hg
inst✝² : IsAffine U₂
inst✝¹ : IsOpenImmersion f₁
inst✝ : IsOpenImmersion f₂
⊢ MorphismProperty.diagonal (targetAffineLocally P) f
[PROOFSTEP]
assumption
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  MorphismProperty.diagonal (targetAffineLocally P) f →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd
⊢ TFAE
    [MorphismProperty.diagonal (targetAffineLocally P) f, ∃ 𝒰 x, ∀ (i : 𝒰.J), diagonal P pullback.snd,
      ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),
        diagonal P pullback.snd,
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd,
      ∃ 𝒰 x 𝒰' x_1,
        ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
          P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)]
[PROOFSTEP]
tfae_have 4 → 3
[GOAL]
case tfae_4_to_3
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  MorphismProperty.diagonal (targetAffineLocally P) f →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd
⊢ (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),
      diagonal P pullback.snd
[PROOFSTEP]
introv H h𝒰
[GOAL]
case tfae_4_to_3
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  MorphismProperty.diagonal (targetAffineLocally P) f →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd
H : ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd
𝒰 : Scheme.OpenCover Y
inst✝² : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
i : 𝒰.J
h𝒰 U₂ : Scheme
f₁ : h𝒰 ⟶ pullback f (Scheme.OpenCover.map 𝒰 i)
f₂ : U₂ ⟶ pullback f (Scheme.OpenCover.map 𝒰 i)
inst✝¹ : IsAffine h𝒰
inst✝ : IsAffine U₂
⊢ ∀ [inst : IsOpenImmersion f₁] [inst : IsOpenImmersion f₂], P (pullback.mapDesc f₁ f₂ pullback.snd)
[PROOFSTEP]
apply H
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  MorphismProperty.diagonal (targetAffineLocally P) f →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),
      diagonal P pullback.snd
⊢ TFAE
    [MorphismProperty.diagonal (targetAffineLocally P) f, ∃ 𝒰 x, ∀ (i : 𝒰.J), diagonal P pullback.snd,
      ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),
        diagonal P pullback.snd,
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd,
      ∃ 𝒰 x 𝒰' x_1,
        ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
          P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)]
[PROOFSTEP]
tfae_have 3 → 2
[GOAL]
case tfae_3_to_2
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  MorphismProperty.diagonal (targetAffineLocally P) f →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),
      diagonal P pullback.snd
⊢ (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),
      diagonal P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), diagonal P pullback.snd
[PROOFSTEP]
exact fun H => ⟨Y.affineCover, inferInstance, H Y.affineCover⟩
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  MorphismProperty.diagonal (targetAffineLocally P) f →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),
      diagonal P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),
      diagonal P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), diagonal P pullback.snd
⊢ TFAE
    [MorphismProperty.diagonal (targetAffineLocally P) f, ∃ 𝒰 x, ∀ (i : 𝒰.J), diagonal P pullback.snd,
      ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),
        diagonal P pullback.snd,
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd,
      ∃ 𝒰 x 𝒰' x_1,
        ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
          P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)]
[PROOFSTEP]
tfae_have 2 → 5
[GOAL]
case tfae_2_to_5
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  MorphismProperty.diagonal (targetAffineLocally P) f →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),
      diagonal P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),
      diagonal P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), diagonal P pullback.snd
⊢ (∃ 𝒰 x, ∀ (i : 𝒰.J), diagonal P pullback.snd) →
    ∃ 𝒰 x 𝒰' x_1,
      ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
        P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)
[PROOFSTEP]
rintro ⟨𝒰, h𝒰, H⟩
[GOAL]
case tfae_2_to_5.intro.intro
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  MorphismProperty.diagonal (targetAffineLocally P) f →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),
      diagonal P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),
      diagonal P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), diagonal P pullback.snd
𝒰 : Scheme.OpenCover Y
h𝒰 : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
H : ∀ (i : 𝒰.J), diagonal P pullback.snd
⊢ ∃ 𝒰 x 𝒰' x_1,
    ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
      P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)
[PROOFSTEP]
refine' ⟨𝒰, inferInstance, fun _ => Scheme.affineCover _, inferInstance, _⟩
[GOAL]
case tfae_2_to_5.intro.intro
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  MorphismProperty.diagonal (targetAffineLocally P) f →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),
      diagonal P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),
      diagonal P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), diagonal P pullback.snd
𝒰 : Scheme.OpenCover Y
h𝒰 : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
H : ∀ (i : 𝒰.J), diagonal P pullback.snd
⊢ ∀ (i : 𝒰.J) (j k : ((fun x => Scheme.affineCover (pullback f (Scheme.OpenCover.map 𝒰 x))) i).J),
    P
      (pullback.mapDesc
        (Scheme.OpenCover.map ((fun x => Scheme.affineCover (pullback f (Scheme.OpenCover.map 𝒰 x))) i) j)
        (Scheme.OpenCover.map ((fun x => Scheme.affineCover (pullback f (Scheme.OpenCover.map 𝒰 x))) i) k) pullback.snd)
[PROOFSTEP]
intro i j k
[GOAL]
case tfae_2_to_5.intro.intro
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  MorphismProperty.diagonal (targetAffineLocally P) f →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),
      diagonal P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),
      diagonal P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), diagonal P pullback.snd
𝒰 : Scheme.OpenCover Y
h𝒰 : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
H : ∀ (i : 𝒰.J), diagonal P pullback.snd
i : 𝒰.J
j k : ((fun x => Scheme.affineCover (pullback f (Scheme.OpenCover.map 𝒰 x))) i).J
⊢ P
    (pullback.mapDesc (Scheme.OpenCover.map ((fun x => Scheme.affineCover (pullback f (Scheme.OpenCover.map 𝒰 x))) i) j)
      (Scheme.OpenCover.map ((fun x => Scheme.affineCover (pullback f (Scheme.OpenCover.map 𝒰 x))) i) k) pullback.snd)
[PROOFSTEP]
apply H
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  MorphismProperty.diagonal (targetAffineLocally P) f →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),
      diagonal P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),
      diagonal P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), diagonal P pullback.snd
tfae_2_to_5 :
  (∃ 𝒰 x, ∀ (i : 𝒰.J), diagonal P pullback.snd) →
    ∃ 𝒰 x 𝒰' x_1,
      ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
        P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)
⊢ TFAE
    [MorphismProperty.diagonal (targetAffineLocally P) f, ∃ 𝒰 x, ∀ (i : 𝒰.J), diagonal P pullback.snd,
      ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),
        diagonal P pullback.snd,
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd,
      ∃ 𝒰 x 𝒰' x_1,
        ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
          P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)]
[PROOFSTEP]
tfae_have 5 → 1
[GOAL]
case tfae_5_to_1
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  MorphismProperty.diagonal (targetAffineLocally P) f →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),
      diagonal P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),
      diagonal P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), diagonal P pullback.snd
tfae_2_to_5 :
  (∃ 𝒰 x, ∀ (i : 𝒰.J), diagonal P pullback.snd) →
    ∃ 𝒰 x 𝒰' x_1,
      ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
        P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)
⊢ (∃ 𝒰 x 𝒰' x_1,
      ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
        P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)) →
    MorphismProperty.diagonal (targetAffineLocally P) f
[PROOFSTEP]
rintro ⟨𝒰, _, 𝒰', _, H⟩
[GOAL]
case tfae_5_to_1.intro.intro.intro.intro
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  MorphismProperty.diagonal (targetAffineLocally P) f →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),
      diagonal P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),
      diagonal P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), diagonal P pullback.snd
tfae_2_to_5 :
  (∃ 𝒰 x, ∀ (i : 𝒰.J), diagonal P pullback.snd) →
    ∃ 𝒰 x 𝒰' x_1,
      ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
        P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)
𝒰 : Scheme.OpenCover Y
w✝¹ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)
𝒰' : (i : 𝒰.J) → Scheme.OpenCover (pullback f (Scheme.OpenCover.map 𝒰 i))
w✝ : ∀ (i : 𝒰.J) (j : (𝒰' i).J), IsAffine (Scheme.OpenCover.obj (𝒰' i) j)
H :
  ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
    P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)
⊢ MorphismProperty.diagonal (targetAffineLocally P) f
[PROOFSTEP]
exact diagonalTargetAffineLocallyOfOpenCover P hP f 𝒰 𝒰' H
[GOAL]
P : AffineTargetMorphismProperty
hP : IsLocal P
X Y : Scheme
f : X ⟶ Y
tfae_1_to_4 :
  MorphismProperty.diagonal (targetAffineLocally P) f →
    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd
tfae_4_to_3 :
  (∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd) →
    ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),
      diagonal P pullback.snd
tfae_3_to_2 :
  (∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),
      diagonal P pullback.snd) →
    ∃ 𝒰 x, ∀ (i : 𝒰.J), diagonal P pullback.snd
tfae_2_to_5 :
  (∃ 𝒰 x, ∀ (i : 𝒰.J), diagonal P pullback.snd) →
    ∃ 𝒰 x 𝒰' x_1,
      ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
        P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)
tfae_5_to_1 :
  (∃ 𝒰 x 𝒰' x_1,
      ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
        P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)) →
    MorphismProperty.diagonal (targetAffineLocally P) f
⊢ TFAE
    [MorphismProperty.diagonal (targetAffineLocally P) f, ∃ 𝒰 x, ∀ (i : 𝒰.J), diagonal P pullback.snd,
      ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),
        diagonal P pullback.snd,
      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], diagonal P pullback.snd,
      ∃ 𝒰 x 𝒰' x_1,
        ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
          P (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)]
[PROOFSTEP]
tfae_finish
[GOAL]
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
⊢ MorphismProperty.diagonal (targetAffineLocally P) = targetAffineLocally (AffineTargetMorphismProperty.diagonal P)
[PROOFSTEP]
refine funext fun _ => funext fun _ => funext fun f => propext ?_
[GOAL]
P : AffineTargetMorphismProperty
hP : AffineTargetMorphismProperty.IsLocal P
x✝¹ x✝ : Scheme
f : x✝¹ ⟶ x✝
⊢ MorphismProperty.diagonal (targetAffineLocally P) f ↔ targetAffineLocally (AffineTargetMorphismProperty.diagonal P) f
[PROOFSTEP]
exact ((hP.diagonal_affine_openCover_TFAE f).out 0 1).trans ((hP.diagonal.affine_openCover_TFAE f).out 1 0)
[GOAL]
P : MorphismProperty Scheme
hP : ∀ {X Y : Scheme} (f : X ⟶ Y) (𝒰 : Scheme.OpenCover Y), (∀ (i : 𝒰.J), P pullback.snd) → P f
⊢ PropertyIsLocalAtTarget (MorphismProperty.universally P)
[PROOFSTEP]
refine'
  ⟨P.universally_respectsIso, fun {X Y} f U =>
    P.universally_stableUnderBaseChange (isPullback_morphismRestrict f U).flip, _⟩
[GOAL]
P : MorphismProperty Scheme
hP : ∀ {X Y : Scheme} (f : X ⟶ Y) (𝒰 : Scheme.OpenCover Y), (∀ (i : 𝒰.J), P pullback.snd) → P f
⊢ ∀ {X Y : Scheme} (f : X ⟶ Y) (𝒰 : Scheme.OpenCover Y),
    (∀ (i : 𝒰.J), MorphismProperty.universally P pullback.snd) → MorphismProperty.universally P f
[PROOFSTEP]
intro X Y f 𝒰 h X' Y' i₁ i₂ f' H
[GOAL]
P : MorphismProperty Scheme
hP : ∀ {X Y : Scheme} (f : X ⟶ Y) (𝒰 : Scheme.OpenCover Y), (∀ (i : 𝒰.J), P pullback.snd) → P f
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h : ∀ (i : 𝒰.J), MorphismProperty.universally P pullback.snd
X' Y' : Scheme
i₁ : X' ⟶ X
i₂ : Y' ⟶ Y
f' : X' ⟶ Y'
H : IsPullback f' i₁ i₂ f
⊢ P f'
[PROOFSTEP]
apply hP _ (𝒰.pullbackCover i₂)
[GOAL]
P : MorphismProperty Scheme
hP : ∀ {X Y : Scheme} (f : X ⟶ Y) (𝒰 : Scheme.OpenCover Y), (∀ (i : 𝒰.J), P pullback.snd) → P f
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h : ∀ (i : 𝒰.J), MorphismProperty.universally P pullback.snd
X' Y' : Scheme
i₁ : X' ⟶ X
i₂ : Y' ⟶ Y
f' : X' ⟶ Y'
H : IsPullback f' i₁ i₂ f
⊢ ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰 i₂).J), P pullback.snd
[PROOFSTEP]
intro i
[GOAL]
P : MorphismProperty Scheme
hP : ∀ {X Y : Scheme} (f : X ⟶ Y) (𝒰 : Scheme.OpenCover Y), (∀ (i : 𝒰.J), P pullback.snd) → P f
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h : ∀ (i : 𝒰.J), MorphismProperty.universally P pullback.snd
X' Y' : Scheme
i₁ : X' ⟶ X
i₂ : Y' ⟶ Y
f' : X' ⟶ Y'
H : IsPullback f' i₁ i₂ f
i : (Scheme.OpenCover.pullbackCover 𝒰 i₂).J
⊢ P pullback.snd
[PROOFSTEP]
dsimp
[GOAL]
P : MorphismProperty Scheme
hP : ∀ {X Y : Scheme} (f : X ⟶ Y) (𝒰 : Scheme.OpenCover Y), (∀ (i : 𝒰.J), P pullback.snd) → P f
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h : ∀ (i : 𝒰.J), MorphismProperty.universally P pullback.snd
X' Y' : Scheme
i₁ : X' ⟶ X
i₂ : Y' ⟶ Y
f' : X' ⟶ Y'
H : IsPullback f' i₁ i₂ f
i : (Scheme.OpenCover.pullbackCover 𝒰 i₂).J
⊢ P pullback.snd
[PROOFSTEP]
apply h i (pullback.lift (pullback.fst ≫ i₁) (pullback.snd ≫ pullback.snd) _) pullback.snd
[GOAL]
case x
P : MorphismProperty Scheme
hP : ∀ {X Y : Scheme} (f : X ⟶ Y) (𝒰 : Scheme.OpenCover Y), (∀ (i : 𝒰.J), P pullback.snd) → P f
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h : ∀ (i : 𝒰.J), MorphismProperty.universally P pullback.snd
X' Y' : Scheme
i₁ : X' ⟶ X
i₂ : Y' ⟶ Y
f' : X' ⟶ Y'
H : IsPullback f' i₁ i₂ f
i : (Scheme.OpenCover.pullbackCover 𝒰 i₂).J
⊢ IsPullback pullback.snd (pullback.lift (pullback.fst ≫ i₁) (pullback.snd ≫ pullback.snd) ?m.186333) pullback.snd
    pullback.snd
P : MorphismProperty Scheme
hP : ∀ {X Y : Scheme} (f : X ⟶ Y) (𝒰 : Scheme.OpenCover Y), (∀ (i : 𝒰.J), P pullback.snd) → P f
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h : ∀ (i : 𝒰.J), MorphismProperty.universally P pullback.snd
X' Y' : Scheme
i₁ : X' ⟶ X
i₂ : Y' ⟶ Y
f' : X' ⟶ Y'
H : IsPullback f' i₁ i₂ f
i : (Scheme.OpenCover.pullbackCover 𝒰 i₂).J
⊢ (pullback.fst ≫ i₁) ≫ f = (pullback.snd ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i
[PROOFSTEP]
swap
[GOAL]
P : MorphismProperty Scheme
hP : ∀ {X Y : Scheme} (f : X ⟶ Y) (𝒰 : Scheme.OpenCover Y), (∀ (i : 𝒰.J), P pullback.snd) → P f
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h : ∀ (i : 𝒰.J), MorphismProperty.universally P pullback.snd
X' Y' : Scheme
i₁ : X' ⟶ X
i₂ : Y' ⟶ Y
f' : X' ⟶ Y'
H : IsPullback f' i₁ i₂ f
i : (Scheme.OpenCover.pullbackCover 𝒰 i₂).J
⊢ (pullback.fst ≫ i₁) ≫ f = (pullback.snd ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i
[PROOFSTEP]
rw [Category.assoc, Category.assoc, ← pullback.condition, ← pullback.condition_assoc, H.w]
[GOAL]
case x
P : MorphismProperty Scheme
hP : ∀ {X Y : Scheme} (f : X ⟶ Y) (𝒰 : Scheme.OpenCover Y), (∀ (i : 𝒰.J), P pullback.snd) → P f
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h : ∀ (i : 𝒰.J), MorphismProperty.universally P pullback.snd
X' Y' : Scheme
i₁ : X' ⟶ X
i₂ : Y' ⟶ Y
f' : X' ⟶ Y'
H : IsPullback f' i₁ i₂ f
i : (Scheme.OpenCover.pullbackCover 𝒰 i₂).J
⊢ IsPullback pullback.snd
    (pullback.lift (pullback.fst ≫ i₁) (pullback.snd ≫ pullback.snd)
      (_ : (pullback.fst ≫ i₁) ≫ f = (pullback.snd ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i))
    pullback.snd pullback.snd
[PROOFSTEP]
refine' (IsPullback.of_right _ (pullback.lift_snd _ _ _) (IsPullback.of_hasPullback _ _)).flip
[GOAL]
case x
P : MorphismProperty Scheme
hP : ∀ {X Y : Scheme} (f : X ⟶ Y) (𝒰 : Scheme.OpenCover Y), (∀ (i : 𝒰.J), P pullback.snd) → P f
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h : ∀ (i : 𝒰.J), MorphismProperty.universally P pullback.snd
X' Y' : Scheme
i₁ : X' ⟶ X
i₂ : Y' ⟶ Y
f' : X' ⟶ Y'
H : IsPullback f' i₁ i₂ f
i : (Scheme.OpenCover.pullbackCover 𝒰 i₂).J
⊢ IsPullback
    (pullback.lift (pullback.fst ≫ i₁) (pullback.snd ≫ pullback.snd)
        (_ : (pullback.fst ≫ i₁) ≫ f = (pullback.snd ≫ pullback.snd) ≫ Scheme.OpenCover.map 𝒰 i) ≫
      pullback.fst)
    pullback.snd f (pullback.snd ≫ Scheme.OpenCover.map 𝒰 i)
[PROOFSTEP]
rw [pullback.lift_fst, ← pullback.condition]
[GOAL]
case x
P : MorphismProperty Scheme
hP : ∀ {X Y : Scheme} (f : X ⟶ Y) (𝒰 : Scheme.OpenCover Y), (∀ (i : 𝒰.J), P pullback.snd) → P f
X Y : Scheme
f : X ⟶ Y
𝒰 : Scheme.OpenCover Y
h : ∀ (i : 𝒰.J), MorphismProperty.universally P pullback.snd
X' Y' : Scheme
i₁ : X' ⟶ X
i₂ : Y' ⟶ Y
f' : X' ⟶ Y'
H : IsPullback f' i₁ i₂ f
i : (Scheme.OpenCover.pullbackCover 𝒰 i₂).J
⊢ IsPullback (pullback.fst ≫ i₁) pullback.snd f (pullback.fst ≫ i₂)
[PROOFSTEP]
exact (IsPullback.of_hasPullback _ _).paste_horiz H.flip
[GOAL]
P : MorphismProperty Scheme
hP₁ : MorphismProperty.RespectsIso P
hP₂ :
  ∀ {X Y : Scheme} (f : X ⟶ Y) {ι : Type u} (U : ι → Opens ↑↑Y.toPresheafedSpace),
    iSup U = ⊤ → (∀ (i : ι), P (f ∣_ U i)) → P f
X✝ Y✝ : Scheme
f : X✝ ⟶ Y✝
𝒰 : Scheme.OpenCover Y✝
h𝒰 : ∀ (i : 𝒰.J), P pullback.snd
⊢ P f
[PROOFSTEP]
apply hP₂ f (fun i : 𝒰.J => Scheme.Hom.opensRange (𝒰.map i)) 𝒰.iSup_opensRange
[GOAL]
P : MorphismProperty Scheme
hP₁ : MorphismProperty.RespectsIso P
hP₂ :
  ∀ {X Y : Scheme} (f : X ⟶ Y) {ι : Type u} (U : ι → Opens ↑↑Y.toPresheafedSpace),
    iSup U = ⊤ → (∀ (i : ι), P (f ∣_ U i)) → P f
X✝ Y✝ : Scheme
f : X✝ ⟶ Y✝
𝒰 : Scheme.OpenCover Y✝
h𝒰 : ∀ (i : 𝒰.J), P pullback.snd
⊢ ∀ (i : 𝒰.J), P (f ∣_ Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))
[PROOFSTEP]
simp_rw [hP₁.arrow_mk_iso_iff (morphismRestrictOpensRange f _)]
[GOAL]
P : MorphismProperty Scheme
hP₁ : MorphismProperty.RespectsIso P
hP₂ :
  ∀ {X Y : Scheme} (f : X ⟶ Y) {ι : Type u} (U : ι → Opens ↑↑Y.toPresheafedSpace),
    iSup U = ⊤ → (∀ (i : ι), P (f ∣_ U i)) → P f
X✝ Y✝ : Scheme
f : X✝ ⟶ Y✝
𝒰 : Scheme.OpenCover Y✝
h𝒰 : ∀ (i : 𝒰.J), P pullback.snd
⊢ ∀ (i : 𝒰.J), P pullback.snd
[PROOFSTEP]
exact h𝒰