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

tactic: intro s t h_eq
state_before: R : Type u
inst✝ : CommRing R
f : R
⊢ Function.Injective ↑(toBasicOpen R f)

tactic: obtain ⟨a, ⟨b, hb⟩, rfl⟩ := IsLocalization.mk'_surjective (Submonoid.powers f) s
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

tactic: obtain ⟨c, ⟨d, hd⟩, rfl⟩ := IsLocalization.mk'_surjective (Submonoid.powers f) t
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 { val := b, property := hb }) = ↑(toBasicOpen R f) t
⊢ IsLocalization.mk' (Localization.Away f) a { val := b, property := hb } = t

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 :
  ↑(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 }

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)
      (_ :
        ∀ (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 }

tactic: let I : Ideal R :=
  { carrier := { r : R | r * (d * a) = r * (b * c) }
    zero_mem' := by simp only [Set.mem_setOf_eq, MulZeroClass.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)
      (_ :
        ∀ (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)

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)
      (_ :
        ∀ (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)

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)
      (_ :
        ∀ (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

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)
      (_ :
        ∀ (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

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)
      (_ :
        ∀ (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

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)
      (_ :
        ∀ (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

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)
      (_ :
        ∀ (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

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)
      (_ :
        ∀ (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

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)
      (_ :
        ∀ (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

tactic: cases' this with r 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)
      (_ :
        ∀ (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

tactic: exact ⟨r.1, hr, r.2⟩
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)
      (_ :
        ∀ (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

tactic: simp only [Set.mem_setOf_eq, MulZeroClass.zero_mul]
state_before: 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

tactic: dsimp at hr₁ hr₂ ⊢
state_before: 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)}

tactic: simp only [add_mul, hr₁, hr₂]
state_before: 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)

tactic: dsimp at hr₂ ⊢
state_before: 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

tactic: simp only [mul_assoc, hr₂]
state_before: 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)

tactic: cases' this with n hn
state_before: 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)

tactic: exact ⟨⟨f ^ n, n, rfl⟩, hn⟩
state_before: 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)