-- Mathlib/AlgebraicGeometry/Morphisms/RingHomProperties.lean
theorem of_source_openCover [IsAffine Y]
    (𝒰 : X.OpenCover) [∀ i, IsAffine (𝒰.obj i)] (H : ∀ i, Q ((𝒰.map i ≫ f).appTop.hom)) :
    P f

Proof state:
case openCover
P : MorphismProperty Scheme
Q : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
inst✝² : HasRingHomProperty P Q
X Y : Scheme
f : X ⟶ Y
inst✝¹ : IsAffine Y
𝒰 : X.OpenCover
inst✝ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
H✝ : ∀ (i : 𝒰.J), Q (CommRingCat.Hom.hom (Scheme.Hom.appTop (𝒰.map i ≫ f)))
S : 𝒰.J → ↑X.affineOpens := fun i => ⟨Scheme.Hom.opensRange (𝒰.map i), ⋯⟩
U : ↑X.affineOpens
s : Finset ↑Γ(X, ↑U)
hs : Ideal.span ↑s = ⊤
H : ∀ (f_1 : { x // x ∈ s }), Q (CommRingCat.Hom.hom (Scheme.Hom.appLE f ⊤ ↑(X.affineBasicOpen ↑f_1) ⋯))
⊢ Q (CommRingCat.Hom.hom (Scheme.Hom.appLE f ⊤ ↑U ⋯))

Tactic:
apply (isLocal_ringHomProperty P).ofLocalizationSpanTarget.ofIsLocalization
  (isLocal_ringHomProperty P).respectsIso _ _ hs

Result:
case openCover
P : MorphismProperty Scheme
Q : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
inst✝² : HasRingHomProperty P Q
X Y : Scheme
f : X ⟶ Y
inst✝¹ : IsAffine Y
𝒰 : X.OpenCover
inst✝ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
H✝ : ∀ (i : 𝒰.J), Q (CommRingCat.Hom.hom (Scheme.Hom.appTop (𝒰.map i ≫ f)))
S : 𝒰.J → ↑X.affineOpens := fun i => ⟨Scheme.Hom.opensRange (𝒰.map i), ⋯⟩
U : ↑X.affineOpens
s : Finset ↑Γ(X, ↑U)
hs : Ideal.span ↑s = ⊤
H : ∀ (f_1 : { x // x ∈ s }), Q (CommRingCat.Hom.hom (Scheme.Hom.appLE f ⊤ ↑(X.affineBasicOpen ↑f_1) ⋯))
⊢ ∀ (r : ↑↑s),
    ∃ T x x_1,
      ∃ (_ : IsLocalization.Away (↑r) T),
        Q ((algebraMap (↑Γ(X, ↑U)) T).comp (CommRingCat.Hom.hom (Scheme.Hom.appLE f ⊤ ↑U ⋯)))

Proof state:
case basicOpen
P : MorphismProperty Scheme
Q : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
inst✝² : HasRingHomProperty P Q
X Y : Scheme
f : X ⟶ Y
inst✝¹ : IsAffine Y
𝒰 : X.OpenCover
inst✝ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
H✝ : ∀ (i : 𝒰.J), Q (CommRingCat.Hom.hom (Scheme.Hom.appTop (𝒰.map i ≫ f)))
S : 𝒰.J → ↑X.affineOpens := fun i => ⟨Scheme.Hom.opensRange (𝒰.map i), ⋯⟩
U : ↑X.affineOpens
r : ↑Γ(X, ↑U)
H : Q (CommRingCat.Hom.hom (Scheme.Hom.appLE f ⊤ ↑U ⋯))
⊢ Q (CommRingCat.Hom.hom (Scheme.Hom.appLE f ⊤ ↑U ⋯ ≫ X.presheaf.map (homOfLE ⋯).op))

Tactic:
have := U.2.isLocalization_basicOpen r

Result:
case basicOpen
P : MorphismProperty Scheme
Q : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
inst✝² : HasRingHomProperty P Q
X Y : Scheme
f : X ⟶ Y
inst✝¹ : IsAffine Y
𝒰 : X.OpenCover
inst✝ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
H✝ : ∀ (i : 𝒰.J), Q (CommRingCat.Hom.hom (Scheme.Hom.appTop (𝒰.map i ≫ f)))
S : 𝒰.J → ↑X.affineOpens := fun i => ⟨Scheme.Hom.opensRange (𝒰.map i), ⋯⟩
U : ↑X.affineOpens
r : ↑Γ(X, ↑U)
H : Q (CommRingCat.Hom.hom (Scheme.Hom.appLE f ⊤ ↑U ⋯))
this : IsLocalization.Away r ↑Γ(X, X.basicOpen r)
⊢ Q (CommRingCat.Hom.hom (Scheme.Hom.appLE f ⊤ ↑U ⋯ ≫ X.presheaf.map (homOfLE ⋯).op))

Proof state:
P : MorphismProperty Scheme
Q : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
inst✝² : HasRingHomProperty P Q
X Y : Scheme
f : X ⟶ Y
inst✝¹ : IsAffine Y
𝒰 : X.OpenCover
inst✝ : ∀ (i : 𝒰.J), IsAffine (𝒰.obj i)
S : 𝒰.J → ↑X.affineOpens := fun i => ⟨Scheme.Hom.opensRange (𝒰.map i), ⋯⟩
i : 𝒰.J
H : Q (CommRingCat.Hom.hom (Scheme.Hom.appLE f ⊤ ((↑(S i)).ι ''ᵁ ⊤) ⋯))
⊢ (↑(S i)).ι ''ᵁ ⊤ = ↑(S i)

Tactic:
simp

Result:
no goals