Theorem: AlgebraicGeometry.sourceAffineLocally_of_source_open_cover_aux
File: Mathlib/AlgebraicGeometry/Morphisms/RingHomProperties.lean

tactic: apply_fun Ideal.map (X.presheaf.map (eqToHom U.1.openEmbedding_obj_top).op) at hs
state_before: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : RingHom.PropertyIsLocal P
h₁ : RingHom.RespectsIso P
h₃ : RingHom.OfLocalizationSpanTarget P
X Y : Scheme
f : X ⟶ Y
U : ↑X.affineOpens
s : Set ↑Γ(X, ↑U)
hs : Ideal.span s = ⊤
hs' : ∀ (r : ↑s), P (Scheme.Γ.map (Scheme.ιOpens (X.basicOpen ↑r) ≫ f).op)
⊢ P (Scheme.Γ.map (Scheme.ιOpens ↑U ≫ f).op)
state_after: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : RingHom.PropertyIsLocal P
h₁ : RingHom.RespectsIso P
h₃ : RingHom.OfLocalizationSpanTarget P
X Y : Scheme
f : X ⟶ Y
U : ↑X.affineOpens
s : Set ↑Γ(X, ↑U)
hs' : ∀ (r : ↑s), P (Scheme.Γ.map (Scheme.ιOpens (X.basicOpen ↑r) ≫ f).op)
hs : Ideal.map (X.presheaf.map (eqToHom ⋯).op) (Ideal.span s) = Ideal.map (X.presheaf.map (eqToHom ⋯).op) ⊤
⊢ P (Scheme.Γ.map (Scheme.ιOpens ↑U ≫ f).op)

tactic: rw [Ideal.map_span, Ideal.map_top] at hs
state_before: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : RingHom.PropertyIsLocal P
h₁ : RingHom.RespectsIso P
h₃ : RingHom.OfLocalizationSpanTarget P
X Y : Scheme
f : X ⟶ Y
U : ↑X.affineOpens
s : Set ↑Γ(X, ↑U)
hs' : ∀ (r : ↑s), P (Scheme.Γ.map (Scheme.ιOpens (X.basicOpen ↑r) ≫ f).op)
hs : Ideal.map (X.presheaf.map (eqToHom ⋯).op) (Ideal.span s) = Ideal.map (X.presheaf.map (eqToHom ⋯).op) ⊤
⊢ P (Scheme.Γ.map (Scheme.ιOpens ↑U ≫ f).op)
state_after: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : RingHom.PropertyIsLocal P
h₁ : RingHom.RespectsIso P
h₃ : RingHom.OfLocalizationSpanTarget P
X Y : Scheme
f : X ⟶ Y
U : ↑X.affineOpens
s : Set ↑Γ(X, ↑U)
hs' : ∀ (r : ↑s), P (Scheme.Γ.map (Scheme.ιOpens (X.basicOpen ↑r) ≫ f).op)
hs : Ideal.span (⇑(X.presheaf.map (eqToHom ⋯).op) '' s) = ⊤
⊢ P (Scheme.Γ.map (Scheme.ιOpens ↑U ≫ f).op)

tactic: apply h₃.ofIsLocalization h₁ _ _ hs
state_before: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : RingHom.PropertyIsLocal P
h₁ : RingHom.RespectsIso P
h₃ : RingHom.OfLocalizationSpanTarget P
X Y : Scheme
f : X ⟶ Y
U : ↑X.affineOpens
s : Set ↑Γ(X, ↑U)
hs' : ∀ (r : ↑s), P (Scheme.Γ.map (Scheme.ιOpens (X.basicOpen ↑r) ≫ f).op)
hs : Ideal.span (⇑(X.presheaf.map (eqToHom ⋯).op) '' s) = ⊤
⊢ P (Scheme.Γ.map (Scheme.ιOpens ↑U ≫ f).op)
state_after: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : RingHom.PropertyIsLocal P
h₁ : RingHom.RespectsIso P
h₃ : RingHom.OfLocalizationSpanTarget P
X Y : Scheme
f : X ⟶ Y
U : ↑X.affineOpens
s : Set ↑Γ(X, ↑U)
hs' : ∀ (r : ↑s), P (Scheme.Γ.map (Scheme.ιOpens (X.basicOpen ↑r) ≫ f).op)
hs : Ideal.span (⇑(X.presheaf.map (eqToHom ⋯).op) '' s) = ⊤
⊢ ∀ (r : ↑(⇑(X.presheaf.map (eqToHom ⋯).op) '' s)),
    ∃ T x x_1,
      ∃ (_ : IsLocalization.Away (↑r) T),
        P ((algebraMap (↑Γ(X, ⋯.functor.obj ⊤)) T).comp (Scheme.Γ.map (Scheme.ιOpens ↑U ≫ f).op))

