[GOAL]
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
f : (x : { x // x ∈ U }) → Localizations R ↑x
hf : IsFraction f
⊢ ∃ r s,
    ∀ (x : { x // x ∈ U }),
      ∃ hs, f x = IsLocalization.mk' (Localization.AtPrime (↑x).asIdeal) r { val := s, property := hs }
[PROOFSTEP]
rcases hf with ⟨r, s, h⟩
[GOAL]
case intro.intro
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
f : (x : { x // x ∈ U }) → Localizations R ↑x
r s : R
h :
  ∀ (x : { x // x ∈ U }),
    ¬s ∈ (↑x).asIdeal ∧ f x * ↑(algebraMap R (Localizations R ↑x)) s = ↑(algebraMap R (Localizations R ↑x)) r
⊢ ∃ r s,
    ∀ (x : { x // x ∈ U }),
      ∃ hs, f x = IsLocalization.mk' (Localization.AtPrime (↑x).asIdeal) r { val := s, property := hs }
[PROOFSTEP]
refine' ⟨r, s, fun x => ⟨(h x).1, (IsLocalization.mk'_eq_iff_eq_mul.mpr _).symm⟩⟩
[GOAL]
case intro.intro
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
f : (x : { x // x ∈ U }) → Localizations R ↑x
r s : R
h :
  ∀ (x : { x // x ∈ U }),
    ¬s ∈ (↑x).asIdeal ∧ f x * ↑(algebraMap R (Localizations R ↑x)) s = ↑(algebraMap R (Localizations R ↑x)) r
x : { x // x ∈ U }
⊢ ↑(algebraMap R (Localizations R ↑x)) r =
    f x * ↑(algebraMap R (Localizations R ↑x)) ↑{ val := s, property := (_ : ¬s ∈ (↑x).asIdeal) }
[PROOFSTEP]
exact (h x).2.symm
[GOAL]
R : Type u
inst✝ : CommRing R
⊢ ∀ {U V : Opens ↑(PrimeSpectrum.Top R)} (i : U ⟶ V) (f : (x : { x // x ∈ V }) → Localizations R ↑x),
    (fun {U} f => IsFraction f) f →
      (fun {U} f => IsFraction f) fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)
[PROOFSTEP]
rintro V U i f ⟨r, s, w⟩
[GOAL]
case intro.intro
R : Type u
inst✝ : CommRing R
V U : Opens ↑(PrimeSpectrum.Top R)
i : V ⟶ U
f : (x : { x // x ∈ U }) → Localizations R ↑x
r s : R
w :
  ∀ (x : { x // x ∈ U }),
    ¬s ∈ (↑x).asIdeal ∧ f x * ↑(algebraMap R (Localizations R ↑x)) s = ↑(algebraMap R (Localizations R ↑x)) r
⊢ IsFraction fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)
[PROOFSTEP]
exact ⟨r, s, fun x => w (i x)⟩
[GOAL]
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
⊢ ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
        a * b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f}
[PROOFSTEP]
intro a b ha hb x
[GOAL]
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha : a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f}
hb : b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f}
x : { x // x ∈ U.unop }
⊢ ∃ V x i,
    PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
      (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)
[PROOFSTEP]
rcases ha x with ⟨Va, ma, ia, ra, sa, wa⟩
[GOAL]
case intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha : a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f}
hb : b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f}
x : { x // x ∈ U.unop }
Va : Opens ↑(PrimeSpectrum.Top R)
ma : ↑x ∈ Va
ia : Va ⟶ U.unop
ra sa : R
wa :
  ∀ (x : { x // x ∈ Va }),
    ¬sa ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sa =
        ↑(algebraMap R (Localizations R ↑x)) ra
⊢ ∃ V x i,
    PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
      (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)
[PROOFSTEP]
rcases hb x with ⟨Vb, mb, ib, rb, sb, wb⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha : a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f}
hb : b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f}
x : { x // x ∈ U.unop }
Va : Opens ↑(PrimeSpectrum.Top R)
ma : ↑x ∈ Va
ia : Va ⟶ U.unop
ra sa : R
wa :
  ∀ (x : { x // x ∈ Va }),
    ¬sa ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sa =
        ↑(algebraMap R (Localizations R ↑x)) ra
Vb : Opens ↑(PrimeSpectrum.Top R)
mb : ↑x ∈ Vb
ib : Vb ⟶ U.unop
rb sb : R
wb :
  ∀ (x : { x // x ∈ Vb }),
    ¬sb ∈ (↑x).asIdeal ∧
      (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sb =
        ↑(algebraMap R (Localizations R ↑x)) rb
⊢ ∃ V x i,
    PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
      (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)
[PROOFSTEP]
refine' ⟨Va ⊓ Vb, ⟨ma, mb⟩, Opens.infLELeft _ _ ≫ ia, ra * rb, sa * sb, _⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha : a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f}
hb : b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f}
x : { x // x ∈ U.unop }
Va : Opens ↑(PrimeSpectrum.Top R)
ma : ↑x ∈ Va
ia : Va ⟶ U.unop
ra sa : R
wa :
  ∀ (x : { x // x ∈ Va }),
    ¬sa ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sa =
        ↑(algebraMap R (Localizations R ↑x)) ra
Vb : Opens ↑(PrimeSpectrum.Top R)
mb : ↑x ∈ Vb
ib : Vb ⟶ U.unop
rb sb : R
wb :
  ∀ (x : { x // x ∈ Vb }),
    ¬sb ∈ (↑x).asIdeal ∧
      (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sb =
        ↑(algebraMap R (Localizations R ↑x)) rb
⊢ ∀ (x : { x // x ∈ Va ⊓ Vb }),
    ¬sa * sb ∈ (↑x).asIdeal ∧
      (fun x => (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) (sa * sb) =
        ↑(algebraMap R (Localizations R ↑x)) (ra * rb)
[PROOFSTEP]
intro y
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha : a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f}
hb : b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f}
x : { x // x ∈ U.unop }
Va : Opens ↑(PrimeSpectrum.Top R)
ma : ↑x ∈ Va
ia : Va ⟶ U.unop
ra sa : R
wa :
  ∀ (x : { x // x ∈ Va }),
    ¬sa ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sa =
        ↑(algebraMap R (Localizations R ↑x)) ra
Vb : Opens ↑(PrimeSpectrum.Top R)
mb : ↑x ∈ Vb
ib : Vb ⟶ U.unop
rb sb : R
wb :
  ∀ (x : { x // x ∈ Vb }),
    ¬sb ∈ (↑x).asIdeal ∧
      (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sb =
        ↑(algebraMap R (Localizations R ↑x)) rb
y : { x // x ∈ Va ⊓ Vb }
⊢ ¬sa * sb ∈ (↑y).asIdeal ∧
    (fun x => (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) y *
        ↑(algebraMap R (Localizations R ↑y)) (sa * sb) =
      ↑(algebraMap R (Localizations R ↑y)) (ra * rb)
[PROOFSTEP]
rcases wa (Opens.infLELeft _ _ y) with ⟨nma, wa⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha : a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f}
hb : b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f}
x : { x // x ∈ U.unop }
Va : Opens ↑(PrimeSpectrum.Top R)
ma : ↑x ∈ Va
ia : Va ⟶ U.unop
ra sa : R
wa✝ :
  ∀ (x : { x // x ∈ Va }),
    ¬sa ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sa =
        ↑(algebraMap R (Localizations R ↑x)) ra
Vb : Opens ↑(PrimeSpectrum.Top R)
mb : ↑x ∈ Vb
ib : Vb ⟶ U.unop
rb sb : R
wb :
  ∀ (x : { x // x ∈ Vb }),
    ¬sb ∈ (↑x).asIdeal ∧
      (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sb =
        ↑(algebraMap R (Localizations R ↑x)) rb
y : { x // x ∈ Va ⊓ Vb }
nma : ¬sa ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y)).asIdeal
wa :
  (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) sa =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) ra
⊢ ¬sa * sb ∈ (↑y).asIdeal ∧
    (fun x => (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) y *
        ↑(algebraMap R (Localizations R ↑y)) (sa * sb) =
      ↑(algebraMap R (Localizations R ↑y)) (ra * rb)
[PROOFSTEP]
rcases wb (Opens.infLERight _ _ y) with ⟨nmb, wb⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha : a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f}
hb : b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f}
x : { x // x ∈ U.unop }
Va : Opens ↑(PrimeSpectrum.Top R)
ma : ↑x ∈ Va
ia : Va ⟶ U.unop
ra sa : R
wa✝ :
  ∀ (x : { x // x ∈ Va }),
    ¬sa ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sa =
        ↑(algebraMap R (Localizations R ↑x)) ra
Vb : Opens ↑(PrimeSpectrum.Top R)
mb : ↑x ∈ Vb
ib : Vb ⟶ U.unop
rb sb : R
wb✝ :
  ∀ (x : { x // x ∈ Vb }),
    ¬sb ∈ (↑x).asIdeal ∧
      (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sb =
        ↑(algebraMap R (Localizations R ↑x)) rb
y : { x // x ∈ Va ⊓ Vb }
nma : ¬sa ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y)).asIdeal
wa :
  (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) sa =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) ra
nmb : ¬sb ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y)).asIdeal
wb :
  (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) sb =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) rb
⊢ ¬sa * sb ∈ (↑y).asIdeal ∧
    (fun x => (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) y *
        ↑(algebraMap R (Localizations R ↑y)) (sa * sb) =
      ↑(algebraMap R (Localizations R ↑y)) (ra * rb)
[PROOFSTEP]
fconstructor
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.left
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha : a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f}
hb : b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f}
x : { x // x ∈ U.unop }
Va : Opens ↑(PrimeSpectrum.Top R)
ma : ↑x ∈ Va
ia : Va ⟶ U.unop
ra sa : R
wa✝ :
  ∀ (x : { x // x ∈ Va }),
    ¬sa ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sa =
        ↑(algebraMap R (Localizations R ↑x)) ra
Vb : Opens ↑(PrimeSpectrum.Top R)
mb : ↑x ∈ Vb
ib : Vb ⟶ U.unop
rb sb : R
wb✝ :
  ∀ (x : { x // x ∈ Vb }),
    ¬sb ∈ (↑x).asIdeal ∧
      (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sb =
        ↑(algebraMap R (Localizations R ↑x)) rb
y : { x // x ∈ Va ⊓ Vb }
nma : ¬sa ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y)).asIdeal
wa :
  (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) sa =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) ra
nmb : ¬sb ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y)).asIdeal
wb :
  (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) sb =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) rb
⊢ ¬sa * sb ∈ (↑y).asIdeal
[PROOFSTEP]
intro H
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.left
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha : a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f}
hb : b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f}
x : { x // x ∈ U.unop }
Va : Opens ↑(PrimeSpectrum.Top R)
ma : ↑x ∈ Va
ia : Va ⟶ U.unop
ra sa : R
wa✝ :
  ∀ (x : { x // x ∈ Va }),
    ¬sa ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sa =
        ↑(algebraMap R (Localizations R ↑x)) ra
Vb : Opens ↑(PrimeSpectrum.Top R)
mb : ↑x ∈ Vb
ib : Vb ⟶ U.unop
rb sb : R
wb✝ :
  ∀ (x : { x // x ∈ Vb }),
    ¬sb ∈ (↑x).asIdeal ∧
      (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sb =
        ↑(algebraMap R (Localizations R ↑x)) rb
y : { x // x ∈ Va ⊓ Vb }
nma : ¬sa ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y)).asIdeal
wa :
  (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) sa =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) ra
nmb : ¬sb ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y)).asIdeal
wb :
  (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) sb =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) rb
H : sa * sb ∈ (↑y).asIdeal
⊢ False
[PROOFSTEP]
cases y.1.IsPrime.mem_or_mem H
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.left.inl
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha : a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f}
hb : b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f}
x : { x // x ∈ U.unop }
Va : Opens ↑(PrimeSpectrum.Top R)
ma : ↑x ∈ Va
ia : Va ⟶ U.unop
ra sa : R
wa✝ :
  ∀ (x : { x // x ∈ Va }),
    ¬sa ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sa =
        ↑(algebraMap R (Localizations R ↑x)) ra
Vb : Opens ↑(PrimeSpectrum.Top R)
mb : ↑x ∈ Vb
ib : Vb ⟶ U.unop
rb sb : R
wb✝ :
  ∀ (x : { x // x ∈ Vb }),
    ¬sb ∈ (↑x).asIdeal ∧
      (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sb =
        ↑(algebraMap R (Localizations R ↑x)) rb
y : { x // x ∈ Va ⊓ Vb }
nma : ¬sa ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y)).asIdeal
wa :
  (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) sa =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) ra
nmb : ¬sb ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y)).asIdeal
wb :
  (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) sb =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) rb
H : sa * sb ∈ (↑y).asIdeal
h✝ : sa ∈ (↑y).asIdeal
⊢ False
[PROOFSTEP]
contradiction
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.left.inr
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha : a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f}
hb : b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f}
x : { x // x ∈ U.unop }
Va : Opens ↑(PrimeSpectrum.Top R)
ma : ↑x ∈ Va
ia : Va ⟶ U.unop
ra sa : R
wa✝ :
  ∀ (x : { x // x ∈ Va }),
    ¬sa ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sa =
        ↑(algebraMap R (Localizations R ↑x)) ra
Vb : Opens ↑(PrimeSpectrum.Top R)
mb : ↑x ∈ Vb
ib : Vb ⟶ U.unop
rb sb : R
wb✝ :
  ∀ (x : { x // x ∈ Vb }),
    ¬sb ∈ (↑x).asIdeal ∧
      (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sb =
        ↑(algebraMap R (Localizations R ↑x)) rb
y : { x // x ∈ Va ⊓ Vb }
nma : ¬sa ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y)).asIdeal
wa :
  (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) sa =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) ra
nmb : ¬sb ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y)).asIdeal
wb :
  (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) sb =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) rb
H : sa * sb ∈ (↑y).asIdeal
h✝ : sb ∈ (↑y).asIdeal
⊢ False
[PROOFSTEP]
contradiction
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.right
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha : a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f}
hb : b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f}
x : { x // x ∈ U.unop }
Va : Opens ↑(PrimeSpectrum.Top R)
ma : ↑x ∈ Va
ia : Va ⟶ U.unop
ra sa : R
wa✝ :
  ∀ (x : { x // x ∈ Va }),
    ¬sa ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sa =
        ↑(algebraMap R (Localizations R ↑x)) ra
Vb : Opens ↑(PrimeSpectrum.Top R)
mb : ↑x ∈ Vb
ib : Vb ⟶ U.unop
rb sb : R
wb✝ :
  ∀ (x : { x // x ∈ Vb }),
    ¬sb ∈ (↑x).asIdeal ∧
      (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sb =
        ↑(algebraMap R (Localizations R ↑x)) rb
y : { x // x ∈ Va ⊓ Vb }
nma : ¬sa ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y)).asIdeal
wa :
  (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) sa =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) ra
nmb : ¬sb ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y)).asIdeal
wb :
  (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) sb =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) rb
⊢ (fun x => (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) y *
      ↑(algebraMap R (Localizations R ↑y)) (sa * sb) =
    ↑(algebraMap R (Localizations R ↑y)) (ra * rb)
[PROOFSTEP]
simp only [Pi.mul_apply, RingHom.map_mul]
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.right
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha : a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f}
hb : b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f}
x : { x // x ∈ U.unop }
Va : Opens ↑(PrimeSpectrum.Top R)
ma : ↑x ∈ Va
ia : Va ⟶ U.unop
ra sa : R
wa✝ :
  ∀ (x : { x // x ∈ Va }),
    ¬sa ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sa =
        ↑(algebraMap R (Localizations R ↑x)) ra
Vb : Opens ↑(PrimeSpectrum.Top R)
mb : ↑x ∈ Vb
ib : Vb ⟶ U.unop
rb sb : R
wb✝ :
  ∀ (x : { x // x ∈ Vb }),
    ¬sb ∈ (↑x).asIdeal ∧
      (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sb =
        ↑(algebraMap R (Localizations R ↑x)) rb
y : { x // x ∈ Va ⊓ Vb }
nma : ¬sa ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y)).asIdeal
wa :
  (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) sa =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) ra
nmb : ¬sb ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y)).asIdeal
wb :
  (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) sb =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) rb
⊢ a { val := ↑y, property := (_ : ↑y ∈ ↑U.unop) } * b { val := ↑y, property := (_ : ↑y ∈ ↑U.unop) } *
      (↑(algebraMap R (Localizations R ↑y)) sa * ↑(algebraMap R (Localizations R ↑y)) sb) =
    ↑(algebraMap R (Localizations R ↑y)) ra * ↑(algebraMap R (Localizations R ↑y)) rb
[PROOFSTEP]
erw [← wa, ← wb]
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.right
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha : a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f}
hb : b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f}
x : { x // x ∈ U.unop }
Va : Opens ↑(PrimeSpectrum.Top R)
ma : ↑x ∈ Va
ia : Va ⟶ U.unop
ra sa : R
wa✝ :
  ∀ (x : { x // x ∈ Va }),
    ¬sa ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sa =
        ↑(algebraMap R (Localizations R ↑x)) ra
Vb : Opens ↑(PrimeSpectrum.Top R)
mb : ↑x ∈ Vb
ib : Vb ⟶ U.unop
rb sb : R
wb✝ :
  ∀ (x : { x // x ∈ Vb }),
    ¬sb ∈ (↑x).asIdeal ∧
      (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sb =
        ↑(algebraMap R (Localizations R ↑x)) rb
y : { x // x ∈ Va ⊓ Vb }
nma : ¬sa ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y)).asIdeal
wa :
  (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) sa =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) ra
nmb : ¬sb ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y)).asIdeal
wb :
  (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) sb =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) rb
⊢ a { val := ↑y, property := (_ : ↑y ∈ ↑U.unop) } * b { val := ↑y, property := (_ : ↑y ∈ ↑U.unop) } *
      (↑(algebraMap R (Localizations R ↑y)) sa * ↑(algebraMap R (Localizations R ↑y)) sb) =
    (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
          ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y) *
        ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) sa *
      ((fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
          ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y) *
        ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) sb)
[PROOFSTEP]
simp only [mul_left_comm, mul_assoc, mul_comm]
[GOAL]
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
⊢ 1 ∈
    { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
        mul_mem' :=
          (_ :
            ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
              a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                  ∀ (x : { x // x ∈ U.unop }),
                    ∃ V x i,
                      PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                        (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.carrier
[PROOFSTEP]
refine' fun x => ⟨unop U, x.2, 𝟙 _, 1, 1, fun y => ⟨_, _⟩⟩
[GOAL]
case refine'_1
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
x y : { x // x ∈ U.unop }
⊢ ¬1 ∈ (↑y).asIdeal
[PROOFSTEP]
rw [← Ideal.ne_top_iff_one]
[GOAL]
case refine'_1
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
x y : { x // x ∈ U.unop }
⊢ (↑y).asIdeal ≠ ⊤
[PROOFSTEP]
exact y.1.IsPrime.1
[GOAL]
case refine'_2
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
x y : { x // x ∈ U.unop }
⊢ (fun x => OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) y *
      ↑(algebraMap R (Localizations R ↑y)) 1 =
    ↑(algebraMap R (Localizations R ↑y)) 1
[PROOFSTEP]
simp
[GOAL]
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
⊢ ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
    a ∈
        {
              toSubsemigroup :=
                { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                  mul_mem' :=
                    (_ :
                      ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                        a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                          b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                            ∀ (x : { x // x ∈ U.unop }),
                              ∃ V x i,
                                PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                  (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
              one_mem' :=
                (_ :
                  ∀ (x : { x // x ∈ U.unop }),
                    ∃ V x i,
                      PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                        OfNat.ofNat 1
                          ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier →
      b ∈
          {
                toSubsemigroup :=
                  { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                    mul_mem' :=
                      (_ :
                        ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                          a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                            b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                              ∀ (x : { x // x ∈ U.unop }),
                                ∃ V x i,
                                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                    (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                one_mem' :=
                  (_ :
                    ∀ (x : { x // x ∈ U.unop }),
                      ∃ V x i,
                        PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                          OfNat.ofNat 1
                            ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier →
        a + b ∈
          {
                toSubsemigroup :=
                  { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                    mul_mem' :=
                      (_ :
                        ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                          a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                            b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                              ∀ (x : { x // x ∈ U.unop }),
                                ∃ V x i,
                                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                    (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                one_mem' :=
                  (_ :
                    ∀ (x : { x // x ∈ U.unop }),
                      ∃ V x i,
                        PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                          OfNat.ofNat 1
                            ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
[PROOFSTEP]
intro a b ha hb x
[GOAL]
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha :
  a ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
hb :
  b ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
x : { x // x ∈ U.unop }
⊢ ∃ V x i,
    PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
      (a + b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)
[PROOFSTEP]
rcases ha x with ⟨Va, ma, ia, ra, sa, wa⟩
[GOAL]
case intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha :
  a ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
hb :
  b ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
x : { x // x ∈ U.unop }
Va : Opens ↑(PrimeSpectrum.Top R)
ma : ↑x ∈ Va
ia : Va ⟶ U.unop
ra sa : R
wa :
  ∀ (x : { x // x ∈ Va }),
    ¬sa ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sa =
        ↑(algebraMap R (Localizations R ↑x)) ra
⊢ ∃ V x i,
    PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
      (a + b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)
[PROOFSTEP]
rcases hb x with ⟨Vb, mb, ib, rb, sb, wb⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha :
  a ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
hb :
  b ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
x : { x // x ∈ U.unop }
Va : Opens ↑(PrimeSpectrum.Top R)
ma : ↑x ∈ Va
ia : Va ⟶ U.unop
ra sa : R
wa :
  ∀ (x : { x // x ∈ Va }),
    ¬sa ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sa =
        ↑(algebraMap R (Localizations R ↑x)) ra
Vb : Opens ↑(PrimeSpectrum.Top R)
mb : ↑x ∈ Vb
ib : Vb ⟶ U.unop
rb sb : R
wb :
  ∀ (x : { x // x ∈ Vb }),
    ¬sb ∈ (↑x).asIdeal ∧
      (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sb =
        ↑(algebraMap R (Localizations R ↑x)) rb
⊢ ∃ V x i,
    PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
      (a + b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)
[PROOFSTEP]
refine' ⟨Va ⊓ Vb, ⟨ma, mb⟩, Opens.infLELeft _ _ ≫ ia, ra * sb + rb * sa, sa * sb, _⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha :
  a ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
hb :
  b ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
x : { x // x ∈ U.unop }
Va : Opens ↑(PrimeSpectrum.Top R)
ma : ↑x ∈ Va
ia : Va ⟶ U.unop
ra sa : R
wa :
  ∀ (x : { x // x ∈ Va }),
    ¬sa ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sa =
        ↑(algebraMap R (Localizations R ↑x)) ra
Vb : Opens ↑(PrimeSpectrum.Top R)
mb : ↑x ∈ Vb
ib : Vb ⟶ U.unop
rb sb : R
wb :
  ∀ (x : { x // x ∈ Vb }),
    ¬sb ∈ (↑x).asIdeal ∧
      (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sb =
        ↑(algebraMap R (Localizations R ↑x)) rb
⊢ ∀ (x : { x // x ∈ Va ⊓ Vb }),
    ¬sa * sb ∈ (↑x).asIdeal ∧
      (fun x => (a + b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) (sa * sb) =
        ↑(algebraMap R (Localizations R ↑x)) (ra * sb + rb * sa)
[PROOFSTEP]
intro y
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha :
  a ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
hb :
  b ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
x : { x // x ∈ U.unop }
Va : Opens ↑(PrimeSpectrum.Top R)
ma : ↑x ∈ Va
ia : Va ⟶ U.unop
ra sa : R
wa :
  ∀ (x : { x // x ∈ Va }),
    ¬sa ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sa =
        ↑(algebraMap R (Localizations R ↑x)) ra
Vb : Opens ↑(PrimeSpectrum.Top R)
mb : ↑x ∈ Vb
ib : Vb ⟶ U.unop
rb sb : R
wb :
  ∀ (x : { x // x ∈ Vb }),
    ¬sb ∈ (↑x).asIdeal ∧
      (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sb =
        ↑(algebraMap R (Localizations R ↑x)) rb
y : { x // x ∈ Va ⊓ Vb }
⊢ ¬sa * sb ∈ (↑y).asIdeal ∧
    (fun x => (a + b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) y *
        ↑(algebraMap R (Localizations R ↑y)) (sa * sb) =
      ↑(algebraMap R (Localizations R ↑y)) (ra * sb + rb * sa)
[PROOFSTEP]
rcases wa (Opens.infLELeft _ _ y) with ⟨nma, wa⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha :
  a ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
hb :
  b ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
x : { x // x ∈ U.unop }
Va : Opens ↑(PrimeSpectrum.Top R)
ma : ↑x ∈ Va
ia : Va ⟶ U.unop
ra sa : R
wa✝ :
  ∀ (x : { x // x ∈ Va }),
    ¬sa ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sa =
        ↑(algebraMap R (Localizations R ↑x)) ra
Vb : Opens ↑(PrimeSpectrum.Top R)
mb : ↑x ∈ Vb
ib : Vb ⟶ U.unop
rb sb : R
wb :
  ∀ (x : { x // x ∈ Vb }),
    ¬sb ∈ (↑x).asIdeal ∧
      (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sb =
        ↑(algebraMap R (Localizations R ↑x)) rb
y : { x // x ∈ Va ⊓ Vb }
nma : ¬sa ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y)).asIdeal
wa :
  (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) sa =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) ra
⊢ ¬sa * sb ∈ (↑y).asIdeal ∧
    (fun x => (a + b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) y *
        ↑(algebraMap R (Localizations R ↑y)) (sa * sb) =
      ↑(algebraMap R (Localizations R ↑y)) (ra * sb + rb * sa)
[PROOFSTEP]
rcases wb (Opens.infLERight _ _ y) with ⟨nmb, wb⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha :
  a ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
hb :
  b ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
x : { x // x ∈ U.unop }
Va : Opens ↑(PrimeSpectrum.Top R)
ma : ↑x ∈ Va
ia : Va ⟶ U.unop
ra sa : R
wa✝ :
  ∀ (x : { x // x ∈ Va }),
    ¬sa ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sa =
        ↑(algebraMap R (Localizations R ↑x)) ra
Vb : Opens ↑(PrimeSpectrum.Top R)
mb : ↑x ∈ Vb
ib : Vb ⟶ U.unop
rb sb : R
wb✝ :
  ∀ (x : { x // x ∈ Vb }),
    ¬sb ∈ (↑x).asIdeal ∧
      (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sb =
        ↑(algebraMap R (Localizations R ↑x)) rb
y : { x // x ∈ Va ⊓ Vb }
nma : ¬sa ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y)).asIdeal
wa :
  (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) sa =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) ra
nmb : ¬sb ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y)).asIdeal
wb :
  (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) sb =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) rb
⊢ ¬sa * sb ∈ (↑y).asIdeal ∧
    (fun x => (a + b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) y *
        ↑(algebraMap R (Localizations R ↑y)) (sa * sb) =
      ↑(algebraMap R (Localizations R ↑y)) (ra * sb + rb * sa)
[PROOFSTEP]
fconstructor
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.left
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha :
  a ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
hb :
  b ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
x : { x // x ∈ U.unop }
Va : Opens ↑(PrimeSpectrum.Top R)
ma : ↑x ∈ Va
ia : Va ⟶ U.unop
ra sa : R
wa✝ :
  ∀ (x : { x // x ∈ Va }),
    ¬sa ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sa =
        ↑(algebraMap R (Localizations R ↑x)) ra
Vb : Opens ↑(PrimeSpectrum.Top R)
mb : ↑x ∈ Vb
ib : Vb ⟶ U.unop
rb sb : R
wb✝ :
  ∀ (x : { x // x ∈ Vb }),
    ¬sb ∈ (↑x).asIdeal ∧
      (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sb =
        ↑(algebraMap R (Localizations R ↑x)) rb
y : { x // x ∈ Va ⊓ Vb }
nma : ¬sa ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y)).asIdeal
wa :
  (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) sa =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) ra
nmb : ¬sb ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y)).asIdeal
wb :
  (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) sb =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) rb
⊢ ¬sa * sb ∈ (↑y).asIdeal
[PROOFSTEP]
intro H
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.left
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha :
  a ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
hb :
  b ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
x : { x // x ∈ U.unop }
Va : Opens ↑(PrimeSpectrum.Top R)
ma : ↑x ∈ Va
ia : Va ⟶ U.unop
ra sa : R
wa✝ :
  ∀ (x : { x // x ∈ Va }),
    ¬sa ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sa =
        ↑(algebraMap R (Localizations R ↑x)) ra
Vb : Opens ↑(PrimeSpectrum.Top R)
mb : ↑x ∈ Vb
ib : Vb ⟶ U.unop
rb sb : R
wb✝ :
  ∀ (x : { x // x ∈ Vb }),
    ¬sb ∈ (↑x).asIdeal ∧
      (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sb =
        ↑(algebraMap R (Localizations R ↑x)) rb
y : { x // x ∈ Va ⊓ Vb }
nma : ¬sa ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y)).asIdeal
wa :
  (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) sa =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) ra
nmb : ¬sb ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y)).asIdeal
wb :
  (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) sb =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) rb
H : sa * sb ∈ (↑y).asIdeal
⊢ False
[PROOFSTEP]
cases y.1.IsPrime.mem_or_mem H
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.left.inl
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha :
  a ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
hb :
  b ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
x : { x // x ∈ U.unop }
Va : Opens ↑(PrimeSpectrum.Top R)
ma : ↑x ∈ Va
ia : Va ⟶ U.unop
ra sa : R
wa✝ :
  ∀ (x : { x // x ∈ Va }),
    ¬sa ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sa =
        ↑(algebraMap R (Localizations R ↑x)) ra
Vb : Opens ↑(PrimeSpectrum.Top R)
mb : ↑x ∈ Vb
ib : Vb ⟶ U.unop
rb sb : R
wb✝ :
  ∀ (x : { x // x ∈ Vb }),
    ¬sb ∈ (↑x).asIdeal ∧
      (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sb =
        ↑(algebraMap R (Localizations R ↑x)) rb
y : { x // x ∈ Va ⊓ Vb }
nma : ¬sa ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y)).asIdeal
wa :
  (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) sa =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) ra
nmb : ¬sb ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y)).asIdeal
wb :
  (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) sb =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) rb
H : sa * sb ∈ (↑y).asIdeal
h✝ : sa ∈ (↑y).asIdeal
⊢ False
[PROOFSTEP]
contradiction
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.left.inr
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha :
  a ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
hb :
  b ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
x : { x // x ∈ U.unop }
Va : Opens ↑(PrimeSpectrum.Top R)
ma : ↑x ∈ Va
ia : Va ⟶ U.unop
ra sa : R
wa✝ :
  ∀ (x : { x // x ∈ Va }),
    ¬sa ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sa =
        ↑(algebraMap R (Localizations R ↑x)) ra
Vb : Opens ↑(PrimeSpectrum.Top R)
mb : ↑x ∈ Vb
ib : Vb ⟶ U.unop
rb sb : R
wb✝ :
  ∀ (x : { x // x ∈ Vb }),
    ¬sb ∈ (↑x).asIdeal ∧
      (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sb =
        ↑(algebraMap R (Localizations R ↑x)) rb
y : { x // x ∈ Va ⊓ Vb }
nma : ¬sa ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y)).asIdeal
wa :
  (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) sa =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) ra
nmb : ¬sb ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y)).asIdeal
wb :
  (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) sb =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) rb
H : sa * sb ∈ (↑y).asIdeal
h✝ : sb ∈ (↑y).asIdeal
⊢ False
[PROOFSTEP]
contradiction
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.right
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha :
  a ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
hb :
  b ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
x : { x // x ∈ U.unop }
Va : Opens ↑(PrimeSpectrum.Top R)
ma : ↑x ∈ Va
ia : Va ⟶ U.unop
ra sa : R
wa✝ :
  ∀ (x : { x // x ∈ Va }),
    ¬sa ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sa =
        ↑(algebraMap R (Localizations R ↑x)) ra
Vb : Opens ↑(PrimeSpectrum.Top R)
mb : ↑x ∈ Vb
ib : Vb ⟶ U.unop
rb sb : R
wb✝ :
  ∀ (x : { x // x ∈ Vb }),
    ¬sb ∈ (↑x).asIdeal ∧
      (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sb =
        ↑(algebraMap R (Localizations R ↑x)) rb
y : { x // x ∈ Va ⊓ Vb }
nma : ¬sa ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y)).asIdeal
wa :
  (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) sa =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) ra
nmb : ¬sb ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y)).asIdeal
wb :
  (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) sb =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) rb
⊢ (fun x => (a + b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) y *
      ↑(algebraMap R (Localizations R ↑y)) (sa * sb) =
    ↑(algebraMap R (Localizations R ↑y)) (ra * sb + rb * sa)
[PROOFSTEP]
simp only [add_mul, RingHom.map_add, Pi.add_apply, RingHom.map_mul]
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.right
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha :
  a ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
hb :
  b ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
x : { x // x ∈ U.unop }
Va : Opens ↑(PrimeSpectrum.Top R)
ma : ↑x ∈ Va
ia : Va ⟶ U.unop
ra sa : R
wa✝ :
  ∀ (x : { x // x ∈ Va }),
    ¬sa ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sa =
        ↑(algebraMap R (Localizations R ↑x)) ra
Vb : Opens ↑(PrimeSpectrum.Top R)
mb : ↑x ∈ Vb
ib : Vb ⟶ U.unop
rb sb : R
wb✝ :
  ∀ (x : { x // x ∈ Vb }),
    ¬sb ∈ (↑x).asIdeal ∧
      (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sb =
        ↑(algebraMap R (Localizations R ↑x)) rb
y : { x // x ∈ Va ⊓ Vb }
nma : ¬sa ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y)).asIdeal
wa :
  (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) sa =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) ra
nmb : ¬sb ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y)).asIdeal
wb :
  (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) sb =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) rb
⊢ a { val := ↑y, property := (_ : ↑y ∈ ↑U.unop) } *
        (↑(algebraMap R (Localizations R ↑y)) sa * ↑(algebraMap R (Localizations R ↑y)) sb) +
      b { val := ↑y, property := (_ : ↑y ∈ ↑U.unop) } *
        (↑(algebraMap R (Localizations R ↑y)) sa * ↑(algebraMap R (Localizations R ↑y)) sb) =
    ↑(algebraMap R (Localizations R ↑y)) ra * ↑(algebraMap R (Localizations R ↑y)) sb +
      ↑(algebraMap R (Localizations R ↑y)) rb * ↑(algebraMap R (Localizations R ↑y)) sa
[PROOFSTEP]
erw [← wa, ← wb]
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.right
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha :
  a ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
hb :
  b ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
x : { x // x ∈ U.unop }
Va : Opens ↑(PrimeSpectrum.Top R)
ma : ↑x ∈ Va
ia : Va ⟶ U.unop
ra sa : R
wa✝ :
  ∀ (x : { x // x ∈ Va }),
    ¬sa ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sa =
        ↑(algebraMap R (Localizations R ↑x)) ra
Vb : Opens ↑(PrimeSpectrum.Top R)
mb : ↑x ∈ Vb
ib : Vb ⟶ U.unop
rb sb : R
wb✝ :
  ∀ (x : { x // x ∈ Vb }),
    ¬sb ∈ (↑x).asIdeal ∧
      (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sb =
        ↑(algebraMap R (Localizations R ↑x)) rb
y : { x // x ∈ Va ⊓ Vb }
nma : ¬sa ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y)).asIdeal
wa :
  (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) sa =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) ra
nmb : ¬sb ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y)).asIdeal
wb :
  (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) sb =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) rb
⊢ a { val := ↑y, property := (_ : ↑y ∈ ↑U.unop) } *
        (↑(algebraMap R (Localizations R ↑y)) sa * ↑(algebraMap R (Localizations R ↑y)) sb) +
      b { val := ↑y, property := (_ : ↑y ∈ ↑U.unop) } *
        (↑(algebraMap R (Localizations R ↑y)) sa * ↑(algebraMap R (Localizations R ↑y)) sb) =
    (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
            ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y) *
          ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) sa *
        ↑(algebraMap R (Localizations R ↑y)) sb +
      (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
            ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y) *
          ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) sb *
        ↑(algebraMap R (Localizations R ↑y)) sa
[PROOFSTEP]
simp only [mul_assoc]
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.right
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha :
  a ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
hb :
  b ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
x : { x // x ∈ U.unop }
Va : Opens ↑(PrimeSpectrum.Top R)
ma : ↑x ∈ Va
ia : Va ⟶ U.unop
ra sa : R
wa✝ :
  ∀ (x : { x // x ∈ Va }),
    ¬sa ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sa =
        ↑(algebraMap R (Localizations R ↑x)) ra
Vb : Opens ↑(PrimeSpectrum.Top R)
mb : ↑x ∈ Vb
ib : Vb ⟶ U.unop
rb sb : R
wb✝ :
  ∀ (x : { x // x ∈ Vb }),
    ¬sb ∈ (↑x).asIdeal ∧
      (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sb =
        ↑(algebraMap R (Localizations R ↑x)) rb
y : { x // x ∈ Va ⊓ Vb }
nma : ¬sa ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y)).asIdeal
wa :
  (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) sa =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) ra
nmb : ¬sb ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y)).asIdeal
wb :
  (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) sb =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) rb
⊢ a { val := ↑y, property := (_ : ↑y ∈ ↑U.unop) } *
        (↑(algebraMap R (Localizations R ↑y)) sa * ↑(algebraMap R (Localizations R ↑y)) sb) +
      b { val := ↑y, property := (_ : ↑y ∈ ↑U.unop) } *
        (↑(algebraMap R (Localizations R ↑y)) sa * ↑(algebraMap R (Localizations R ↑y)) sb) =
    a { val := ↑y, property := (_ : ↑{ val := ↑y, property := (_ : ↑y ∈ ↑Va) } ∈ ↑U.unop) } *
        (↑(algebraMap R (Localizations R ↑y)) sa * ↑(algebraMap R (Localizations R ↑y)) sb) +
      b { val := ↑y, property := (_ : ↑{ val := ↑y, property := (_ : ↑y ∈ ↑Vb) } ∈ ↑U.unop) } *
        (↑(algebraMap R (Localizations R ↑y)) sb * ↑(algebraMap R (Localizations R ↑y)) sa)
[PROOFSTEP]
congr 2
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.right.e_a.e_a
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha :
  a ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
hb :
  b ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
x : { x // x ∈ U.unop }
Va : Opens ↑(PrimeSpectrum.Top R)
ma : ↑x ∈ Va
ia : Va ⟶ U.unop
ra sa : R
wa✝ :
  ∀ (x : { x // x ∈ Va }),
    ¬sa ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sa =
        ↑(algebraMap R (Localizations R ↑x)) ra
Vb : Opens ↑(PrimeSpectrum.Top R)
mb : ↑x ∈ Vb
ib : Vb ⟶ U.unop
rb sb : R
wb✝ :
  ∀ (x : { x // x ∈ Vb }),
    ¬sb ∈ (↑x).asIdeal ∧
      (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) sb =
        ↑(algebraMap R (Localizations R ↑x)) rb
y : { x // x ∈ Va ⊓ Vb }
nma : ¬sa ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y)).asIdeal
wa :
  (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) sa =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y))) ra
nmb : ¬sb ∈ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y)).asIdeal
wb :
  (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x))
        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y) *
      ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) sb =
    ↑(algebraMap R (Localizations R ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y))) rb
⊢ ↑(algebraMap R (Localizations R ↑y)) sa * ↑(algebraMap R (Localizations R ↑y)) sb =
    ↑(algebraMap R (Localizations R ↑y)) sb * ↑(algebraMap R (Localizations R ↑y)) sa
[PROOFSTEP]
rw [mul_comm]
[GOAL]
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
⊢ 0 ∈
    {
          toSubsemigroup :=
            { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
              mul_mem' :=
                (_ :
                  ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                    a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                      b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
          one_mem' :=
            (_ :
              ∀ (x : { x // x ∈ U.unop }),
                ∃ V x i,
                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                    OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) }.toSubsemigroup.carrier
[PROOFSTEP]
refine' fun x => ⟨unop U, x.2, 𝟙 _, 0, 1, fun y => ⟨_, _⟩⟩
[GOAL]
case refine'_1
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
x y : { x // x ∈ U.unop }
⊢ ¬1 ∈ (↑y).asIdeal
[PROOFSTEP]
rw [← Ideal.ne_top_iff_one]
[GOAL]
case refine'_1
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
x y : { x // x ∈ U.unop }
⊢ (↑y).asIdeal ≠ ⊤
[PROOFSTEP]
exact y.1.IsPrime.1
[GOAL]
case refine'_2
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
x y : { x // x ∈ U.unop }
⊢ (fun x => OfNat.ofNat 0 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) y *
      ↑(algebraMap R (Localizations R ↑y)) 1 =
    ↑(algebraMap R (Localizations R ↑y)) 0
[PROOFSTEP]
simp
[GOAL]
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
⊢ ∀ {x : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
    x ∈
        {
                toSubmonoid :=
                  {
                    toSubsemigroup :=
                      { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                        mul_mem' :=
                          (_ :
                            ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                              a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                  ∀ (x : { x // x ∈ U.unop }),
                                    ∃ V x i,
                                      PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                        (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                    one_mem' :=
                      (_ :
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                add_mem' :=
                  (_ :
                    ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                      a ∈
                          {
                                toSubsemigroup :=
                                  { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                                    mul_mem' :=
                                      (_ :
                                        ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                                          a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                            b ∈
                                                {f |
                                                  PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                              ∀ (x : { x // x ∈ U.unop }),
                                                ∃ V x i,
                                                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                                    (a * b)
                                                      ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                                one_mem' :=
                                  (_ :
                                    ∀ (x : { x // x ∈ U.unop }),
                                      ∃ V x i,
                                        PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                          OfNat.ofNat 1
                                            ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                                              x)) }.toSubsemigroup.carrier →
                        b ∈
                            {
                                  toSubsemigroup :=
                                    {
                                      carrier :=
                                        {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                                      mul_mem' :=
                                        (_ :
                                          ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                                            a ∈
                                                {f |
                                                  PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                              b ∈
                                                  {f |
                                                    PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate
                                                      f} →
                                                ∀ (x : { x // x ∈ U.unop }),
                                                  ∃ V x i,
                                                    PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                                      (a * b)
                                                        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                                  one_mem' :=
                                    (_ :
                                      ∀ (x : { x // x ∈ U.unop }),
                                        ∃ V x i,
                                          PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                            OfNat.ofNat 1
                                              ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                                                x)) }.toSubsemigroup.carrier →
                          ∀ (x : { x // x ∈ U.unop }),
                            ∃ V x i,
                              PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                (a + b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)),
                zero_mem' :=
                  (_ :
                    ∀ (x : { x // x ∈ U.unop }),
                      ∃ V x i,
                        PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                          OfNat.ofNat 0
                            ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                              x)) }.toSubmonoid.toSubsemigroup.carrier →
      -x ∈
        {
                toSubmonoid :=
                  {
                    toSubsemigroup :=
                      { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                        mul_mem' :=
                          (_ :
                            ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                              a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                  ∀ (x : { x // x ∈ U.unop }),
                                    ∃ V x i,
                                      PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                        (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                    one_mem' :=
                      (_ :
                        ∀ (x : { x // x ∈ U.unop }),
                          ∃ V x i,
                            PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                              OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                add_mem' :=
                  (_ :
                    ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                      a ∈
                          {
                                toSubsemigroup :=
                                  { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                                    mul_mem' :=
                                      (_ :
                                        ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                                          a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                            b ∈
                                                {f |
                                                  PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                              ∀ (x : { x // x ∈ U.unop }),
                                                ∃ V x i,
                                                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                                    (a * b)
                                                      ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                                one_mem' :=
                                  (_ :
                                    ∀ (x : { x // x ∈ U.unop }),
                                      ∃ V x i,
                                        PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                          OfNat.ofNat 1
                                            ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                                              x)) }.toSubsemigroup.carrier →
                        b ∈
                            {
                                  toSubsemigroup :=
                                    {
                                      carrier :=
                                        {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                                      mul_mem' :=
                                        (_ :
                                          ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                                            a ∈
                                                {f |
                                                  PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                              b ∈
                                                  {f |
                                                    PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate
                                                      f} →
                                                ∀ (x : { x // x ∈ U.unop }),
                                                  ∃ V x i,
                                                    PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                                      (a * b)
                                                        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                                  one_mem' :=
                                    (_ :
                                      ∀ (x : { x // x ∈ U.unop }),
                                        ∃ V x i,
                                          PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                            OfNat.ofNat 1
                                              ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                                                x)) }.toSubsemigroup.carrier →
                          ∀ (x : { x // x ∈ U.unop }),
                            ∃ V x i,
                              PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                (a + b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)),
                zero_mem' :=
                  (_ :
                    ∀ (x : { x // x ∈ U.unop }),
                      ∃ V x i,
                        PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                          OfNat.ofNat 0
                            ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                              x)) }.toSubmonoid.toSubsemigroup.carrier
[PROOFSTEP]
intro a ha x
[GOAL]
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha :
  a ∈
    {
            toSubmonoid :=
              {
                toSubsemigroup :=
                  { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                    mul_mem' :=
                      (_ :
                        ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                          a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                            b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                              ∀ (x : { x // x ∈ U.unop }),
                                ∃ V x i,
                                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                    (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                one_mem' :=
                  (_ :
                    ∀ (x : { x // x ∈ U.unop }),
                      ∃ V x i,
                        PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                          OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
            add_mem' :=
              (_ :
                ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                  a ∈
                      {
                            toSubsemigroup :=
                              { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                                mul_mem' :=
                                  (_ :
                                    ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                                      a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                        b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                          ∀ (x : { x // x ∈ U.unop }),
                                            ∃ V x i,
                                              PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                                (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                            one_mem' :=
                              (_ :
                                ∀ (x : { x // x ∈ U.unop }),
                                  ∃ V x i,
                                    PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                      OfNat.ofNat 1
                                        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                                          x)) }.toSubsemigroup.carrier →
                    b ∈
                        {
                              toSubsemigroup :=
                                { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                                  mul_mem' :=
                                    (_ :
                                      ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                                        a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                          b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                            ∀ (x : { x // x ∈ U.unop }),
                                              ∃ V x i,
                                                PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                                  (a * b)
                                                    ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                              one_mem' :=
                                (_ :
                                  ∀ (x : { x // x ∈ U.unop }),
                                    ∃ V x i,
                                      PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                        OfNat.ofNat 1
                                          ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                                            x)) }.toSubsemigroup.carrier →
                      ∀ (x : { x // x ∈ U.unop }),
                        ∃ V x i,
                          PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                            (a + b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)),
            zero_mem' :=
              (_ :
                ∀ (x : { x // x ∈ U.unop }),
                  ∃ V x i,
                    PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                      OfNat.ofNat 0
                        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                          x)) }.toSubmonoid.toSubsemigroup.carrier
x : { x // x ∈ U.unop }
⊢ ∃ V x i,
    PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
      (-a) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)
[PROOFSTEP]
rcases ha x with ⟨V, m, i, r, s, w⟩
[GOAL]
case intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha :
  a ∈
    {
            toSubmonoid :=
              {
                toSubsemigroup :=
                  { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                    mul_mem' :=
                      (_ :
                        ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                          a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                            b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                              ∀ (x : { x // x ∈ U.unop }),
                                ∃ V x i,
                                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                    (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                one_mem' :=
                  (_ :
                    ∀ (x : { x // x ∈ U.unop }),
                      ∃ V x i,
                        PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                          OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
            add_mem' :=
              (_ :
                ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                  a ∈
                      {
                            toSubsemigroup :=
                              { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                                mul_mem' :=
                                  (_ :
                                    ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                                      a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                        b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                          ∀ (x : { x // x ∈ U.unop }),
                                            ∃ V x i,
                                              PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                                (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                            one_mem' :=
                              (_ :
                                ∀ (x : { x // x ∈ U.unop }),
                                  ∃ V x i,
                                    PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                      OfNat.ofNat 1
                                        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                                          x)) }.toSubsemigroup.carrier →
                    b ∈
                        {
                              toSubsemigroup :=
                                { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                                  mul_mem' :=
                                    (_ :
                                      ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                                        a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                          b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                            ∀ (x : { x // x ∈ U.unop }),
                                              ∃ V x i,
                                                PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                                  (a * b)
                                                    ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                              one_mem' :=
                                (_ :
                                  ∀ (x : { x // x ∈ U.unop }),
                                    ∃ V x i,
                                      PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                        OfNat.ofNat 1
                                          ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                                            x)) }.toSubsemigroup.carrier →
                      ∀ (x : { x // x ∈ U.unop }),
                        ∃ V x i,
                          PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                            (a + b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)),
            zero_mem' :=
              (_ :
                ∀ (x : { x // x ∈ U.unop }),
                  ∃ V x i,
                    PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                      OfNat.ofNat 0
                        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                          x)) }.toSubmonoid.toSubsemigroup.carrier
x : { x // x ∈ U.unop }
V : Opens ↑(PrimeSpectrum.Top R)
m : ↑x ∈ V
i : V ⟶ U.unop
r s : R
w :
  ∀ (x : { x // x ∈ V }),
    ¬s ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) s =
        ↑(algebraMap R (Localizations R ↑x)) r
⊢ ∃ V x i,
    PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
      (-a) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)
[PROOFSTEP]
refine' ⟨V, m, i, -r, s, _⟩
[GOAL]
case intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha :
  a ∈
    {
            toSubmonoid :=
              {
                toSubsemigroup :=
                  { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                    mul_mem' :=
                      (_ :
                        ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                          a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                            b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                              ∀ (x : { x // x ∈ U.unop }),
                                ∃ V x i,
                                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                    (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                one_mem' :=
                  (_ :
                    ∀ (x : { x // x ∈ U.unop }),
                      ∃ V x i,
                        PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                          OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
            add_mem' :=
              (_ :
                ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                  a ∈
                      {
                            toSubsemigroup :=
                              { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                                mul_mem' :=
                                  (_ :
                                    ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                                      a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                        b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                          ∀ (x : { x // x ∈ U.unop }),
                                            ∃ V x i,
                                              PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                                (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                            one_mem' :=
                              (_ :
                                ∀ (x : { x // x ∈ U.unop }),
                                  ∃ V x i,
                                    PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                      OfNat.ofNat 1
                                        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                                          x)) }.toSubsemigroup.carrier →
                    b ∈
                        {
                              toSubsemigroup :=
                                { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                                  mul_mem' :=
                                    (_ :
                                      ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                                        a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                          b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                            ∀ (x : { x // x ∈ U.unop }),
                                              ∃ V x i,
                                                PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                                  (a * b)
                                                    ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                              one_mem' :=
                                (_ :
                                  ∀ (x : { x // x ∈ U.unop }),
                                    ∃ V x i,
                                      PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                        OfNat.ofNat 1
                                          ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                                            x)) }.toSubsemigroup.carrier →
                      ∀ (x : { x // x ∈ U.unop }),
                        ∃ V x i,
                          PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                            (a + b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)),
            zero_mem' :=
              (_ :
                ∀ (x : { x // x ∈ U.unop }),
                  ∃ V x i,
                    PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                      OfNat.ofNat 0
                        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                          x)) }.toSubmonoid.toSubsemigroup.carrier
x : { x // x ∈ U.unop }
V : Opens ↑(PrimeSpectrum.Top R)
m : ↑x ∈ V
i : V ⟶ U.unop
r s : R
w :
  ∀ (x : { x // x ∈ V }),
    ¬s ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) s =
        ↑(algebraMap R (Localizations R ↑x)) r
⊢ ∀ (x : { x // x ∈ V }),
    ¬s ∈ (↑x).asIdeal ∧
      (fun x => (-a) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) s =
        ↑(algebraMap R (Localizations R ↑x)) (-r)
[PROOFSTEP]
intro y
[GOAL]
case intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha :
  a ∈
    {
            toSubmonoid :=
              {
                toSubsemigroup :=
                  { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                    mul_mem' :=
                      (_ :
                        ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                          a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                            b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                              ∀ (x : { x // x ∈ U.unop }),
                                ∃ V x i,
                                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                    (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                one_mem' :=
                  (_ :
                    ∀ (x : { x // x ∈ U.unop }),
                      ∃ V x i,
                        PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                          OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
            add_mem' :=
              (_ :
                ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                  a ∈
                      {
                            toSubsemigroup :=
                              { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                                mul_mem' :=
                                  (_ :
                                    ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                                      a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                        b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                          ∀ (x : { x // x ∈ U.unop }),
                                            ∃ V x i,
                                              PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                                (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                            one_mem' :=
                              (_ :
                                ∀ (x : { x // x ∈ U.unop }),
                                  ∃ V x i,
                                    PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                      OfNat.ofNat 1
                                        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                                          x)) }.toSubsemigroup.carrier →
                    b ∈
                        {
                              toSubsemigroup :=
                                { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                                  mul_mem' :=
                                    (_ :
                                      ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                                        a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                          b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                            ∀ (x : { x // x ∈ U.unop }),
                                              ∃ V x i,
                                                PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                                  (a * b)
                                                    ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                              one_mem' :=
                                (_ :
                                  ∀ (x : { x // x ∈ U.unop }),
                                    ∃ V x i,
                                      PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                        OfNat.ofNat 1
                                          ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                                            x)) }.toSubsemigroup.carrier →
                      ∀ (x : { x // x ∈ U.unop }),
                        ∃ V x i,
                          PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                            (a + b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)),
            zero_mem' :=
              (_ :
                ∀ (x : { x // x ∈ U.unop }),
                  ∃ V x i,
                    PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                      OfNat.ofNat 0
                        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                          x)) }.toSubmonoid.toSubsemigroup.carrier
x : { x // x ∈ U.unop }
V : Opens ↑(PrimeSpectrum.Top R)
m : ↑x ∈ V
i : V ⟶ U.unop
r s : R
w :
  ∀ (x : { x // x ∈ V }),
    ¬s ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) s =
        ↑(algebraMap R (Localizations R ↑x)) r
y : { x // x ∈ V }
⊢ ¬s ∈ (↑y).asIdeal ∧
    (fun x => (-a) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) y *
        ↑(algebraMap R (Localizations R ↑y)) s =
      ↑(algebraMap R (Localizations R ↑y)) (-r)
[PROOFSTEP]
rcases w y with ⟨nm, w⟩
[GOAL]
case intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha :
  a ∈
    {
            toSubmonoid :=
              {
                toSubsemigroup :=
                  { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                    mul_mem' :=
                      (_ :
                        ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                          a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                            b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                              ∀ (x : { x // x ∈ U.unop }),
                                ∃ V x i,
                                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                    (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                one_mem' :=
                  (_ :
                    ∀ (x : { x // x ∈ U.unop }),
                      ∃ V x i,
                        PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                          OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
            add_mem' :=
              (_ :
                ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                  a ∈
                      {
                            toSubsemigroup :=
                              { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                                mul_mem' :=
                                  (_ :
                                    ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                                      a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                        b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                          ∀ (x : { x // x ∈ U.unop }),
                                            ∃ V x i,
                                              PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                                (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                            one_mem' :=
                              (_ :
                                ∀ (x : { x // x ∈ U.unop }),
                                  ∃ V x i,
                                    PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                      OfNat.ofNat 1
                                        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                                          x)) }.toSubsemigroup.carrier →
                    b ∈
                        {
                              toSubsemigroup :=
                                { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                                  mul_mem' :=
                                    (_ :
                                      ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                                        a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                          b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                            ∀ (x : { x // x ∈ U.unop }),
                                              ∃ V x i,
                                                PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                                  (a * b)
                                                    ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                              one_mem' :=
                                (_ :
                                  ∀ (x : { x // x ∈ U.unop }),
                                    ∃ V x i,
                                      PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                        OfNat.ofNat 1
                                          ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                                            x)) }.toSubsemigroup.carrier →
                      ∀ (x : { x // x ∈ U.unop }),
                        ∃ V x i,
                          PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                            (a + b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)),
            zero_mem' :=
              (_ :
                ∀ (x : { x // x ∈ U.unop }),
                  ∃ V x i,
                    PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                      OfNat.ofNat 0
                        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                          x)) }.toSubmonoid.toSubsemigroup.carrier
x : { x // x ∈ U.unop }
V : Opens ↑(PrimeSpectrum.Top R)
m : ↑x ∈ V
i : V ⟶ U.unop
r s : R
w✝ :
  ∀ (x : { x // x ∈ V }),
    ¬s ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) s =
        ↑(algebraMap R (Localizations R ↑x)) r
y : { x // x ∈ V }
nm : ¬s ∈ (↑y).asIdeal
w :
  (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) y * ↑(algebraMap R (Localizations R ↑y)) s =
    ↑(algebraMap R (Localizations R ↑y)) r
⊢ ¬s ∈ (↑y).asIdeal ∧
    (fun x => (-a) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) y *
        ↑(algebraMap R (Localizations R ↑y)) s =
      ↑(algebraMap R (Localizations R ↑y)) (-r)
[PROOFSTEP]
fconstructor
[GOAL]
case intro.intro.intro.intro.intro.intro.left
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha :
  a ∈
    {
            toSubmonoid :=
              {
                toSubsemigroup :=
                  { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                    mul_mem' :=
                      (_ :
                        ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                          a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                            b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                              ∀ (x : { x // x ∈ U.unop }),
                                ∃ V x i,
                                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                    (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                one_mem' :=
                  (_ :
                    ∀ (x : { x // x ∈ U.unop }),
                      ∃ V x i,
                        PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                          OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
            add_mem' :=
              (_ :
                ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                  a ∈
                      {
                            toSubsemigroup :=
                              { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                                mul_mem' :=
                                  (_ :
                                    ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                                      a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                        b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                          ∀ (x : { x // x ∈ U.unop }),
                                            ∃ V x i,
                                              PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                                (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                            one_mem' :=
                              (_ :
                                ∀ (x : { x // x ∈ U.unop }),
                                  ∃ V x i,
                                    PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                      OfNat.ofNat 1
                                        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                                          x)) }.toSubsemigroup.carrier →
                    b ∈
                        {
                              toSubsemigroup :=
                                { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                                  mul_mem' :=
                                    (_ :
                                      ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                                        a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                          b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                            ∀ (x : { x // x ∈ U.unop }),
                                              ∃ V x i,
                                                PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                                  (a * b)
                                                    ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                              one_mem' :=
                                (_ :
                                  ∀ (x : { x // x ∈ U.unop }),
                                    ∃ V x i,
                                      PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                        OfNat.ofNat 1
                                          ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                                            x)) }.toSubsemigroup.carrier →
                      ∀ (x : { x // x ∈ U.unop }),
                        ∃ V x i,
                          PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                            (a + b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)),
            zero_mem' :=
              (_ :
                ∀ (x : { x // x ∈ U.unop }),
                  ∃ V x i,
                    PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                      OfNat.ofNat 0
                        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                          x)) }.toSubmonoid.toSubsemigroup.carrier
x : { x // x ∈ U.unop }
V : Opens ↑(PrimeSpectrum.Top R)
m : ↑x ∈ V
i : V ⟶ U.unop
r s : R
w✝ :
  ∀ (x : { x // x ∈ V }),
    ¬s ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) s =
        ↑(algebraMap R (Localizations R ↑x)) r
y : { x // x ∈ V }
nm : ¬s ∈ (↑y).asIdeal
w :
  (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) y * ↑(algebraMap R (Localizations R ↑y)) s =
    ↑(algebraMap R (Localizations R ↑y)) r
⊢ ¬s ∈ (↑y).asIdeal
[PROOFSTEP]
exact nm
[GOAL]
case intro.intro.intro.intro.intro.intro.right
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha :
  a ∈
    {
            toSubmonoid :=
              {
                toSubsemigroup :=
                  { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                    mul_mem' :=
                      (_ :
                        ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                          a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                            b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                              ∀ (x : { x // x ∈ U.unop }),
                                ∃ V x i,
                                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                    (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                one_mem' :=
                  (_ :
                    ∀ (x : { x // x ∈ U.unop }),
                      ∃ V x i,
                        PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                          OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
            add_mem' :=
              (_ :
                ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                  a ∈
                      {
                            toSubsemigroup :=
                              { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                                mul_mem' :=
                                  (_ :
                                    ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                                      a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                        b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                          ∀ (x : { x // x ∈ U.unop }),
                                            ∃ V x i,
                                              PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                                (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                            one_mem' :=
                              (_ :
                                ∀ (x : { x // x ∈ U.unop }),
                                  ∃ V x i,
                                    PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                      OfNat.ofNat 1
                                        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                                          x)) }.toSubsemigroup.carrier →
                    b ∈
                        {
                              toSubsemigroup :=
                                { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                                  mul_mem' :=
                                    (_ :
                                      ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                                        a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                          b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                            ∀ (x : { x // x ∈ U.unop }),
                                              ∃ V x i,
                                                PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                                  (a * b)
                                                    ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                              one_mem' :=
                                (_ :
                                  ∀ (x : { x // x ∈ U.unop }),
                                    ∃ V x i,
                                      PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                        OfNat.ofNat 1
                                          ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                                            x)) }.toSubsemigroup.carrier →
                      ∀ (x : { x // x ∈ U.unop }),
                        ∃ V x i,
                          PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                            (a + b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)),
            zero_mem' :=
              (_ :
                ∀ (x : { x // x ∈ U.unop }),
                  ∃ V x i,
                    PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                      OfNat.ofNat 0
                        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                          x)) }.toSubmonoid.toSubsemigroup.carrier
x : { x // x ∈ U.unop }
V : Opens ↑(PrimeSpectrum.Top R)
m : ↑x ∈ V
i : V ⟶ U.unop
r s : R
w✝ :
  ∀ (x : { x // x ∈ V }),
    ¬s ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) s =
        ↑(algebraMap R (Localizations R ↑x)) r
y : { x // x ∈ V }
nm : ¬s ∈ (↑y).asIdeal
w :
  (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) y * ↑(algebraMap R (Localizations R ↑y)) s =
    ↑(algebraMap R (Localizations R ↑y)) r
⊢ (fun x => (-a) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) y *
      ↑(algebraMap R (Localizations R ↑y)) s =
    ↑(algebraMap R (Localizations R ↑y)) (-r)
[PROOFSTEP]
simp only [RingHom.map_neg, Pi.neg_apply]
[GOAL]
case intro.intro.intro.intro.intro.intro.right
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha :
  a ∈
    {
            toSubmonoid :=
              {
                toSubsemigroup :=
                  { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                    mul_mem' :=
                      (_ :
                        ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                          a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                            b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                              ∀ (x : { x // x ∈ U.unop }),
                                ∃ V x i,
                                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                    (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                one_mem' :=
                  (_ :
                    ∀ (x : { x // x ∈ U.unop }),
                      ∃ V x i,
                        PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                          OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
            add_mem' :=
              (_ :
                ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                  a ∈
                      {
                            toSubsemigroup :=
                              { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                                mul_mem' :=
                                  (_ :
                                    ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                                      a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                        b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                          ∀ (x : { x // x ∈ U.unop }),
                                            ∃ V x i,
                                              PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                                (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                            one_mem' :=
                              (_ :
                                ∀ (x : { x // x ∈ U.unop }),
                                  ∃ V x i,
                                    PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                      OfNat.ofNat 1
                                        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                                          x)) }.toSubsemigroup.carrier →
                    b ∈
                        {
                              toSubsemigroup :=
                                { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                                  mul_mem' :=
                                    (_ :
                                      ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                                        a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                          b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                            ∀ (x : { x // x ∈ U.unop }),
                                              ∃ V x i,
                                                PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                                  (a * b)
                                                    ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                              one_mem' :=
                                (_ :
                                  ∀ (x : { x // x ∈ U.unop }),
                                    ∃ V x i,
                                      PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                        OfNat.ofNat 1
                                          ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                                            x)) }.toSubsemigroup.carrier →
                      ∀ (x : { x // x ∈ U.unop }),
                        ∃ V x i,
                          PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                            (a + b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)),
            zero_mem' :=
              (_ :
                ∀ (x : { x // x ∈ U.unop }),
                  ∃ V x i,
                    PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                      OfNat.ofNat 0
                        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                          x)) }.toSubmonoid.toSubsemigroup.carrier
x : { x // x ∈ U.unop }
V : Opens ↑(PrimeSpectrum.Top R)
m : ↑x ∈ V
i : V ⟶ U.unop
r s : R
w✝ :
  ∀ (x : { x // x ∈ V }),
    ¬s ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) s =
        ↑(algebraMap R (Localizations R ↑x)) r
y : { x // x ∈ V }
nm : ¬s ∈ (↑y).asIdeal
w :
  (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) y * ↑(algebraMap R (Localizations R ↑y)) s =
    ↑(algebraMap R (Localizations R ↑y)) r
⊢ -a { val := ↑y, property := (_ : ↑y ∈ ↑U.unop) } * ↑(algebraMap R (Localizations R ↑y)) s =
    -↑(algebraMap R (Localizations R ↑y)) r
[PROOFSTEP]
erw [← w]
[GOAL]
case intro.intro.intro.intro.intro.intro.right
R : Type u
inst✝ : CommRing R
U : (Opens ↑(PrimeSpectrum.Top R))ᵒᵖ
a : (x : { x // x ∈ U.unop }) → Localizations R ↑x
ha :
  a ∈
    {
            toSubmonoid :=
              {
                toSubsemigroup :=
                  { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                    mul_mem' :=
                      (_ :
                        ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                          a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                            b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                              ∀ (x : { x // x ∈ U.unop }),
                                ∃ V x i,
                                  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                    (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                one_mem' :=
                  (_ :
                    ∀ (x : { x // x ∈ U.unop }),
                      ∃ V x i,
                        PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                          OfNat.ofNat 1 ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
            add_mem' :=
              (_ :
                ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                  a ∈
                      {
                            toSubsemigroup :=
                              { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                                mul_mem' :=
                                  (_ :
                                    ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                                      a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                        b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                          ∀ (x : { x // x ∈ U.unop }),
                                            ∃ V x i,
                                              PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                                (a * b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                            one_mem' :=
                              (_ :
                                ∀ (x : { x // x ∈ U.unop }),
                                  ∃ V x i,
                                    PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                      OfNat.ofNat 1
                                        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                                          x)) }.toSubsemigroup.carrier →
                    b ∈
                        {
                              toSubsemigroup :=
                                { carrier := {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f},
                                  mul_mem' :=
                                    (_ :
                                      ∀ {a b : (x : { x // x ∈ U.unop }) → Localizations R ↑x},
                                        a ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                          b ∈ {f | PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate f} →
                                            ∀ (x : { x // x ∈ U.unop }),
                                              ∃ V x i,
                                                PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                                  (a * b)
                                                    ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) },
                              one_mem' :=
                                (_ :
                                  ∀ (x : { x // x ∈ U.unop }),
                                    ∃ V x i,
                                      PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                                        OfNat.ofNat 1
                                          ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                                            x)) }.toSubsemigroup.carrier →
                      ∀ (x : { x // x ∈ U.unop }),
                        ∃ V x i,
                          PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                            (a + b) ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)),
            zero_mem' :=
              (_ :
                ∀ (x : { x // x ∈ U.unop }),
                  ∃ V x i,
                    PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
                      OfNat.ofNat 0
                        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) })
                          x)) }.toSubmonoid.toSubsemigroup.carrier
x : { x // x ∈ U.unop }
V : Opens ↑(PrimeSpectrum.Top R)
m : ↑x ∈ V
i : V ⟶ U.unop
r s : R
w✝ :
  ∀ (x : { x // x ∈ V }),
    ¬s ∈ (↑x).asIdeal ∧
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x *
          ↑(algebraMap R (Localizations R ↑x)) s =
        ↑(algebraMap R (Localizations R ↑x)) r
y : { x // x ∈ V }
nm : ¬s ∈ (↑y).asIdeal
w :
  (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) y * ↑(algebraMap R (Localizations R ↑y)) s =
    ↑(algebraMap R (Localizations R ↑y)) r
⊢ -a { val := ↑y, property := (_ : ↑y ∈ ↑U.unop) } * ↑(algebraMap R (Localizations R ↑y)) s =
    -((fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) y *
        ↑(algebraMap R (Localizations R ↑y)) s)
[PROOFSTEP]
simp only [neg_mul]
[GOAL]
R : Type u
inst✝ : CommRing R
f : R
U : Opens ↑(PrimeSpectrum.Top R)
hu : ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ U → f ∈ Ideal.primeCompl x.asIdeal
x : { x // x ∈ (op U).unop }
⊢ ↑(algebraMap R (Localizations R ↑x)) 0 =
    ↑0 x * ↑(algebraMap R (Localizations R ↑x)) ↑{ val := f, property := (_ : f ∈ Ideal.primeCompl (↑x).asIdeal) }
[PROOFSTEP]
erw [RingHom.map_zero, Subring.coe_zero, Pi.zero_apply, zero_mul]
[GOAL]
R : Type u
inst✝ : CommRing R
f₁ f₂ g₁ g₂ : R
U : Opens ↑(PrimeSpectrum.Top R)
hu₁ : ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ U → g₁ ∈ Ideal.primeCompl x.asIdeal
hu₂ : ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ U → g₂ ∈ Ideal.primeCompl x.asIdeal
x : { x // x ∈ (op U).unop }
⊢ ↑(const R (f₁ * f₂) (g₁ * g₂) U (_ : ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ U → g₁ * g₂ ∈ Ideal.primeCompl x.asIdeal))
      x =
    ↑(const R f₁ g₁ U hu₁ * const R f₂ g₂ U hu₂) x
[PROOFSTEP]
convert IsLocalization.mk'_mul _ f₁ f₂ ⟨g₁, hu₁ x x.2⟩ ⟨g₂, hu₂ x x.2⟩
[GOAL]
R : Type u
inst✝ : CommRing R
f₁ f₂ g₁ g₂ : R
U : Opens ↑(PrimeSpectrum.Top R)
hu₁ : ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ U → g₁ ∈ Ideal.primeCompl x.asIdeal
hu₂ : ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ U → g₂ ∈ Ideal.primeCompl x.asIdeal
h : f₁ * g₂ = f₂ * g₁
x : { x // x ∈ (op U).unop }
⊢ ↑{ val := g₁, property := (_ : g₁ ∈ Ideal.primeCompl (↑x).asIdeal) } * f₂ =
    ↑{ val := g₂, property := (_ : g₂ ∈ Ideal.primeCompl (↑x).asIdeal) } * f₁
[PROOFSTEP]
rw [mul_comm, Subtype.coe_mk, ← h, mul_comm, Subtype.coe_mk]
[GOAL]
R : Type u
inst✝ : CommRing R
f₁ f₂ g₁ g₂ : R
U : Opens ↑(PrimeSpectrum.Top R)
hu : ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ U → g₁ ∈ Ideal.primeCompl x.asIdeal
hf : f₁ = f₂
hg : g₁ = g₂
⊢ const R f₁ g₁ U hu = const R f₂ g₂ U (_ : ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ U → g₂ ∈ Ideal.primeCompl x.asIdeal)
[PROOFSTEP]
substs hf hg
[GOAL]
R : Type u
inst✝ : CommRing R
f₁ g₁ : R
U : Opens ↑(PrimeSpectrum.Top R)
hu : ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ U → g₁ ∈ Ideal.primeCompl x.asIdeal
⊢ const R f₁ g₁ U hu = const R f₁ g₁ U (_ : ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ U → g₁ ∈ Ideal.primeCompl x.asIdeal)
[PROOFSTEP]
rfl
[GOAL]
R : Type u
inst✝ : CommRing R
f g : R
U : Opens ↑(PrimeSpectrum.Top R)
hu₁ : ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ U → g ∈ Ideal.primeCompl x.asIdeal
hu₂ : ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ U → f ∈ Ideal.primeCompl x.asIdeal
⊢ const R f g U hu₁ * const R g f U hu₂ = 1
[PROOFSTEP]
rw [const_mul, const_congr R rfl (mul_comm g f), const_self]
[GOAL]
R : Type u
inst✝ : CommRing R
f g₁ g₂ : R
U : Opens ↑(PrimeSpectrum.Top R)
hu₁ : ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ U → g₁ ∈ Ideal.primeCompl x.asIdeal
hu₂ : ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ U → g₂ ∈ Ideal.primeCompl x.asIdeal
⊢ const R f g₁ U hu₁ * const R g₁ g₂ U hu₂ = const R f g₂ U hu₂
[PROOFSTEP]
rw [const_mul, const_ext]
[GOAL]
case h
R : Type u
inst✝ : CommRing R
f g₁ g₂ : R
U : Opens ↑(PrimeSpectrum.Top R)
hu₁ : ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ U → g₁ ∈ Ideal.primeCompl x.asIdeal
hu₂ : ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ U → g₂ ∈ Ideal.primeCompl x.asIdeal
⊢ f * g₁ * g₂ = f * (g₁ * g₂)
[PROOFSTEP]
rw [mul_assoc]
[GOAL]
R : Type u
inst✝ : CommRing R
f g₁ g₂ : R
U : Opens ↑(PrimeSpectrum.Top R)
hu₁ : ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ U → g₁ ∈ Ideal.primeCompl x.asIdeal
hu₂ : ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ U → g₂ ∈ Ideal.primeCompl x.asIdeal
⊢ const R g₁ g₂ U hu₂ * const R f g₁ U hu₁ = const R f g₂ U hu₂
[PROOFSTEP]
rw [mul_comm, const_mul_cancel]
[GOAL]
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
f : ↑(CommRingCat.of R)
x : { x // x ∈ (op U).unop }
y : { x // x ∈ U }
⊢ (fun x =>
          (fun x => ↑(algebraMap R (Localizations R ↑x)) f)
            ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑(op U).unop) }) x))
        y *
      ↑(algebraMap R (Localizations R ↑y)) 1 =
    ↑(algebraMap R (Localizations R ↑y)) f
[PROOFSTEP]
rw [RingHom.map_one, mul_one]
[GOAL]
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
⊢ x ∈ ⊤
[PROOFSTEP]
trivial
[GOAL]
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
x : { x // x ∈ U }
⊢ toOpen R U ≫ germ (Sheaf.presheaf (structureSheaf R)) x = toStalk R ↑x
[PROOFSTEP]
rw [← toOpen_res R ⊤ U (homOfLE le_top : U ⟶ ⊤), Category.assoc, Presheaf.germ_res]
[GOAL]
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
x : { x // x ∈ U }
⊢ toOpen R ⊤ ≫ germ (structureSheaf R).val ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑⊤) }) x) = toStalk R ↑x
[PROOFSTEP]
rfl
[GOAL]
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
x : { x // x ∈ U }
f : R
⊢ ↑(germ (Sheaf.presheaf (structureSheaf R)) x) (↑(toOpen R U) f) = ↑(toStalk R ↑x) f
[PROOFSTEP]
rw [← toOpen_germ]
[GOAL]
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
x : { x // x ∈ U }
f : R
⊢ ↑(germ (Sheaf.presheaf (structureSheaf R)) x) (↑(toOpen R U) f) =
    ↑(toOpen R U ≫ germ (Sheaf.presheaf (structureSheaf R)) x) f
[PROOFSTEP]
rfl
[GOAL]
R : Type u
inst✝ : CommRing R
f : R
⊢ ↑(toOpen R (PrimeSpectrum.basicOpen f)) f *
      const R 1 f (PrimeSpectrum.basicOpen f)
        (_ : ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ PrimeSpectrum.basicOpen f → x ∈ PrimeSpectrum.basicOpen f) =
    1
[PROOFSTEP]
rw [toOpen_eq_const, const_mul_rev]
[GOAL]
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
f : { x_1 // x_1 ∈ Ideal.primeCompl x.asIdeal }
⊢ IsUnit (↑(toStalk R x) ↑f)
[PROOFSTEP]
erw [← germ_toOpen R (PrimeSpectrum.basicOpen (f : R)) ⟨x, f.2⟩ (f : R)]
[GOAL]
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
f : { x_1 // x_1 ∈ Ideal.primeCompl x.asIdeal }
⊢ IsUnit
    (↑(germ (Sheaf.presheaf (structureSheaf R)) { val := x, property := (_ : ↑f ∈ Ideal.primeCompl x.asIdeal) })
      (↑(toOpen R (PrimeSpectrum.basicOpen ↑f)) ↑f))
[PROOFSTEP]
exact RingHom.isUnit_map _ (isUnit_to_basicOpen_self R f)
[GOAL]
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
f : R
s : { x_1 // x_1 ∈ Ideal.primeCompl x.asIdeal }
⊢ ↑(toStalk R x) f =
    ↑(toStalk R x) ↑s *
      ↑(germ (Sheaf.presheaf (structureSheaf R)) { val := x, property := (_ : ↑s ∈ Ideal.primeCompl x.asIdeal) })
        (const R f (↑s) (PrimeSpectrum.basicOpen ↑s)
          (_ : ∀ (x_1 : ↑(PrimeSpectrum.Top R)), x_1 ∈ PrimeSpectrum.basicOpen ↑s → x_1 ∈ PrimeSpectrum.basicOpen ↑s))
[PROOFSTEP]
erw [← germ_toOpen R (PrimeSpectrum.basicOpen s) ⟨x, s.2⟩, ← germ_toOpen R (PrimeSpectrum.basicOpen s) ⟨x, s.2⟩, ←
  RingHom.map_mul, toOpen_eq_const, toOpen_eq_const, const_mul_cancel']
[GOAL]
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
x : { x // x ∈ U }
s : ↑((structureSheaf R).val.obj (op U))
⊢ ↑(stalkToFiberRingHom R ↑x) (↑(germ (Sheaf.presheaf (structureSheaf R)) x) s) = ↑s x
[PROOFSTEP]
cases x
[GOAL]
case mk
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
val✝ : ↑(PrimeSpectrum.Top R)
property✝ : val✝ ∈ U
⊢ ↑(stalkToFiberRingHom R ↑{ val := val✝, property := property✝ })
      (↑(germ (Sheaf.presheaf (structureSheaf R)) { val := val✝, property := property✝ }) s) =
    ↑s { val := val✝, property := property✝ }
[PROOFSTEP]
exact stalkToFiberRingHom_germ' R U _ _ _
[GOAL]
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
⊢ toStalk R x ≫ stalkToFiberRingHom R x = algebraMap R (Localization.AtPrime x.asIdeal)
[PROOFSTEP]
erw [toStalk, Category.assoc, germ_comp_stalkToFiberRingHom]
[GOAL]
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
⊢ toOpen R ⊤ ≫
      openToLocalization R ⊤ ↑{ val := x, property := True.intro } (_ : ↑{ val := x, property := True.intro } ∈ ⊤) =
    algebraMap R (Localization.AtPrime x.asIdeal)
[PROOFSTEP]
rfl
[GOAL]
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
⊢ stalkToFiberRingHom R x ≫ localizationToStalk R x = 𝟙 (stalk (Sheaf.presheaf (structureSheaf R)) x)
[PROOFSTEP]
ext U hxU s
[GOAL]
case ih.w
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
U : Opens ↑(PrimeSpectrum.Top R)
hxU : x ∈ U
s : (forget CommRingCat).obj ((Sheaf.presheaf (structureSheaf R)).obj (op U))
⊢ ↑(germ (Sheaf.presheaf (structureSheaf R)) { val := x, property := hxU } ≫
          stalkToFiberRingHom R x ≫ localizationToStalk R x)
      s =
    ↑(germ (Sheaf.presheaf (structureSheaf R)) { val := x, property := hxU } ≫
          𝟙 (stalk (Sheaf.presheaf (structureSheaf R)) x))
      s
[PROOFSTEP]
simp only [FunctorToTypes.map_comp_apply, CommRingCat.forget_map, CommRingCat.coe_of, Category.comp_id]
[GOAL]
case ih.w
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
U : Opens ↑(PrimeSpectrum.Top R)
hxU : x ∈ U
s : (forget CommRingCat).obj ((Sheaf.presheaf (structureSheaf R)).obj (op U))
⊢ ↑(germ (Sheaf.presheaf (structureSheaf R)) { val := x, property := hxU } ≫
          stalkToFiberRingHom R x ≫ localizationToStalk R x)
      s =
    ↑(germ (Sheaf.presheaf (structureSheaf R)) { val := x, property := hxU }) s
[PROOFSTEP]
rw [comp_apply, comp_apply, stalkToFiberRingHom_germ']
[GOAL]
case ih.w
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
U : Opens ↑(PrimeSpectrum.Top R)
hxU : x ∈ U
s : (forget CommRingCat).obj ((Sheaf.presheaf (structureSheaf R)).obj (op U))
⊢ ↑(localizationToStalk R x) (↑s { val := x, property := hxU }) =
    ↑(germ (Sheaf.presheaf (structureSheaf R)) { val := x, property := hxU }) s
[PROOFSTEP]
obtain ⟨V, hxV, iVU, f, g, (hg : V ≤ PrimeSpectrum.basicOpen _), hs⟩ := exists_const _ _ s x hxU
[GOAL]
case ih.w.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
U : Opens ↑(PrimeSpectrum.Top R)
hxU : x ∈ U
s : (forget CommRingCat).obj ((Sheaf.presheaf (structureSheaf R)).obj (op U))
V : Opens ↑(PrimeSpectrum.Top R)
hxV : x ∈ V
iVU : V ⟶ U
f g : R
hg : V ≤ PrimeSpectrum.basicOpen g
hs : const R f g V hg = ↑((structureSheaf R).val.map iVU.op) s
⊢ ↑(localizationToStalk R x) (↑s { val := x, property := hxU }) =
    ↑(germ (Sheaf.presheaf (structureSheaf R)) { val := x, property := hxU }) s
[PROOFSTEP]
erw [← res_apply R U V iVU s ⟨x, hxV⟩, ← hs, const_apply, localizationToStalk_mk']
[GOAL]
case ih.w.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
U : Opens ↑(PrimeSpectrum.Top R)
hxU : x ∈ U
s : (forget CommRingCat).obj ((Sheaf.presheaf (structureSheaf R)).obj (op U))
V : Opens ↑(PrimeSpectrum.Top R)
hxV : x ∈ V
iVU : V ⟶ U
f g : R
hg : V ≤ PrimeSpectrum.basicOpen g
hs : const R f g V hg = ↑((structureSheaf R).val.map iVU.op) s
⊢ ↑(germ (Sheaf.presheaf (structureSheaf R))
          { val := x,
            property :=
              (_ :
                ↑{ val := g, property := (_ : ↑{ val := x, property := hxV } ∈ ↑(PrimeSpectrum.basicOpen ?m.680272)) } ∈
                  Ideal.primeCompl x.asIdeal) })
      (const R f
        (↑{ val := g, property := (_ : ↑{ val := x, property := hxV } ∈ ↑(PrimeSpectrum.basicOpen ?m.680272)) })
        (PrimeSpectrum.basicOpen
          ↑{ val := g, property := (_ : ↑{ val := x, property := hxV } ∈ ↑(PrimeSpectrum.basicOpen ?m.680272)) })
        (_ :
          ∀ (x_1 : ↑(PrimeSpectrum.Top R)),
            x_1 ∈
                PrimeSpectrum.basicOpen
                  ↑{ val := g,
                      property := (_ : ↑{ val := x, property := hxV } ∈ ↑(PrimeSpectrum.basicOpen ?m.680272)) } →
              x_1 ∈
                PrimeSpectrum.basicOpen
                  ↑{ val := g,
                      property := (_ : ↑{ val := x, property := hxV } ∈ ↑(PrimeSpectrum.basicOpen ?m.680272)) })) =
    ↑(germ (Sheaf.presheaf (structureSheaf R)) { val := x, property := hxU }) s
[PROOFSTEP]
refine' (structureSheaf R).presheaf.germ_ext V hxV (homOfLE hg) iVU _
[GOAL]
case ih.w.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
U : Opens ↑(PrimeSpectrum.Top R)
hxU : x ∈ U
s : (forget CommRingCat).obj ((Sheaf.presheaf (structureSheaf R)).obj (op U))
V : Opens ↑(PrimeSpectrum.Top R)
hxV : x ∈ V
iVU : V ⟶ U
f g : R
hg : V ≤ PrimeSpectrum.basicOpen g
hs : const R f g V hg = ↑((structureSheaf R).val.map iVU.op) s
⊢ ↑((Sheaf.presheaf (structureSheaf R)).map (homOfLE hg).op)
      (const R f
        (↑{ val := g, property := (_ : ↑{ val := x, property := hxV } ∈ ↑(PrimeSpectrum.basicOpen ?m.680272)) })
        (PrimeSpectrum.basicOpen
          ↑{ val := g, property := (_ : ↑{ val := x, property := hxV } ∈ ↑(PrimeSpectrum.basicOpen ?m.680272)) })
        (_ :
          ∀ (x_1 : ↑(PrimeSpectrum.Top R)),
            x_1 ∈
                PrimeSpectrum.basicOpen
                  ↑{ val := g,
                      property := (_ : ↑{ val := x, property := hxV } ∈ ↑(PrimeSpectrum.basicOpen ?m.680272)) } →
              x_1 ∈
                PrimeSpectrum.basicOpen
                  ↑{ val := g,
                      property := (_ : ↑{ val := x, property := hxV } ∈ ↑(PrimeSpectrum.basicOpen ?m.680272)) })) =
    ↑((Sheaf.presheaf (structureSheaf R)).map iVU.op) s
[PROOFSTEP]
dsimp
[GOAL]
case ih.w.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
U : Opens ↑(PrimeSpectrum.Top R)
hxU : x ∈ U
s : (forget CommRingCat).obj ((Sheaf.presheaf (structureSheaf R)).obj (op U))
V : Opens ↑(PrimeSpectrum.Top R)
hxV : x ∈ V
iVU : V ⟶ U
f g : R
hg : V ≤ PrimeSpectrum.basicOpen g
hs : const R f g V hg = ↑((structureSheaf R).val.map iVU.op) s
⊢ ↑((Sheaf.presheaf (structureSheaf R)).map (homOfLE hg).op)
      (const R f g (PrimeSpectrum.basicOpen g)
        (_ : ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ PrimeSpectrum.basicOpen g → x ∈ PrimeSpectrum.basicOpen g)) =
    ↑((Sheaf.presheaf (structureSheaf R)).map iVU.op) s
[PROOFSTEP]
erw [← hs, res_const']
[GOAL]
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
⊢ RingHom.comp (RingHom.comp (stalkToFiberRingHom R x) (localizationToStalk R x))
      (algebraMap R (Localization.AtPrime x.asIdeal)) =
    RingHom.comp (RingHom.id (Localization.AtPrime x.asIdeal)) (algebraMap R (Localization.AtPrime x.asIdeal))
[PROOFSTEP]
ext f
[GOAL]
case a
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
f : R
⊢ ↑(RingHom.comp (RingHom.comp (stalkToFiberRingHom R x) (localizationToStalk R x))
          (algebraMap R (Localization.AtPrime x.asIdeal)))
      f =
    ↑(RingHom.comp (RingHom.id (Localization.AtPrime x.asIdeal)) (algebraMap R (Localization.AtPrime x.asIdeal))) f
[PROOFSTEP]
rw [RingHom.comp_apply, RingHom.comp_apply, localizationToStalk_of, stalkToFiberRingHom_toStalk, RingHom.comp_apply,
  RingHom.id_apply]
[GOAL]
R : Type u
inst✝ : CommRing R
s f : R
g : { x // x ∈ Submonoid.powers s }
⊢ ↑(toOpen R (PrimeSpectrum.basicOpen s)) f =
    ↑(toOpen R (PrimeSpectrum.basicOpen s)) ↑g *
      const R f (↑g) (PrimeSpectrum.basicOpen s)
        (_ : ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ PrimeSpectrum.basicOpen s → ↑g ∈ Ideal.primeCompl x.asIdeal)
[PROOFSTEP]
rw [toOpen_eq_const, toOpen_eq_const, const_mul_cancel']
[GOAL]
R : Type u
inst✝ : CommRing R
f g : R
⊢ ↑(RingHom.comp (toBasicOpen R f) (algebraMap R (Localization.Away f))) g = ↑(toOpen R (PrimeSpectrum.basicOpen f)) g
[PROOFSTEP]
rw [toBasicOpen, IsLocalization.Away.lift, RingHom.comp_apply, IsLocalization.lift_eq]
[GOAL]
R : Type u
inst✝ : CommRing R
f : R
⊢ Function.Injective ↑(toBasicOpen R f)
[PROOFSTEP]
intro s t h_eq
[GOAL]
R : Type u
inst✝ : CommRing R
f : R
s t : Localization.Away f
h_eq : ↑(toBasicOpen R f) s = ↑(toBasicOpen R f) t
⊢ s = t
[PROOFSTEP]
obtain ⟨a, ⟨b, hb⟩, rfl⟩ := IsLocalization.mk'_surjective (Submonoid.powers f) s
[GOAL]
case intro.intro.mk
R : Type u
inst✝ : CommRing R
f : R
t : Localization.Away f
a b : R
hb : b ∈ Submonoid.powers f
h_eq :
  ↑(toBasicOpen R f) (IsLocalization.mk' (Localization.Away f) a { val := b, property := hb }) = ↑(toBasicOpen R f) t
⊢ IsLocalization.mk' (Localization.Away f) a { val := b, property := hb } = t
[PROOFSTEP]
obtain ⟨c, ⟨d, hd⟩, rfl⟩ := IsLocalization.mk'_surjective (Submonoid.powers f) t
[GOAL]
case intro.intro.mk.intro.intro.mk
R : Type u
inst✝ : CommRing R
f a b : R
hb : b ∈ Submonoid.powers f
c d : R
hd : d ∈ Submonoid.powers f
h_eq :
  ↑(toBasicOpen R f) (IsLocalization.mk' (Localization.Away f) a { val := b, property := hb }) =
    ↑(toBasicOpen R f) (IsLocalization.mk' (Localization.Away f) c { val := d, property := hd })
⊢ IsLocalization.mk' (Localization.Away f) a { val := b, property := hb } =
    IsLocalization.mk' (Localization.Away f) c { val := d, property := hd }
[PROOFSTEP]
simp only [toBasicOpen_mk'] at h_eq
[GOAL]
case intro.intro.mk.intro.intro.mk
R : Type u
inst✝ : CommRing R
f a b : R
hb : b ∈ Submonoid.powers f
c d : R
hd : d ∈ Submonoid.powers f
h_eq :
  const R a b (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := b, property := hb } ∈ Ideal.primeCompl x.asIdeal) =
    const R c d (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := d, property := hd } ∈ Ideal.primeCompl x.asIdeal)
⊢ IsLocalization.mk' (Localization.Away f) a { val := b, property := hb } =
    IsLocalization.mk' (Localization.Away f) c { val := d, property := hd }
[PROOFSTEP]
rw [IsLocalization.eq]
  -- We know that the fractions `a/b` and `c/d` are equal as sections of the structure sheaf on
    -- `basicOpen f`. We need to show that they agree as elements in the localization of `R` at `f`.
    -- This amounts showing that `r * (d * a) = r * (b * c)`, for some power `r = f ^ n` of `f`.
    -- We define `I` as the ideal of *all* elements `r` satisfying the above equation.
[GOAL]
case intro.intro.mk.intro.intro.mk
R : Type u
inst✝ : CommRing R
f a b : R
hb : b ∈ Submonoid.powers f
c d : R
hd : d ∈ Submonoid.powers f
h_eq :
  const R a b (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := b, property := hb } ∈ Ideal.primeCompl x.asIdeal) =
    const R c d (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := d, property := hd } ∈ Ideal.primeCompl x.asIdeal)
⊢ ∃ c_1, ↑c_1 * (↑{ val := d, property := hd } * a) = ↑c_1 * (↑{ val := b, property := hb } * c)
[PROOFSTEP]
let I : Ideal R :=
  { carrier := {r : R | r * (d * a) = r * (b * c)}
    zero_mem' := by simp only [Set.mem_setOf_eq, zero_mul]
    add_mem' := fun {r₁ r₂} hr₁ hr₂ => by dsimp at hr₁ hr₂ ⊢; simp only [add_mul, hr₁, hr₂]
    smul_mem' := fun {r₁ r₂} hr₂ => by dsimp at hr₂ ⊢; simp only [mul_assoc, hr₂] }
    -- Our claim now reduces to showing that `f` is contained in the radical of `I`
[GOAL]
R : Type u
inst✝ : CommRing R
f a b : R
hb : b ∈ Submonoid.powers f
c d : R
hd : d ∈ Submonoid.powers f
h_eq :
  const R a b (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := b, property := hb } ∈ Ideal.primeCompl x.asIdeal) =
    const R c d (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := d, property := hd } ∈ Ideal.primeCompl x.asIdeal)
r₁ r₂ : R
hr₁ : r₁ ∈ {r | r * (d * a) = r * (b * c)}
hr₂ : r₂ ∈ {r | r * (d * a) = r * (b * c)}
⊢ r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}
[PROOFSTEP]
dsimp at hr₁ hr₂ ⊢
[GOAL]
R : Type u
inst✝ : CommRing R
f a b : R
hb : b ∈ Submonoid.powers f
c d : R
hd : d ∈ Submonoid.powers f
h_eq :
  const R a b (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := b, property := hb } ∈ Ideal.primeCompl x.asIdeal) =
    const R c d (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := d, property := hd } ∈ Ideal.primeCompl x.asIdeal)
r₁ r₂ : R
hr₁ : r₁ * (d * a) = r₁ * (b * c)
hr₂ : r₂ * (d * a) = r₂ * (b * c)
⊢ (r₁ + r₂) * (d * a) = (r₁ + r₂) * (b * c)
[PROOFSTEP]
simp only [add_mul, hr₁, hr₂]
[GOAL]
R : Type u
inst✝ : CommRing R
f a b : R
hb : b ∈ Submonoid.powers f
c d : R
hd : d ∈ Submonoid.powers f
h_eq :
  const R a b (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := b, property := hb } ∈ Ideal.primeCompl x.asIdeal) =
    const R c d (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := d, property := hd } ∈ Ideal.primeCompl x.asIdeal)
⊢ 0 ∈
    { carrier := {r | r * (d * a) = r * (b * c)},
        add_mem' :=
          (_ :
            ∀ {r₁ r₂ : R},
              r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) }.carrier
[PROOFSTEP]
simp only [Set.mem_setOf_eq, zero_mul]
[GOAL]
R : Type u
inst✝ : CommRing R
f a b : R
hb : b ∈ Submonoid.powers f
c d : R
hd : d ∈ Submonoid.powers f
h_eq :
  const R a b (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := b, property := hb } ∈ Ideal.primeCompl x.asIdeal) =
    const R c d (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := d, property := hd } ∈ Ideal.primeCompl x.asIdeal)
r₁ r₂ : R
hr₂ :
  r₂ ∈
    {
          toAddSubsemigroup :=
            { carrier := {r | r * (d * a) = r * (b * c)},
              add_mem' :=
                (_ :
                  ∀ {r₁ r₂ : R},
                    r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                      r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
          zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) }.toAddSubsemigroup.carrier
⊢ r₁ • r₂ ∈
    {
          toAddSubsemigroup :=
            { carrier := {r | r * (d * a) = r * (b * c)},
              add_mem' :=
                (_ :
                  ∀ {r₁ r₂ : R},
                    r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                      r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
          zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) }.toAddSubsemigroup.carrier
[PROOFSTEP]
dsimp at hr₂ ⊢
[GOAL]
R : Type u
inst✝ : CommRing R
f a b : R
hb : b ∈ Submonoid.powers f
c d : R
hd : d ∈ Submonoid.powers f
h_eq :
  const R a b (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := b, property := hb } ∈ Ideal.primeCompl x.asIdeal) =
    const R c d (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := d, property := hd } ∈ Ideal.primeCompl x.asIdeal)
r₁ r₂ : R
hr₂ : r₂ * (d * a) = r₂ * (b * c)
⊢ r₁ * r₂ * (d * a) = r₁ * r₂ * (b * c)
[PROOFSTEP]
simp only [mul_assoc, hr₂]
[GOAL]
case intro.intro.mk.intro.intro.mk
R : Type u
inst✝ : CommRing R
f a b : R
hb : b ∈ Submonoid.powers f
c d : R
hd : d ∈ Submonoid.powers f
h_eq :
  const R a b (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := b, property := hb } ∈ Ideal.primeCompl x.asIdeal) =
    const R c d (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := d, property := hd } ∈ Ideal.primeCompl x.asIdeal)
I : Ideal R :=
  {
    toAddSubmonoid :=
      {
        toAddSubsemigroup :=
          { carrier := {r | r * (d * a) = r * (b * c)},
            add_mem' :=
              (_ :
                ∀ {r₁ r₂ : R},
                  r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                    r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
        zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) },
    smul_mem' :=
      (_ :
        ∀ {r₁ r₂ : R},
          r₂ ∈
              {
                    toAddSubsemigroup :=
                      { carrier := {r | r * (d * a) = r * (b * c)},
                        add_mem' :=
                          (_ :
                            ∀ {r₁ r₂ : R},
                              r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                                r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
                    zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) }.toAddSubsemigroup.carrier →
            r₁ • r₂ ∈
              {
                    toAddSubsemigroup :=
                      { carrier := {r | r * (d * a) = r * (b * c)},
                        add_mem' :=
                          (_ :
                            ∀ {r₁ r₂ : R},
                              r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                                r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
                    zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) }.toAddSubsemigroup.carrier) }
⊢ ∃ c_1, ↑c_1 * (↑{ val := d, property := hd } * a) = ↑c_1 * (↑{ val := b, property := hb } * c)
[PROOFSTEP]
suffices f ∈ I.radical by
  cases' this with n hn
  exact ⟨⟨f ^ n, n, rfl⟩, hn⟩
[GOAL]
R : Type u
inst✝ : CommRing R
f a b : R
hb : b ∈ Submonoid.powers f
c d : R
hd : d ∈ Submonoid.powers f
h_eq :
  const R a b (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := b, property := hb } ∈ Ideal.primeCompl x.asIdeal) =
    const R c d (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := d, property := hd } ∈ Ideal.primeCompl x.asIdeal)
I : Ideal R :=
  {
    toAddSubmonoid :=
      {
        toAddSubsemigroup :=
          { carrier := {r | r * (d * a) = r * (b * c)},
            add_mem' :=
              (_ :
                ∀ {r₁ r₂ : R},
                  r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                    r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
        zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) },
    smul_mem' :=
      (_ :
        ∀ {r₁ r₂ : R},
          r₂ ∈
              {
                    toAddSubsemigroup :=
                      { carrier := {r | r * (d * a) = r * (b * c)},
                        add_mem' :=
                          (_ :
                            ∀ {r₁ r₂ : R},
                              r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                                r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
                    zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) }.toAddSubsemigroup.carrier →
            r₁ • r₂ ∈
              {
                    toAddSubsemigroup :=
                      { carrier := {r | r * (d * a) = r * (b * c)},
                        add_mem' :=
                          (_ :
                            ∀ {r₁ r₂ : R},
                              r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                                r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
                    zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) }.toAddSubsemigroup.carrier) }
this : f ∈ Ideal.radical I
⊢ ∃ c_1, ↑c_1 * (↑{ val := d, property := hd } * a) = ↑c_1 * (↑{ val := b, property := hb } * c)
[PROOFSTEP]
cases' this with n hn
[GOAL]
case intro
R : Type u
inst✝ : CommRing R
f a b : R
hb : b ∈ Submonoid.powers f
c d : R
hd : d ∈ Submonoid.powers f
h_eq :
  const R a b (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := b, property := hb } ∈ Ideal.primeCompl x.asIdeal) =
    const R c d (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := d, property := hd } ∈ Ideal.primeCompl x.asIdeal)
I : Ideal R :=
  {
    toAddSubmonoid :=
      {
        toAddSubsemigroup :=
          { carrier := {r | r * (d * a) = r * (b * c)},
            add_mem' :=
              (_ :
                ∀ {r₁ r₂ : R},
                  r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                    r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
        zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) },
    smul_mem' :=
      (_ :
        ∀ {r₁ r₂ : R},
          r₂ ∈
              {
                    toAddSubsemigroup :=
                      { carrier := {r | r * (d * a) = r * (b * c)},
                        add_mem' :=
                          (_ :
                            ∀ {r₁ r₂ : R},
                              r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                                r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
                    zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) }.toAddSubsemigroup.carrier →
            r₁ • r₂ ∈
              {
                    toAddSubsemigroup :=
                      { carrier := {r | r * (d * a) = r * (b * c)},
                        add_mem' :=
                          (_ :
                            ∀ {r₁ r₂ : R},
                              r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                                r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
                    zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) }.toAddSubsemigroup.carrier) }
n : ℕ
hn : f ^ n ∈ I
⊢ ∃ c_1, ↑c_1 * (↑{ val := d, property := hd } * a) = ↑c_1 * (↑{ val := b, property := hb } * c)
[PROOFSTEP]
exact ⟨⟨f ^ n, n, rfl⟩, hn⟩
[GOAL]
case intro.intro.mk.intro.intro.mk
R : Type u
inst✝ : CommRing R
f a b : R
hb : b ∈ Submonoid.powers f
c d : R
hd : d ∈ Submonoid.powers f
h_eq :
  const R a b (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := b, property := hb } ∈ Ideal.primeCompl x.asIdeal) =
    const R c d (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := d, property := hd } ∈ Ideal.primeCompl x.asIdeal)
I : Ideal R :=
  {
    toAddSubmonoid :=
      {
        toAddSubsemigroup :=
          { carrier := {r | r * (d * a) = r * (b * c)},
            add_mem' :=
              (_ :
                ∀ {r₁ r₂ : R},
                  r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                    r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
        zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) },
    smul_mem' :=
      (_ :
        ∀ {r₁ r₂ : R},
          r₂ ∈
              {
                    toAddSubsemigroup :=
                      { carrier := {r | r * (d * a) = r * (b * c)},
                        add_mem' :=
                          (_ :
                            ∀ {r₁ r₂ : R},
                              r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                                r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
                    zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) }.toAddSubsemigroup.carrier →
            r₁ • r₂ ∈
              {
                    toAddSubsemigroup :=
                      { carrier := {r | r * (d * a) = r * (b * c)},
                        add_mem' :=
                          (_ :
                            ∀ {r₁ r₂ : R},
                              r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                                r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
                    zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) }.toAddSubsemigroup.carrier) }
⊢ f ∈ Ideal.radical I
[PROOFSTEP]
rw [← PrimeSpectrum.vanishingIdeal_zeroLocus_eq_radical, PrimeSpectrum.mem_vanishingIdeal]
[GOAL]
case intro.intro.mk.intro.intro.mk
R : Type u
inst✝ : CommRing R
f a b : R
hb : b ∈ Submonoid.powers f
c d : R
hd : d ∈ Submonoid.powers f
h_eq :
  const R a b (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := b, property := hb } ∈ Ideal.primeCompl x.asIdeal) =
    const R c d (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := d, property := hd } ∈ Ideal.primeCompl x.asIdeal)
I : Ideal R :=
  {
    toAddSubmonoid :=
      {
        toAddSubsemigroup :=
          { carrier := {r | r * (d * a) = r * (b * c)},
            add_mem' :=
              (_ :
                ∀ {r₁ r₂ : R},
                  r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                    r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
        zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) },
    smul_mem' :=
      (_ :
        ∀ {r₁ r₂ : R},
          r₂ ∈
              {
                    toAddSubsemigroup :=
                      { carrier := {r | r * (d * a) = r * (b * c)},
                        add_mem' :=
                          (_ :
                            ∀ {r₁ r₂ : R},
                              r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                                r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
                    zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) }.toAddSubsemigroup.carrier →
            r₁ • r₂ ∈
              {
                    toAddSubsemigroup :=
                      { carrier := {r | r * (d * a) = r * (b * c)},
                        add_mem' :=
                          (_ :
                            ∀ {r₁ r₂ : R},
                              r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                                r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
                    zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) }.toAddSubsemigroup.carrier) }
⊢ ∀ (x : PrimeSpectrum R), x ∈ PrimeSpectrum.zeroLocus ↑I → f ∈ x.asIdeal
[PROOFSTEP]
intro p hfp
[GOAL]
case intro.intro.mk.intro.intro.mk
R : Type u
inst✝ : CommRing R
f a b : R
hb : b ∈ Submonoid.powers f
c d : R
hd : d ∈ Submonoid.powers f
h_eq :
  const R a b (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := b, property := hb } ∈ Ideal.primeCompl x.asIdeal) =
    const R c d (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := d, property := hd } ∈ Ideal.primeCompl x.asIdeal)
I : Ideal R :=
  {
    toAddSubmonoid :=
      {
        toAddSubsemigroup :=
          { carrier := {r | r * (d * a) = r * (b * c)},
            add_mem' :=
              (_ :
                ∀ {r₁ r₂ : R},
                  r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                    r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
        zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) },
    smul_mem' :=
      (_ :
        ∀ {r₁ r₂ : R},
          r₂ ∈
              {
                    toAddSubsemigroup :=
                      { carrier := {r | r * (d * a) = r * (b * c)},
                        add_mem' :=
                          (_ :
                            ∀ {r₁ r₂ : R},
                              r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                                r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
                    zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) }.toAddSubsemigroup.carrier →
            r₁ • r₂ ∈
              {
                    toAddSubsemigroup :=
                      { carrier := {r | r * (d * a) = r * (b * c)},
                        add_mem' :=
                          (_ :
                            ∀ {r₁ r₂ : R},
                              r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                                r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
                    zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) }.toAddSubsemigroup.carrier) }
p : PrimeSpectrum R
hfp : p ∈ PrimeSpectrum.zeroLocus ↑I
⊢ f ∈ p.asIdeal
[PROOFSTEP]
contrapose hfp
[GOAL]
case intro.intro.mk.intro.intro.mk
R : Type u
inst✝ : CommRing R
f a b : R
hb : b ∈ Submonoid.powers f
c d : R
hd : d ∈ Submonoid.powers f
h_eq :
  const R a b (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := b, property := hb } ∈ Ideal.primeCompl x.asIdeal) =
    const R c d (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := d, property := hd } ∈ Ideal.primeCompl x.asIdeal)
I : Ideal R :=
  {
    toAddSubmonoid :=
      {
        toAddSubsemigroup :=
          { carrier := {r | r * (d * a) = r * (b * c)},
            add_mem' :=
              (_ :
                ∀ {r₁ r₂ : R},
                  r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                    r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
        zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) },
    smul_mem' :=
      (_ :
        ∀ {r₁ r₂ : R},
          r₂ ∈
              {
                    toAddSubsemigroup :=
                      { carrier := {r | r * (d * a) = r * (b * c)},
                        add_mem' :=
                          (_ :
                            ∀ {r₁ r₂ : R},
                              r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                                r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
                    zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) }.toAddSubsemigroup.carrier →
            r₁ • r₂ ∈
              {
                    toAddSubsemigroup :=
                      { carrier := {r | r * (d * a) = r * (b * c)},
                        add_mem' :=
                          (_ :
                            ∀ {r₁ r₂ : R},
                              r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                                r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
                    zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) }.toAddSubsemigroup.carrier) }
p : PrimeSpectrum R
hfp : ¬f ∈ p.asIdeal
⊢ ¬p ∈ PrimeSpectrum.zeroLocus ↑I
[PROOFSTEP]
rw [PrimeSpectrum.mem_zeroLocus, Set.not_subset]
[GOAL]
case intro.intro.mk.intro.intro.mk
R : Type u
inst✝ : CommRing R
f a b : R
hb : b ∈ Submonoid.powers f
c d : R
hd : d ∈ Submonoid.powers f
h_eq :
  const R a b (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := b, property := hb } ∈ Ideal.primeCompl x.asIdeal) =
    const R c d (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := d, property := hd } ∈ Ideal.primeCompl x.asIdeal)
I : Ideal R :=
  {
    toAddSubmonoid :=
      {
        toAddSubsemigroup :=
          { carrier := {r | r * (d * a) = r * (b * c)},
            add_mem' :=
              (_ :
                ∀ {r₁ r₂ : R},
                  r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                    r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
        zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) },
    smul_mem' :=
      (_ :
        ∀ {r₁ r₂ : R},
          r₂ ∈
              {
                    toAddSubsemigroup :=
                      { carrier := {r | r * (d * a) = r * (b * c)},
                        add_mem' :=
                          (_ :
                            ∀ {r₁ r₂ : R},
                              r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                                r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
                    zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) }.toAddSubsemigroup.carrier →
            r₁ • r₂ ∈
              {
                    toAddSubsemigroup :=
                      { carrier := {r | r * (d * a) = r * (b * c)},
                        add_mem' :=
                          (_ :
                            ∀ {r₁ r₂ : R},
                              r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                                r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
                    zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) }.toAddSubsemigroup.carrier) }
p : PrimeSpectrum R
hfp : ¬f ∈ p.asIdeal
⊢ ∃ a, a ∈ ↑I ∧ ¬a ∈ ↑p.asIdeal
[PROOFSTEP]
have := congr_fun (congr_arg Subtype.val h_eq) ⟨p, hfp⟩
[GOAL]
case intro.intro.mk.intro.intro.mk
R : Type u
inst✝ : CommRing R
f a b : R
hb : b ∈ Submonoid.powers f
c d : R
hd : d ∈ Submonoid.powers f
h_eq :
  const R a b (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := b, property := hb } ∈ Ideal.primeCompl x.asIdeal) =
    const R c d (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := d, property := hd } ∈ Ideal.primeCompl x.asIdeal)
I : Ideal R :=
  {
    toAddSubmonoid :=
      {
        toAddSubsemigroup :=
          { carrier := {r | r * (d * a) = r * (b * c)},
            add_mem' :=
              (_ :
                ∀ {r₁ r₂ : R},
                  r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                    r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
        zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) },
    smul_mem' :=
      (_ :
        ∀ {r₁ r₂ : R},
          r₂ ∈
              {
                    toAddSubsemigroup :=
                      { carrier := {r | r * (d * a) = r * (b * c)},
                        add_mem' :=
                          (_ :
                            ∀ {r₁ r₂ : R},
                              r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                                r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
                    zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) }.toAddSubsemigroup.carrier →
            r₁ • r₂ ∈
              {
                    toAddSubsemigroup :=
                      { carrier := {r | r * (d * a) = r * (b * c)},
                        add_mem' :=
                          (_ :
                            ∀ {r₁ r₂ : R},
                              r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                                r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
                    zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) }.toAddSubsemigroup.carrier) }
p : PrimeSpectrum R
hfp : ¬f ∈ p.asIdeal
this :
  ↑(const R a b (PrimeSpectrum.basicOpen f)
          (_ :
            ∀ (x : ↑(PrimeSpectrum.Top R)),
              x ∈ PrimeSpectrum.basicOpen f → ↑{ val := b, property := hb } ∈ Ideal.primeCompl x.asIdeal))
      { val := p, property := hfp } =
    ↑(const R c d (PrimeSpectrum.basicOpen f)
          (_ :
            ∀ (x : ↑(PrimeSpectrum.Top R)),
              x ∈ PrimeSpectrum.basicOpen f → ↑{ val := d, property := hd } ∈ Ideal.primeCompl x.asIdeal))
      { val := p, property := hfp }
⊢ ∃ a, a ∈ ↑I ∧ ¬a ∈ ↑p.asIdeal
[PROOFSTEP]
dsimp at this
[GOAL]
case intro.intro.mk.intro.intro.mk
R : Type u
inst✝ : CommRing R
f a b : R
hb : b ∈ Submonoid.powers f
c d : R
hd : d ∈ Submonoid.powers f
h_eq :
  const R a b (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := b, property := hb } ∈ Ideal.primeCompl x.asIdeal) =
    const R c d (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := d, property := hd } ∈ Ideal.primeCompl x.asIdeal)
I : Ideal R :=
  {
    toAddSubmonoid :=
      {
        toAddSubsemigroup :=
          { carrier := {r | r * (d * a) = r * (b * c)},
            add_mem' :=
              (_ :
                ∀ {r₁ r₂ : R},
                  r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                    r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
        zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) },
    smul_mem' :=
      (_ :
        ∀ {r₁ r₂ : R},
          r₂ ∈
              {
                    toAddSubsemigroup :=
                      { carrier := {r | r * (d * a) = r * (b * c)},
                        add_mem' :=
                          (_ :
                            ∀ {r₁ r₂ : R},
                              r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                                r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
                    zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) }.toAddSubsemigroup.carrier →
            r₁ • r₂ ∈
              {
                    toAddSubsemigroup :=
                      { carrier := {r | r * (d * a) = r * (b * c)},
                        add_mem' :=
                          (_ :
                            ∀ {r₁ r₂ : R},
                              r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                                r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
                    zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) }.toAddSubsemigroup.carrier) }
p : PrimeSpectrum R
hfp : ¬f ∈ p.asIdeal
this :
  IsLocalization.mk' (Localizations R p) a { val := b, property := (_ : b ∈ Ideal.primeCompl p.asIdeal) } =
    IsLocalization.mk' (Localizations R p) c { val := d, property := (_ : d ∈ Ideal.primeCompl p.asIdeal) }
⊢ ∃ a, a ∈ ↑I ∧ ¬a ∈ ↑p.asIdeal
[PROOFSTEP]
erw [IsLocalization.eq (S := Localization.AtPrime p.asIdeal)] at this
[GOAL]
case intro.intro.mk.intro.intro.mk
R : Type u
inst✝ : CommRing R
f a b : R
hb : b ∈ Submonoid.powers f
c d : R
hd : d ∈ Submonoid.powers f
h_eq :
  const R a b (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := b, property := hb } ∈ Ideal.primeCompl x.asIdeal) =
    const R c d (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := d, property := hd } ∈ Ideal.primeCompl x.asIdeal)
I : Ideal R :=
  {
    toAddSubmonoid :=
      {
        toAddSubsemigroup :=
          { carrier := {r | r * (d * a) = r * (b * c)},
            add_mem' :=
              (_ :
                ∀ {r₁ r₂ : R},
                  r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                    r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
        zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) },
    smul_mem' :=
      (_ :
        ∀ {r₁ r₂ : R},
          r₂ ∈
              {
                    toAddSubsemigroup :=
                      { carrier := {r | r * (d * a) = r * (b * c)},
                        add_mem' :=
                          (_ :
                            ∀ {r₁ r₂ : R},
                              r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                                r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
                    zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) }.toAddSubsemigroup.carrier →
            r₁ • r₂ ∈
              {
                    toAddSubsemigroup :=
                      { carrier := {r | r * (d * a) = r * (b * c)},
                        add_mem' :=
                          (_ :
                            ∀ {r₁ r₂ : R},
                              r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                                r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
                    zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) }.toAddSubsemigroup.carrier) }
p : PrimeSpectrum R
hfp : ¬f ∈ p.asIdeal
this :
  ∃ c_1,
    ↑c_1 * (↑{ val := d, property := (_ : d ∈ Ideal.primeCompl p.asIdeal) } * a) =
      ↑c_1 * (↑{ val := b, property := (_ : b ∈ Ideal.primeCompl p.asIdeal) } * c)
⊢ ∃ a, a ∈ ↑I ∧ ¬a ∈ ↑p.asIdeal
[PROOFSTEP]
cases' this with r hr
[GOAL]
case intro.intro.mk.intro.intro.mk.intro
R : Type u
inst✝ : CommRing R
f a b : R
hb : b ∈ Submonoid.powers f
c d : R
hd : d ∈ Submonoid.powers f
h_eq :
  const R a b (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := b, property := hb } ∈ Ideal.primeCompl x.asIdeal) =
    const R c d (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f → ↑{ val := d, property := hd } ∈ Ideal.primeCompl x.asIdeal)
I : Ideal R :=
  {
    toAddSubmonoid :=
      {
        toAddSubsemigroup :=
          { carrier := {r | r * (d * a) = r * (b * c)},
            add_mem' :=
              (_ :
                ∀ {r₁ r₂ : R},
                  r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                    r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
        zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) },
    smul_mem' :=
      (_ :
        ∀ {r₁ r₂ : R},
          r₂ ∈
              {
                    toAddSubsemigroup :=
                      { carrier := {r | r * (d * a) = r * (b * c)},
                        add_mem' :=
                          (_ :
                            ∀ {r₁ r₂ : R},
                              r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                                r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
                    zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) }.toAddSubsemigroup.carrier →
            r₁ • r₂ ∈
              {
                    toAddSubsemigroup :=
                      { carrier := {r | r * (d * a) = r * (b * c)},
                        add_mem' :=
                          (_ :
                            ∀ {r₁ r₂ : R},
                              r₁ ∈ {r | r * (d * a) = r * (b * c)} →
                                r₂ ∈ {r | r * (d * a) = r * (b * c)} → r₁ + r₂ ∈ {r | r * (d * a) = r * (b * c)}) },
                    zero_mem' := (_ : 0 * (d * a) = 0 * (b * c)) }.toAddSubsemigroup.carrier) }
p : PrimeSpectrum R
hfp : ¬f ∈ p.asIdeal
r : { x // x ∈ Ideal.primeCompl p.asIdeal }
hr :
  ↑r * (↑{ val := d, property := (_ : d ∈ Ideal.primeCompl p.asIdeal) } * a) =
    ↑r * (↑{ val := b, property := (_ : b ∈ Ideal.primeCompl p.asIdeal) } * c)
⊢ ∃ a, a ∈ ↑I ∧ ¬a ∈ ↑p.asIdeal
[PROOFSTEP]
exact ⟨r.1, hr, r.2⟩
[GOAL]
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
x : { x // x ∈ U }
⊢ ∃ f g i,
    ↑x ∈ PrimeSpectrum.basicOpen g ∧
      const R f g (PrimeSpectrum.basicOpen g)
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen g → y ∈ PrimeSpectrum.basicOpen g) =
        ↑((structureSheaf R).val.map i.op) s
[PROOFSTEP]
obtain ⟨V, hxV : x.1 ∈ V.1, iVU, f, g, hVDg : V ≤ PrimeSpectrum.basicOpen g, s_eq⟩ := exists_const R U s x.1 x.2
[GOAL]
case intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
x : { x // x ∈ U }
V : Opens ↑(PrimeSpectrum.Top R)
hxV : ↑x ∈ V.carrier
iVU : V ⟶ U
f g : R
hVDg : V ≤ PrimeSpectrum.basicOpen g
s_eq : const R f g V hVDg = ↑((structureSheaf R).val.map iVU.op) s
⊢ ∃ f g i,
    ↑x ∈ PrimeSpectrum.basicOpen g ∧
      const R f g (PrimeSpectrum.basicOpen g)
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen g → y ∈ PrimeSpectrum.basicOpen g) =
        ↑((structureSheaf R).val.map i.op) s
[PROOFSTEP]
obtain ⟨_, ⟨h, rfl⟩, hxDh, hDhV : PrimeSpectrum.basicOpen h ≤ V⟩ :=
  PrimeSpectrum.isTopologicalBasis_basic_opens.exists_subset_of_mem_open hxV
    V.2
      -- The problem is of course, that `g` and `h` don't need to coincide.
        -- But, since `basicOpen h ≤ basicOpen g`, some power of `h` must be a multiple of `g`
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
x : { x // x ∈ U }
V : Opens ↑(PrimeSpectrum.Top R)
hxV : ↑x ∈ V.carrier
iVU : V ⟶ U
f g : R
hVDg : V ≤ PrimeSpectrum.basicOpen g
s_eq : const R f g V hVDg = ↑((structureSheaf R).val.map iVU.op) s
h : R
hxDh : ↑x ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) h
hDhV : PrimeSpectrum.basicOpen h ≤ V
⊢ ∃ f g i,
    ↑x ∈ PrimeSpectrum.basicOpen g ∧
      const R f g (PrimeSpectrum.basicOpen g)
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen g → y ∈ PrimeSpectrum.basicOpen g) =
        ↑((structureSheaf R).val.map i.op) s
[PROOFSTEP]
cases' (PrimeSpectrum.basicOpen_le_basicOpen_iff h g).mp (Set.Subset.trans hDhV hVDg) with n hn
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
x : { x // x ∈ U }
V : Opens ↑(PrimeSpectrum.Top R)
hxV : ↑x ∈ V.carrier
iVU : V ⟶ U
f g : R
hVDg : V ≤ PrimeSpectrum.basicOpen g
s_eq : const R f g V hVDg = ↑((structureSheaf R).val.map iVU.op) s
h : R
hxDh : ↑x ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) h
hDhV : PrimeSpectrum.basicOpen h ≤ V
n : ℕ
hn : h ^ n ∈ Ideal.span {g}
⊢ ∃ f g i,
    ↑x ∈ PrimeSpectrum.basicOpen g ∧
      const R f g (PrimeSpectrum.basicOpen g)
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen g → y ∈ PrimeSpectrum.basicOpen g) =
        ↑((structureSheaf R).val.map i.op) s
[PROOFSTEP]
replace hn := Ideal.mul_mem_left (Ideal.span { g }) h hn
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
x : { x // x ∈ U }
V : Opens ↑(PrimeSpectrum.Top R)
hxV : ↑x ∈ V.carrier
iVU : V ⟶ U
f g : R
hVDg : V ≤ PrimeSpectrum.basicOpen g
s_eq : const R f g V hVDg = ↑((structureSheaf R).val.map iVU.op) s
h : R
hxDh : ↑x ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) h
hDhV : PrimeSpectrum.basicOpen h ≤ V
n : ℕ
hn : h * h ^ n ∈ Ideal.span {g}
⊢ ∃ f g i,
    ↑x ∈ PrimeSpectrum.basicOpen g ∧
      const R f g (PrimeSpectrum.basicOpen g)
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen g → y ∈ PrimeSpectrum.basicOpen g) =
        ↑((structureSheaf R).val.map i.op) s
[PROOFSTEP]
rw [← pow_succ, Ideal.mem_span_singleton'] at hn
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
x : { x // x ∈ U }
V : Opens ↑(PrimeSpectrum.Top R)
hxV : ↑x ∈ V.carrier
iVU : V ⟶ U
f g : R
hVDg : V ≤ PrimeSpectrum.basicOpen g
s_eq : const R f g V hVDg = ↑((structureSheaf R).val.map iVU.op) s
h : R
hxDh : ↑x ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) h
hDhV : PrimeSpectrum.basicOpen h ≤ V
n : ℕ
hn : ∃ a, a * g = h ^ (n + 1)
⊢ ∃ f g i,
    ↑x ∈ PrimeSpectrum.basicOpen g ∧
      const R f g (PrimeSpectrum.basicOpen g)
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen g → y ∈ PrimeSpectrum.basicOpen g) =
        ↑((structureSheaf R).val.map i.op) s
[PROOFSTEP]
cases' hn with c hc
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
x : { x // x ∈ U }
V : Opens ↑(PrimeSpectrum.Top R)
hxV : ↑x ∈ V.carrier
iVU : V ⟶ U
f g : R
hVDg : V ≤ PrimeSpectrum.basicOpen g
s_eq : const R f g V hVDg = ↑((structureSheaf R).val.map iVU.op) s
h : R
hxDh : ↑x ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) h
hDhV : PrimeSpectrum.basicOpen h ≤ V
n : ℕ
c : R
hc : c * g = h ^ (n + 1)
⊢ ∃ f g i,
    ↑x ∈ PrimeSpectrum.basicOpen g ∧
      const R f g (PrimeSpectrum.basicOpen g)
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen g → y ∈ PrimeSpectrum.basicOpen g) =
        ↑((structureSheaf R).val.map i.op) s
[PROOFSTEP]
have basic_opens_eq := PrimeSpectrum.basicOpen_pow h (n + 1) (by linarith)
[GOAL]
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
x : { x // x ∈ U }
V : Opens ↑(PrimeSpectrum.Top R)
hxV : ↑x ∈ V.carrier
iVU : V ⟶ U
f g : R
hVDg : V ≤ PrimeSpectrum.basicOpen g
s_eq : const R f g V hVDg = ↑((structureSheaf R).val.map iVU.op) s
h : R
hxDh : ↑x ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) h
hDhV : PrimeSpectrum.basicOpen h ≤ V
n : ℕ
c : R
hc : c * g = h ^ (n + 1)
⊢ 0 < n + 1
[PROOFSTEP]
linarith
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
x : { x // x ∈ U }
V : Opens ↑(PrimeSpectrum.Top R)
hxV : ↑x ∈ V.carrier
iVU : V ⟶ U
f g : R
hVDg : V ≤ PrimeSpectrum.basicOpen g
s_eq : const R f g V hVDg = ↑((structureSheaf R).val.map iVU.op) s
h : R
hxDh : ↑x ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) h
hDhV : PrimeSpectrum.basicOpen h ≤ V
n : ℕ
c : R
hc : c * g = h ^ (n + 1)
basic_opens_eq : PrimeSpectrum.basicOpen (h ^ (n + 1)) = PrimeSpectrum.basicOpen h
⊢ ∃ f g i,
    ↑x ∈ PrimeSpectrum.basicOpen g ∧
      const R f g (PrimeSpectrum.basicOpen g)
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen g → y ∈ PrimeSpectrum.basicOpen g) =
        ↑((structureSheaf R).val.map i.op) s
[PROOFSTEP]
have i_basic_open := eqToHom basic_opens_eq ≫ homOfLE hDhV
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
x : { x // x ∈ U }
V : Opens ↑(PrimeSpectrum.Top R)
hxV : ↑x ∈ V.carrier
iVU : V ⟶ U
f g : R
hVDg : V ≤ PrimeSpectrum.basicOpen g
s_eq : const R f g V hVDg = ↑((structureSheaf R).val.map iVU.op) s
h : R
hxDh : ↑x ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) h
hDhV : PrimeSpectrum.basicOpen h ≤ V
n : ℕ
c : R
hc : c * g = h ^ (n + 1)
basic_opens_eq : PrimeSpectrum.basicOpen (h ^ (n + 1)) = PrimeSpectrum.basicOpen h
i_basic_open : PrimeSpectrum.basicOpen (h ^ (n + 1)) ⟶ V
⊢ ∃ f g i,
    ↑x ∈ PrimeSpectrum.basicOpen g ∧
      const R f g (PrimeSpectrum.basicOpen g)
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen g → y ∈ PrimeSpectrum.basicOpen g) =
        ↑((structureSheaf R).val.map i.op) s
[PROOFSTEP]
use f * c, h ^ (n + 1), i_basic_open ≫ iVU, (basic_opens_eq.symm.le : _) hxDh
[GOAL]
case right
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
x : { x // x ∈ U }
V : Opens ↑(PrimeSpectrum.Top R)
hxV : ↑x ∈ V.carrier
iVU : V ⟶ U
f g : R
hVDg : V ≤ PrimeSpectrum.basicOpen g
s_eq : const R f g V hVDg = ↑((structureSheaf R).val.map iVU.op) s
h : R
hxDh : ↑x ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) h
hDhV : PrimeSpectrum.basicOpen h ≤ V
n : ℕ
c : R
hc : c * g = h ^ (n + 1)
basic_opens_eq : PrimeSpectrum.basicOpen (h ^ (n + 1)) = PrimeSpectrum.basicOpen h
i_basic_open : PrimeSpectrum.basicOpen (h ^ (n + 1)) ⟶ V
⊢ const R (f * c) (h ^ (n + 1)) (PrimeSpectrum.basicOpen (h ^ (n + 1)))
      (_ :
        ∀ (y : ↑(PrimeSpectrum.Top R)),
          y ∈ PrimeSpectrum.basicOpen (h ^ (n + 1)) → y ∈ PrimeSpectrum.basicOpen (h ^ (n + 1))) =
    ↑((structureSheaf R).val.map (i_basic_open ≫ iVU).op) s
[PROOFSTEP]
rw [op_comp, Functor.map_comp]
  --, comp_apply, ← s_eq, res_const]
    -- Porting note : `comp_apply` can't be rewritten, so use a change
[GOAL]
case right
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
x : { x // x ∈ U }
V : Opens ↑(PrimeSpectrum.Top R)
hxV : ↑x ∈ V.carrier
iVU : V ⟶ U
f g : R
hVDg : V ≤ PrimeSpectrum.basicOpen g
s_eq : const R f g V hVDg = ↑((structureSheaf R).val.map iVU.op) s
h : R
hxDh : ↑x ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) h
hDhV : PrimeSpectrum.basicOpen h ≤ V
n : ℕ
c : R
hc : c * g = h ^ (n + 1)
basic_opens_eq : PrimeSpectrum.basicOpen (h ^ (n + 1)) = PrimeSpectrum.basicOpen h
i_basic_open : PrimeSpectrum.basicOpen (h ^ (n + 1)) ⟶ V
⊢ const R (f * c) (h ^ (n + 1)) (PrimeSpectrum.basicOpen (h ^ (n + 1)))
      (_ :
        ∀ (y : ↑(PrimeSpectrum.Top R)),
          y ∈ PrimeSpectrum.basicOpen (h ^ (n + 1)) → y ∈ PrimeSpectrum.basicOpen (h ^ (n + 1))) =
    ↑((structureSheaf R).val.map iVU.op ≫ (structureSheaf R).val.map i_basic_open.op) s
[PROOFSTEP]
change const R _ _ _ _ = (structureSheaf R).1.map i_basic_open.op ((structureSheaf R).1.map iVU.op s)
[GOAL]
case right
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
x : { x // x ∈ U }
V : Opens ↑(PrimeSpectrum.Top R)
hxV : ↑x ∈ V.carrier
iVU : V ⟶ U
f g : R
hVDg : V ≤ PrimeSpectrum.basicOpen g
s_eq : const R f g V hVDg = ↑((structureSheaf R).val.map iVU.op) s
h : R
hxDh : ↑x ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) h
hDhV : PrimeSpectrum.basicOpen h ≤ V
n : ℕ
c : R
hc : c * g = h ^ (n + 1)
basic_opens_eq : PrimeSpectrum.basicOpen (h ^ (n + 1)) = PrimeSpectrum.basicOpen h
i_basic_open : PrimeSpectrum.basicOpen (h ^ (n + 1)) ⟶ V
⊢ const R (f * c) (h ^ (n + 1)) (PrimeSpectrum.basicOpen (h ^ (n + 1)))
      (_ :
        ∀ (y : ↑(PrimeSpectrum.Top R)),
          y ∈ PrimeSpectrum.basicOpen (h ^ (n + 1)) → y ∈ PrimeSpectrum.basicOpen (h ^ (n + 1))) =
    ↑((structureSheaf R).val.map i_basic_open.op) (↑((structureSheaf R).val.map iVU.op) s)
[PROOFSTEP]
rw [← s_eq, res_const]
  -- Note that the last rewrite here generated an additional goal, which was a parameter
    -- of `res_const`. We prove this goal first
[GOAL]
case right
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
x : { x // x ∈ U }
V : Opens ↑(PrimeSpectrum.Top R)
hxV : ↑x ∈ V.carrier
iVU : V ⟶ U
f g : R
hVDg : V ≤ PrimeSpectrum.basicOpen g
s_eq : const R f g V hVDg = ↑((structureSheaf R).val.map iVU.op) s
h : R
hxDh : ↑x ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) h
hDhV : PrimeSpectrum.basicOpen h ≤ V
n : ℕ
c : R
hc : c * g = h ^ (n + 1)
basic_opens_eq : PrimeSpectrum.basicOpen (h ^ (n + 1)) = PrimeSpectrum.basicOpen h
i_basic_open : PrimeSpectrum.basicOpen (h ^ (n + 1)) ⟶ V
⊢ const R (f * c) (h ^ (n + 1)) (PrimeSpectrum.basicOpen (h ^ (n + 1)))
      (_ :
        ∀ (y : ↑(PrimeSpectrum.Top R)),
          y ∈ PrimeSpectrum.basicOpen (h ^ (n + 1)) → y ∈ PrimeSpectrum.basicOpen (h ^ (n + 1))) =
    const R f g (PrimeSpectrum.basicOpen (h ^ (n + 1))) ?right.hv
case right.hv
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
x : { x // x ∈ U }
V : Opens ↑(PrimeSpectrum.Top R)
hxV : ↑x ∈ V.carrier
iVU : V ⟶ U
f g : R
hVDg : V ≤ PrimeSpectrum.basicOpen g
s_eq : const R f g V hVDg = ↑((structureSheaf R).val.map iVU.op) s
h : R
hxDh : ↑x ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) h
hDhV : PrimeSpectrum.basicOpen h ≤ V
n : ℕ
c : R
hc : c * g = h ^ (n + 1)
basic_opens_eq : PrimeSpectrum.basicOpen (h ^ (n + 1)) = PrimeSpectrum.basicOpen h
i_basic_open : PrimeSpectrum.basicOpen (h ^ (n + 1)) ⟶ V
⊢ ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ PrimeSpectrum.basicOpen (h ^ (n + 1)) → g ∈ Ideal.primeCompl x.asIdeal
[PROOFSTEP]
swap
[GOAL]
case right.hv
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
x : { x // x ∈ U }
V : Opens ↑(PrimeSpectrum.Top R)
hxV : ↑x ∈ V.carrier
iVU : V ⟶ U
f g : R
hVDg : V ≤ PrimeSpectrum.basicOpen g
s_eq : const R f g V hVDg = ↑((structureSheaf R).val.map iVU.op) s
h : R
hxDh : ↑x ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) h
hDhV : PrimeSpectrum.basicOpen h ≤ V
n : ℕ
c : R
hc : c * g = h ^ (n + 1)
basic_opens_eq : PrimeSpectrum.basicOpen (h ^ (n + 1)) = PrimeSpectrum.basicOpen h
i_basic_open : PrimeSpectrum.basicOpen (h ^ (n + 1)) ⟶ V
⊢ ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ PrimeSpectrum.basicOpen (h ^ (n + 1)) → g ∈ Ideal.primeCompl x.asIdeal
[PROOFSTEP]
intro y hy
[GOAL]
case right.hv
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
x : { x // x ∈ U }
V : Opens ↑(PrimeSpectrum.Top R)
hxV : ↑x ∈ V.carrier
iVU : V ⟶ U
f g : R
hVDg : V ≤ PrimeSpectrum.basicOpen g
s_eq : const R f g V hVDg = ↑((structureSheaf R).val.map iVU.op) s
h : R
hxDh : ↑x ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) h
hDhV : PrimeSpectrum.basicOpen h ≤ V
n : ℕ
c : R
hc : c * g = h ^ (n + 1)
basic_opens_eq : PrimeSpectrum.basicOpen (h ^ (n + 1)) = PrimeSpectrum.basicOpen h
i_basic_open : PrimeSpectrum.basicOpen (h ^ (n + 1)) ⟶ V
y : ↑(PrimeSpectrum.Top R)
hy : y ∈ PrimeSpectrum.basicOpen (h ^ (n + 1))
⊢ g ∈ Ideal.primeCompl y.asIdeal
[PROOFSTEP]
rw [basic_opens_eq] at hy
[GOAL]
case right.hv
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
x : { x // x ∈ U }
V : Opens ↑(PrimeSpectrum.Top R)
hxV : ↑x ∈ V.carrier
iVU : V ⟶ U
f g : R
hVDg : V ≤ PrimeSpectrum.basicOpen g
s_eq : const R f g V hVDg = ↑((structureSheaf R).val.map iVU.op) s
h : R
hxDh : ↑x ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) h
hDhV : PrimeSpectrum.basicOpen h ≤ V
n : ℕ
c : R
hc : c * g = h ^ (n + 1)
basic_opens_eq : PrimeSpectrum.basicOpen (h ^ (n + 1)) = PrimeSpectrum.basicOpen h
i_basic_open : PrimeSpectrum.basicOpen (h ^ (n + 1)) ⟶ V
y : ↑(PrimeSpectrum.Top R)
hy : y ∈ PrimeSpectrum.basicOpen h
⊢ g ∈ Ideal.primeCompl y.asIdeal
[PROOFSTEP]
exact (Set.Subset.trans hDhV hVDg : _) hy
[GOAL]
case right
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
x : { x // x ∈ U }
V : Opens ↑(PrimeSpectrum.Top R)
hxV : ↑x ∈ V.carrier
iVU : V ⟶ U
f g : R
hVDg : V ≤ PrimeSpectrum.basicOpen g
s_eq : const R f g V hVDg = ↑((structureSheaf R).val.map iVU.op) s
h : R
hxDh : ↑x ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) h
hDhV : PrimeSpectrum.basicOpen h ≤ V
n : ℕ
c : R
hc : c * g = h ^ (n + 1)
basic_opens_eq : PrimeSpectrum.basicOpen (h ^ (n + 1)) = PrimeSpectrum.basicOpen h
i_basic_open : PrimeSpectrum.basicOpen (h ^ (n + 1)) ⟶ V
⊢ const R (f * c) (h ^ (n + 1)) (PrimeSpectrum.basicOpen (h ^ (n + 1)))
      (_ :
        ∀ (y : ↑(PrimeSpectrum.Top R)),
          y ∈ PrimeSpectrum.basicOpen (h ^ (n + 1)) → y ∈ PrimeSpectrum.basicOpen (h ^ (n + 1))) =
    const R f g (PrimeSpectrum.basicOpen (h ^ (n + 1)))
      (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h ^ (n + 1)) → y ∈ ↑(PrimeSpectrum.basicOpen g))
[PROOFSTEP]
apply const_ext
[GOAL]
case right.h
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
x : { x // x ∈ U }
V : Opens ↑(PrimeSpectrum.Top R)
hxV : ↑x ∈ V.carrier
iVU : V ⟶ U
f g : R
hVDg : V ≤ PrimeSpectrum.basicOpen g
s_eq : const R f g V hVDg = ↑((structureSheaf R).val.map iVU.op) s
h : R
hxDh : ↑x ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) h
hDhV : PrimeSpectrum.basicOpen h ≤ V
n : ℕ
c : R
hc : c * g = h ^ (n + 1)
basic_opens_eq : PrimeSpectrum.basicOpen (h ^ (n + 1)) = PrimeSpectrum.basicOpen h
i_basic_open : PrimeSpectrum.basicOpen (h ^ (n + 1)) ⟶ V
⊢ f * c * g = f * h ^ (n + 1)
[PROOFSTEP]
rw [mul_assoc f c g, hc]
[GOAL]
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
⊢ ∃ a' h' iDh',
    U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h' i) ∧
      (∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a' i * h' j = h' i * a' j) ∧
        ∀ (i : ι),
          i ∈ t →
            ↑((structureSheaf R).val.map (iDh' i).op) s =
              const R (a' i) (h' i) (PrimeSpectrum.basicOpen (h' i))
                (_ :
                  ∀ (y : ↑(PrimeSpectrum.Top R)),
                    y ∈ PrimeSpectrum.basicOpen (h' i) → y ∈ PrimeSpectrum.basicOpen (h' i))
[PROOFSTEP]
have fractions_eq :
  ∀ i j : ι,
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j) ⟨h i * h j, Submonoid.mem_powers _⟩ =
      IsLocalization.mk' _ (h i * a j) ⟨h i * h j, Submonoid.mem_powers _⟩ :=
  by
  intro i j
  let D := PrimeSpectrum.basicOpen (h i * h j)
  let iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE (PrimeSpectrum.basicOpen_mul_le_left _ _)
  let iDj : D ⟶ PrimeSpectrum.basicOpen (h j) :=
    homOfLE
      (PrimeSpectrum.basicOpen_mul_le_right _ _)
        -- Crucially, we need injectivity of `toBasicOpen`
  apply toBasicOpen_injective R (h i * h j)
  rw [toBasicOpen_mk', toBasicOpen_mk']
  simp only []
    -- Here, both sides of the equation are equal to a restriction of `s`
  trans
  convert congr_arg ((structureSheaf R).1.map iDj.op) (hs j).symm using 1
  convert congr_arg ((structureSheaf R).1.map iDi.op) (hs i) using 1; swap
  all_goals rw [res_const]; apply const_ext;
    ring
      -- The remaining two goals were generated during the rewrite of `res_const`
          -- These can be solved immediately
  exacts [PrimeSpectrum.basicOpen_mul_le_right _ _, PrimeSpectrum.basicOpen_mul_le_left _ _]
    -- From the equality in the localization, we obtain for each `(i,j)` some power `(h i * h j) ^ n`
      -- which equalizes `a i * h j` and `h i * a j`
[GOAL]
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
⊢ ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
[PROOFSTEP]
intro i j
[GOAL]
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
i j : ι
⊢ IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
      { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
    IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
      { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
[PROOFSTEP]
let D := PrimeSpectrum.basicOpen (h i * h j)
[GOAL]
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
⊢ IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
      { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
    IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
      { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
[PROOFSTEP]
let iDi : D ⟶ PrimeSpectrum.basicOpen (h i) := homOfLE (PrimeSpectrum.basicOpen_mul_le_left _ _)
[GOAL]
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h i))
⊢ IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
      { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
    IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
      { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
[PROOFSTEP]
let iDj : D ⟶ PrimeSpectrum.basicOpen (h j) :=
  homOfLE
    (PrimeSpectrum.basicOpen_mul_le_right _ _)
      -- Crucially, we need injectivity of `toBasicOpen`
[GOAL]
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h i))
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h j))
⊢ IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
      { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
    IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
      { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
[PROOFSTEP]
apply toBasicOpen_injective R (h i * h j)
[GOAL]
case a
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h i))
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h j))
⊢ ↑(toBasicOpen R (h i * h j))
      (IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }) =
    ↑(toBasicOpen R (h i * h j))
      (IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) })
[PROOFSTEP]
rw [toBasicOpen_mk', toBasicOpen_mk']
[GOAL]
case a
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h i))
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h j))
⊢ const R (a i * h j) (↑{ val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) })
      (PrimeSpectrum.basicOpen (h i * h j))
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen (h i * h j) →
            ↑{ val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } ∈
              Ideal.primeCompl x.asIdeal) =
    const R (h i * a j) (↑{ val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) })
      (PrimeSpectrum.basicOpen (h i * h j))
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen (h i * h j) →
            ↑{ val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } ∈
              Ideal.primeCompl x.asIdeal)
[PROOFSTEP]
simp only []
  -- Here, both sides of the equation are equal to a restriction of `s`
[GOAL]
case a
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h i))
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h j))
⊢ const R (a i * h j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j))
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen (h i * h j) →
            ↑{ val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } ∈
              Ideal.primeCompl x.asIdeal) =
    const R (h i * a j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j))
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen (h i * h j) →
            ↑{ val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } ∈
              Ideal.primeCompl x.asIdeal)
[PROOFSTEP]
trans
[GOAL]
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h i))
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h j))
⊢ const R (a i * h j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j))
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen (h i * h j) →
            ↑{ val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } ∈
              Ideal.primeCompl x.asIdeal) =
    ?m.984852
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h i))
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h j))
⊢ ?m.984852 =
    const R (h i * a j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j))
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen (h i * h j) →
            ↑{ val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } ∈
              Ideal.primeCompl x.asIdeal)
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h i))
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h j))
⊢ ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen (h i * h j))))
[PROOFSTEP]
convert congr_arg ((structureSheaf R).1.map iDj.op) (hs j).symm using 1
[GOAL]
case h.e'_2
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h i))
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h j))
⊢ const R (a i * h j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j))
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen (h i * h j) →
            ↑{ val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } ∈
              Ideal.primeCompl x.asIdeal) =
    ↑((structureSheaf R).val.map iDj.op) (↑((structureSheaf R).val.map (iDh j).op) s)
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h i))
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h j))
⊢ ↑((structureSheaf R).val.map iDj.op)
      (const R (a j) (h j) (PrimeSpectrum.basicOpen (h j))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h j) → y ∈ PrimeSpectrum.basicOpen (h j))) =
    const R (h i * a j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j))
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen (h i * h j) →
            ↑{ val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } ∈
              Ideal.primeCompl x.asIdeal)
[PROOFSTEP]
convert congr_arg ((structureSheaf R).1.map iDi.op) (hs i) using 1
[GOAL]
case h.e'_2
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h i))
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h j))
⊢ const R (a i * h j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j))
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen (h i * h j) →
            ↑{ val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } ∈
              Ideal.primeCompl x.asIdeal) =
    ↑((structureSheaf R).val.map iDi.op)
      (const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)))
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h i))
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h j))
⊢ ↑((structureSheaf R).val.map iDj.op)
      (const R (a j) (h j) (PrimeSpectrum.basicOpen (h j))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h j) → y ∈ PrimeSpectrum.basicOpen (h j))) =
    const R (h i * a j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j))
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen (h i * h j) →
            ↑{ val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } ∈
              Ideal.primeCompl x.asIdeal)
[PROOFSTEP]
swap
[GOAL]
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h i))
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h j))
⊢ ↑((structureSheaf R).val.map iDj.op)
      (const R (a j) (h j) (PrimeSpectrum.basicOpen (h j))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h j) → y ∈ PrimeSpectrum.basicOpen (h j))) =
    const R (h i * a j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j))
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen (h i * h j) →
            ↑{ val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } ∈
              Ideal.primeCompl x.asIdeal)
case h.e'_2
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h i))
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h j))
⊢ const R (a i * h j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j))
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen (h i * h j) →
            ↑{ val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } ∈
              Ideal.primeCompl x.asIdeal) =
    ↑((structureSheaf R).val.map iDi.op)
      (const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)))
[PROOFSTEP]
all_goals rw [res_const]; apply const_ext;
  ring
    -- The remaining two goals were generated during the rewrite of `res_const`
        -- These can be solved immediately
[GOAL]
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h i))
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h j))
⊢ ↑((structureSheaf R).val.map iDj.op)
      (const R (a j) (h j) (PrimeSpectrum.basicOpen (h j))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h j) → y ∈ PrimeSpectrum.basicOpen (h j))) =
    const R (h i * a j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j))
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen (h i * h j) →
            ↑{ val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } ∈
              Ideal.primeCompl x.asIdeal)
[PROOFSTEP]
rw [res_const]
[GOAL]
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h i))
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h j))
⊢ const R (a j) (h j) D ?hv =
    const R (h i * a j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j))
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen (h i * h j) →
            ↑{ val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } ∈
              Ideal.primeCompl x.asIdeal)
case hv
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h i))
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h j))
⊢ ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ D → h j ∈ Ideal.primeCompl x.asIdeal
[PROOFSTEP]
apply const_ext
[GOAL]
case h
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h i))
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h j))
⊢ a j * (h i * h j) = h i * a j * h j
case hv
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h i))
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h j))
⊢ ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ D → h j ∈ Ideal.primeCompl x.asIdeal
[PROOFSTEP]
ring
  -- The remaining two goals were generated during the rewrite of `res_const`
      -- These can be solved immediately
[GOAL]
case h.e'_2
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h i))
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h j))
⊢ const R (a i * h j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j))
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen (h i * h j) →
            ↑{ val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } ∈
              Ideal.primeCompl x.asIdeal) =
    ↑((structureSheaf R).val.map iDi.op)
      (const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)))
[PROOFSTEP]
rw [res_const]
[GOAL]
case h.e'_2
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h i))
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h j))
⊢ const R (a i * h j) (h i * h j) (PrimeSpectrum.basicOpen (h i * h j))
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen (h i * h j) →
            ↑{ val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } ∈
              Ideal.primeCompl x.asIdeal) =
    const R (a i) (h i) D ?h.e'_2.hv
case h.e'_2.hv
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h i))
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h j))
⊢ ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ D → h i ∈ Ideal.primeCompl x.asIdeal
[PROOFSTEP]
apply const_ext
[GOAL]
case h.e'_2.h
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h i))
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h j))
⊢ a i * h j * h i = a i * (h i * h j)
case h.e'_2.hv
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h i))
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h j))
⊢ ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ D → h i ∈ Ideal.primeCompl x.asIdeal
[PROOFSTEP]
ring
  -- The remaining two goals were generated during the rewrite of `res_const`
      -- These can be solved immediately
[GOAL]
case hv
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h i))
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h j))
⊢ ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ D → h j ∈ Ideal.primeCompl x.asIdeal
case h.e'_2.hv
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
i j : ι
D : Opens (PrimeSpectrum R) := PrimeSpectrum.basicOpen (h i * h j)
iDi : D ⟶ PrimeSpectrum.basicOpen (h i) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h i))
iDj : D ⟶ PrimeSpectrum.basicOpen (h j) :=
  homOfLE (_ : PrimeSpectrum.basicOpen (h i * h j) ≤ PrimeSpectrum.basicOpen (h j))
⊢ ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ D → h i ∈ Ideal.primeCompl x.asIdeal
[PROOFSTEP]
exacts [PrimeSpectrum.basicOpen_mul_le_right _ _, PrimeSpectrum.basicOpen_mul_le_left _ _]
  -- From the equality in the localization, we obtain for each `(i,j)` some power `(h i * h j) ^ n`
    -- which equalizes `a i * h j` and `h i * a j`
[GOAL]
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
⊢ ∃ a' h' iDh',
    U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h' i) ∧
      (∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a' i * h' j = h' i * a' j) ∧
        ∀ (i : ι),
          i ∈ t →
            ↑((structureSheaf R).val.map (iDh' i).op) s =
              const R (a' i) (h' i) (PrimeSpectrum.basicOpen (h' i))
                (_ :
                  ∀ (y : ↑(PrimeSpectrum.Top R)),
                    y ∈ PrimeSpectrum.basicOpen (h' i) → y ∈ PrimeSpectrum.basicOpen (h' i))
[PROOFSTEP]
have exists_power : ∀ i j : ι, ∃ n : ℕ, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n :=
  by
  intro i j
  obtain ⟨⟨c, n, rfl⟩, hc⟩ := IsLocalization.eq.mp (fractions_eq i j)
  use n + 1
  rw [pow_succ]
  dsimp at hc
  convert hc using 1 <;> ring
[GOAL]
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
⊢ ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
[PROOFSTEP]
intro i j
[GOAL]
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
i j : ι
⊢ ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
[PROOFSTEP]
obtain ⟨⟨c, n, rfl⟩, hc⟩ := IsLocalization.eq.mp (fractions_eq i j)
[GOAL]
case intro.mk.intro
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
i j : ι
n : ℕ
hc :
  ↑{ val := (fun x x_1 => x ^ x_1) (h i * h j) n,
          property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (h i * h j) y = (fun x x_1 => x ^ x_1) (h i * h j) n) } *
      (↑{ val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } * (a i * h j)) =
    ↑{ val := (fun x x_1 => x ^ x_1) (h i * h j) n,
          property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (h i * h j) y = (fun x x_1 => x ^ x_1) (h i * h j) n) } *
      (↑{ val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } * (h i * a j))
⊢ ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
[PROOFSTEP]
use n + 1
[GOAL]
case h
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
i j : ι
n : ℕ
hc :
  ↑{ val := (fun x x_1 => x ^ x_1) (h i * h j) n,
          property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (h i * h j) y = (fun x x_1 => x ^ x_1) (h i * h j) n) } *
      (↑{ val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } * (a i * h j)) =
    ↑{ val := (fun x x_1 => x ^ x_1) (h i * h j) n,
          property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (h i * h j) y = (fun x x_1 => x ^ x_1) (h i * h j) n) } *
      (↑{ val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } * (h i * a j))
⊢ a i * h j * (h i * h j) ^ (n + 1) = h i * a j * (h i * h j) ^ (n + 1)
[PROOFSTEP]
rw [pow_succ]
[GOAL]
case h
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
i j : ι
n : ℕ
hc :
  ↑{ val := (fun x x_1 => x ^ x_1) (h i * h j) n,
          property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (h i * h j) y = (fun x x_1 => x ^ x_1) (h i * h j) n) } *
      (↑{ val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } * (a i * h j)) =
    ↑{ val := (fun x x_1 => x ^ x_1) (h i * h j) n,
          property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (h i * h j) y = (fun x x_1 => x ^ x_1) (h i * h j) n) } *
      (↑{ val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } * (h i * a j))
⊢ a i * h j * (h i * h j * (h i * h j) ^ n) = h i * a j * (h i * h j * (h i * h j) ^ n)
[PROOFSTEP]
dsimp at hc
[GOAL]
case h
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
i j : ι
n : ℕ
hc : (h i * h j) ^ n * (h i * h j * (a i * h j)) = (h i * h j) ^ n * (h i * h j * (h i * a j))
⊢ a i * h j * (h i * h j * (h i * h j) ^ n) = h i * a j * (h i * h j * (h i * h j) ^ n)
[PROOFSTEP]
convert hc using 1
[GOAL]
case h.e'_2
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
i j : ι
n : ℕ
hc : (h i * h j) ^ n * (h i * h j * (a i * h j)) = (h i * h j) ^ n * (h i * h j * (h i * a j))
⊢ a i * h j * (h i * h j * (h i * h j) ^ n) = (h i * h j) ^ n * (h i * h j * (a i * h j))
[PROOFSTEP]
ring
[GOAL]
case h.e'_3
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
i j : ι
n : ℕ
hc : (h i * h j) ^ n * (h i * h j * (a i * h j)) = (h i * h j) ^ n * (h i * h j * (h i * a j))
⊢ h i * a j * (h i * h j * (h i * h j) ^ n) = (h i * h j) ^ n * (h i * h j * (h i * a j))
[PROOFSTEP]
ring
[GOAL]
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
⊢ ∃ a' h' iDh',
    U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h' i) ∧
      (∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a' i * h' j = h' i * a' j) ∧
        ∀ (i : ι),
          i ∈ t →
            ↑((structureSheaf R).val.map (iDh' i).op) s =
              const R (a' i) (h' i) (PrimeSpectrum.basicOpen (h' i))
                (_ :
                  ∀ (y : ↑(PrimeSpectrum.Top R)),
                    y ∈ PrimeSpectrum.basicOpen (h' i) → y ∈ PrimeSpectrum.basicOpen (h' i))
[PROOFSTEP]
let n := fun p : ι × ι => (exists_power p.1 p.2).choose
[GOAL]
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ :=
  fun p =>
    Exists.choose (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
⊢ ∃ a' h' iDh',
    U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h' i) ∧
      (∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a' i * h' j = h' i * a' j) ∧
        ∀ (i : ι),
          i ∈ t →
            ↑((structureSheaf R).val.map (iDh' i).op) s =
              const R (a' i) (h' i) (PrimeSpectrum.basicOpen (h' i))
                (_ :
                  ∀ (y : ↑(PrimeSpectrum.Top R)),
                    y ∈ PrimeSpectrum.basicOpen (h' i) → y ∈ PrimeSpectrum.basicOpen (h' i))
[PROOFSTEP]
have n_spec := fun p : ι × ι => (exists_power p.fst p.snd).choose_spec
[GOAL]
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ :=
  fun p =>
    Exists.choose (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
n_spec :
  ∀ (p : ι × ι),
    a p.fst * h p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n) =
      h p.fst * a p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
⊢ ∃ a' h' iDh',
    U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h' i) ∧
      (∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a' i * h' j = h' i * a' j) ∧
        ∀ (i : ι),
          i ∈ t →
            ↑((structureSheaf R).val.map (iDh' i).op) s =
              const R (a' i) (h' i) (PrimeSpectrum.basicOpen (h' i))
                (_ :
                  ∀ (y : ↑(PrimeSpectrum.Top R)),
                    y ∈ PrimeSpectrum.basicOpen (h' i) → y ∈ PrimeSpectrum.basicOpen (h' i))
[PROOFSTEP]
let N := (t ×ˢ t).sup n
[GOAL]
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ :=
  fun p =>
    Exists.choose (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
n_spec :
  ∀ (p : ι × ι),
    a p.fst * h p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n) =
      h p.fst * a p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
N : ℕ := Finset.sup (t ×ˢ t) n
⊢ ∃ a' h' iDh',
    U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h' i) ∧
      (∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a' i * h' j = h' i * a' j) ∧
        ∀ (i : ι),
          i ∈ t →
            ↑((structureSheaf R).val.map (iDh' i).op) s =
              const R (a' i) (h' i) (PrimeSpectrum.basicOpen (h' i))
                (_ :
                  ∀ (y : ↑(PrimeSpectrum.Top R)),
                    y ∈ PrimeSpectrum.basicOpen (h' i) → y ∈ PrimeSpectrum.basicOpen (h' i))
[PROOFSTEP]
have basic_opens_eq : ∀ i : ι, PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i) := fun i =>
  PrimeSpectrum.basicOpen_pow _ _
    (by linarith)
      -- Expanding the fraction `a i / h i` by the power `(h i) ^ n` gives the desired normalization
[GOAL]
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ :=
  fun p =>
    Exists.choose (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
n_spec :
  ∀ (p : ι × ι),
    a p.fst * h p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n) =
      h p.fst * a p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
N : ℕ := Finset.sup (t ×ˢ t) n
i : ι
⊢ 0 < N + 1
[PROOFSTEP]
linarith
[GOAL]
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ :=
  fun p =>
    Exists.choose (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
n_spec :
  ∀ (p : ι × ι),
    a p.fst * h p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n) =
      h p.fst * a p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
N : ℕ := Finset.sup (t ×ˢ t) n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
⊢ ∃ a' h' iDh',
    U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h' i) ∧
      (∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a' i * h' j = h' i * a' j) ∧
        ∀ (i : ι),
          i ∈ t →
            ↑((structureSheaf R).val.map (iDh' i).op) s =
              const R (a' i) (h' i) (PrimeSpectrum.basicOpen (h' i))
                (_ :
                  ∀ (y : ↑(PrimeSpectrum.Top R)),
                    y ∈ PrimeSpectrum.basicOpen (h' i) → y ∈ PrimeSpectrum.basicOpen (h' i))
[PROOFSTEP]
refine' ⟨fun i => a i * h i ^ N, fun i => h i ^ (N + 1), fun i => eqToHom (basic_opens_eq i) ≫ iDh i, _, _, _⟩
[GOAL]
case refine'_1
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ :=
  fun p =>
    Exists.choose (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
n_spec :
  ∀ (p : ι × ι),
    a p.fst * h p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n) =
      h p.fst * a p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
N : ℕ := Finset.sup (t ×ˢ t) n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
⊢ U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i)
[PROOFSTEP]
simpa only [basic_opens_eq] using h_cover
[GOAL]
case refine'_2
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ :=
  fun p =>
    Exists.choose (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
n_spec :
  ∀ (p : ι × ι),
    a p.fst * h p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n) =
      h p.fst * a p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
N : ℕ := Finset.sup (t ×ˢ t) n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
⊢ ∀ (i : ι),
    i ∈ t →
      ∀ (j : ι),
        j ∈ t →
          (fun i => a i * h i ^ N) i * (fun i => h i ^ (N + 1)) j =
            (fun i => h i ^ (N + 1)) i * (fun i => a i * h i ^ N) j
[PROOFSTEP]
intro i hi j hj
[GOAL]
case refine'_2
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ :=
  fun p =>
    Exists.choose (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
n_spec :
  ∀ (p : ι × ι),
    a p.fst * h p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n) =
      h p.fst * a p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
N : ℕ := Finset.sup (t ×ˢ t) n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
hi : i ∈ t
j : ι
hj : j ∈ t
⊢ (fun i => a i * h i ^ N) i * (fun i => h i ^ (N + 1)) j = (fun i => h i ^ (N + 1)) i * (fun i => a i * h i ^ N) j
[PROOFSTEP]
have n_le_N : n (i, j) ≤ N := Finset.le_sup (Finset.mem_product.mpr ⟨hi, hj⟩)
[GOAL]
case refine'_2
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ :=
  fun p =>
    Exists.choose (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
n_spec :
  ∀ (p : ι × ι),
    a p.fst * h p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n) =
      h p.fst * a p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
N : ℕ := Finset.sup (t ×ˢ t) n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
hi : i ∈ t
j : ι
hj : j ∈ t
n_le_N : n (i, j) ≤ N
⊢ (fun i => a i * h i ^ N) i * (fun i => h i ^ (N + 1)) j = (fun i => h i ^ (N + 1)) i * (fun i => a i * h i ^ N) j
[PROOFSTEP]
cases' Nat.le.dest n_le_N with k hk
[GOAL]
case refine'_2.intro
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ :=
  fun p =>
    Exists.choose (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
n_spec :
  ∀ (p : ι × ι),
    a p.fst * h p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n) =
      h p.fst * a p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
N : ℕ := Finset.sup (t ×ˢ t) n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
hi : i ∈ t
j : ι
hj : j ∈ t
n_le_N : n (i, j) ≤ N
k : ℕ
hk : n (i, j) + k = N
⊢ (fun i => a i * h i ^ N) i * (fun i => h i ^ (N + 1)) j = (fun i => h i ^ (N + 1)) i * (fun i => a i * h i ^ N) j
[PROOFSTEP]
simp only [← hk, pow_add, pow_one]
  -- To accommodate for the difference `k`, we multiply both sides of the equation `n_spec (i, j)`
      -- by `(h i * h j) ^ k`
[GOAL]
case refine'_2.intro
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ :=
  fun p =>
    Exists.choose (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
n_spec :
  ∀ (p : ι × ι),
    a p.fst * h p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n) =
      h p.fst * a p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
N : ℕ := Finset.sup (t ×ˢ t) n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
hi : i ∈ t
j : ι
hj : j ∈ t
n_le_N : n (i, j) ≤ N
k : ℕ
hk : n (i, j) + k = N
⊢ a i *
        (h i ^
            Exists.choose
              (_ :
                ∃ n,
                  a (i, j).fst * h (i, j).snd * (h (i, j).fst * h (i, j).snd) ^ n =
                    h (i, j).fst * a (i, j).snd * (h (i, j).fst * h (i, j).snd) ^ n) *
          h i ^ k) *
      (h j ^
            Exists.choose
              (_ :
                ∃ n,
                  a (i, j).fst * h (i, j).snd * (h (i, j).fst * h (i, j).snd) ^ n =
                    h (i, j).fst * a (i, j).snd * (h (i, j).fst * h (i, j).snd) ^ n) *
          h j ^ k *
        h j) =
    h i ^
            Exists.choose
              (_ :
                ∃ n,
                  a (i, j).fst * h (i, j).snd * (h (i, j).fst * h (i, j).snd) ^ n =
                    h (i, j).fst * a (i, j).snd * (h (i, j).fst * h (i, j).snd) ^ n) *
          h i ^ k *
        h i *
      (a j *
        (h j ^
            Exists.choose
              (_ :
                ∃ n,
                  a (i, j).fst * h (i, j).snd * (h (i, j).fst * h (i, j).snd) ^ n =
                    h (i, j).fst * a (i, j).snd * (h (i, j).fst * h (i, j).snd) ^ n) *
          h j ^ k))
[PROOFSTEP]
convert congr_arg (fun z => z * (h i * h j) ^ k) (n_spec (i, j)) using 1
[GOAL]
case h.e'_2
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ :=
  fun p =>
    Exists.choose (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
n_spec :
  ∀ (p : ι × ι),
    a p.fst * h p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n) =
      h p.fst * a p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
N : ℕ := Finset.sup (t ×ˢ t) n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
hi : i ∈ t
j : ι
hj : j ∈ t
n_le_N : n (i, j) ≤ N
k : ℕ
hk : n (i, j) + k = N
⊢ a i *
        (h i ^
            Exists.choose
              (_ :
                ∃ n,
                  a (i, j).fst * h (i, j).snd * (h (i, j).fst * h (i, j).snd) ^ n =
                    h (i, j).fst * a (i, j).snd * (h (i, j).fst * h (i, j).snd) ^ n) *
          h i ^ k) *
      (h j ^
            Exists.choose
              (_ :
                ∃ n,
                  a (i, j).fst * h (i, j).snd * (h (i, j).fst * h (i, j).snd) ^ n =
                    h (i, j).fst * a (i, j).snd * (h (i, j).fst * h (i, j).snd) ^ n) *
          h j ^ k *
        h j) =
    a (i, j).fst * h (i, j).snd *
        (h (i, j).fst * h (i, j).snd) ^
          Exists.choose
            (_ :
              ∃ n,
                a (i, j).fst * h (i, j).snd * (h (i, j).fst * h (i, j).snd) ^ n =
                  h (i, j).fst * a (i, j).snd * (h (i, j).fst * h (i, j).snd) ^ n) *
      (h i * h j) ^ k
[PROOFSTEP]
simp only [mul_pow]
[GOAL]
case h.e'_2
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ :=
  fun p =>
    Exists.choose (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
n_spec :
  ∀ (p : ι × ι),
    a p.fst * h p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n) =
      h p.fst * a p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
N : ℕ := Finset.sup (t ×ˢ t) n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
hi : i ∈ t
j : ι
hj : j ∈ t
n_le_N : n (i, j) ≤ N
k : ℕ
hk : n (i, j) + k = N
⊢ a i *
        (h i ^
            Exists.choose
              (_ : ∃ a_1, (fun n => a i * h j * (h i ^ n * h j ^ n) = h i * a j * (h i ^ n * h j ^ n)) a_1) *
          h i ^ k) *
      (h j ^
            Exists.choose
              (_ : ∃ a_1, (fun n => a i * h j * (h i ^ n * h j ^ n) = h i * a j * (h i ^ n * h j ^ n)) a_1) *
          h j ^ k *
        h j) =
    a i * h j *
        (h i ^
            Exists.choose
              (_ : ∃ a_1, (fun a_2 => a i * h j * (h i ^ a_2 * h j ^ a_2) = h i * a j * (h i ^ a_2 * h j ^ a_2)) a_1) *
          h j ^
            Exists.choose
              (_ : ∃ a_1, (fun a_2 => a i * h j * (h i ^ a_2 * h j ^ a_2) = h i * a j * (h i ^ a_2 * h j ^ a_2)) a_1)) *
      (h i ^ k * h j ^ k)
[PROOFSTEP]
ring
  -- Lastly, we need to show that the new fractions still represent our original `s`
[GOAL]
case h.e'_3
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ :=
  fun p =>
    Exists.choose (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
n_spec :
  ∀ (p : ι × ι),
    a p.fst * h p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n) =
      h p.fst * a p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
N : ℕ := Finset.sup (t ×ˢ t) n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
hi : i ∈ t
j : ι
hj : j ∈ t
n_le_N : n (i, j) ≤ N
k : ℕ
hk : n (i, j) + k = N
⊢ h i ^
            Exists.choose
              (_ :
                ∃ n,
                  a (i, j).fst * h (i, j).snd * (h (i, j).fst * h (i, j).snd) ^ n =
                    h (i, j).fst * a (i, j).snd * (h (i, j).fst * h (i, j).snd) ^ n) *
          h i ^ k *
        h i *
      (a j *
        (h j ^
            Exists.choose
              (_ :
                ∃ n,
                  a (i, j).fst * h (i, j).snd * (h (i, j).fst * h (i, j).snd) ^ n =
                    h (i, j).fst * a (i, j).snd * (h (i, j).fst * h (i, j).snd) ^ n) *
          h j ^ k)) =
    h (i, j).fst * a (i, j).snd *
        (h (i, j).fst * h (i, j).snd) ^
          Exists.choose
            (_ :
              ∃ n,
                a (i, j).fst * h (i, j).snd * (h (i, j).fst * h (i, j).snd) ^ n =
                  h (i, j).fst * a (i, j).snd * (h (i, j).fst * h (i, j).snd) ^ n) *
      (h i * h j) ^ k
[PROOFSTEP]
simp only [mul_pow]
[GOAL]
case h.e'_3
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ :=
  fun p =>
    Exists.choose (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
n_spec :
  ∀ (p : ι × ι),
    a p.fst * h p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n) =
      h p.fst * a p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
N : ℕ := Finset.sup (t ×ˢ t) n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
hi : i ∈ t
j : ι
hj : j ∈ t
n_le_N : n (i, j) ≤ N
k : ℕ
hk : n (i, j) + k = N
⊢ h i ^ Exists.choose (_ : ∃ a_1, (fun n => a i * h j * (h i ^ n * h j ^ n) = h i * a j * (h i ^ n * h j ^ n)) a_1) *
          h i ^ k *
        h i *
      (a j *
        (h j ^
            Exists.choose
              (_ : ∃ a_1, (fun n => a i * h j * (h i ^ n * h j ^ n) = h i * a j * (h i ^ n * h j ^ n)) a_1) *
          h j ^ k)) =
    h i * a j *
        (h i ^
            Exists.choose
              (_ : ∃ a_1, (fun a_2 => a i * h j * (h i ^ a_2 * h j ^ a_2) = h i * a j * (h i ^ a_2 * h j ^ a_2)) a_1) *
          h j ^
            Exists.choose
              (_ : ∃ a_1, (fun a_2 => a i * h j * (h i ^ a_2 * h j ^ a_2) = h i * a j * (h i ^ a_2 * h j ^ a_2)) a_1)) *
      (h i ^ k * h j ^ k)
[PROOFSTEP]
ring
  -- Lastly, we need to show that the new fractions still represent our original `s`
[GOAL]
case refine'_3
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ :=
  fun p =>
    Exists.choose (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
n_spec :
  ∀ (p : ι × ι),
    a p.fst * h p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n) =
      h p.fst * a p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
N : ℕ := Finset.sup (t ×ˢ t) n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
⊢ ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map
              ((fun i => eqToHom (_ : PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)) ≫ iDh i)
                  i).op)
          s =
        const R ((fun i => a i * h i ^ N) i) ((fun i => h i ^ (N + 1)) i)
          (PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i))
          (_ :
            ∀ (y : ↑(PrimeSpectrum.Top R)),
              y ∈ PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i) →
                y ∈ PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i))
[PROOFSTEP]
intro i _
[GOAL]
case refine'_3
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ :=
  fun p =>
    Exists.choose (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
n_spec :
  ∀ (p : ι × ι),
    a p.fst * h p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n) =
      h p.fst * a p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
N : ℕ := Finset.sup (t ×ˢ t) n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
a✝ : i ∈ t
⊢ ↑((structureSheaf R).val.map
          ((fun i => eqToHom (_ : PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)) ≫ iDh i)
              i).op)
      s =
    const R ((fun i => a i * h i ^ N) i) ((fun i => h i ^ (N + 1)) i)
      (PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i))
      (_ :
        ∀ (y : ↑(PrimeSpectrum.Top R)),
          y ∈ PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i) →
            y ∈ PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i))
[PROOFSTEP]
rw [op_comp, Functor.map_comp]
  -- Porting note : `comp_apply` can't be rewritten, so use a change
[GOAL]
case refine'_3
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ :=
  fun p =>
    Exists.choose (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
n_spec :
  ∀ (p : ι × ι),
    a p.fst * h p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n) =
      h p.fst * a p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
N : ℕ := Finset.sup (t ×ˢ t) n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
a✝ : i ∈ t
⊢ ↑((structureSheaf R).val.map (iDh i).op ≫
          (structureSheaf R).val.map
            (eqToHom (_ : PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i))).op)
      s =
    const R ((fun i => a i * h i ^ N) i) ((fun i => h i ^ (N + 1)) i)
      (PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i))
      (_ :
        ∀ (y : ↑(PrimeSpectrum.Top R)),
          y ∈ PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i) →
            y ∈ PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i))
[PROOFSTEP]
change (structureSheaf R).1.map (eqToHom (basic_opens_eq _)).op ((structureSheaf R).1.map (iDh i).op s) = _
[GOAL]
case refine'_3
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ :=
  fun p =>
    Exists.choose (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
n_spec :
  ∀ (p : ι × ι),
    a p.fst * h p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n) =
      h p.fst * a p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
N : ℕ := Finset.sup (t ×ˢ t) n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
a✝ : i ∈ t
⊢ ↑((structureSheaf R).val.map
          (eqToHom (_ : PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i))).op)
      (↑((structureSheaf R).val.map (iDh i).op) s) =
    const R ((fun i => a i * h i ^ N) i) ((fun i => h i ^ (N + 1)) i)
      (PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i))
      (_ :
        ∀ (y : ↑(PrimeSpectrum.Top R)),
          y ∈ PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i) →
            y ∈ PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i))
[PROOFSTEP]
rw [← hs, res_const]
  -- additional goal spit out by `res_const`
[GOAL]
case refine'_3
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ :=
  fun p =>
    Exists.choose (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
n_spec :
  ∀ (p : ι × ι),
    a p.fst * h p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n) =
      h p.fst * a p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
N : ℕ := Finset.sup (t ×ˢ t) n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
a✝ : i ∈ t
⊢ const R (a i) (h i) (PrimeSpectrum.basicOpen (h i ^ (N + 1))) ?refine'_3.hv =
    const R ((fun i => a i * h i ^ N) i) ((fun i => h i ^ (N + 1)) i)
      (PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i))
      (_ :
        ∀ (y : ↑(PrimeSpectrum.Top R)),
          y ∈ PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i) →
            y ∈ PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i))
case refine'_3.hv
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ :=
  fun p =>
    Exists.choose (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
n_spec :
  ∀ (p : ι × ι),
    a p.fst * h p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n) =
      h p.fst * a p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
N : ℕ := Finset.sup (t ×ˢ t) n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
a✝ : i ∈ t
⊢ ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ PrimeSpectrum.basicOpen (h i ^ (N + 1)) → h i ∈ Ideal.primeCompl x.asIdeal
[PROOFSTEP]
swap
[GOAL]
case refine'_3.hv
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ :=
  fun p =>
    Exists.choose (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
n_spec :
  ∀ (p : ι × ι),
    a p.fst * h p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n) =
      h p.fst * a p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
N : ℕ := Finset.sup (t ×ˢ t) n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
a✝ : i ∈ t
⊢ ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ PrimeSpectrum.basicOpen (h i ^ (N + 1)) → h i ∈ Ideal.primeCompl x.asIdeal
[PROOFSTEP]
exact (basic_opens_eq i).le
[GOAL]
case refine'_3
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ :=
  fun p =>
    Exists.choose (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
n_spec :
  ∀ (p : ι × ι),
    a p.fst * h p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n) =
      h p.fst * a p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
N : ℕ := Finset.sup (t ×ˢ t) n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
a✝ : i ∈ t
⊢ const R (a i) (h i) (PrimeSpectrum.basicOpen (h i ^ (N + 1)))
      (_ : PrimeSpectrum.basicOpen (h i ^ (N + 1)) ≤ PrimeSpectrum.basicOpen (h i)) =
    const R ((fun i => a i * h i ^ N) i) ((fun i => h i ^ (N + 1)) i)
      (PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i))
      (_ :
        ∀ (y : ↑(PrimeSpectrum.Top R)),
          y ∈ PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i) →
            y ∈ PrimeSpectrum.basicOpen ((fun i => h i ^ (N + 1)) i))
[PROOFSTEP]
apply const_ext
[GOAL]
case refine'_3.h
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ :=
  fun p =>
    Exists.choose (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
n_spec :
  ∀ (p : ι × ι),
    a p.fst * h p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n) =
      h p.fst * a p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
N : ℕ := Finset.sup (t ×ˢ t) n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
a✝ : i ∈ t
⊢ a i * (fun i => h i ^ (N + 1)) i = (fun i => a i * h i ^ N) i * h i
[PROOFSTEP]
dsimp
[GOAL]
case refine'_3.h
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ :=
  fun p =>
    Exists.choose (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
n_spec :
  ∀ (p : ι × ι),
    a p.fst * h p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n) =
      h p.fst * a p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
N : ℕ := Finset.sup (t ×ˢ t) n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
a✝ : i ∈ t
⊢ a i *
      h i ^
        ((Finset.sup (t ×ˢ t) fun p =>
            Exists.choose
              (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)) +
          1) =
    (a i *
        h i ^
          Finset.sup (t ×ˢ t) fun p =>
            Exists.choose
              (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)) *
      h i
[PROOFSTEP]
rw [pow_succ]
[GOAL]
case refine'_3.h
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
s : ↑((structureSheaf R).val.obj (op U))
ι : Type u_1
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ U
h_cover : U ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
hs :
  ∀ (i : ι),
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i)) =
      ↑((structureSheaf R).val.map (iDh i).op) s
fractions_eq :
  ∀ (i j : ι),
    IsLocalization.mk' (Localization.Away (h i * h j)) (a i * h j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) } =
      IsLocalization.mk' (Localization.Away (h i * h j)) (h i * a j)
        { val := h i * h j, property := (_ : h i * h j ∈ Submonoid.powers (h i * h j)) }
exists_power : ∀ (i j : ι), ∃ n, a i * h j * (h i * h j) ^ n = h i * a j * (h i * h j) ^ n
n : ι × ι → ℕ :=
  fun p =>
    Exists.choose (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
n_spec :
  ∀ (p : ι × ι),
    a p.fst * h p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n) =
      h p.fst * a p.snd *
        (h p.fst * h p.snd) ^
          Exists.choose
            (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)
N : ℕ := Finset.sup (t ×ˢ t) n
basic_opens_eq : ∀ (i : ι), PrimeSpectrum.basicOpen (h i ^ (N + 1)) = PrimeSpectrum.basicOpen (h i)
i : ι
a✝ : i ∈ t
⊢ a i *
      (h i *
        h i ^
          Finset.sup (t ×ˢ t) fun p =>
            Exists.choose
              (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)) =
    (a i *
        h i ^
          Finset.sup (t ×ˢ t) fun p =>
            Exists.choose
              (_ : ∃ n, a p.fst * h p.snd * (h p.fst * h p.snd) ^ n = h p.fst * a p.snd * (h p.fst * h p.snd) ^ n)) *
      h i
[PROOFSTEP]
ring
[GOAL]
R : Type u
inst✝ : CommRing R
f : R
⊢ Function.Surjective ↑(toBasicOpen R f)
[PROOFSTEP]
intro s
[GOAL]
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
⊢ ∃ a, ↑(toBasicOpen R f) a = s
[PROOFSTEP]
let ι : Type u := PrimeSpectrum.basicOpen f
[GOAL]
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
⊢ ∃ a, ↑(toBasicOpen R f) a = s
[PROOFSTEP]
choose a' h' iDh' hxDh' s_eq' using locally_const_basicOpen R (PrimeSpectrum.basicOpen f) s
[GOAL]
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
a' h' : { x // x ∈ PrimeSpectrum.basicOpen f } → R
iDh' : (x : { x // x ∈ PrimeSpectrum.basicOpen f }) → PrimeSpectrum.basicOpen (h' x) ⟶ PrimeSpectrum.basicOpen f
hxDh' : ∀ (x : { x // x ∈ PrimeSpectrum.basicOpen f }), ↑x ∈ PrimeSpectrum.basicOpen (h' x)
s_eq' :
  ∀ (x : { x // x ∈ PrimeSpectrum.basicOpen f }),
    const R (a' x) (h' x) (PrimeSpectrum.basicOpen (h' x))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h' x) → y ∈ PrimeSpectrum.basicOpen (h' x)) =
      ↑((structureSheaf R).val.map (iDh' x).op) s
⊢ ∃ a, ↑(toBasicOpen R f) a = s
[PROOFSTEP]
obtain ⟨t, ht_cover'⟩ :=
  (PrimeSpectrum.isCompact_basicOpen f).elim_finite_subcover (fun i : ι => PrimeSpectrum.basicOpen (h' i))
    (fun i => PrimeSpectrum.isOpen_basicOpen)
      -- Here, we need to show that our basic opens actually form a cover of `basicOpen f`
    fun x hx => by rw [Set.mem_iUnion]; exact ⟨⟨x, hx⟩, hxDh' ⟨x, hx⟩⟩
[GOAL]
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
a' h' : { x // x ∈ PrimeSpectrum.basicOpen f } → R
iDh' : (x : { x // x ∈ PrimeSpectrum.basicOpen f }) → PrimeSpectrum.basicOpen (h' x) ⟶ PrimeSpectrum.basicOpen f
hxDh' : ∀ (x : { x // x ∈ PrimeSpectrum.basicOpen f }), ↑x ∈ PrimeSpectrum.basicOpen (h' x)
s_eq' :
  ∀ (x : { x // x ∈ PrimeSpectrum.basicOpen f }),
    const R (a' x) (h' x) (PrimeSpectrum.basicOpen (h' x))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h' x) → y ∈ PrimeSpectrum.basicOpen (h' x)) =
      ↑((structureSheaf R).val.map (iDh' x).op) s
x : PrimeSpectrum R
hx : x ∈ ↑(PrimeSpectrum.basicOpen f)
⊢ x ∈ ⋃ (i : ι), (fun i => ↑(PrimeSpectrum.basicOpen (h' i))) i
[PROOFSTEP]
rw [Set.mem_iUnion]
[GOAL]
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
a' h' : { x // x ∈ PrimeSpectrum.basicOpen f } → R
iDh' : (x : { x // x ∈ PrimeSpectrum.basicOpen f }) → PrimeSpectrum.basicOpen (h' x) ⟶ PrimeSpectrum.basicOpen f
hxDh' : ∀ (x : { x // x ∈ PrimeSpectrum.basicOpen f }), ↑x ∈ PrimeSpectrum.basicOpen (h' x)
s_eq' :
  ∀ (x : { x // x ∈ PrimeSpectrum.basicOpen f }),
    const R (a' x) (h' x) (PrimeSpectrum.basicOpen (h' x))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h' x) → y ∈ PrimeSpectrum.basicOpen (h' x)) =
      ↑((structureSheaf R).val.map (iDh' x).op) s
x : PrimeSpectrum R
hx : x ∈ ↑(PrimeSpectrum.basicOpen f)
⊢ ∃ i, x ∈ (fun i => ↑(PrimeSpectrum.basicOpen (h' i))) i
[PROOFSTEP]
exact ⟨⟨x, hx⟩, hxDh' ⟨x, hx⟩⟩
[GOAL]
case intro
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
a' h' : { x // x ∈ PrimeSpectrum.basicOpen f } → R
iDh' : (x : { x // x ∈ PrimeSpectrum.basicOpen f }) → PrimeSpectrum.basicOpen (h' x) ⟶ PrimeSpectrum.basicOpen f
hxDh' : ∀ (x : { x // x ∈ PrimeSpectrum.basicOpen f }), ↑x ∈ PrimeSpectrum.basicOpen (h' x)
s_eq' :
  ∀ (x : { x // x ∈ PrimeSpectrum.basicOpen f }),
    const R (a' x) (h' x) (PrimeSpectrum.basicOpen (h' x))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h' x) → y ∈ PrimeSpectrum.basicOpen (h' x)) =
      ↑((structureSheaf R).val.map (iDh' x).op) s
t : Finset ι
ht_cover' : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h' i))
⊢ ∃ a, ↑(toBasicOpen R f) a = s
[PROOFSTEP]
simp only [← Opens.coe_iSup, SetLike.coe_subset_coe] at ht_cover'
[GOAL]
case intro
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
a' h' : { x // x ∈ PrimeSpectrum.basicOpen f } → R
iDh' : (x : { x // x ∈ PrimeSpectrum.basicOpen f }) → PrimeSpectrum.basicOpen (h' x) ⟶ PrimeSpectrum.basicOpen f
hxDh' : ∀ (x : { x // x ∈ PrimeSpectrum.basicOpen f }), ↑x ∈ PrimeSpectrum.basicOpen (h' x)
s_eq' :
  ∀ (x : { x // x ∈ PrimeSpectrum.basicOpen f }),
    const R (a' x) (h' x) (PrimeSpectrum.basicOpen (h' x))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h' x) → y ∈ PrimeSpectrum.basicOpen (h' x)) =
      ↑((structureSheaf R).val.map (iDh' x).op) s
t : Finset ι
ht_cover' :
  PrimeSpectrum.basicOpen f ≤ ⨆ (i : { x // x ∈ PrimeSpectrum.basicOpen f }) (_ : i ∈ t), PrimeSpectrum.basicOpen (h' i)
⊢ ∃ a, ↑(toBasicOpen R f) a = s
[PROOFSTEP]
obtain ⟨a, h, iDh, ht_cover, ah_ha, s_eq⟩ :=
  normalize_finite_fraction_representation R (PrimeSpectrum.basicOpen f) s t a' h' iDh' ht_cover' s_eq'
[GOAL]
case intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
a' h' : { x // x ∈ PrimeSpectrum.basicOpen f } → R
iDh' : (x : { x // x ∈ PrimeSpectrum.basicOpen f }) → PrimeSpectrum.basicOpen (h' x) ⟶ PrimeSpectrum.basicOpen f
hxDh' : ∀ (x : { x // x ∈ PrimeSpectrum.basicOpen f }), ↑x ∈ PrimeSpectrum.basicOpen (h' x)
s_eq' :
  ∀ (x : { x // x ∈ PrimeSpectrum.basicOpen f }),
    const R (a' x) (h' x) (PrimeSpectrum.basicOpen (h' x))
        (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h' x) → y ∈ PrimeSpectrum.basicOpen (h' x)) =
      ↑((structureSheaf R).val.map (iDh' x).op) s
t : Finset ι
ht_cover' :
  PrimeSpectrum.basicOpen f ≤ ⨆ (i : { x // x ∈ PrimeSpectrum.basicOpen f }) (_ : i ∈ t), PrimeSpectrum.basicOpen (h' i)
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ht_cover : PrimeSpectrum.basicOpen f ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
⊢ ∃ a, ↑(toBasicOpen R f) a = s
[PROOFSTEP]
clear s_eq' iDh' hxDh' ht_cover' a' h'
[GOAL]
case intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ht_cover : PrimeSpectrum.basicOpen f ≤ ⨆ (i : ι) (_ : i ∈ t), PrimeSpectrum.basicOpen (h i)
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
⊢ ∃ a, ↑(toBasicOpen R f) a = s
[PROOFSTEP]
rw [← SetLike.coe_subset_coe, Opens.coe_iSup] at ht_cover
[GOAL]
case intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι), ↑(⨆ (_ : i ∈ t), PrimeSpectrum.basicOpen (h i))
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
⊢ ∃ a, ↑(toBasicOpen R f) a = s
[PROOFSTEP]
replace ht_cover :
  (PrimeSpectrum.basicOpen f : Set <| PrimeSpectrum R) ⊆ ⋃ (i : ι) (x : i ∈ t), (PrimeSpectrum.basicOpen (h i) : Set _)
[GOAL]
case ht_cover
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι), ↑(⨆ (_ : i ∈ t), PrimeSpectrum.basicOpen (h i))
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
⊢ ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
[PROOFSTEP]
convert ht_cover using 2
[GOAL]
case h.e'_4.h.h.e'_3.h
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι), ↑(⨆ (_ : i ∈ t), PrimeSpectrum.basicOpen (h i))
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
e_1✝¹ : Set (PrimeSpectrum R) = Set ↑(PrimeSpectrum.Top R)
e_1✝ : PrimeSpectrum R = ↑(PrimeSpectrum.Top R)
⊢ (fun i => ⋃ (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))) = fun i => ↑(⨆ (_ : i ∈ t), PrimeSpectrum.basicOpen (h i))
[PROOFSTEP]
exact
  funext fun j => by
    rw [Opens.coe_iSup]
      -- Next we show that some power of `f` is a linear combination of the `h i`
[GOAL]
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι), ↑(⨆ (_ : i ∈ t), PrimeSpectrum.basicOpen (h i))
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
e_1✝¹ : Set (PrimeSpectrum R) = Set ↑(PrimeSpectrum.Top R)
e_1✝ : PrimeSpectrum R = ↑(PrimeSpectrum.Top R)
j : ι
⊢ ⋃ (_ : j ∈ t), ↑(PrimeSpectrum.basicOpen (h j)) = ↑(⨆ (_ : j ∈ t), PrimeSpectrum.basicOpen (h j))
[PROOFSTEP]
rw [Opens.coe_iSup]
  -- Next we show that some power of `f` is a linear combination of the `h i`
[GOAL]
case intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
⊢ ∃ a, ↑(toBasicOpen R f) a = s
[PROOFSTEP]
obtain ⟨n, hn⟩ : f ∈ (Ideal.span (h '' ↑t)).radical :=
  by
  rw [← PrimeSpectrum.vanishingIdeal_zeroLocus_eq_radical, PrimeSpectrum.zeroLocus_span]
    -- Porting note : simp with `PrimeSpectrum.basicOpen_eq_zeroLocus_compl` does not work
  replace ht_cover : (PrimeSpectrum.zeroLocus { f })ᶜ ⊆ ⋃ (i : ι) (x : i ∈ t), (PrimeSpectrum.zeroLocus {h i})ᶜ
  · convert ht_cover
    · rw [PrimeSpectrum.basicOpen_eq_zeroLocus_compl]
    · simp only [Opens.iSup_mk, Opens.carrier_eq_coe, PrimeSpectrum.basicOpen_eq_zeroLocus_compl]
  rw [Set.compl_subset_comm] at ht_cover
  simp_rw [Set.compl_iUnion, compl_compl, ← PrimeSpectrum.zeroLocus_iUnion, ← Finset.set_biUnion_coe, ←
    Set.image_eq_iUnion] at ht_cover
  apply PrimeSpectrum.vanishingIdeal_anti_mono ht_cover
  exact PrimeSpectrum.subset_vanishingIdeal_zeroLocus { f } (Set.mem_singleton f)
[GOAL]
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
⊢ f ∈ Ideal.radical (Ideal.span (h '' ↑t))
[PROOFSTEP]
rw [← PrimeSpectrum.vanishingIdeal_zeroLocus_eq_radical, PrimeSpectrum.zeroLocus_span]
  -- Porting note : simp with `PrimeSpectrum.basicOpen_eq_zeroLocus_compl` does not work
[GOAL]
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
⊢ f ∈ PrimeSpectrum.vanishingIdeal (PrimeSpectrum.zeroLocus (h '' ↑t))
[PROOFSTEP]
replace ht_cover : (PrimeSpectrum.zeroLocus { f })ᶜ ⊆ ⋃ (i : ι) (x : i ∈ t), (PrimeSpectrum.zeroLocus {h i})ᶜ
[GOAL]
case ht_cover
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
⊢ (PrimeSpectrum.zeroLocus {f})ᶜ ⊆ ⋃ (i : ι) (_ : i ∈ t), (PrimeSpectrum.zeroLocus {h i})ᶜ
[PROOFSTEP]
convert ht_cover
[GOAL]
case h.e'_3
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
⊢ (PrimeSpectrum.zeroLocus {f})ᶜ = ↑(PrimeSpectrum.basicOpen f)
[PROOFSTEP]
rw [PrimeSpectrum.basicOpen_eq_zeroLocus_compl]
[GOAL]
case h.e'_4.h.e'_3.h.f
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
x✝¹ : ι
x✝ : x✝¹ ∈ t
⊢ (PrimeSpectrum.zeroLocus {h x✝¹})ᶜ = ↑(PrimeSpectrum.basicOpen (h x✝¹))
[PROOFSTEP]
simp only [Opens.iSup_mk, Opens.carrier_eq_coe, PrimeSpectrum.basicOpen_eq_zeroLocus_compl]
[GOAL]
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : (PrimeSpectrum.zeroLocus {f})ᶜ ⊆ ⋃ (i : ι) (_ : i ∈ t), (PrimeSpectrum.zeroLocus {h i})ᶜ
⊢ f ∈ PrimeSpectrum.vanishingIdeal (PrimeSpectrum.zeroLocus (h '' ↑t))
[PROOFSTEP]
rw [Set.compl_subset_comm] at ht_cover
[GOAL]
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : (⋃ (i : ι) (_ : i ∈ t), (PrimeSpectrum.zeroLocus {h i})ᶜ)ᶜ ⊆ PrimeSpectrum.zeroLocus {f}
⊢ f ∈ PrimeSpectrum.vanishingIdeal (PrimeSpectrum.zeroLocus (h '' ↑t))
[PROOFSTEP]
simp_rw [Set.compl_iUnion, compl_compl, ← PrimeSpectrum.zeroLocus_iUnion, ← Finset.set_biUnion_coe, ←
  Set.image_eq_iUnion] at ht_cover
[GOAL]
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : PrimeSpectrum.zeroLocus ((fun i => h i) '' ↑t) ⊆ PrimeSpectrum.zeroLocus {f}
⊢ f ∈ PrimeSpectrum.vanishingIdeal (PrimeSpectrum.zeroLocus (h '' ↑t))
[PROOFSTEP]
apply PrimeSpectrum.vanishingIdeal_anti_mono ht_cover
[GOAL]
case a
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : PrimeSpectrum.zeroLocus ((fun i => h i) '' ↑t) ⊆ PrimeSpectrum.zeroLocus {f}
⊢ f ∈ PrimeSpectrum.vanishingIdeal (PrimeSpectrum.zeroLocus {f})
[PROOFSTEP]
exact PrimeSpectrum.subset_vanishingIdeal_zeroLocus { f } (Set.mem_singleton f)
[GOAL]
case intro.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
hn : f ^ n ∈ Ideal.span (h '' ↑t)
⊢ ∃ a, ↑(toBasicOpen R f) a = s
[PROOFSTEP]
replace hn := Ideal.mul_mem_left _ f hn
[GOAL]
case intro.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
hn : f * f ^ n ∈ Ideal.span (h '' ↑t)
⊢ ∃ a, ↑(toBasicOpen R f) a = s
[PROOFSTEP]
erw [← pow_succ, Finsupp.mem_span_image_iff_total] at hn
[GOAL]
case intro.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
hn : ∃ l, l ∈ Finsupp.supported R R ↑t ∧ ↑(Finsupp.total ι R R h) l = f ^ (n + 1)
⊢ ∃ a, ↑(toBasicOpen R f) a = s
[PROOFSTEP]
rcases hn with ⟨b, b_supp, hb⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
b : ι →₀ R
b_supp : b ∈ Finsupp.supported R R ↑t
hb : ↑(Finsupp.total ι R R h) b = f ^ (n + 1)
⊢ ∃ a, ↑(toBasicOpen R f) a = s
[PROOFSTEP]
rw [Finsupp.total_apply_of_mem_supported R b_supp] at hb
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
b : ι →₀ R
b_supp : b ∈ Finsupp.supported R R ↑t
hb : ∑ i in t, ↑b i • h i = f ^ (n + 1)
⊢ ∃ a, ↑(toBasicOpen R f) a = s
[PROOFSTEP]
dsimp at hb
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
b : ι →₀ R
b_supp : b ∈ Finsupp.supported R R ↑t
hb : ∑ i in t, ↑b i * h i = f ^ (n + 1)
⊢ ∃ a, ↑(toBasicOpen R f) a = s
[PROOFSTEP]
use IsLocalization.mk' (Localization.Away f) (∑ i : ι in t, b i * a i) (⟨f ^ (n + 1), n + 1, rfl⟩ : Submonoid.powers _)
[GOAL]
case h
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
b : ι →₀ R
b_supp : b ∈ Finsupp.supported R R ↑t
hb : ∑ i in t, ↑b i * h i = f ^ (n + 1)
⊢ ↑(toBasicOpen R f)
      (IsLocalization.mk' (Localization.Away f) (∑ i in t, ↑b i * a i)
        { val := f ^ (n + 1), property := (_ : ∃ y, (fun x x_1 => x ^ x_1) f y = f ^ (n + 1)) }) =
    s
[PROOFSTEP]
rw [toBasicOpen_mk']
  -- Since the structure sheaf is a sheaf, we can show the desired equality locally.
    -- Annoyingly, `Sheaf.eq_of_locally_eq'` requires an open cover indexed by a *type*, so we need to
    -- coerce our finset `t` to a type first.
[GOAL]
case h
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
b : ι →₀ R
b_supp : b ∈ Finsupp.supported R R ↑t
hb : ∑ i in t, ↑b i * h i = f ^ (n + 1)
⊢ const R (∑ i in t, ↑b i * a i)
      (↑{ val := f ^ (n + 1), property := (_ : ∃ y, (fun x x_1 => x ^ x_1) f y = f ^ (n + 1)) })
      (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f →
            ↑{ val := f ^ (n + 1), property := (_ : ∃ y, (fun x x_1 => x ^ x_1) f y = f ^ (n + 1)) } ∈
              Ideal.primeCompl x.asIdeal) =
    s
[PROOFSTEP]
let tt := ((t : Set (PrimeSpectrum.basicOpen f)) : Type u)
[GOAL]
case h
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
b : ι →₀ R
b_supp : b ∈ Finsupp.supported R R ↑t
hb : ∑ i in t, ↑b i * h i = f ^ (n + 1)
tt : Type u := ↑↑t
⊢ const R (∑ i in t, ↑b i * a i)
      (↑{ val := f ^ (n + 1), property := (_ : ∃ y, (fun x x_1 => x ^ x_1) f y = f ^ (n + 1)) })
      (PrimeSpectrum.basicOpen f)
      (_ :
        ∀ (x : ↑(PrimeSpectrum.Top R)),
          x ∈ PrimeSpectrum.basicOpen f →
            ↑{ val := f ^ (n + 1), property := (_ : ∃ y, (fun x x_1 => x ^ x_1) f y = f ^ (n + 1)) } ∈
              Ideal.primeCompl x.asIdeal) =
    s
[PROOFSTEP]
apply
  (structureSheaf R).eq_of_locally_eq' (fun i : tt => PrimeSpectrum.basicOpen (h i)) (PrimeSpectrum.basicOpen f)
    fun i : tt => iDh i
[GOAL]
case h.hcover
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
b : ι →₀ R
b_supp : b ∈ Finsupp.supported R R ↑t
hb : ∑ i in t, ↑b i * h i = f ^ (n + 1)
tt : Type u := ↑↑t
⊢ PrimeSpectrum.basicOpen f ≤ ⨆ (i : tt), PrimeSpectrum.basicOpen (h ↑i)
[PROOFSTEP]
intro x hx
[GOAL]
case h.hcover
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
b : ι →₀ R
b_supp : b ∈ Finsupp.supported R R ↑t
hb : ∑ i in t, ↑b i * h i = f ^ (n + 1)
tt : Type u := ↑↑t
x : ↑(PrimeSpectrum.Top R)
hx : x ∈ ↑(PrimeSpectrum.basicOpen f)
⊢ x ∈ ↑(⨆ (i : tt), PrimeSpectrum.basicOpen (h ↑i))
[PROOFSTEP]
erw [TopologicalSpace.Opens.mem_iSup]
[GOAL]
case h.hcover
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
b : ι →₀ R
b_supp : b ∈ Finsupp.supported R R ↑t
hb : ∑ i in t, ↑b i * h i = f ^ (n + 1)
tt : Type u := ↑↑t
x : ↑(PrimeSpectrum.Top R)
hx : x ∈ ↑(PrimeSpectrum.basicOpen f)
⊢ ∃ i, x ∈ PrimeSpectrum.basicOpen (h ↑i)
[PROOFSTEP]
have := ht_cover hx
[GOAL]
case h.hcover
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
b : ι →₀ R
b_supp : b ∈ Finsupp.supported R R ↑t
hb : ∑ i in t, ↑b i * h i = f ^ (n + 1)
tt : Type u := ↑↑t
x : ↑(PrimeSpectrum.Top R)
hx : x ∈ ↑(PrimeSpectrum.basicOpen f)
this : x ∈ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
⊢ ∃ i, x ∈ PrimeSpectrum.basicOpen (h ↑i)
[PROOFSTEP]
rw [← Finset.set_biUnion_coe, Set.mem_iUnion₂] at this
[GOAL]
case h.hcover
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
b : ι →₀ R
b_supp : b ∈ Finsupp.supported R R ↑t
hb : ∑ i in t, ↑b i * h i = f ^ (n + 1)
tt : Type u := ↑↑t
x : ↑(PrimeSpectrum.Top R)
hx : x ∈ ↑(PrimeSpectrum.basicOpen f)
this : ∃ i j, x ∈ ↑(PrimeSpectrum.basicOpen (h i))
⊢ ∃ i, x ∈ PrimeSpectrum.basicOpen (h ↑i)
[PROOFSTEP]
rcases this with ⟨i, i_mem, x_mem⟩
[GOAL]
case h.hcover.intro.intro
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
b : ι →₀ R
b_supp : b ∈ Finsupp.supported R R ↑t
hb : ∑ i in t, ↑b i * h i = f ^ (n + 1)
tt : Type u := ↑↑t
x : ↑(PrimeSpectrum.Top R)
hx : x ∈ ↑(PrimeSpectrum.basicOpen f)
i : ι
i_mem : i ∈ ↑t
x_mem : x ∈ ↑(PrimeSpectrum.basicOpen (h i))
⊢ ∃ i, x ∈ PrimeSpectrum.basicOpen (h ↑i)
[PROOFSTEP]
refine ⟨⟨i, i_mem⟩, x_mem⟩
[GOAL]
case h.h
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
b : ι →₀ R
b_supp : b ∈ Finsupp.supported R R ↑t
hb : ∑ i in t, ↑b i * h i = f ^ (n + 1)
tt : Type u := ↑↑t
⊢ ∀ (i : tt),
    ↑((structureSheaf R).val.map (iDh ↑i).op)
        (const R (∑ i in t, ↑b i * a i)
          (↑{ val := f ^ (n + 1), property := (_ : ∃ y, (fun x x_1 => x ^ x_1) f y = f ^ (n + 1)) })
          (PrimeSpectrum.basicOpen f)
          (_ :
            ∀ (x : ↑(PrimeSpectrum.Top R)),
              x ∈ PrimeSpectrum.basicOpen f →
                ↑{ val := f ^ (n + 1), property := (_ : ∃ y, (fun x x_1 => x ^ x_1) f y = f ^ (n + 1)) } ∈
                  Ideal.primeCompl x.asIdeal)) =
      ↑((structureSheaf R).val.map (iDh ↑i).op) s
[PROOFSTEP]
rintro ⟨i, hi⟩
[GOAL]
case h.h.mk
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
b : ι →₀ R
b_supp : b ∈ Finsupp.supported R R ↑t
hb : ∑ i in t, ↑b i * h i = f ^ (n + 1)
tt : Type u := ↑↑t
i : ι
hi : i ∈ ↑t
⊢ ↑((structureSheaf R).val.map (iDh ↑{ val := i, property := hi }).op)
      (const R (∑ i in t, ↑b i * a i)
        (↑{ val := f ^ (n + 1), property := (_ : ∃ y, (fun x x_1 => x ^ x_1) f y = f ^ (n + 1)) })
        (PrimeSpectrum.basicOpen f)
        (_ :
          ∀ (x : ↑(PrimeSpectrum.Top R)),
            x ∈ PrimeSpectrum.basicOpen f →
              ↑{ val := f ^ (n + 1), property := (_ : ∃ y, (fun x x_1 => x ^ x_1) f y = f ^ (n + 1)) } ∈
                Ideal.primeCompl x.asIdeal)) =
    ↑((structureSheaf R).val.map (iDh ↑{ val := i, property := hi }).op) s
[PROOFSTEP]
dsimp
[GOAL]
case h.h.mk
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
b : ι →₀ R
b_supp : b ∈ Finsupp.supported R R ↑t
hb : ∑ i in t, ↑b i * h i = f ^ (n + 1)
tt : Type u := ↑↑t
i : ι
hi : i ∈ ↑t
⊢ ↑((structureSheaf R).val.map (iDh i).op)
      (const R (∑ i in t, ↑b i * a i) (f ^ (n + 1)) (PrimeSpectrum.basicOpen f)
        (_ :
          ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ PrimeSpectrum.basicOpen f → f ^ (n + 1) ∈ Ideal.primeCompl x.asIdeal)) =
    ↑((structureSheaf R).val.map (iDh i).op) s
[PROOFSTEP]
change (structureSheaf R).1.map _ _ = (structureSheaf R).1.map _ _
[GOAL]
case h.h.mk
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
b : ι →₀ R
b_supp : b ∈ Finsupp.supported R R ↑t
hb : ∑ i in t, ↑b i * h i = f ^ (n + 1)
tt : Type u := ↑↑t
i : ι
hi : i ∈ ↑t
⊢ ↑((structureSheaf R).val.map (iDh i).op)
      (const R (∑ i in t, ↑b i * a i) (f ^ (n + 1)) (PrimeSpectrum.basicOpen f)
        (_ :
          ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ PrimeSpectrum.basicOpen f → f ^ (n + 1) ∈ Ideal.primeCompl x.asIdeal)) =
    ↑((structureSheaf R).val.map (iDh i).op) s
[PROOFSTEP]
rw [s_eq i hi, res_const]
  -- Again, `res_const` spits out an additional goal
[GOAL]
case h.h.mk
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
b : ι →₀ R
b_supp : b ∈ Finsupp.supported R R ↑t
hb : ∑ i in t, ↑b i * h i = f ^ (n + 1)
tt : Type u := ↑↑t
i : ι
hi : i ∈ ↑t
⊢ const R (∑ i in t, ↑b i * a i) (f ^ (n + 1)) (PrimeSpectrum.basicOpen (h i)) ?h.h.mk.hv =
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
      (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
case h.h.mk.hv
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
b : ι →₀ R
b_supp : b ∈ Finsupp.supported R R ↑t
hb : ∑ i in t, ↑b i * h i = f ^ (n + 1)
tt : Type u := ↑↑t
i : ι
hi : i ∈ ↑t
⊢ ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ PrimeSpectrum.basicOpen (h i) → f ^ (n + 1) ∈ Ideal.primeCompl x.asIdeal
[PROOFSTEP]
swap
[GOAL]
case h.h.mk.hv
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
b : ι →₀ R
b_supp : b ∈ Finsupp.supported R R ↑t
hb : ∑ i in t, ↑b i * h i = f ^ (n + 1)
tt : Type u := ↑↑t
i : ι
hi : i ∈ ↑t
⊢ ∀ (x : ↑(PrimeSpectrum.Top R)), x ∈ PrimeSpectrum.basicOpen (h i) → f ^ (n + 1) ∈ Ideal.primeCompl x.asIdeal
[PROOFSTEP]
intro y hy
[GOAL]
case h.h.mk.hv
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
b : ι →₀ R
b_supp : b ∈ Finsupp.supported R R ↑t
hb : ∑ i in t, ↑b i * h i = f ^ (n + 1)
tt : Type u := ↑↑t
i : ι
hi : i ∈ ↑t
y : ↑(PrimeSpectrum.Top R)
hy : y ∈ PrimeSpectrum.basicOpen (h i)
⊢ f ^ (n + 1) ∈ Ideal.primeCompl y.asIdeal
[PROOFSTEP]
change y ∈ PrimeSpectrum.basicOpen (f ^ (n + 1))
[GOAL]
case h.h.mk.hv
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
b : ι →₀ R
b_supp : b ∈ Finsupp.supported R R ↑t
hb : ∑ i in t, ↑b i * h i = f ^ (n + 1)
tt : Type u := ↑↑t
i : ι
hi : i ∈ ↑t
y : ↑(PrimeSpectrum.Top R)
hy : y ∈ PrimeSpectrum.basicOpen (h i)
⊢ y ∈ PrimeSpectrum.basicOpen (f ^ (n + 1))
[PROOFSTEP]
rw [PrimeSpectrum.basicOpen_pow f (n + 1) (by linarith)]
[GOAL]
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
b : ι →₀ R
b_supp : b ∈ Finsupp.supported R R ↑t
hb : ∑ i in t, ↑b i * h i = f ^ (n + 1)
tt : Type u := ↑↑t
i : ι
hi : i ∈ ↑t
y : ↑(PrimeSpectrum.Top R)
hy : y ∈ PrimeSpectrum.basicOpen (h i)
⊢ 0 < n + 1
[PROOFSTEP]
linarith
[GOAL]
case h.h.mk.hv
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
b : ι →₀ R
b_supp : b ∈ Finsupp.supported R R ↑t
hb : ∑ i in t, ↑b i * h i = f ^ (n + 1)
tt : Type u := ↑↑t
i : ι
hi : i ∈ ↑t
y : ↑(PrimeSpectrum.Top R)
hy : y ∈ PrimeSpectrum.basicOpen (h i)
⊢ y ∈ PrimeSpectrum.basicOpen f
[PROOFSTEP]
exact (leOfHom (iDh i) : _) hy
[GOAL]
case h.h.mk
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
b : ι →₀ R
b_supp : b ∈ Finsupp.supported R R ↑t
hb : ∑ i in t, ↑b i * h i = f ^ (n + 1)
tt : Type u := ↑↑t
i : ι
hi : i ∈ ↑t
⊢ const R (∑ i in t, ↑b i * a i) (f ^ (n + 1)) (PrimeSpectrum.basicOpen (h i))
      (_ :
        ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (f ^ (n + 1))) =
    const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
      (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
[PROOFSTEP]
apply const_ext
[GOAL]
case h.h.mk.h
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
b : ι →₀ R
b_supp : b ∈ Finsupp.supported R R ↑t
hb : ∑ i in t, ↑b i * h i = f ^ (n + 1)
tt : Type u := ↑↑t
i : ι
hi : i ∈ ↑t
⊢ (∑ i in t, ↑b i * a i) * h i = a i * f ^ (n + 1)
[PROOFSTEP]
rw [← hb, Finset.sum_mul, Finset.mul_sum]
[GOAL]
case h.h.mk.h
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
b : ι →₀ R
b_supp : b ∈ Finsupp.supported R R ↑t
hb : ∑ i in t, ↑b i * h i = f ^ (n + 1)
tt : Type u := ↑↑t
i : ι
hi : i ∈ ↑t
⊢ ∑ x in t, ↑b x * a x * h i = ∑ x in t, a i * (↑b x * h x)
[PROOFSTEP]
apply Finset.sum_congr rfl
[GOAL]
case h.h.mk.h
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
b : ι →₀ R
b_supp : b ∈ Finsupp.supported R R ↑t
hb : ∑ i in t, ↑b i * h i = f ^ (n + 1)
tt : Type u := ↑↑t
i : ι
hi : i ∈ ↑t
⊢ ∀ (x : { x // x ∈ PrimeSpectrum.basicOpen f }), x ∈ t → ↑b x * a x * h i = a i * (↑b x * h x)
[PROOFSTEP]
intro j hj
[GOAL]
case h.h.mk.h
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
b : ι →₀ R
b_supp : b ∈ Finsupp.supported R R ↑t
hb : ∑ i in t, ↑b i * h i = f ^ (n + 1)
tt : Type u := ↑↑t
i : ι
hi : i ∈ ↑t
j : { x // x ∈ PrimeSpectrum.basicOpen f }
hj : j ∈ t
⊢ ↑b j * a j * h i = a i * (↑b j * h j)
[PROOFSTEP]
rw [mul_assoc, ah_ha j hj i hi]
[GOAL]
case h.h.mk.h
R : Type u
inst✝ : CommRing R
f : R
s : ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen f)))
ι : Type u := { x // x ∈ PrimeSpectrum.basicOpen f }
t : Finset ι
a h : ι → R
iDh : (i : ι) → PrimeSpectrum.basicOpen (h i) ⟶ PrimeSpectrum.basicOpen f
ah_ha : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → a i * h j = h i * a j
s_eq :
  ∀ (i : ι),
    i ∈ t →
      ↑((structureSheaf R).val.map (iDh i).op) s =
        const R (a i) (h i) (PrimeSpectrum.basicOpen (h i))
          (_ : ∀ (y : ↑(PrimeSpectrum.Top R)), y ∈ PrimeSpectrum.basicOpen (h i) → y ∈ PrimeSpectrum.basicOpen (h i))
ht_cover : ↑(PrimeSpectrum.basicOpen f) ⊆ ⋃ (i : ι) (_ : i ∈ t), ↑(PrimeSpectrum.basicOpen (h i))
n : ℕ
b : ι →₀ R
b_supp : b ∈ Finsupp.supported R R ↑t
hb : ∑ i in t, ↑b i * h i = f ^ (n + 1)
tt : Type u := ↑↑t
i : ι
hi : i ∈ ↑t
j : { x // x ∈ PrimeSpectrum.basicOpen f }
hj : j ∈ t
⊢ ↑b j * (h j * a i) = a i * (↑b j * h j)
[PROOFSTEP]
ring
[GOAL]
R : Type u
inst✝ : CommRing R
p : PrimeSpectrum R
⊢ IsLocalization.AtPrime (↑(stalk (Sheaf.presheaf (structureSheaf R)) p)) p.asIdeal
[PROOFSTEP]
convert
  (IsLocalization.isLocalization_iff_of_ringEquiv (S := Localization.AtPrime p.asIdeal) _
        (stalkIso R p).symm.commRingCatIsoToRingEquiv).mp
    Localization.isLocalization
[GOAL]
case h.e'_5.h
R : Type u
inst✝ : CommRing R
p : PrimeSpectrum R
⊢ stalkAlgebra R p =
    RingHom.toAlgebra
      (RingHom.comp (RingEquiv.toRingHom (Iso.commRingCatIsoToRingEquiv (stalkIso R p).symm))
        (algebraMap R (Localization.AtPrime p.asIdeal)))
[PROOFSTEP]
apply Algebra.algebra_ext
[GOAL]
case h.e'_5.h.h
R : Type u
inst✝ : CommRing R
p : PrimeSpectrum R
⊢ ∀ (r : R),
    ↑(algebraMap R ↑(stalk (Sheaf.presheaf (structureSheaf R)) p)) r =
      ↑(algebraMap R ↑(stalk (Sheaf.presheaf (structureSheaf R)) p)) r
[PROOFSTEP]
intro
[GOAL]
case h.e'_5.h.h
R : Type u
inst✝ : CommRing R
p : PrimeSpectrum R
r✝ : R
⊢ ↑(algebraMap R ↑(stalk (Sheaf.presheaf (structureSheaf R)) p)) r✝ =
    ↑(algebraMap R ↑(stalk (Sheaf.presheaf (structureSheaf R)) p)) r✝
[PROOFSTEP]
rw [stalkAlgebra_map]
[GOAL]
case h.e'_5.h.h
R : Type u
inst✝ : CommRing R
p : PrimeSpectrum R
r✝ : R
⊢ ↑(toStalk R p) r✝ = ↑(algebraMap R ↑(stalk (Sheaf.presheaf (structureSheaf R)) p)) r✝
[PROOFSTEP]
congr 1
[GOAL]
case h.e'_5.h.h.e_a
R : Type u
inst✝ : CommRing R
p : PrimeSpectrum R
r✝ : R
⊢ toStalk R p = algebraMap R ↑(stalk (Sheaf.presheaf (structureSheaf R)) p)
[PROOFSTEP]
change toStalk R p = _ ≫ (stalkIso R p).inv
[GOAL]
case h.e'_5.h.h.e_a
R : Type u
inst✝ : CommRing R
p : PrimeSpectrum R
r✝ : R
⊢ toStalk R p = algebraMap R (Localization.AtPrime p.asIdeal) ≫ (stalkIso R p).inv
[PROOFSTEP]
erw [Iso.eq_comp_inv]
[GOAL]
case h.e'_5.h.h.e_a
R : Type u
inst✝ : CommRing R
p : PrimeSpectrum R
r✝ : R
⊢ toStalk R p ≫ (stalkIso R p).hom = algebraMap R (Localization.AtPrime p.asIdeal)
[PROOFSTEP]
exact toStalk_comp_stalkToFiberRingHom R p
[GOAL]
R : Type u
inst✝ : CommRing R
r : R
⊢ IsLocalization.Away r ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen r)))
[PROOFSTEP]
convert
  (IsLocalization.isLocalization_iff_of_ringEquiv (S := Localization.Away r) _
        (basicOpenIso R r).symm.commRingCatIsoToRingEquiv).mp
    Localization.isLocalization
[GOAL]
case h.e'_3
R : Type u
inst✝ : CommRing R
r : R
⊢ openAlgebra R (op (PrimeSpectrum.basicOpen r)) =
    RingHom.toAlgebra
      (RingHom.comp (RingEquiv.toRingHom (Iso.commRingCatIsoToRingEquiv (basicOpenIso R r).symm))
        (algebraMap R (Localization.Away r)))
[PROOFSTEP]
apply Algebra.algebra_ext
[GOAL]
case h.e'_3.h
R : Type u
inst✝ : CommRing R
r : R
⊢ ∀ (r_1 : R),
    ↑(algebraMap R ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen r)))) r_1 =
      ↑(algebraMap R ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen r)))) r_1
[PROOFSTEP]
intro x
[GOAL]
case h.e'_3.h
R : Type u
inst✝ : CommRing R
r x : R
⊢ ↑(algebraMap R ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen r)))) x =
    ↑(algebraMap R ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen r)))) x
[PROOFSTEP]
congr 1
[GOAL]
case h.e'_3.h.e_a
R : Type u
inst✝ : CommRing R
r x : R
⊢ algebraMap R ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen r))) =
    algebraMap R ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen r)))
[PROOFSTEP]
exact (localization_toBasicOpen R r).symm
[GOAL]
R : Type u
inst✝ : CommRing R
r : R
S : CommRingCat
f g : (structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen r)) ⟶ S
h : toOpen R (PrimeSpectrum.basicOpen r) ≫ f = toOpen R (PrimeSpectrum.basicOpen r) ≫ g
⊢ f = g
[PROOFSTEP]
refine' IsLocalization.ringHom_ext (R := R) (S := (structureSheaf R).val.obj (op <| PrimeSpectrum.basicOpen r)) _ _
[GOAL]
R : Type u
inst✝ : CommRing R
r : R
S : CommRingCat
f g : (structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen r)) ⟶ S
h : toOpen R (PrimeSpectrum.basicOpen r) ≫ f = toOpen R (PrimeSpectrum.basicOpen r) ≫ g
⊢ RingHom.comp f (algebraMap R ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen r)))) =
    RingHom.comp g (algebraMap R ↑((structureSheaf R).val.obj (op (PrimeSpectrum.basicOpen r))))
[PROOFSTEP]
exact h
[GOAL]
R : Type u
inst✝ : CommRing R
⊢ toOpen R ⊤ =
    CommRingCat.ofHom (algebraMap R (Localization.Away 1)) ≫
      toBasicOpen R 1 ≫ (structureSheaf R).val.map (eqToHom (_ : ⊤ = PrimeSpectrum.basicOpen 1)).op
[PROOFSTEP]
rw [← Category.assoc]
[GOAL]
R : Type u
inst✝ : CommRing R
⊢ toOpen R ⊤ =
    (CommRingCat.ofHom (algebraMap R (Localization.Away 1)) ≫ toBasicOpen R 1) ≫
      (structureSheaf R).val.map (eqToHom (_ : ⊤ = PrimeSpectrum.basicOpen 1)).op
[PROOFSTEP]
change
  toOpen R ⊤ =
    (CommRingCat.ofHom <| (toBasicOpen R 1).comp (algebraMap R (Localization.Away 1))) ≫
      (structureSheaf R).1.map (eqToHom _).op
[GOAL]
R : Type u
inst✝ : CommRing R
⊢ toOpen R ⊤ =
    CommRingCat.ofHom (RingHom.comp (toBasicOpen R 1) (algebraMap R (Localization.Away 1))) ≫
      (structureSheaf R).val.map (eqToHom (_ : ⊤ = PrimeSpectrum.basicOpen 1)).op
[PROOFSTEP]
unfold CommRingCat.ofHom
[GOAL]
R : Type u
inst✝ : CommRing R
⊢ toOpen R ⊤ =
    RingHom.comp (toBasicOpen R 1) (algebraMap R (Localization.Away 1)) ≫
      (structureSheaf R).val.map (eqToHom (_ : ⊤ = PrimeSpectrum.basicOpen 1)).op
[PROOFSTEP]
rw [localization_toBasicOpen R, toOpen_res]
[GOAL]
R : Type u
inst✝ : CommRing R
⊢ IsIso (toOpen R ⊤)
[PROOFSTEP]
let hom := CommRingCat.ofHom (algebraMap R (Localization.Away (1 : R)))
[GOAL]
R : Type u
inst✝ : CommRing R
hom : CommRingCat.of R ⟶ CommRingCat.of (Localization.Away 1) := CommRingCat.ofHom (algebraMap R (Localization.Away 1))
⊢ IsIso (toOpen R ⊤)
[PROOFSTEP]
haveI : IsIso hom := IsIso.of_iso (IsLocalization.atOne R (Localization.Away (1 : R))).toRingEquiv.toCommRingCatIso
[GOAL]
R : Type u
inst✝ : CommRing R
hom : CommRingCat.of R ⟶ CommRingCat.of (Localization.Away 1) := CommRingCat.ofHom (algebraMap R (Localization.Away 1))
this : IsIso hom
⊢ IsIso (toOpen R ⊤)
[PROOFSTEP]
rw [to_global_factors R]
[GOAL]
R : Type u
inst✝ : CommRing R
hom : CommRingCat.of R ⟶ CommRingCat.of (Localization.Away 1) := CommRingCat.ofHom (algebraMap R (Localization.Away 1))
this : IsIso hom
⊢ IsIso
    (CommRingCat.ofHom (algebraMap R (Localization.Away 1)) ≫
      toBasicOpen R 1 ≫ (structureSheaf R).val.map (eqToHom (_ : ⊤ = PrimeSpectrum.basicOpen 1)).op)
[PROOFSTEP]
infer_instance
[GOAL]
R✝ : Type u
inst✝¹ : CommRing R✝
R : Type u_1
inst✝ : CommRing R
x y : PrimeSpectrum R
h : x ⤳ y
⊢ toStalk R y ≫ stalkSpecializes (Sheaf.presheaf (structureSheaf R)) h = toStalk R x
[PROOFSTEP]
dsimp [toStalk]
[GOAL]
R✝ : Type u
inst✝¹ : CommRing R✝
R : Type u_1
inst✝ : CommRing R
x y : PrimeSpectrum R
h : x ⤳ y
⊢ (toOpen R ⊤ ≫ germ (Sheaf.presheaf (structureSheaf R)) { val := y, property := True.intro }) ≫
      stalkSpecializes (Sheaf.presheaf (structureSheaf R)) h =
    toOpen R ⊤ ≫ germ (Sheaf.presheaf (structureSheaf R)) { val := x, property := True.intro }
[PROOFSTEP]
simp [-toOpen_germ]
[GOAL]
R✝ : Type u
inst✝¹ : CommRing R✝
R : Type u_1
inst✝ : CommRing R
x y : PrimeSpectrum R
h : x ⤳ y
⊢ localizationToStalk R y ≫ stalkSpecializes (Sheaf.presheaf (structureSheaf R)) h =
    CommRingCat.ofHom (PrimeSpectrum.localizationMapOfSpecializes h) ≫ localizationToStalk R x
[PROOFSTEP]
apply IsLocalization.ringHom_ext (S := Localization.AtPrime y.asIdeal) y.asIdeal.primeCompl
[GOAL]
case h
R✝ : Type u
inst✝¹ : CommRing R✝
R : Type u_1
inst✝ : CommRing R
x y : PrimeSpectrum R
h : x ⤳ y
⊢ RingHom.comp (localizationToStalk R y ≫ stalkSpecializes (Sheaf.presheaf (structureSheaf R)) h)
      (algebraMap R (Localization.AtPrime y.asIdeal)) =
    RingHom.comp (CommRingCat.ofHom (PrimeSpectrum.localizationMapOfSpecializes h) ≫ localizationToStalk R x)
      (algebraMap R (Localization.AtPrime y.asIdeal))
[PROOFSTEP]
erw [RingHom.comp_assoc]
[GOAL]
case h
R✝ : Type u
inst✝¹ : CommRing R✝
R : Type u_1
inst✝ : CommRing R
x y : PrimeSpectrum R
h : x ⤳ y
⊢ RingHom.comp (stalkSpecializes (Sheaf.presheaf (structureSheaf R)) h)
      (RingHom.comp (localizationToStalk R y) (algebraMap R (Localization.AtPrime y.asIdeal))) =
    RingHom.comp (CommRingCat.ofHom (PrimeSpectrum.localizationMapOfSpecializes h) ≫ localizationToStalk R x)
      (algebraMap R (Localization.AtPrime y.asIdeal))
[PROOFSTEP]
conv_rhs => erw [RingHom.comp_assoc]
[GOAL]
R✝ : Type u
inst✝¹ : CommRing R✝
R : Type u_1
inst✝ : CommRing R
x y : PrimeSpectrum R
h : x ⤳ y
| RingHom.comp (CommRingCat.ofHom (PrimeSpectrum.localizationMapOfSpecializes h) ≫ localizationToStalk R x)
    (algebraMap R (Localization.AtPrime y.asIdeal))
[PROOFSTEP]
erw [RingHom.comp_assoc]
[GOAL]
R✝ : Type u
inst✝¹ : CommRing R✝
R : Type u_1
inst✝ : CommRing R
x y : PrimeSpectrum R
h : x ⤳ y
| RingHom.comp (CommRingCat.ofHom (PrimeSpectrum.localizationMapOfSpecializes h) ≫ localizationToStalk R x)
    (algebraMap R (Localization.AtPrime y.asIdeal))
[PROOFSTEP]
erw [RingHom.comp_assoc]
[GOAL]
R✝ : Type u
inst✝¹ : CommRing R✝
R : Type u_1
inst✝ : CommRing R
x y : PrimeSpectrum R
h : x ⤳ y
| RingHom.comp (CommRingCat.ofHom (PrimeSpectrum.localizationMapOfSpecializes h) ≫ localizationToStalk R x)
    (algebraMap R (Localization.AtPrime y.asIdeal))
[PROOFSTEP]
erw [RingHom.comp_assoc]
[GOAL]
case h
R✝ : Type u
inst✝¹ : CommRing R✝
R : Type u_1
inst✝ : CommRing R
x y : PrimeSpectrum R
h : x ⤳ y
⊢ RingHom.comp (stalkSpecializes (Sheaf.presheaf (structureSheaf R)) h)
      (RingHom.comp (localizationToStalk R y) (algebraMap R (Localization.AtPrime y.asIdeal))) =
    RingHom.comp (localizationToStalk R x)
      (RingHom.comp (CommRingCat.ofHom (PrimeSpectrum.localizationMapOfSpecializes h))
        (algebraMap R (Localization.AtPrime y.asIdeal)))
[PROOFSTEP]
dsimp [CommRingCat.ofHom, localizationToStalk, PrimeSpectrum.localizationMapOfSpecializes]
[GOAL]
case h
R✝ : Type u
inst✝¹ : CommRing R✝
R : Type u_1
inst✝ : CommRing R
x y : PrimeSpectrum R
h : x ⤳ y
⊢ RingHom.comp (stalkSpecializes (Sheaf.presheaf (structureSheaf R)) h)
      (RingHom.comp
        (IsLocalization.lift (_ : ∀ (f : { x // x ∈ Ideal.primeCompl y.asIdeal }), IsUnit (↑(toStalk R y) ↑f)))
        (algebraMap R (Localization.AtPrime y.asIdeal))) =
    RingHom.comp
      (IsLocalization.lift (_ : ∀ (f : { x_1 // x_1 ∈ Ideal.primeCompl x.asIdeal }), IsUnit (↑(toStalk R x) ↑f)))
      (RingHom.comp
        (IsLocalization.lift
          (_ :
            ∀ (y_1 : { x // x ∈ Ideal.primeCompl y.asIdeal }),
              IsUnit (↑(algebraMap R (Localization.AtPrime x.asIdeal)) ↑y_1)))
        (algebraMap R (Localization.AtPrime y.asIdeal)))
[PROOFSTEP]
rw [IsLocalization.lift_comp, IsLocalization.lift_comp, IsLocalization.lift_comp]
[GOAL]
case h
R✝ : Type u
inst✝¹ : CommRing R✝
R : Type u_1
inst✝ : CommRing R
x y : PrimeSpectrum R
h : x ⤳ y
⊢ RingHom.comp (stalkSpecializes (Sheaf.presheaf (structureSheaf R)) h) (toStalk R y) = toStalk R x
[PROOFSTEP]
exact toStalk_stalkSpecializes h
[GOAL]
R✝ : Type u
inst✝¹ : CommRing R✝
R : Type u_1
inst✝ : CommRing R
x y : PrimeSpectrum R
h : x ⤳ y
⊢ stalkSpecializes (Sheaf.presheaf (structureSheaf R)) h ≫ stalkToFiberRingHom R x =
    stalkToFiberRingHom R y ≫
      let_fun this := PrimeSpectrum.localizationMapOfSpecializes h;
      this
[PROOFSTEP]
change _ ≫ (StructureSheaf.stalkIso R x).hom = (StructureSheaf.stalkIso R y).hom ≫ _
[GOAL]
R✝ : Type u
inst✝¹ : CommRing R✝
R : Type u_1
inst✝ : CommRing R
x y : PrimeSpectrum R
h : x ⤳ y
⊢ stalkSpecializes (Sheaf.presheaf (structureSheaf R)) h ≫ (stalkIso R x).hom =
    (stalkIso R y).hom ≫
      let_fun this := PrimeSpectrum.localizationMapOfSpecializes h;
      this
[PROOFSTEP]
rw [← Iso.eq_comp_inv, Category.assoc, ← Iso.inv_comp_eq]
[GOAL]
R✝ : Type u
inst✝¹ : CommRing R✝
R : Type u_1
inst✝ : CommRing R
x y : PrimeSpectrum R
h : x ⤳ y
⊢ (stalkIso R y).inv ≫ stalkSpecializes (Sheaf.presheaf (structureSheaf R)) h =
    (let_fun this := PrimeSpectrum.localizationMapOfSpecializes h;
      this) ≫
      (stalkIso R x).inv
[PROOFSTEP]
exact localizationToStalk_stalkSpecializes h
[GOAL]
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
hUV : V.carrier ⊆ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier
s : (x : { x // x ∈ U }) → Localizations R ↑x
hs : PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate s
⊢ PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate (comapFun f U V hUV s)
[PROOFSTEP]
rintro
  ⟨p, hpV⟩
      -- Since `s` is locally fraction, we can find a neighborhood `W` of `PrimeSpectrum.comap f p`
        -- in `U`, such that `s = a / b` on `W`, for some ring elements `a, b : R`.
[GOAL]
case mk
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
hUV : V.carrier ⊆ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier
s : (x : { x // x ∈ U }) → Localizations R ↑x
hs : PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate s
p : ↑(PrimeSpectrum.Top S)
hpV : p ∈ V
⊢ ∃ V_1 x i,
    PrelocalPredicate.pred (isFractionPrelocal S) fun x =>
      comapFun f U V hUV s ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)
[PROOFSTEP]
rcases hs ⟨PrimeSpectrum.comap f p, hUV hpV⟩ with
  ⟨W, m, iWU, a, b, h_frac⟩
    -- We claim that we can write our new section as the fraction `f a / f b` on the neighborhood
      -- `(comap f) ⁻¹ W ⊓ V` of `p`.
[GOAL]
case mk.intro.intro.intro.intro.intro
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
hUV : V.carrier ⊆ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier
s : (x : { x // x ∈ U }) → Localizations R ↑x
hs : PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate s
p : ↑(PrimeSpectrum.Top S)
hpV : p ∈ V
W : Opens ↑(PrimeSpectrum.Top R)
m : ↑{ val := ↑(PrimeSpectrum.comap f) p, property := (_ : p ∈ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier) } ∈ W
iWU : W ⟶ U
a b : R
h_frac :
  ∀ (x : { x // x ∈ W }),
    ¬b ∈ (↑x).asIdeal ∧
      (fun x => s ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)) x * ↑(algebraMap R (Localizations R ↑x)) b =
        ↑(algebraMap R (Localizations R ↑x)) a
⊢ ∃ V_1 x i,
    PrelocalPredicate.pred (isFractionPrelocal S) fun x =>
      comapFun f U V hUV s ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)
[PROOFSTEP]
refine' ⟨Opens.comap (PrimeSpectrum.comap f) W ⊓ V, ⟨m, hpV⟩, Opens.infLERight _ _, f a, f b, _⟩
[GOAL]
case mk.intro.intro.intro.intro.intro
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
hUV : V.carrier ⊆ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier
s : (x : { x // x ∈ U }) → Localizations R ↑x
hs : PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate s
p : ↑(PrimeSpectrum.Top S)
hpV : p ∈ V
W : Opens ↑(PrimeSpectrum.Top R)
m : ↑{ val := ↑(PrimeSpectrum.comap f) p, property := (_ : p ∈ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier) } ∈ W
iWU : W ⟶ U
a b : R
h_frac :
  ∀ (x : { x // x ∈ W }),
    ¬b ∈ (↑x).asIdeal ∧
      (fun x => s ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)) x * ↑(algebraMap R (Localizations R ↑x)) b =
        ↑(algebraMap R (Localizations R ↑x)) a
⊢ ∀ (x : { x // x ∈ ↑(Opens.comap (PrimeSpectrum.comap f)) W ⊓ V }),
    ¬↑f b ∈ (↑x).asIdeal ∧
      (fun x => comapFun f U V hUV s ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)) x *
          ↑(algebraMap S (Localizations S ↑x)) (↑f b) =
        ↑(algebraMap S (Localizations S ↑x)) (↑f a)
[PROOFSTEP]
rintro ⟨q, ⟨hqW, hqV⟩⟩
[GOAL]
case mk.intro.intro.intro.intro.intro.mk.intro
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
hUV : V.carrier ⊆ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier
s : (x : { x // x ∈ U }) → Localizations R ↑x
hs : PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate s
p : ↑(PrimeSpectrum.Top S)
hpV : p ∈ V
W : Opens ↑(PrimeSpectrum.Top R)
m : ↑{ val := ↑(PrimeSpectrum.comap f) p, property := (_ : p ∈ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier) } ∈ W
iWU : W ⟶ U
a b : R
h_frac :
  ∀ (x : { x // x ∈ W }),
    ¬b ∈ (↑x).asIdeal ∧
      (fun x => s ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)) x * ↑(algebraMap R (Localizations R ↑x)) b =
        ↑(algebraMap R (Localizations R ↑x)) a
q : ↑(PrimeSpectrum.Top S)
hqW : q ∈ ↑(↑(Opens.comap (PrimeSpectrum.comap f)) W)
hqV : q ∈ ↑V
⊢ ¬↑f b ∈ (↑{ val := q, property := (_ : q ∈ ↑(↑(Opens.comap (PrimeSpectrum.comap f)) W) ∧ q ∈ ↑V) }).asIdeal ∧
    (fun x => comapFun f U V hUV s ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x))
          { val := q, property := (_ : q ∈ ↑(↑(Opens.comap (PrimeSpectrum.comap f)) W) ∧ q ∈ ↑V) } *
        ↑(algebraMap S
              (Localizations S
                ↑{ val := q, property := (_ : q ∈ ↑(↑(Opens.comap (PrimeSpectrum.comap f)) W) ∧ q ∈ ↑V) }))
          (↑f b) =
      ↑(algebraMap S
            (Localizations S ↑{ val := q, property := (_ : q ∈ ↑(↑(Opens.comap (PrimeSpectrum.comap f)) W) ∧ q ∈ ↑V) }))
        (↑f a)
[PROOFSTEP]
specialize h_frac ⟨PrimeSpectrum.comap f q, hqW⟩
[GOAL]
case mk.intro.intro.intro.intro.intro.mk.intro
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
hUV : V.carrier ⊆ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier
s : (x : { x // x ∈ U }) → Localizations R ↑x
hs : PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate s
p : ↑(PrimeSpectrum.Top S)
hpV : p ∈ V
W : Opens ↑(PrimeSpectrum.Top R)
m : ↑{ val := ↑(PrimeSpectrum.comap f) p, property := (_ : p ∈ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier) } ∈ W
iWU : W ⟶ U
a b : R
q : ↑(PrimeSpectrum.Top S)
hqW : q ∈ ↑(↑(Opens.comap (PrimeSpectrum.comap f)) W)
hqV : q ∈ ↑V
h_frac :
  ¬b ∈ (↑{ val := ↑(PrimeSpectrum.comap f) q, property := hqW }).asIdeal ∧
    (fun x => s ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x))
          { val := ↑(PrimeSpectrum.comap f) q, property := hqW } *
        ↑(algebraMap R (Localizations R ↑{ val := ↑(PrimeSpectrum.comap f) q, property := hqW })) b =
      ↑(algebraMap R (Localizations R ↑{ val := ↑(PrimeSpectrum.comap f) q, property := hqW })) a
⊢ ¬↑f b ∈ (↑{ val := q, property := (_ : q ∈ ↑(↑(Opens.comap (PrimeSpectrum.comap f)) W) ∧ q ∈ ↑V) }).asIdeal ∧
    (fun x => comapFun f U V hUV s ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x))
          { val := q, property := (_ : q ∈ ↑(↑(Opens.comap (PrimeSpectrum.comap f)) W) ∧ q ∈ ↑V) } *
        ↑(algebraMap S
              (Localizations S
                ↑{ val := q, property := (_ : q ∈ ↑(↑(Opens.comap (PrimeSpectrum.comap f)) W) ∧ q ∈ ↑V) }))
          (↑f b) =
      ↑(algebraMap S
            (Localizations S ↑{ val := q, property := (_ : q ∈ ↑(↑(Opens.comap (PrimeSpectrum.comap f)) W) ∧ q ∈ ↑V) }))
        (↑f a)
[PROOFSTEP]
refine' ⟨h_frac.1, _⟩
[GOAL]
case mk.intro.intro.intro.intro.intro.mk.intro
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
hUV : V.carrier ⊆ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier
s : (x : { x // x ∈ U }) → Localizations R ↑x
hs : PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate s
p : ↑(PrimeSpectrum.Top S)
hpV : p ∈ V
W : Opens ↑(PrimeSpectrum.Top R)
m : ↑{ val := ↑(PrimeSpectrum.comap f) p, property := (_ : p ∈ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier) } ∈ W
iWU : W ⟶ U
a b : R
q : ↑(PrimeSpectrum.Top S)
hqW : q ∈ ↑(↑(Opens.comap (PrimeSpectrum.comap f)) W)
hqV : q ∈ ↑V
h_frac :
  ¬b ∈ (↑{ val := ↑(PrimeSpectrum.comap f) q, property := hqW }).asIdeal ∧
    (fun x => s ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x))
          { val := ↑(PrimeSpectrum.comap f) q, property := hqW } *
        ↑(algebraMap R (Localizations R ↑{ val := ↑(PrimeSpectrum.comap f) q, property := hqW })) b =
      ↑(algebraMap R (Localizations R ↑{ val := ↑(PrimeSpectrum.comap f) q, property := hqW })) a
⊢ (fun x => comapFun f U V hUV s ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x))
        { val := q, property := (_ : q ∈ ↑(↑(Opens.comap (PrimeSpectrum.comap f)) W) ∧ q ∈ ↑V) } *
      ↑(algebraMap S
            (Localizations S ↑{ val := q, property := (_ : q ∈ ↑(↑(Opens.comap (PrimeSpectrum.comap f)) W) ∧ q ∈ ↑V) }))
        (↑f b) =
    ↑(algebraMap S
          (Localizations S ↑{ val := q, property := (_ : q ∈ ↑(↑(Opens.comap (PrimeSpectrum.comap f)) W) ∧ q ∈ ↑V) }))
      (↑f a)
[PROOFSTEP]
dsimp only [comapFun]
[GOAL]
case mk.intro.intro.intro.intro.intro.mk.intro
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
hUV : V.carrier ⊆ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier
s : (x : { x // x ∈ U }) → Localizations R ↑x
hs : PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate s
p : ↑(PrimeSpectrum.Top S)
hpV : p ∈ V
W : Opens ↑(PrimeSpectrum.Top R)
m : ↑{ val := ↑(PrimeSpectrum.comap f) p, property := (_ : p ∈ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier) } ∈ W
iWU : W ⟶ U
a b : R
q : ↑(PrimeSpectrum.Top S)
hqW : q ∈ ↑(↑(Opens.comap (PrimeSpectrum.comap f)) W)
hqV : q ∈ ↑V
h_frac :
  ¬b ∈ (↑{ val := ↑(PrimeSpectrum.comap f) q, property := hqW }).asIdeal ∧
    (fun x => s ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x))
          { val := ↑(PrimeSpectrum.comap f) q, property := hqW } *
        ↑(algebraMap R (Localizations R ↑{ val := ↑(PrimeSpectrum.comap f) q, property := hqW })) b =
      ↑(algebraMap R (Localizations R ↑{ val := ↑(PrimeSpectrum.comap f) q, property := hqW })) a
⊢ ↑(Localization.localRingHom (↑(PrimeSpectrum.comap f) q).asIdeal q.asIdeal f
            (_ :
              (↑(PrimeSpectrum.comap f)
                    ↑{ val := q,
                        property :=
                          (_ :
                            ↑{ val := q, property := (_ : q ∈ ↑(↑(Opens.comap (PrimeSpectrum.comap f)) W) ∧ q ∈ ↑V) } ∈
                              ↑V) }).asIdeal =
                (↑(PrimeSpectrum.comap f)
                    ↑{ val := q,
                        property :=
                          (_ :
                            ↑{ val := q, property := (_ : q ∈ ↑(↑(Opens.comap (PrimeSpectrum.comap f)) W) ∧ q ∈ ↑V) } ∈
                              ↑V) }).asIdeal))
        (s
          { val := ↑(PrimeSpectrum.comap f) q,
            property :=
              (_ :
                ↑{ val := q,
                      property :=
                        (_ :
                          ↑{ val := q, property := (_ : q ∈ ↑(↑(Opens.comap (PrimeSpectrum.comap f)) W) ∧ q ∈ ↑V) } ∈
                            ↑V) } ∈
                  ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier) }) *
      ↑(algebraMap S (Localizations S q)) (↑f b) =
    ↑(algebraMap S (Localizations S q)) (↑f a)
[PROOFSTEP]
erw [← Localization.localRingHom_to_map (PrimeSpectrum.comap f q).asIdeal, ← RingHom.map_mul, h_frac.2,
  Localization.localRingHom_to_map]
[GOAL]
case mk.intro.intro.intro.intro.intro.mk.intro
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
hUV : V.carrier ⊆ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier
s : (x : { x // x ∈ U }) → Localizations R ↑x
hs : PrelocalPredicate.pred (isLocallyFraction R).toPrelocalPredicate s
p : ↑(PrimeSpectrum.Top S)
hpV : p ∈ V
W : Opens ↑(PrimeSpectrum.Top R)
m : ↑{ val := ↑(PrimeSpectrum.comap f) p, property := (_ : p ∈ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier) } ∈ W
iWU : W ⟶ U
a b : R
q : ↑(PrimeSpectrum.Top S)
hqW : q ∈ ↑(↑(Opens.comap (PrimeSpectrum.comap f)) W)
hqV : q ∈ ↑V
h_frac :
  ¬b ∈ (↑{ val := ↑(PrimeSpectrum.comap f) q, property := hqW }).asIdeal ∧
    (fun x => s ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x))
          { val := ↑(PrimeSpectrum.comap f) q, property := hqW } *
        ↑(algebraMap R (Localizations R ↑{ val := ↑(PrimeSpectrum.comap f) q, property := hqW })) b =
      ↑(algebraMap R (Localizations R ↑{ val := ↑(PrimeSpectrum.comap f) q, property := hqW })) a
⊢ ↑(algebraMap ((fun x => S) a) (Localization.AtPrime q.asIdeal)) (↑f a) = ↑(algebraMap S (Localizations S q)) (↑f a)
[PROOFSTEP]
rfl
[GOAL]
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
hUV : V.carrier ⊆ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier
p : { x // x ∈ (op V).unop }
⊢ ↑((fun s =>
            { val := comapFun f U V hUV ↑s,
              property :=
                (_ : PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate (comapFun f U V hUV ↑s)) })
          1)
      p =
    ↑1 p
[PROOFSTEP]
dsimp
[GOAL]
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
hUV : V.carrier ⊆ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier
p : { x // x ∈ (op V).unop }
⊢ comapFun f U V hUV (↑1) p = ↑1 p
[PROOFSTEP]
rw [comapFun, (sectionsSubring R (op U)).coe_one, Pi.one_apply, RingHom.map_one]
[GOAL]
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
hUV : V.carrier ⊆ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier
p : { x // x ∈ (op V).unop }
⊢ 1 = ↑1 p
[PROOFSTEP]
rfl
[GOAL]
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
hUV : V.carrier ⊆ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier
s t : ↑((structureSheaf R).val.obj (op U))
p : { x // x ∈ (op V).unop }
⊢ ↑(OneHom.toFun
          {
            toFun := fun s =>
              { val := comapFun f U V hUV ↑s,
                property :=
                  (_ : PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate (comapFun f U V hUV ↑s)) },
            map_one' :=
              (_ :
                (fun s =>
                      { val := comapFun f U V hUV ↑s,
                        property :=
                          (_ :
                            PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate (comapFun f U V hUV ↑s)) })
                    1 =
                  1) }
          (s * t))
      p =
    ↑(OneHom.toFun
            {
              toFun := fun s =>
                { val := comapFun f U V hUV ↑s,
                  property :=
                    (_ : PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate (comapFun f U V hUV ↑s)) },
              map_one' :=
                (_ :
                  (fun s =>
                        { val := comapFun f U V hUV ↑s,
                          property :=
                            (_ :
                              PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate
                                (comapFun f U V hUV ↑s)) })
                      1 =
                    1) }
            s *
          OneHom.toFun
            {
              toFun := fun s =>
                { val := comapFun f U V hUV ↑s,
                  property :=
                    (_ : PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate (comapFun f U V hUV ↑s)) },
              map_one' :=
                (_ :
                  (fun s =>
                        { val := comapFun f U V hUV ↑s,
                          property :=
                            (_ :
                              PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate
                                (comapFun f U V hUV ↑s)) })
                      1 =
                    1) }
            t)
      p
[PROOFSTEP]
dsimp
[GOAL]
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
hUV : V.carrier ⊆ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier
s t : ↑((structureSheaf R).val.obj (op U))
p : { x // x ∈ (op V).unop }
⊢ comapFun f U V hUV (↑(s * t)) p =
    ↑({ val := comapFun f U V hUV ↑s,
            property :=
              (_ : PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate (comapFun f U V hUV ↑s)) } *
          { val := comapFun f U V hUV ↑t,
            property :=
              (_ : PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate (comapFun f U V hUV ↑t)) })
      p
[PROOFSTEP]
rw [comapFun, (sectionsSubring R (op U)).coe_mul, Pi.mul_apply, RingHom.map_mul]
[GOAL]
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
hUV : V.carrier ⊆ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier
s t : ↑((structureSheaf R).val.obj (op U))
p : { x // x ∈ (op V).unop }
⊢ ↑(Localization.localRingHom (↑(PrimeSpectrum.comap f) ↑p).asIdeal (↑p).asIdeal f
            (_ : (↑(PrimeSpectrum.comap f) ↑p).asIdeal = (↑(PrimeSpectrum.comap f) ↑p).asIdeal))
        (↑s { val := ↑(PrimeSpectrum.comap f) ↑p, property := (_ : ↑p ∈ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier) }) *
      ↑(Localization.localRingHom (↑(PrimeSpectrum.comap f) ↑p).asIdeal (↑p).asIdeal f
            (_ : (↑(PrimeSpectrum.comap f) ↑p).asIdeal = (↑(PrimeSpectrum.comap f) ↑p).asIdeal))
        (↑t { val := ↑(PrimeSpectrum.comap f) ↑p, property := (_ : ↑p ∈ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier) }) =
    ↑({ val := comapFun f U V hUV ↑s,
            property :=
              (_ : PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate (comapFun f U V hUV ↑s)) } *
          { val := comapFun f U V hUV ↑t,
            property :=
              (_ : PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate (comapFun f U V hUV ↑t)) })
      p
[PROOFSTEP]
rfl
[GOAL]
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
hUV : V.carrier ⊆ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier
p : { x // x ∈ (op V).unop }
⊢ ↑(OneHom.toFun
          (↑{
              toOneHom :=
                {
                  toFun := fun s =>
                    { val := comapFun f U V hUV ↑s,
                      property :=
                        (_ :
                          PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate (comapFun f U V hUV ↑s)) },
                  map_one' :=
                    (_ :
                      (fun s =>
                            { val := comapFun f U V hUV ↑s,
                              property :=
                                (_ :
                                  PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate
                                    (comapFun f U V hUV ↑s)) })
                          1 =
                        1) },
              map_mul' :=
                (_ :
                  ∀ (s t : ↑((structureSheaf R).val.obj (op U))),
                    OneHom.toFun
                        {
                          toFun := fun s =>
                            { val := comapFun f U V hUV ↑s,
                              property :=
                                (_ :
                                  PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate
                                    (comapFun f U V hUV ↑s)) },
                          map_one' :=
                            (_ :
                              (fun s =>
                                    { val := comapFun f U V hUV ↑s,
                                      property :=
                                        (_ :
                                          PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate
                                            (comapFun f U V hUV ↑s)) })
                                  1 =
                                1) }
                        (s * t) =
                      OneHom.toFun
                          {
                            toFun := fun s =>
                              { val := comapFun f U V hUV ↑s,
                                property :=
                                  (_ :
                                    PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate
                                      (comapFun f U V hUV ↑s)) },
                            map_one' :=
                              (_ :
                                (fun s =>
                                      { val := comapFun f U V hUV ↑s,
                                        property :=
                                          (_ :
                                            PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate
                                              (comapFun f U V hUV ↑s)) })
                                    1 =
                                  1) }
                          s *
                        OneHom.toFun
                          {
                            toFun := fun s =>
                              { val := comapFun f U V hUV ↑s,
                                property :=
                                  (_ :
                                    PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate
                                      (comapFun f U V hUV ↑s)) },
                            map_one' :=
                              (_ :
                                (fun s =>
                                      { val := comapFun f U V hUV ↑s,
                                        property :=
                                          (_ :
                                            PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate
                                              (comapFun f U V hUV ↑s)) })
                                    1 =
                                  1) }
                          t) })
          0)
      p =
    ↑0 p
[PROOFSTEP]
dsimp
[GOAL]
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
hUV : V.carrier ⊆ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier
p : { x // x ∈ (op V).unop }
⊢ comapFun f U V hUV (↑0) p = ↑0 p
[PROOFSTEP]
rw [comapFun, (sectionsSubring R (op U)).coe_zero, Pi.zero_apply, RingHom.map_zero]
[GOAL]
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
hUV : V.carrier ⊆ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier
p : { x // x ∈ (op V).unop }
⊢ 0 = ↑0 p
[PROOFSTEP]
rfl
[GOAL]
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
hUV : V.carrier ⊆ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier
s t : ↑((structureSheaf R).val.obj (op U))
p : { x // x ∈ (op V).unop }
⊢ ↑(OneHom.toFun
          (↑{
              toOneHom :=
                {
                  toFun := fun s =>
                    { val := comapFun f U V hUV ↑s,
                      property :=
                        (_ :
                          PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate (comapFun f U V hUV ↑s)) },
                  map_one' :=
                    (_ :
                      (fun s =>
                            { val := comapFun f U V hUV ↑s,
                              property :=
                                (_ :
                                  PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate
                                    (comapFun f U V hUV ↑s)) })
                          1 =
                        1) },
              map_mul' :=
                (_ :
                  ∀ (s t : ↑((structureSheaf R).val.obj (op U))),
                    OneHom.toFun
                        {
                          toFun := fun s =>
                            { val := comapFun f U V hUV ↑s,
                              property :=
                                (_ :
                                  PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate
                                    (comapFun f U V hUV ↑s)) },
                          map_one' :=
                            (_ :
                              (fun s =>
                                    { val := comapFun f U V hUV ↑s,
                                      property :=
                                        (_ :
                                          PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate
                                            (comapFun f U V hUV ↑s)) })
                                  1 =
                                1) }
                        (s * t) =
                      OneHom.toFun
                          {
                            toFun := fun s =>
                              { val := comapFun f U V hUV ↑s,
                                property :=
                                  (_ :
                                    PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate
                                      (comapFun f U V hUV ↑s)) },
                            map_one' :=
                              (_ :
                                (fun s =>
                                      { val := comapFun f U V hUV ↑s,
                                        property :=
                                          (_ :
                                            PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate
                                              (comapFun f U V hUV ↑s)) })
                                    1 =
                                  1) }
                          s *
                        OneHom.toFun
                          {
                            toFun := fun s =>
                              { val := comapFun f U V hUV ↑s,
                                property :=
                                  (_ :
                                    PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate
                                      (comapFun f U V hUV ↑s)) },
                            map_one' :=
                              (_ :
                                (fun s =>
                                      { val := comapFun f U V hUV ↑s,
                                        property :=
                                          (_ :
                                            PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate
                                              (comapFun f U V hUV ↑s)) })
                                    1 =
                                  1) }
                          t) })
          (s + t))
      p =
    ↑(OneHom.toFun
            (↑{
                toOneHom :=
                  {
                    toFun := fun s =>
                      { val := comapFun f U V hUV ↑s,
                        property :=
                          (_ :
                            PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate (comapFun f U V hUV ↑s)) },
                    map_one' :=
                      (_ :
                        (fun s =>
                              { val := comapFun f U V hUV ↑s,
                                property :=
                                  (_ :
                                    PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate
                                      (comapFun f U V hUV ↑s)) })
                            1 =
                          1) },
                map_mul' :=
                  (_ :
                    ∀ (s t : ↑((structureSheaf R).val.obj (op U))),
                      OneHom.toFun
                          {
                            toFun := fun s =>
                              { val := comapFun f U V hUV ↑s,
                                property :=
                                  (_ :
                                    PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate
                                      (comapFun f U V hUV ↑s)) },
                            map_one' :=
                              (_ :
                                (fun s =>
                                      { val := comapFun f U V hUV ↑s,
                                        property :=
                                          (_ :
                                            PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate
                                              (comapFun f U V hUV ↑s)) })
                                    1 =
                                  1) }
                          (s * t) =
                        OneHom.toFun
                            {
                              toFun := fun s =>
                                { val := comapFun f U V hUV ↑s,
                                  property :=
                                    (_ :
                                      PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate
                                        (comapFun f U V hUV ↑s)) },
                              map_one' :=
                                (_ :
                                  (fun s =>
                                        { val := comapFun f U V hUV ↑s,
                                          property :=
                                            (_ :
                                              PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate
                                                (comapFun f U V hUV ↑s)) })
                                      1 =
                                    1) }
                            s *
                          OneHom.toFun
                            {
                              toFun := fun s =>
                                { val := comapFun f U V hUV ↑s,
                                  property :=
                                    (_ :
                                      PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate
                                        (comapFun f U V hUV ↑s)) },
                              map_one' :=
                                (_ :
                                  (fun s =>
                                        { val := comapFun f U V hUV ↑s,
                                          property :=
                                            (_ :
                                              PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate
                                                (comapFun f U V hUV ↑s)) })
                                      1 =
                                    1) }
                            t) })
            s +
          OneHom.toFun
            (↑{
                toOneHom :=
                  {
                    toFun := fun s =>
                      { val := comapFun f U V hUV ↑s,
                        property :=
                          (_ :
                            PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate (comapFun f U V hUV ↑s)) },
                    map_one' :=
                      (_ :
                        (fun s =>
                              { val := comapFun f U V hUV ↑s,
                                property :=
                                  (_ :
                                    PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate
                                      (comapFun f U V hUV ↑s)) })
                            1 =
                          1) },
                map_mul' :=
                  (_ :
                    ∀ (s t : ↑((structureSheaf R).val.obj (op U))),
                      OneHom.toFun
                          {
                            toFun := fun s =>
                              { val := comapFun f U V hUV ↑s,
                                property :=
                                  (_ :
                                    PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate
                                      (comapFun f U V hUV ↑s)) },
                            map_one' :=
                              (_ :
                                (fun s =>
                                      { val := comapFun f U V hUV ↑s,
                                        property :=
                                          (_ :
                                            PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate
                                              (comapFun f U V hUV ↑s)) })
                                    1 =
                                  1) }
                          (s * t) =
                        OneHom.toFun
                            {
                              toFun := fun s =>
                                { val := comapFun f U V hUV ↑s,
                                  property :=
                                    (_ :
                                      PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate
                                        (comapFun f U V hUV ↑s)) },
                              map_one' :=
                                (_ :
                                  (fun s =>
                                        { val := comapFun f U V hUV ↑s,
                                          property :=
                                            (_ :
                                              PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate
                                                (comapFun f U V hUV ↑s)) })
                                      1 =
                                    1) }
                            s *
                          OneHom.toFun
                            {
                              toFun := fun s =>
                                { val := comapFun f U V hUV ↑s,
                                  property :=
                                    (_ :
                                      PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate
                                        (comapFun f U V hUV ↑s)) },
                              map_one' :=
                                (_ :
                                  (fun s =>
                                        { val := comapFun f U V hUV ↑s,
                                          property :=
                                            (_ :
                                              PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate
                                                (comapFun f U V hUV ↑s)) })
                                      1 =
                                    1) }
                            t) })
            t)
      p
[PROOFSTEP]
dsimp
[GOAL]
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
hUV : V.carrier ⊆ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier
s t : ↑((structureSheaf R).val.obj (op U))
p : { x // x ∈ (op V).unop }
⊢ comapFun f U V hUV (↑(s + t)) p =
    ↑({ val := comapFun f U V hUV ↑s,
            property :=
              (_ : PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate (comapFun f U V hUV ↑s)) } +
          { val := comapFun f U V hUV ↑t,
            property :=
              (_ : PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate (comapFun f U V hUV ↑t)) })
      p
[PROOFSTEP]
rw [comapFun, (sectionsSubring R (op U)).coe_add, Pi.add_apply, RingHom.map_add]
[GOAL]
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
hUV : V.carrier ⊆ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier
s t : ↑((structureSheaf R).val.obj (op U))
p : { x // x ∈ (op V).unop }
⊢ ↑(Localization.localRingHom (↑(PrimeSpectrum.comap f) ↑p).asIdeal (↑p).asIdeal f
            (_ : (↑(PrimeSpectrum.comap f) ↑p).asIdeal = (↑(PrimeSpectrum.comap f) ↑p).asIdeal))
        (↑s { val := ↑(PrimeSpectrum.comap f) ↑p, property := (_ : ↑p ∈ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier) }) +
      ↑(Localization.localRingHom (↑(PrimeSpectrum.comap f) ↑p).asIdeal (↑p).asIdeal f
            (_ : (↑(PrimeSpectrum.comap f) ↑p).asIdeal = (↑(PrimeSpectrum.comap f) ↑p).asIdeal))
        (↑t { val := ↑(PrimeSpectrum.comap f) ↑p, property := (_ : ↑p ∈ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier) }) =
    ↑({ val := comapFun f U V hUV ↑s,
            property :=
              (_ : PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate (comapFun f U V hUV ↑s)) } +
          { val := comapFun f U V hUV ↑t,
            property :=
              (_ : PrelocalPredicate.pred (isLocallyFraction S).toPrelocalPredicate (comapFun f U V hUV ↑t)) })
      p
[PROOFSTEP]
rfl
[GOAL]
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
hUV : V.carrier ⊆ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier
a b : R
hb : ∀ (x : PrimeSpectrum R), x ∈ U → b ∈ Ideal.primeCompl x.asIdeal
p : { x // x ∈ (op V).unop }
⊢ ↑(↑(comap f U V hUV) (const R a b U hb)) p =
    ↑(const S (↑f a) (↑f b) V
          (_ : ∀ (p : ↑(PrimeSpectrum.Top S)), p ∈ V → b ∈ Ideal.primeCompl (↑(PrimeSpectrum.comap f) p).asIdeal))
      p
[PROOFSTEP]
rw [comap_apply, const_apply, const_apply]
[GOAL]
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
hUV : V.carrier ⊆ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier
a b : R
hb : ∀ (x : PrimeSpectrum R), x ∈ U → b ∈ Ideal.primeCompl x.asIdeal
p : { x // x ∈ (op V).unop }
⊢ ↑(Localization.localRingHom (↑(PrimeSpectrum.comap f) ↑p).asIdeal (↑p).asIdeal f
          (_ : (↑(PrimeSpectrum.comap f) ↑p).asIdeal = (↑(PrimeSpectrum.comap f) ↑p).asIdeal))
      (IsLocalization.mk'
        (Localizations R
          ↑{ val := ↑(PrimeSpectrum.comap f) ↑p, property := (_ : ↑p ∈ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier) })
        a
        { val := b,
          property :=
            (_ :
              b ∈
                Ideal.primeCompl
                  (↑{ val := ↑(PrimeSpectrum.comap f) ↑p,
                        property := (_ : ↑p ∈ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier) }).asIdeal) }) =
    IsLocalization.mk' (Localizations S ↑p) (↑f a)
      { val := ↑f b, property := (_ : b ∈ Ideal.primeCompl (↑(PrimeSpectrum.comap f) ↑p).asIdeal) }
[PROOFSTEP]
erw [Localization.localRingHom_mk']
[GOAL]
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
hUV : V.carrier ⊆ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier
a b : R
hb : ∀ (x : PrimeSpectrum R), x ∈ U → b ∈ Ideal.primeCompl x.asIdeal
p : { x // x ∈ (op V).unop }
⊢ IsLocalization.mk' (Localization.AtPrime (↑p).asIdeal) (↑f a)
      {
        val :=
          ↑f
            ↑{ val := b,
                property :=
                  (_ :
                    b ∈
                      Ideal.primeCompl
                        (↑{ val := ↑(PrimeSpectrum.comap f) ↑p,
                              property := (_ : ↑p ∈ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier) }).asIdeal) },
        property :=
          (_ :
            ↑{ val := b,
                  property :=
                    (_ :
                      b ∈
                        Ideal.primeCompl
                          (↑{ val := ↑(PrimeSpectrum.comap f) ↑p,
                                property := (_ : ↑p ∈ ↑(PrimeSpectrum.comap f) ⁻¹' U.carrier) }).asIdeal) } ∈
              Submonoid.comap f (Ideal.primeCompl (↑p).asIdeal)) } =
    IsLocalization.mk' (Localizations S ↑p) (↑f a)
      { val := ↑f b, property := (_ : b ∈ Ideal.primeCompl (↑(PrimeSpectrum.comap f) ↑p).asIdeal) }
[PROOFSTEP]
rfl
[GOAL]
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
U V : Opens ↑(PrimeSpectrum.Top R)
iVU : V ⟶ U
s : ↑((structureSheaf R).val.obj (op U))
p : { x // x ∈ (op V).unop }
⊢ ↑(↑(comap (RingHom.id R) U V (_ : ∀ (p : ↑(PrimeSpectrum.Top R)), p ∈ V.carrier → p ∈ ↑U)) s) p =
    ↑(↑((structureSheaf R).val.map iVU.op) s) p
[PROOFSTEP]
rw [comap_apply]
  -- Unfortunately, we cannot use `Localization.localRingHom_id` here, because
      -- `PrimeSpectrum.comap (RingHom.id R) p` is not *definitionally* equal to `p`. Instead, we use
      -- that we can write `s` as a fraction `a/b` in a small neighborhood around `p`. Since
      -- `PrimeSpectrum.comap (RingHom.id R) p` equals `p`, it is also contained in the same
      -- neighborhood, hence `s` equals `a/b` there too.
[GOAL]
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
U V : Opens ↑(PrimeSpectrum.Top R)
iVU : V ⟶ U
s : ↑((structureSheaf R).val.obj (op U))
p : { x // x ∈ (op V).unop }
⊢ ↑(Localization.localRingHom (↑(PrimeSpectrum.comap (RingHom.id R)) ↑p).asIdeal (↑p).asIdeal (RingHom.id R)
          (_ : (↑(PrimeSpectrum.comap (RingHom.id R)) ↑p).asIdeal = (↑(PrimeSpectrum.comap (RingHom.id R)) ↑p).asIdeal))
      (↑s { val := ↑(PrimeSpectrum.comap (RingHom.id R)) ↑p, property := (_ : ↑p ∈ ↑U) }) =
    ↑(↑((structureSheaf R).val.map iVU.op) s) p
[PROOFSTEP]
obtain ⟨W, hpW, iWU, h⟩ := s.2 (iVU p)
[GOAL]
case intro.intro.intro
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
U V : Opens ↑(PrimeSpectrum.Top R)
iVU : V ⟶ U
s : ↑((structureSheaf R).val.obj (op U))
p : { x // x ∈ (op V).unop }
W : Opens ↑(PrimeSpectrum.Top R)
hpW : ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) p) ∈ W
iWU : W ⟶ (op U).unop
h :
  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
    ↑s ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑(op U).unop) }) x)
⊢ ↑(Localization.localRingHom (↑(PrimeSpectrum.comap (RingHom.id R)) ↑p).asIdeal (↑p).asIdeal (RingHom.id R)
          (_ : (↑(PrimeSpectrum.comap (RingHom.id R)) ↑p).asIdeal = (↑(PrimeSpectrum.comap (RingHom.id R)) ↑p).asIdeal))
      (↑s { val := ↑(PrimeSpectrum.comap (RingHom.id R)) ↑p, property := (_ : ↑p ∈ ↑U) }) =
    ↑(↑((structureSheaf R).val.map iVU.op) s) p
[PROOFSTEP]
obtain ⟨a, b, h'⟩ := h.eq_mk'
[GOAL]
case intro.intro.intro.intro.intro
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
U V : Opens ↑(PrimeSpectrum.Top R)
iVU : V ⟶ U
s : ↑((structureSheaf R).val.obj (op U))
p : { x // x ∈ (op V).unop }
W : Opens ↑(PrimeSpectrum.Top R)
hpW : ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) p) ∈ W
iWU : W ⟶ (op U).unop
h :
  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
    ↑s ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑(op U).unop) }) x)
a b : R
h' :
  ∀ (x : { x // x ∈ W }),
    ∃ hs,
      (fun x => ↑s ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑(op U).unop) }) x)) x =
        IsLocalization.mk' (Localization.AtPrime (↑x).asIdeal) a { val := b, property := hs }
⊢ ↑(Localization.localRingHom (↑(PrimeSpectrum.comap (RingHom.id R)) ↑p).asIdeal (↑p).asIdeal (RingHom.id R)
          (_ : (↑(PrimeSpectrum.comap (RingHom.id R)) ↑p).asIdeal = (↑(PrimeSpectrum.comap (RingHom.id R)) ↑p).asIdeal))
      (↑s { val := ↑(PrimeSpectrum.comap (RingHom.id R)) ↑p, property := (_ : ↑p ∈ ↑U) }) =
    ↑(↑((structureSheaf R).val.map iVU.op) s) p
[PROOFSTEP]
obtain ⟨hb₁, s_eq₁⟩ := h' ⟨p, hpW⟩
[GOAL]
case intro.intro.intro.intro.intro.intro
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
U V : Opens ↑(PrimeSpectrum.Top R)
iVU : V ⟶ U
s : ↑((structureSheaf R).val.obj (op U))
p : { x // x ∈ (op V).unop }
W : Opens ↑(PrimeSpectrum.Top R)
hpW : ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) p) ∈ W
iWU : W ⟶ (op U).unop
h :
  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
    ↑s ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑(op U).unop) }) x)
a b : R
h' :
  ∀ (x : { x // x ∈ W }),
    ∃ hs,
      (fun x => ↑s ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑(op U).unop) }) x)) x =
        IsLocalization.mk' (Localization.AtPrime (↑x).asIdeal) a { val := b, property := hs }
hb₁ : ¬b ∈ (↑{ val := ↑p, property := hpW }).asIdeal
s_eq₁ :
  (fun x => ↑s ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑(op U).unop) }) x)) { val := ↑p, property := hpW } =
    IsLocalization.mk' (Localization.AtPrime (↑{ val := ↑p, property := hpW }).asIdeal) a { val := b, property := hb₁ }
⊢ ↑(Localization.localRingHom (↑(PrimeSpectrum.comap (RingHom.id R)) ↑p).asIdeal (↑p).asIdeal (RingHom.id R)
          (_ : (↑(PrimeSpectrum.comap (RingHom.id R)) ↑p).asIdeal = (↑(PrimeSpectrum.comap (RingHom.id R)) ↑p).asIdeal))
      (↑s { val := ↑(PrimeSpectrum.comap (RingHom.id R)) ↑p, property := (_ : ↑p ∈ ↑U) }) =
    ↑(↑((structureSheaf R).val.map iVU.op) s) p
[PROOFSTEP]
obtain ⟨hb₂, s_eq₂⟩ := h' ⟨PrimeSpectrum.comap (RingHom.id _) p.1, hpW⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
U V : Opens ↑(PrimeSpectrum.Top R)
iVU : V ⟶ U
s : ↑((structureSheaf R).val.obj (op U))
p : { x // x ∈ (op V).unop }
W : Opens ↑(PrimeSpectrum.Top R)
hpW : ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) p) ∈ W
iWU : W ⟶ (op U).unop
h :
  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
    ↑s ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑(op U).unop) }) x)
a b : R
h' :
  ∀ (x : { x // x ∈ W }),
    ∃ hs,
      (fun x => ↑s ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑(op U).unop) }) x)) x =
        IsLocalization.mk' (Localization.AtPrime (↑x).asIdeal) a { val := b, property := hs }
hb₁ : ¬b ∈ (↑{ val := ↑p, property := hpW }).asIdeal
s_eq₁ :
  (fun x => ↑s ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑(op U).unop) }) x)) { val := ↑p, property := hpW } =
    IsLocalization.mk' (Localization.AtPrime (↑{ val := ↑p, property := hpW }).asIdeal) a { val := b, property := hb₁ }
hb₂ : ¬b ∈ (↑{ val := ↑(PrimeSpectrum.comap (RingHom.id R)) ↑p, property := hpW }).asIdeal
s_eq₂ :
  (fun x => ↑s ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑(op U).unop) }) x))
      { val := ↑(PrimeSpectrum.comap (RingHom.id R)) ↑p, property := hpW } =
    IsLocalization.mk'
      (Localization.AtPrime (↑{ val := ↑(PrimeSpectrum.comap (RingHom.id R)) ↑p, property := hpW }).asIdeal) a
      { val := b, property := hb₂ }
⊢ ↑(Localization.localRingHom (↑(PrimeSpectrum.comap (RingHom.id R)) ↑p).asIdeal (↑p).asIdeal (RingHom.id R)
          (_ : (↑(PrimeSpectrum.comap (RingHom.id R)) ↑p).asIdeal = (↑(PrimeSpectrum.comap (RingHom.id R)) ↑p).asIdeal))
      (↑s { val := ↑(PrimeSpectrum.comap (RingHom.id R)) ↑p, property := (_ : ↑p ∈ ↑U) }) =
    ↑(↑((structureSheaf R).val.map iVU.op) s) p
[PROOFSTEP]
dsimp only at s_eq₁ s_eq₂
[GOAL]
case intro.intro.intro.intro.intro.intro.intro
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
U V : Opens ↑(PrimeSpectrum.Top R)
iVU : V ⟶ U
s : ↑((structureSheaf R).val.obj (op U))
p : { x // x ∈ (op V).unop }
W : Opens ↑(PrimeSpectrum.Top R)
hpW : ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) p) ∈ W
iWU : W ⟶ (op U).unop
h :
  PrelocalPredicate.pred (isFractionPrelocal R) fun x =>
    ↑s ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑(op U).unop) }) x)
a b : R
h' :
  ∀ (x : { x // x ∈ W }),
    ∃ hs,
      (fun x => ↑s ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑(op U).unop) }) x)) x =
        IsLocalization.mk' (Localization.AtPrime (↑x).asIdeal) a { val := b, property := hs }
hb₁ : ¬b ∈ (↑{ val := ↑p, property := hpW }).asIdeal
s_eq₁ :
  ↑s { val := ↑p, property := (_ : ↑{ val := ↑p, property := hpW } ∈ ↑(op U).unop) } =
    IsLocalization.mk' (Localization.AtPrime (↑p).asIdeal) a { val := b, property := hb₁ }
hb₂ : ¬b ∈ (↑{ val := ↑(PrimeSpectrum.comap (RingHom.id R)) ↑p, property := hpW }).asIdeal
s_eq₂ :
  ↑s
      { val := ↑(PrimeSpectrum.comap (RingHom.id R)) ↑p,
        property := (_ : ↑{ val := ↑(PrimeSpectrum.comap (RingHom.id R)) ↑p, property := hpW } ∈ ↑(op U).unop) } =
    IsLocalization.mk' (Localization.AtPrime (↑(PrimeSpectrum.comap (RingHom.id R)) ↑p).asIdeal) a
      { val := b, property := hb₂ }
⊢ ↑(Localization.localRingHom (↑(PrimeSpectrum.comap (RingHom.id R)) ↑p).asIdeal (↑p).asIdeal (RingHom.id R)
          (_ : (↑(PrimeSpectrum.comap (RingHom.id R)) ↑p).asIdeal = (↑(PrimeSpectrum.comap (RingHom.id R)) ↑p).asIdeal))
      (↑s { val := ↑(PrimeSpectrum.comap (RingHom.id R)) ↑p, property := (_ : ↑p ∈ ↑U) }) =
    ↑(↑((structureSheaf R).val.map iVU.op) s) p
[PROOFSTEP]
erw [s_eq₂, Localization.localRingHom_mk', ← s_eq₁, ← res_apply _ _ _ iVU]
[GOAL]
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
U V : Opens ↑(PrimeSpectrum.Top R)
hUV : U = V
p : ↑(PrimeSpectrum.Top R)
hpV : p ∈ V.carrier
⊢ p ∈ ↑(PrimeSpectrum.comap (RingHom.id R)) ⁻¹' U.carrier
[PROOFSTEP]
rwa [hUV, PrimeSpectrum.comap_id]
[GOAL]
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
U V : Opens ↑(PrimeSpectrum.Top R)
hUV : U = V
⊢ (structureSheaf R).val.obj (op U) = (structureSheaf R).val.obj (op V)
[PROOFSTEP]
rw [hUV]
[GOAL]
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
U V : Opens ↑(PrimeSpectrum.Top R)
hUV : U = V
⊢ comap (RingHom.id R) U V
      (_ : ∀ (p : ↑(PrimeSpectrum.Top R)), p ∈ V.carrier → p ∈ ↑(PrimeSpectrum.comap (RingHom.id R)) ⁻¹' U.carrier) =
    eqToHom (_ : (structureSheaf R).val.obj (op U) = (structureSheaf R).val.obj (op V))
[PROOFSTEP]
erw [comap_id_eq_map U V (eqToHom hUV.symm), eqToHom_op, eqToHom_map]
[GOAL]
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
U : Opens ↑(PrimeSpectrum.Top R)
p : ↑(PrimeSpectrum.Top R)
hpU : p ∈ U.carrier
⊢ p ∈ ↑(PrimeSpectrum.comap (RingHom.id R)) ⁻¹' U.carrier
[PROOFSTEP]
rwa [PrimeSpectrum.comap_id]
[GOAL]
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
U : Opens ↑(PrimeSpectrum.Top R)
⊢ comap (RingHom.id R) U U
      (_ : ∀ (p : ↑(PrimeSpectrum.Top R)), p ∈ U.carrier → p ∈ ↑(PrimeSpectrum.comap (RingHom.id R)) ⁻¹' U.carrier) =
    RingHom.id ↑((structureSheaf R).val.obj (op U))
[PROOFSTEP]
rw [comap_id U U rfl]
[GOAL]
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
U : Opens ↑(PrimeSpectrum.Top R)
⊢ eqToHom (_ : (structureSheaf R).val.obj (op U) = (structureSheaf R).val.obj (op U)) =
    RingHom.id ↑((structureSheaf R).val.obj (op U))
[PROOFSTEP]
rfl
[GOAL]
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
g : S →+* P
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
W : Opens ↑(PrimeSpectrum.Top P)
hUV : ∀ (p : ↑(PrimeSpectrum.Top S)), p ∈ V → ↑(PrimeSpectrum.comap f) p ∈ U
hVW : ∀ (p : ↑(PrimeSpectrum.Top P)), p ∈ W → ↑(PrimeSpectrum.comap g) p ∈ V
s : ↑((structureSheaf R).val.obj (op U))
p : { x // x ∈ (op W).unop }
⊢ ↑(↑(comap (RingHom.comp g f) U W
              (_ :
                ∀ (p : ↑(PrimeSpectrum.Top P)),
                  p ∈ W.carrier → ↑(PrimeSpectrum.comap f) (↑(PrimeSpectrum.comap g) p) ∈ U))
          s)
      p =
    ↑(↑(RingHom.comp (comap g V W hVW) (comap f U V hUV)) s) p
[PROOFSTEP]
rw [comap_apply]
[GOAL]
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
g : S →+* P
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
W : Opens ↑(PrimeSpectrum.Top P)
hUV : ∀ (p : ↑(PrimeSpectrum.Top S)), p ∈ V → ↑(PrimeSpectrum.comap f) p ∈ U
hVW : ∀ (p : ↑(PrimeSpectrum.Top P)), p ∈ W → ↑(PrimeSpectrum.comap g) p ∈ V
s : ↑((structureSheaf R).val.obj (op U))
p : { x // x ∈ (op W).unop }
⊢ ↑(Localization.localRingHom (↑(PrimeSpectrum.comap (RingHom.comp g f)) ↑p).asIdeal (↑p).asIdeal (RingHom.comp g f)
          (_ :
            (↑(PrimeSpectrum.comap (RingHom.comp g f)) ↑p).asIdeal =
              (↑(PrimeSpectrum.comap (RingHom.comp g f)) ↑p).asIdeal))
      (↑s
        { val := ↑(PrimeSpectrum.comap (RingHom.comp g f)) ↑p,
          property := (_ : ↑(PrimeSpectrum.comap f) (↑(PrimeSpectrum.comap g) ↑p) ∈ U) }) =
    ↑(↑(RingHom.comp (comap g V W hVW) (comap f U V hUV)) s) p
[PROOFSTEP]
erw [Localization.localRingHom_comp _ (PrimeSpectrum.comap g p.1).asIdeal]
[GOAL]
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
g : S →+* P
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
W : Opens ↑(PrimeSpectrum.Top P)
hUV : ∀ (p : ↑(PrimeSpectrum.Top S)), p ∈ V → ↑(PrimeSpectrum.comap f) p ∈ U
hVW : ∀ (p : ↑(PrimeSpectrum.Top P)), p ∈ W → ↑(PrimeSpectrum.comap g) p ∈ V
s : ↑((structureSheaf R).val.obj (op U))
p : { x // x ∈ (op W).unop }
⊢ ↑(RingHom.comp (Localization.localRingHom (↑(PrimeSpectrum.comap g) ↑p).asIdeal (↑p).asIdeal g ?hJK)
          (Localization.localRingHom (↑(PrimeSpectrum.comap (RingHom.comp g f)) ↑p).asIdeal
            (↑(PrimeSpectrum.comap g) ↑p).asIdeal f ?hIJ))
      (↑s
        { val := ↑(PrimeSpectrum.comap (RingHom.comp g f)) ↑p,
          property := (_ : ↑(PrimeSpectrum.comap f) (↑(PrimeSpectrum.comap g) ↑p) ∈ U) }) =
    ↑(↑(RingHom.comp (comap g V W hVW) (comap f U V hUV)) s) p
[PROOFSTEP]
rfl
[GOAL]
case hJK
R : Type u
inst✝² : CommRing R
S : Type u
inst✝¹ : CommRing S
P : Type u
inst✝ : CommRing P
f : R →+* S
g : S →+* P
U : Opens ↑(PrimeSpectrum.Top R)
V : Opens ↑(PrimeSpectrum.Top S)
W : Opens ↑(PrimeSpectrum.Top P)
hUV : ∀ (p : ↑(PrimeSpectrum.Top S)), p ∈ V → ↑(PrimeSpectrum.comap f) p ∈ U
hVW : ∀ (p : ↑(PrimeSpectrum.Top P)), p ∈ W → ↑(PrimeSpectrum.comap g) p ∈ V
s : ↑((structureSheaf R).val.obj (op U))
p : { x // x ∈ (op W).unop }
⊢ (↑(PrimeSpectrum.comap g) ↑p).asIdeal = Ideal.comap g (↑p).asIdeal
[PROOFSTEP]
rfl