Theorem: AlgebraicGeometry.StructureSheaf.toBasicOpen_injective
File: Mathlib/AlgebraicGeometry/StructureSheaf.lean

Proof steps:
state_before: R : Type u
inst✝ : CommRing R
f : R
⊢ Function.Injective ⇑(toBasicOpen R f)
state_after: 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
tactic: intro s t h_eq
state_before: 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
state_after: 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 ⟨b, hb⟩) = (toBasicOpen R f) t
⊢ IsLocalization.mk' (Localization.Away f) a ⟨b, hb⟩ = t
tactic: obtain ⟨a, ⟨b, hb⟩, rfl⟩ := IsLocalization.mk'_surjective (Submonoid.powers f) s
state_before: 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 ⟨b, hb⟩) = (toBasicOpen R f) t
⊢ IsLocalization.mk' (Localization.Away f) a ⟨b, hb⟩ = t
state_after: 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 ⟨b, hb⟩) =
    (toBasicOpen R f) (IsLocalization.mk' (Localization.Away f) c ⟨d, hd⟩)
⊢ IsLocalization.mk' (Localization.Away f) a ⟨b, hb⟩ = IsLocalization.mk' (Localization.Away f) c ⟨d, hd⟩
tactic: obtain ⟨c, ⟨d, hd⟩, rfl⟩ := IsLocalization.mk'_surjective (Submonoid.powers f) t
state_before: 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 ⟨b, hb⟩) =
    (toBasicOpen R f) (IsLocalization.mk' (Localization.Away f) c ⟨d, hd⟩)
⊢ IsLocalization.mk' (Localization.Away f) a ⟨b, hb⟩ = IsLocalization.mk' (Localization.Away f) c ⟨d, hd⟩
state_after: 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) ⋯ = const R c d (PrimeSpectrum.basicOpen f) ⋯
⊢ IsLocalization.mk' (Localization.Away f) a ⟨b, hb⟩ = IsLocalization.mk' (Localization.Away f) c ⟨d, hd⟩
tactic: simp only [toBasicOpen_mk'] at h_eq
state_before: 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) ⋯ = const R c d (PrimeSpectrum.basicOpen f) ⋯
⊢ IsLocalization.mk' (Localization.Away f) a ⟨b, hb⟩ = IsLocalization.mk' (Localization.Away f) c ⟨d, hd⟩
state_after: 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) ⋯ = const R c d (PrimeSpectrum.basicOpen f) ⋯
⊢ ∃ c_1, ↑c_1 * (↑⟨d, hd⟩ * a) = ↑c_1 * (↑⟨b, hb⟩ * c)
tactic: rw [IsLocalization.eq]
state_before: 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) ⋯ = const R c d (PrimeSpectrum.basicOpen f) ⋯
⊢ ∃ c_1, ↑c_1 * (↑⟨d, hd⟩ * a) = ↑c_1 * (↑⟨b, hb⟩ * c)
state_after: 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) ⋯ = const R c d (PrimeSpectrum.basicOpen f) ⋯
I : Ideal R := { carrier := {r | r * (d * a) = r * (b * c)}, add_mem' := ⋯, zero_mem' := ⋯, smul_mem' := ⋯ }
⊢ ∃ c_1, ↑c_1 * (↑⟨d, hd⟩ * a) = ↑c_1 * (↑⟨b, hb⟩ * c)
tactic: 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₂] }
state_before: 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) ⋯ = const R c d (PrimeSpectrum.basicOpen f) ⋯
I : Ideal R := { carrier := {r | r * (d * a) = r * (b * c)}, add_mem' := ⋯, zero_mem' := ⋯, smul_mem' := ⋯ }
⊢ ∃ c_1, ↑c_1 * (↑⟨d, hd⟩ * a) = ↑c_1 * (↑⟨b, hb⟩ * c)
state_after: 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) ⋯ = const R c d (PrimeSpectrum.basicOpen f) ⋯
I : Ideal R := { carrier := {r | r * (d * a) = r * (b * c)}, add_mem' := ⋯, zero_mem' := ⋯, smul_mem' := ⋯ }
⊢ f ∈ I.radical
tactic: suffices f ∈ I.radical by
    cases' this with n hn
    exact ⟨⟨f ^ n, n, rfl⟩, hn⟩
state_before: 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) ⋯ = const R c d (PrimeSpectrum.basicOpen f) ⋯
I : Ideal R := { carrier := {r | r * (d * a) = r * (b * c)}, add_mem' := ⋯, zero_mem' := ⋯, smul_mem' := ⋯ }
⊢ f ∈ I.radical
state_after: 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) ⋯ = const R c d (PrimeSpectrum.basicOpen f) ⋯
I : Ideal R := { carrier := {r | r * (d * a) = r * (b * c)}, add_mem' := ⋯, zero_mem' := ⋯, smul_mem' := ⋯ }
⊢ ∀ x ∈ PrimeSpectrum.zeroLocus ↑I, f ∈ x.asIdeal
tactic: rw [← PrimeSpectrum.vanishingIdeal_zeroLocus_eq_radical, PrimeSpectrum.mem_vanishingIdeal]
state_before: 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) ⋯ = const R c d (PrimeSpectrum.basicOpen f) ⋯
I : Ideal R := { carrier := {r | r * (d * a) = r * (b * c)}, add_mem' := ⋯, zero_mem' := ⋯, smul_mem' := ⋯ }
⊢ ∀ x ∈ PrimeSpectrum.zeroLocus ↑I, f ∈ x.asIdeal
state_after: 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) ⋯ = const R c d (PrimeSpectrum.basicOpen f) ⋯
I : Ideal R := { carrier := {r | r * (d * a) = r * (b * c)}, add_mem' := ⋯, zero_mem' := ⋯, smul_mem' := ⋯ }
p : PrimeSpectrum R
hfp : p ∈ PrimeSpectrum.zeroLocus ↑I
⊢ f ∈ p.asIdeal
tactic: intro p hfp
state_before: 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) ⋯ = const R c d (PrimeSpectrum.basicOpen f) ⋯
I : Ideal R := { carrier := {r | r * (d * a) = r * (b * c)}, add_mem' := ⋯, zero_mem' := ⋯, smul_mem' := ⋯ }
p : PrimeSpectrum R
hfp : p ∈ PrimeSpectrum.zeroLocus ↑I
⊢ f ∈ p.asIdeal
state_after: 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) ⋯ = const R c d (PrimeSpectrum.basicOpen f) ⋯
I : Ideal R := { carrier := {r | r * (d * a) = r * (b * c)}, add_mem' := ⋯, zero_mem' := ⋯, smul_mem' := ⋯ }
p : PrimeSpectrum R
hfp : f ∉ p.asIdeal
⊢ p ∉ PrimeSpectrum.zeroLocus ↑I
tactic: contrapose hfp
state_before: 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) ⋯ = const R c d (PrimeSpectrum.basicOpen f) ⋯
I : Ideal R := { carrier := {r | r * (d * a) = r * (b * c)}, add_mem' := ⋯, zero_mem' := ⋯, smul_mem' := ⋯ }
p : PrimeSpectrum R
hfp : f ∉ p.asIdeal
⊢ p ∉ PrimeSpectrum.zeroLocus ↑I
state_after: 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) ⋯ = const R c d (PrimeSpectrum.basicOpen f) ⋯
I : Ideal R := { carrier := {r | r * (d * a) = r * (b * c)}, add_mem' := ⋯, zero_mem' := ⋯, smul_mem' := ⋯ }
p : PrimeSpectrum R
hfp : f ∉ p.asIdeal
⊢ ∃ a ∈ ↑I, a ∉ ↑p.asIdeal
tactic: rw [PrimeSpectrum.mem_zeroLocus, Set.not_subset]
state_before: 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) ⋯ = const R c d (PrimeSpectrum.basicOpen f) ⋯
I : Ideal R := { carrier := {r | r * (d * a) = r * (b * c)}, add_mem' := ⋯, zero_mem' := ⋯, smul_mem' := ⋯ }
p : PrimeSpectrum R
hfp : f ∉ p.asIdeal
⊢ ∃ a ∈ ↑I, a ∉ ↑p.asIdeal
state_after: 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) ⋯ = const R c d (PrimeSpectrum.basicOpen f) ⋯
I : Ideal R := { carrier := {r | r * (d * a) = r * (b * c)}, add_mem' := ⋯, zero_mem' := ⋯, smul_mem' := ⋯ }
p : PrimeSpectrum R
hfp : f ∉ p.asIdeal
this : ↑(const R a b (PrimeSpectrum.basicOpen f) ⋯) ⟨p, hfp⟩ = ↑(const R c d (PrimeSpectrum.basicOpen f) ⋯) ⟨p, hfp⟩
⊢ ∃ a ∈ ↑I, a ∉ ↑p.asIdeal
tactic: have := congr_fun (congr_arg Subtype.val h_eq) ⟨p, hfp⟩
state_before: 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) ⋯ = const R c d (PrimeSpectrum.basicOpen f) ⋯
I : Ideal R := { carrier := {r | r * (d * a) = r * (b * c)}, add_mem' := ⋯, zero_mem' := ⋯, smul_mem' := ⋯ }
p : PrimeSpectrum R
hfp : f ∉ p.asIdeal
this : ↑(const R a b (PrimeSpectrum.basicOpen f) ⋯) ⟨p, hfp⟩ = ↑(const R c d (PrimeSpectrum.basicOpen f) ⋯) ⟨p, hfp⟩
⊢ ∃ a ∈ ↑I, a ∉ ↑p.asIdeal
state_after: 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) ⋯ = const R c d (PrimeSpectrum.basicOpen f) ⋯
I : Ideal R := { carrier := {r | r * (d * a) = r * (b * c)}, add_mem' := ⋯, zero_mem' := ⋯, smul_mem' := ⋯ }
p : PrimeSpectrum R
hfp : f ∉ p.asIdeal
this : IsLocalization.mk' (Localizations R p) a ⟨b, ⋯⟩ = IsLocalization.mk' (Localizations R p) c ⟨d, ⋯⟩
⊢ ∃ a ∈ ↑I, a ∉ ↑p.asIdeal
tactic: dsimp at this
state_before: 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) ⋯ = const R c d (PrimeSpectrum.basicOpen f) ⋯
I : Ideal R := { carrier := {r | r * (d * a) = r * (b * c)}, add_mem' := ⋯, zero_mem' := ⋯, smul_mem' := ⋯ }
p : PrimeSpectrum R
hfp : f ∉ p.asIdeal
this : IsLocalization.mk' (Localizations R p) a ⟨b, ⋯⟩ = IsLocalization.mk' (Localizations R p) c ⟨d, ⋯⟩
⊢ ∃ a ∈ ↑I, a ∉ ↑p.asIdeal
state_after: 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) ⋯ = const R c d (PrimeSpectrum.basicOpen f) ⋯
I : Ideal R := { carrier := {r | r * (d * a) = r * (b * c)}, add_mem' := ⋯, zero_mem' := ⋯, smul_mem' := ⋯ }
p : PrimeSpectrum R
hfp : f ∉ p.asIdeal
this : ∃ c_1, ↑c_1 * (↑⟨d, ⋯⟩ * a) = ↑c_1 * (↑⟨b, ⋯⟩ * c)
⊢ ∃ a ∈ ↑I, a ∉ ↑p.asIdeal
tactic: erw [IsLocalization.eq (S := Localization.AtPrime p.asIdeal)] at this
state_before: 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) ⋯ = const R c d (PrimeSpectrum.basicOpen f) ⋯
I : Ideal R := { carrier := {r | r * (d * a) = r * (b * c)}, add_mem' := ⋯, zero_mem' := ⋯, smul_mem' := ⋯ }
p : PrimeSpectrum R
hfp : f ∉ p.asIdeal
this : ∃ c_1, ↑c_1 * (↑⟨d, ⋯⟩ * a) = ↑c_1 * (↑⟨b, ⋯⟩ * c)
⊢ ∃ a ∈ ↑I, a ∉ ↑p.asIdeal
state_after: 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) ⋯ = const R c d (PrimeSpectrum.basicOpen f) ⋯
I : Ideal R := { carrier := {r | r * (d * a) = r * (b * c)}, add_mem' := ⋯, zero_mem' := ⋯, smul_mem' := ⋯ }
p : PrimeSpectrum R
hfp : f ∉ p.asIdeal
r : ↥p.asIdeal.primeCompl
hr : ↑r * (↑⟨d, ⋯⟩ * a) = ↑r * (↑⟨b, ⋯⟩ * c)
⊢ ∃ a ∈ ↑I, a ∉ ↑p.asIdeal
tactic: cases' this with r hr
state_before: 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) ⋯ = const R c d (PrimeSpectrum.basicOpen f) ⋯
I : Ideal R := { carrier := {r | r * (d * a) = r * (b * c)}, add_mem' := ⋯, zero_mem' := ⋯, smul_mem' := ⋯ }
p : PrimeSpectrum R
hfp : f ∉ p.asIdeal
r : ↥p.asIdeal.primeCompl
hr : ↑r * (↑⟨d, ⋯⟩ * a) = ↑r * (↑⟨b, ⋯⟩ * c)
⊢ ∃ a ∈ ↑I, a ∉ ↑p.asIdeal
state_after: no goals
tactic: exact ⟨r.1, hr, r.2⟩