tactic: rintro ⟨s, r, hr, hs⟩
state_before: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : RingHom.PropertyIsLocal P
h₁ : RingHom.RespectsIso P
h₃ : RingHom.OfLocalizationSpanTarget P
X Y : Scheme
f : X ⟶ Y
U : ↑X.affineOpens
s : Set ↑Γ(X, ↑U)
hs' : ∀ (r : ↑s), P (Scheme.Γ.map (Scheme.ιOpens (X.basicOpen ↑r) ≫ f).op)
hs : Ideal.span (⇑(X.presheaf.map (eqToHom ⋯).op) '' s) = ⊤
⊢ ∀ (r : ↑(⇑(X.presheaf.map (eqToHom ⋯).op) '' s)),
    ∃ T x x_1,
      ∃ (_ : IsLocalization.Away (↑r) T),
        P ((algebraMap (↑Γ(X, ⋯.functor.obj ⊤)) T).comp (Scheme.Γ.map (Scheme.ιOpens ↑U ≫ f).op))
state_after: case mk.intro.intro
P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : RingHom.PropertyIsLocal P
h₁ : RingHom.RespectsIso P
h₃ : RingHom.OfLocalizationSpanTarget P
X Y : Scheme
f : X ⟶ Y
U : ↑X.affineOpens
s✝ : Set ↑Γ(X, ↑U)
hs' : ∀ (r : ↑s✝), P (Scheme.Γ.map (Scheme.ιOpens (X.basicOpen ↑r) ≫ f).op)
hs✝ : Ideal.span (⇑(X.presheaf.map (eqToHom ⋯).op) '' s✝) = ⊤
s : ↑Γ(X, ⋯.functor.obj ⊤)
r : ↑Γ(X, ↑U)
hr : r ∈ s✝
hs : (X.presheaf.map (eqToHom ⋯).op) r = s
⊢ ∃ T x x_1,
    ∃ (_ : IsLocalization.Away (↑⟨s, ⋯⟩) T),
      P ((algebraMap (↑Γ(X, ⋯.functor.obj ⊤)) T).comp (Scheme.Γ.map (Scheme.ιOpens ↑U ≫ f).op))

tactic: refine ⟨_, _, _, @AlgebraicGeometry.Γ_restrict_isLocalization (X ∣_ᵤ U.1) U.2 s, ?_⟩
state_before: case mk.intro.intro
P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : RingHom.PropertyIsLocal P
h₁ : RingHom.RespectsIso P
h₃ : RingHom.OfLocalizationSpanTarget P
X Y : Scheme
f : X ⟶ Y
U : ↑X.affineOpens
s✝ : Set ↑Γ(X, ↑U)
hs' : ∀ (r : ↑s✝), P (Scheme.Γ.map (Scheme.ιOpens (X.basicOpen ↑r) ≫ f).op)
hs✝ : Ideal.span (⇑(X.presheaf.map (eqToHom ⋯).op) '' s✝) = ⊤
s : ↑Γ(X, ⋯.functor.obj ⊤)
r : ↑Γ(X, ↑U)
hr : r ∈ s✝
hs : (X.presheaf.map (eqToHom ⋯).op) r = s
⊢ ∃ T x x_1,
    ∃ (_ : IsLocalization.Away (↑⟨s, ⋯⟩) T),
      P ((algebraMap (↑Γ(X, ⋯.functor.obj ⊤)) T).comp (Scheme.Γ.map (Scheme.ιOpens ↑U ≫ f).op))
state_after: case mk.intro.intro
P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : RingHom.PropertyIsLocal P
h₁ : RingHom.RespectsIso P
h₃ : RingHom.OfLocalizationSpanTarget P
X Y : Scheme
f : X ⟶ Y
U : ↑X.affineOpens
s✝ : Set ↑Γ(X, ↑U)
hs' : ∀ (r : ↑s✝), P (Scheme.Γ.map (Scheme.ιOpens (X.basicOpen ↑r) ≫ f).op)
hs✝ : Ideal.span (⇑(X.presheaf.map (eqToHom ⋯).op) '' s✝) = ⊤
s : ↑Γ(X, ⋯.functor.obj ⊤)
r : ↑Γ(X, ↑U)
hr : r ∈ s✝
hs : (X.presheaf.map (eqToHom ⋯).op) r = s
⊢ P
    ((algebraMap ↑Γ(X, ⋯.functor.obj ⊤) ↑(Scheme.Γ.obj { unop := X ∣_ᵤ ↑U ∣_ᵤ (X ∣_ᵤ ↑U).basicOpen s })).comp
      (Scheme.Γ.map (Scheme.ιOpens ↑U ≫ f).op))

tactic: rw [RingHom.algebraMap_toAlgebra, ← CommRingCat.comp_eq_ring_hom_comp, ← Functor.map_comp,
  ← op_comp, ← h₁.cancel_right_isIso _ (Scheme.Γ.mapIso (Scheme.restrictRestrict _ _ _).op).inv]
state_before: case mk.intro.intro
P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : RingHom.PropertyIsLocal P
h₁ : RingHom.RespectsIso P
h₃ : RingHom.OfLocalizationSpanTarget P
X Y : Scheme
f : X ⟶ Y
U : ↑X.affineOpens
s✝ : Set ↑Γ(X, ↑U)
hs' : ∀ (r : ↑s✝), P (Scheme.Γ.map (Scheme.ιOpens (X.basicOpen ↑r) ≫ f).op)
hs✝ : Ideal.span (⇑(X.presheaf.map (eqToHom ⋯).op) '' s✝) = ⊤
s : ↑Γ(X, ⋯.functor.obj ⊤)
r : ↑Γ(X, ↑U)
hr : r ∈ s✝
hs : (X.presheaf.map (eqToHom ⋯).op) r = s
⊢ P
    ((algebraMap ↑Γ(X, ⋯.functor.obj ⊤) ↑(Scheme.Γ.obj { unop := X ∣_ᵤ ↑U ∣_ᵤ (X ∣_ᵤ ↑U).basicOpen s })).comp
      (Scheme.Γ.map (Scheme.ιOpens ↑U ≫ f).op))
state_after: case mk.intro.intro
P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : RingHom.PropertyIsLocal P
h₁ : RingHom.RespectsIso P
h₃ : RingHom.OfLocalizationSpanTarget P
X Y : Scheme
f : X ⟶ Y
U : ↑X.affineOpens
s✝ : Set ↑Γ(X, ↑U)
hs' : ∀ (r : ↑s✝), P (Scheme.Γ.map (Scheme.ιOpens (X.basicOpen ↑r) ≫ f).op)
hs✝ : Ideal.span (⇑(X.presheaf.map (eqToHom ⋯).op) '' s✝) = ⊤
s : ↑Γ(X, ⋯.functor.obj ⊤)
r : ↑Γ(X, ↑U)
hr : r ∈ s✝
hs : (X.presheaf.map (eqToHom ⋯).op) r = s
⊢ P
    (Scheme.Γ.map ((X ∣_ᵤ ↑U).ofRestrict ⋯ ≫ Scheme.ιOpens ↑U ≫ f).op ≫
      (Scheme.Γ.mapIso (X.restrictRestrict (↑U) ((X ∣_ᵤ ↑U).basicOpen s)).op).inv)

tactic: subst hs
state_before: case mk.intro.intro
P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : RingHom.PropertyIsLocal P
h₁ : RingHom.RespectsIso P
h₃ : RingHom.OfLocalizationSpanTarget P
X Y : Scheme
f : X ⟶ Y
U : ↑X.affineOpens
s✝ : Set ↑Γ(X, ↑U)
hs' : ∀ (r : ↑s✝), P (Scheme.Γ.map (Scheme.ιOpens (X.basicOpen ↑r) ≫ f).op)
hs✝ : Ideal.span (⇑(X.presheaf.map (eqToHom ⋯).op) '' s✝) = ⊤
s : ↑Γ(X, ⋯.functor.obj ⊤)
r : ↑Γ(X, ↑U)
hr : r ∈ s✝
hs : (X.presheaf.map (eqToHom ⋯).op) r = s
⊢ P
    (Scheme.Γ.map ((X ∣_ᵤ ↑U).ofRestrict ⋯ ≫ Scheme.ιOpens ↑U ≫ f).op ≫
      (Scheme.Γ.mapIso (X.restrictRestrict (↑U) ((X ∣_ᵤ ↑U).basicOpen s)).op).inv)
state_after: case mk.intro.intro
P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : RingHom.PropertyIsLocal P
h₁ : RingHom.RespectsIso P
h₃ : RingHom.OfLocalizationSpanTarget P
X Y : Scheme
f : X ⟶ Y
U : ↑X.affineOpens
s : Set ↑Γ(X, ↑U)
hs' : ∀ (r : ↑s), P (Scheme.Γ.map (Scheme.ιOpens (X.basicOpen ↑r) ≫ f).op)
hs : Ideal.span (⇑(X.presheaf.map (eqToHom ⋯).op) '' s) = ⊤
r : ↑Γ(X, ↑U)
hr : r ∈ s
⊢ P
    (Scheme.Γ.map ((X ∣_ᵤ ↑U).ofRestrict ⋯ ≫ Scheme.ιOpens ↑U ≫ f).op ≫
      (Scheme.Γ.mapIso (X.restrictRestrict (↑U) ((X ∣_ᵤ ↑U).basicOpen ((X.presheaf.map (eqToHom ⋯).op) r))).op).inv)

tactic: rw [← h₁.cancel_right_isIso _
  (Scheme.Γ.mapIso (Scheme.restrictIsoOfEq _ (Scheme.map_basicOpen_map _ _ _)).op).inv]
state_before: case mk.intro.intro
P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : RingHom.PropertyIsLocal P
h₁ : RingHom.RespectsIso P
h₃ : RingHom.OfLocalizationSpanTarget P
X Y : Scheme
f : X ⟶ Y
U : ↑X.affineOpens
s : Set ↑Γ(X, ↑U)
hs' : ∀ (r : ↑s), P (Scheme.Γ.map (Scheme.ιOpens (X.basicOpen ↑r) ≫ f).op)
hs : Ideal.span (⇑(X.presheaf.map (eqToHom ⋯).op) '' s) = ⊤
r : ↑Γ(X, ↑U)
hr : r ∈ s
⊢ P
    (Scheme.Γ.map ((X ∣_ᵤ ↑U).ofRestrict ⋯ ≫ Scheme.ιOpens ↑U ≫ f).op ≫
      (Scheme.Γ.mapIso (X.restrictRestrict (↑U) ((X ∣_ᵤ ↑U).basicOpen ((X.presheaf.map (eqToHom ⋯).op) r))).op).inv)
state_after: case mk.intro.intro
P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : RingHom.PropertyIsLocal P
h₁ : RingHom.RespectsIso P
h₃ : RingHom.OfLocalizationSpanTarget P
X Y : Scheme
f : X ⟶ Y
U : ↑X.affineOpens
s : Set ↑Γ(X, ↑U)
hs' : ∀ (r : ↑s), P (Scheme.Γ.map (Scheme.ιOpens (X.basicOpen ↑r) ≫ f).op)
hs : Ideal.span (⇑(X.presheaf.map (eqToHom ⋯).op) '' s) = ⊤
r : ↑Γ(X, ↑U)
hr : r ∈ s
⊢ P
    ((Scheme.Γ.map ((X ∣_ᵤ ↑U).ofRestrict ⋯ ≫ Scheme.ιOpens ↑U ≫ f).op ≫
        (Scheme.Γ.mapIso (X.restrictRestrict (↑U) ((X ∣_ᵤ ↑U).basicOpen ((X.presheaf.map (eqToHom ⋯).op) r))).op).inv) ≫
      (Scheme.Γ.mapIso (X.restrictIsoOfEq ⋯).op).inv)

tactic: simp only [Functor.mapIso_inv, Iso.op_inv, ← Functor.map_comp, ← op_comp,
  Scheme.restrictRestrict_inv_restrict_restrict_assoc, Scheme.restrictIsoOfEq,
  IsOpenImmersion.isoOfRangeEq_inv_fac_assoc]
state_before: case mk.intro.intro
P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : RingHom.PropertyIsLocal P
h₁ : RingHom.RespectsIso P
h₃ : RingHom.OfLocalizationSpanTarget P
X Y : Scheme
f : X ⟶ Y
U : ↑X.affineOpens
s : Set ↑Γ(X, ↑U)
hs' : ∀ (r : ↑s), P (Scheme.Γ.map (Scheme.ιOpens (X.basicOpen ↑r) ≫ f).op)
hs : Ideal.span (⇑(X.presheaf.map (eqToHom ⋯).op) '' s) = ⊤
r : ↑Γ(X, ↑U)
hr : r ∈ s
⊢ P
    ((Scheme.Γ.map ((X ∣_ᵤ ↑U).ofRestrict ⋯ ≫ Scheme.ιOpens ↑U ≫ f).op ≫
        (Scheme.Γ.mapIso (X.restrictRestrict (↑U) ((X ∣_ᵤ ↑U).basicOpen ((X.presheaf.map (eqToHom ⋯).op) r))).op).inv) ≫
      (Scheme.Γ.mapIso (X.restrictIsoOfEq ⋯).op).inv)
state_after: case mk.intro.intro
P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : RingHom.PropertyIsLocal P
h₁ : RingHom.RespectsIso P
h₃ : RingHom.OfLocalizationSpanTarget P
X Y : Scheme
f : X ⟶ Y
U : ↑X.affineOpens
s : Set ↑Γ(X, ↑U)
hs' : ∀ (r : ↑s), P (Scheme.Γ.map (Scheme.ιOpens (X.basicOpen ↑r) ≫ f).op)
hs : Ideal.span (⇑(X.presheaf.map (eqToHom ⋯).op) '' s) = ⊤
r : ↑Γ(X, ↑U)
hr : r ∈ s
⊢ P (Scheme.Γ.map (Scheme.ιOpens (X.basicOpen r) ≫ f).op)

tactic: exact hs' ⟨r, hr⟩
state_before: case mk.intro.intro
P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : RingHom.PropertyIsLocal P
h₁ : RingHom.RespectsIso P
h₃ : RingHom.OfLocalizationSpanTarget P
X Y : Scheme
f : X ⟶ Y
U : ↑X.affineOpens
s : Set ↑Γ(X, ↑U)
hs' : ∀ (r : ↑s), P (Scheme.Γ.map (Scheme.ιOpens (X.basicOpen ↑r) ≫ f).op)
hs : Ideal.span (⇑(X.presheaf.map (eqToHom ⋯).op) '' s) = ⊤
r : ↑Γ(X, ↑U)
hr : r ∈ s
⊢ P (Scheme.Γ.map (Scheme.ιOpens (X.basicOpen r) ≫ f).op)
state_after: no goals