Theorem: FractionalIdeal.isPrincipal.of_finite_maximals_of_inv
File: Mathlib/RingTheory/DedekindDomain/PID.lean

tactic: have hinv' := hinv
state_before: R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : I * I' = 1
⊢ Submodule.IsPrincipal ↑I

tactic: rw [Subtype.ext_iff, val_eq_coe, coe_mul] at hinv
state_before: R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv hinv' : I * I' = 1
⊢ Submodule.IsPrincipal ↑I

tactic: let s := hf.toFinset
state_before: R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
⊢ Submodule.IsPrincipal ↑I

tactic: haveI := Classical.decEq (Ideal R)
state_before: R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
⊢ Submodule.IsPrincipal ↑I

tactic: have coprime : ∀ M ∈ s, ∀ M' ∈ s.erase M, M ⊔ M' = ⊤ := by
  simp_rw [Finset.mem_erase, hf.mem_toFinset]
  rintro M hM M' ⟨hne, hM'⟩
  exact Ideal.IsMaximal.coprime_of_ne hM hM' hne.symm
state_before: R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this : DecidableEq (Ideal R)
⊢ Submodule.IsPrincipal ↑I

tactic: have nle : ∀ M ∈ s, ¬(⨅ M' ∈ s.erase M, M') ≤ M := fun M hM =>
  left_lt_sup.1
    ((hf.mem_toFinset.1 hM).ne_top.lt_top.trans_eq (Ideal.sup_iInf_eq_top <| coprime M hM).symm)
state_before: R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
⊢ Submodule.IsPrincipal ↑I

tactic: have : ∀ M ∈ s, ∃ a ∈ I, ∃ b ∈ I', a * b ∉ IsLocalization.coeSubmodule A M := by
  intro M hM; by_contra' h
  obtain ⟨x, hx, hxM⟩ :=
    SetLike.exists_of_lt
      ((IsLocalization.coeSubmodule_strictMono hS (hf.mem_toFinset.1 hM).ne_top.lt_top).trans_eq
        hinv.symm)
  refine' hxM (Submodule.map₂_le.2 _ hx); exact h
state_before: R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
⊢ Submodule.IsPrincipal ↑I

tactic: choose! a ha b hb hm using this
state_before: R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this✝ : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
this : ∀ (M : Ideal R), M ∈ s → ∃ a, a ∈ I ∧ ∃ b, b ∈ I' ∧ ¬a * b ∈ IsLocalization.coeSubmodule A M
⊢ Submodule.IsPrincipal ↑I

tactic: choose! u hu hum using fun M hM => SetLike.not_le_iff_exists.1 (nle M hM)
state_before: R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a : Ideal R → A
ha : ∀ (M : Ideal R), M ∈ s → a M ∈ I
b : Ideal R → A
hb : ∀ (M : Ideal R), M ∈ s → b M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a M * b M ∈ IsLocalization.coeSubmodule A M
⊢ Submodule.IsPrincipal ↑I

tactic: let v := ∑ M in s, u M • b M
state_before: R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a : Ideal R → A
ha : ∀ (M : Ideal R), M ∈ s → a M ∈ I
b : Ideal R → A
hb : ∀ (M : Ideal R), M ∈ s → b M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a M * b M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hu : ∀ (M : Ideal R), M ∈ s → u M ∈ ⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M'
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
⊢ Submodule.IsPrincipal ↑I

tactic: have hv : v ∈ I' := Submodule.sum_mem _ fun M hM => Submodule.smul_mem _ _ <| hb M hM
state_before: R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a : Ideal R → A
ha : ∀ (M : Ideal R), M ∈ s → a M ∈ I
b : Ideal R → A
hb : ∀ (M : Ideal R), M ∈ s → b M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a M * b M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hu : ∀ (M : Ideal R), M ∈ s → u M ∈ ⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M'
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
v : A := ∑ M in s, u M • b M
⊢ Submodule.IsPrincipal ↑I

tactic: refine'
  FractionalIdeal.isPrincipal_of_unit_of_comap_mul_span_singleton_eq_top
    (Units.mkOfMulEqOne I I' hinv') hv (of_not_not fun h => _)
state_before: R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a : Ideal R → A
ha : ∀ (M : Ideal R), M ∈ s → a M ∈ I
b : Ideal R → A
hb : ∀ (M : Ideal R), M ∈ s → b M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a M * b M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hu : ∀ (M : Ideal R), M ∈ s → u M ∈ ⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M'
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
v : A := ∑ M in s, u M • b M
hv : v ∈ I'
⊢ Submodule.IsPrincipal ↑I

tactic: obtain ⟨M, hM, hJM⟩ := Ideal.exists_le_maximal _ h
state_before: R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a : Ideal R → A
ha : ∀ (M : Ideal R), M ∈ s → a M ∈ I
b : Ideal R → A
hb : ∀ (M : Ideal R), M ∈ s → b M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a M * b M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hu : ∀ (M : Ideal R), M ∈ s → u M ∈ ⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M'
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
v : A := ∑ M in s, u M • b M
hv : v ∈ I'
h : ¬Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) = ⊤
⊢ False

tactic: replace hM := hf.mem_toFinset.2 hM
state_before: case intro.intro
R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a : Ideal R → A
ha : ∀ (M : Ideal R), M ∈ s → a M ∈ I
b : Ideal R → A
hb : ∀ (M : Ideal R), M ∈ s → b M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a M * b M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hu : ∀ (M : Ideal R), M ∈ s → u M ∈ ⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M'
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
v : A := ∑ M in s, u M • b M
hv : v ∈ I'
h : ¬Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) = ⊤
M : Ideal R
hM : IsMaximal M
hJM : Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) ≤ M
⊢ False

tactic: have : ∀ a ∈ I, ∀ b ∈ I', ∃ c, algebraMap R _ c = a * b := by
  intro a ha b hb; have hi := hinv.le
  obtain ⟨c, -, hc⟩ := hi (Submodule.mul_mem_mul ha hb)
  exact ⟨c, hc⟩
state_before: case intro.intro
R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a : Ideal R → A
ha : ∀ (M : Ideal R), M ∈ s → a M ∈ I
b : Ideal R → A
hb : ∀ (M : Ideal R), M ∈ s → b M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a M * b M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hu : ∀ (M : Ideal R), M ∈ s → u M ∈ ⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M'
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
v : A := ∑ M in s, u M • b M
hv : v ∈ I'
h : ¬Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) = ⊤
M : Ideal R
hJM : Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) ≤ M
hM : M ∈ Set.Finite.toFinset hf
⊢ False

tactic: have hmem : a M * v ∈ IsLocalization.coeSubmodule A M := by
  obtain ⟨c, hc⟩ := this _ (ha M hM) v hv
  refine' IsLocalization.coeSubmodule_mono _ hJM ⟨c, _, hc⟩
  have := Submodule.mul_mem_mul (ha M hM) (Submodule.mem_span_singleton_self v)
  rwa [← hc] at this
state_before: case intro.intro
R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this✝ : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a : Ideal R → A
ha : ∀ (M : Ideal R), M ∈ s → a M ∈ I
b : Ideal R → A
hb : ∀ (M : Ideal R), M ∈ s → b M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a M * b M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hu : ∀ (M : Ideal R), M ∈ s → u M ∈ ⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M'
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
v : A := ∑ M in s, u M • b M
hv : v ∈ I'
h : ¬Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) = ⊤
M : Ideal R
hJM : Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) ≤ M
hM : M ∈ Set.Finite.toFinset hf
this : ∀ (a : A), a ∈ I → ∀ (b : A), b ∈ I' → ∃ c, ↑(algebraMap R A) c = a * b
⊢ False

tactic: simp_rw [Finset.mul_sum, mul_smul_comm] at hmem
state_before: case intro.intro
R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this✝ : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a : Ideal R → A
ha : ∀ (M : Ideal R), M ∈ s → a M ∈ I
b : Ideal R → A
hb : ∀ (M : Ideal R), M ∈ s → b M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a M * b M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hu : ∀ (M : Ideal R), M ∈ s → u M ∈ ⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M'
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
v : A := ∑ M in s, u M • b M
hv : v ∈ I'
h : ¬Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) = ⊤
M : Ideal R
hJM : Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) ≤ M
hM : M ∈ Set.Finite.toFinset hf
this : ∀ (a : A), a ∈ I → ∀ (b : A), b ∈ I' → ∃ c, ↑(algebraMap R A) c = a * b
hmem : a M * v ∈ IsLocalization.coeSubmodule A M
⊢ False

tactic: rw [← s.add_sum_erase _ hM, Submodule.add_mem_iff_left] at hmem
state_before: case intro.intro
R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this✝ : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a : Ideal R → A
ha : ∀ (M : Ideal R), M ∈ s → a M ∈ I
b : Ideal R → A
hb : ∀ (M : Ideal R), M ∈ s → b M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a M * b M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hu : ∀ (M : Ideal R), M ∈ s → u M ∈ ⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M'
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
v : A := ∑ M in s, u M • b M
hv : v ∈ I'
h : ¬Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) = ⊤
M : Ideal R
hJM : Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) ≤ M
hM : M ∈ Set.Finite.toFinset hf
this : ∀ (a : A), a ∈ I → ∀ (b : A), b ∈ I' → ∃ c, ↑(algebraMap R A) c = a * b
hmem : ∑ x in Set.Finite.toFinset hf, u x • (a M * b x) ∈ IsLocalization.coeSubmodule A M
⊢ False

tactic: simp_rw [Finset.mem_erase, hf.mem_toFinset]
state_before: R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this : DecidableEq (Ideal R)
⊢ ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤

tactic: rintro M hM M' ⟨hne, hM'⟩
state_before: R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this : DecidableEq (Ideal R)
⊢ ∀ (M : Ideal R), M ∈ {I | IsMaximal I} → ∀ (M' : Ideal R), M' ≠ M ∧ M' ∈ {I | IsMaximal I} → M ⊔ M' = ⊤

tactic: exact Ideal.IsMaximal.coprime_of_ne hM hM' hne.symm
state_before: case intro
R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this : DecidableEq (Ideal R)
M : Ideal R
hM : M ∈ {I | IsMaximal I}
M' : Ideal R
hne : M' ≠ M
hM' : M' ∈ {I | IsMaximal I}
⊢ M ⊔ M' = ⊤

tactic: intro M hM
state_before: R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
⊢ ∀ (M : Ideal R), M ∈ s → ∃ a, a ∈ I ∧ ∃ b, b ∈ I' ∧ ¬a * b ∈ IsLocalization.coeSubmodule A M

tactic: by_contra' h
state_before: R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
M : Ideal R
hM : M ∈ s
⊢ ∃ a, a ∈ I ∧ ∃ b, b ∈ I' ∧ ¬a * b ∈ IsLocalization.coeSubmodule A M

tactic: obtain ⟨x, hx, hxM⟩ :=
  SetLike.exists_of_lt
    ((IsLocalization.coeSubmodule_strictMono hS (hf.mem_toFinset.1 hM).ne_top.lt_top).trans_eq
      hinv.symm)
state_before: R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
M : Ideal R
hM : M ∈ s
h : ∀ (a : A), a ∈ I → ∀ (b : A), b ∈ I' → a * b ∈ IsLocalization.coeSubmodule A M
⊢ False

tactic: refine' hxM (Submodule.map₂_le.2 _ hx)
state_before: case intro.intro
R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
M : Ideal R
hM : M ∈ s
h : ∀ (a : A), a ∈ I → ∀ (b : A), b ∈ I' → a * b ∈ IsLocalization.coeSubmodule A M
x : A
hx : x ∈ ↑I * ↑I'
hxM : ¬x ∈ IsLocalization.coeSubmodule A M
⊢ False

tactic: exact h
state_before: case intro.intro
R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
M : Ideal R
hM : M ∈ s
h : ∀ (a : A), a ∈ I → ∀ (b : A), b ∈ I' → a * b ∈ IsLocalization.coeSubmodule A M
x : A
hx : x ∈ ↑I * ↑I'
hxM : ¬x ∈ IsLocalization.coeSubmodule A M
⊢ ∀ (m : A), m ∈ ↑I → ∀ (n : A), n ∈ ↑I' → ↑(↑(LinearMap.mul R A) m) n ∈ IsLocalization.coeSubmodule A M

tactic: intro a ha b hb
state_before: R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a : Ideal R → A
ha : ∀ (M : Ideal R), M ∈ s → a M ∈ I
b : Ideal R → A
hb : ∀ (M : Ideal R), M ∈ s → b M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a M * b M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hu : ∀ (M : Ideal R), M ∈ s → u M ∈ ⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M'
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
v : A := ∑ M in s, u M • b M
hv : v ∈ I'
h : ¬Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) = ⊤
M : Ideal R
hJM : Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) ≤ M
hM : M ∈ Set.Finite.toFinset hf
⊢ ∀ (a : A), a ∈ I → ∀ (b : A), b ∈ I' → ∃ c, ↑(algebraMap R A) c = a * b

tactic: have hi := hinv.le
state_before: R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a✝ : Ideal R → A
ha✝ : ∀ (M : Ideal R), M ∈ s → a✝ M ∈ I
b✝ : Ideal R → A
hb✝ : ∀ (M : Ideal R), M ∈ s → b✝ M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a✝ M * b✝ M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hu : ∀ (M : Ideal R), M ∈ s → u M ∈ ⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M'
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
v : A := ∑ M in s, u M • b✝ M
hv : v ∈ I'
h : ¬Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) = ⊤
M : Ideal R
hJM : Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) ≤ M
hM : M ∈ Set.Finite.toFinset hf
a : A
ha : a ∈ I
b : A
hb : b ∈ I'
⊢ ∃ c, ↑(algebraMap R A) c = a * b

tactic: obtain ⟨c, -, hc⟩ := hi (Submodule.mul_mem_mul ha hb)
state_before: R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a✝ : Ideal R → A
ha✝ : ∀ (M : Ideal R), M ∈ s → a✝ M ∈ I
b✝ : Ideal R → A
hb✝ : ∀ (M : Ideal R), M ∈ s → b✝ M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a✝ M * b✝ M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hu : ∀ (M : Ideal R), M ∈ s → u M ∈ ⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M'
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
v : A := ∑ M in s, u M • b✝ M
hv : v ∈ I'
h : ¬Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) = ⊤
M : Ideal R
hJM : Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) ≤ M
hM : M ∈ Set.Finite.toFinset hf
a : A
ha : a ∈ I
b : A
hb : b ∈ I'
hi : ↑I * ↑I' ≤ ↑1
⊢ ∃ c, ↑(algebraMap R A) c = a * b

tactic: exact ⟨c, hc⟩
state_before: case intro.intro
R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a✝ : Ideal R → A
ha✝ : ∀ (M : Ideal R), M ∈ s → a✝ M ∈ I
b✝ : Ideal R → A
hb✝ : ∀ (M : Ideal R), M ∈ s → b✝ M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a✝ M * b✝ M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hu : ∀ (M : Ideal R), M ∈ s → u M ∈ ⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M'
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
v : A := ∑ M in s, u M • b✝ M
hv : v ∈ I'
h : ¬Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) = ⊤
M : Ideal R
hJM : Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) ≤ M
hM : M ∈ Set.Finite.toFinset hf
a : A
ha : a ∈ I
b : A
hb : b ∈ I'
hi : ↑I * ↑I' ≤ ↑1
c : R
hc : ↑(Algebra.linearMap R A) c = a * b
⊢ ∃ c, ↑(algebraMap R A) c = a * b

tactic: obtain ⟨c, hc⟩ := this _ (ha M hM) v hv
state_before: R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this✝ : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a : Ideal R → A
ha : ∀ (M : Ideal R), M ∈ s → a M ∈ I
b : Ideal R → A
hb : ∀ (M : Ideal R), M ∈ s → b M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a M * b M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hu : ∀ (M : Ideal R), M ∈ s → u M ∈ ⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M'
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
v : A := ∑ M in s, u M • b M
hv : v ∈ I'
h : ¬Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) = ⊤
M : Ideal R
hJM : Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) ≤ M
hM : M ∈ Set.Finite.toFinset hf
this : ∀ (a : A), a ∈ I → ∀ (b : A), b ∈ I' → ∃ c, ↑(algebraMap R A) c = a * b
⊢ a M * v ∈ IsLocalization.coeSubmodule A M

tactic: refine' IsLocalization.coeSubmodule_mono _ hJM ⟨c, _, hc⟩
state_before: case intro
R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this✝ : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a : Ideal R → A
ha : ∀ (M : Ideal R), M ∈ s → a M ∈ I
b : Ideal R → A
hb : ∀ (M : Ideal R), M ∈ s → b M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a M * b M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hu : ∀ (M : Ideal R), M ∈ s → u M ∈ ⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M'
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
v : A := ∑ M in s, u M • b M
hv : v ∈ I'
h : ¬Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) = ⊤
M : Ideal R
hJM : Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) ≤ M
hM : M ∈ Set.Finite.toFinset hf
this : ∀ (a : A), a ∈ I → ∀ (b : A), b ∈ I' → ∃ c, ↑(algebraMap R A) c = a * b
c : R
hc : ↑(algebraMap R A) c = a M * v
⊢ a M * v ∈ IsLocalization.coeSubmodule A M

tactic: have := Submodule.mul_mem_mul (ha M hM) (Submodule.mem_span_singleton_self v)
state_before: case intro
R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this✝ : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a : Ideal R → A
ha : ∀ (M : Ideal R), M ∈ s → a M ∈ I
b : Ideal R → A
hb : ∀ (M : Ideal R), M ∈ s → b M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a M * b M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hu : ∀ (M : Ideal R), M ∈ s → u M ∈ ⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M'
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
v : A := ∑ M in s, u M • b M
hv : v ∈ I'
h : ¬Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) = ⊤
M : Ideal R
hJM : Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) ≤ M
hM : M ∈ Set.Finite.toFinset hf
this : ∀ (a : A), a ∈ I → ∀ (b : A), b ∈ I' → ∃ c, ↑(algebraMap R A) c = a * b
c : R
hc : ↑(algebraMap R A) c = a M * v
⊢ c ∈ ↑(Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}))

tactic: rwa [← hc] at this
state_before: case intro
R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this✝¹ : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a : Ideal R → A
ha : ∀ (M : Ideal R), M ∈ s → a M ∈ I
b : Ideal R → A
hb : ∀ (M : Ideal R), M ∈ s → b M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a M * b M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hu : ∀ (M : Ideal R), M ∈ s → u M ∈ ⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M'
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
v : A := ∑ M in s, u M • b M
hv : v ∈ I'
h : ¬Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) = ⊤
M : Ideal R
hJM : Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) ≤ M
hM : M ∈ Set.Finite.toFinset hf
this✝ : ∀ (a : A), a ∈ I → ∀ (b : A), b ∈ I' → ∃ c, ↑(algebraMap R A) c = a * b
c : R
hc : ↑(algebraMap R A) c = a M * v
this : a M * v ∈ ↑I * Submodule.span R {v}
⊢ c ∈ ↑(Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}))

tactic: refine' hm M hM _
state_before: case intro.intro
R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this✝ : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a : Ideal R → A
ha : ∀ (M : Ideal R), M ∈ s → a M ∈ I
b : Ideal R → A
hb : ∀ (M : Ideal R), M ∈ s → b M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a M * b M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hu : ∀ (M : Ideal R), M ∈ s → u M ∈ ⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M'
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
v : A := ∑ M in s, u M • b M
hv : v ∈ I'
h : ¬Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) = ⊤
M : Ideal R
hJM : Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) ≤ M
hM : M ∈ Set.Finite.toFinset hf
this : ∀ (a : A), a ∈ I → ∀ (b : A), b ∈ I' → ∃ c, ↑(algebraMap R A) c = a * b
hmem : u M • (a M * b M) ∈ IsLocalization.coeSubmodule A M
⊢ False

tactic: obtain ⟨c, hc : algebraMap R A c = a M * b M⟩ := this _ (ha M hM) _ (hb M hM)
state_before: case intro.intro
R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this✝ : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a : Ideal R → A
ha : ∀ (M : Ideal R), M ∈ s → a M ∈ I
b : Ideal R → A
hb : ∀ (M : Ideal R), M ∈ s → b M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a M * b M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hu : ∀ (M : Ideal R), M ∈ s → u M ∈ ⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M'
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
v : A := ∑ M in s, u M • b M
hv : v ∈ I'
h : ¬Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) = ⊤
M : Ideal R
hJM : Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) ≤ M
hM : M ∈ Set.Finite.toFinset hf
this : ∀ (a : A), a ∈ I → ∀ (b : A), b ∈ I' → ∃ c, ↑(algebraMap R A) c = a * b
hmem : u M • (a M * b M) ∈ IsLocalization.coeSubmodule A M
⊢ a M * b M ∈ IsLocalization.coeSubmodule A M

tactic: rw [← hc] at hmem ⊢
state_before: case intro.intro.intro
R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this✝ : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a : Ideal R → A
ha : ∀ (M : Ideal R), M ∈ s → a M ∈ I
b : Ideal R → A
hb : ∀ (M : Ideal R), M ∈ s → b M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a M * b M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hu : ∀ (M : Ideal R), M ∈ s → u M ∈ ⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M'
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
v : A := ∑ M in s, u M • b M
hv : v ∈ I'
h : ¬Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) = ⊤
M : Ideal R
hJM : Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) ≤ M
hM : M ∈ Set.Finite.toFinset hf
this : ∀ (a : A), a ∈ I → ∀ (b : A), b ∈ I' → ∃ c, ↑(algebraMap R A) c = a * b
hmem : u M • (a M * b M) ∈ IsLocalization.coeSubmodule A M
c : R
hc : ↑(algebraMap R A) c = a M * b M
⊢ a M * b M ∈ IsLocalization.coeSubmodule A M

tactic: rw [Algebra.smul_def, ← _root_.map_mul] at hmem
state_before: case intro.intro.intro
R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this✝ : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a : Ideal R → A
ha : ∀ (M : Ideal R), M ∈ s → a M ∈ I
b : Ideal R → A
hb : ∀ (M : Ideal R), M ∈ s → b M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a M * b M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hu : ∀ (M : Ideal R), M ∈ s → u M ∈ ⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M'
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
v : A := ∑ M in s, u M • b M
hv : v ∈ I'
h : ¬Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) = ⊤
M : Ideal R
hJM : Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) ≤ M
hM : M ∈ Set.Finite.toFinset hf
this : ∀ (a : A), a ∈ I → ∀ (b : A), b ∈ I' → ∃ c, ↑(algebraMap R A) c = a * b
c : R
hmem : u M • ↑(algebraMap R A) c ∈ IsLocalization.coeSubmodule A M
hc : ↑(algebraMap R A) c = a M * b M
⊢ ↑(algebraMap R A) c ∈ IsLocalization.coeSubmodule A M

tactic: obtain ⟨d, hdM, he⟩ := hmem
state_before: case intro.intro.intro
R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this✝ : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a : Ideal R → A
ha : ∀ (M : Ideal R), M ∈ s → a M ∈ I
b : Ideal R → A
hb : ∀ (M : Ideal R), M ∈ s → b M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a M * b M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hu : ∀ (M : Ideal R), M ∈ s → u M ∈ ⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M'
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
v : A := ∑ M in s, u M • b M
hv : v ∈ I'
h : ¬Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) = ⊤
M : Ideal R
hJM : Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) ≤ M
hM : M ∈ Set.Finite.toFinset hf
this : ∀ (a : A), a ∈ I → ∀ (b : A), b ∈ I' → ∃ c, ↑(algebraMap R A) c = a * b
c : R
hmem : ↑(algebraMap R A) (u M * c) ∈ IsLocalization.coeSubmodule A M
hc : ↑(algebraMap R A) c = a M * b M
⊢ ↑(algebraMap R A) c ∈ IsLocalization.coeSubmodule A M

tactic: rw [IsLocalization.injective _ hS he] at hdM
state_before: case intro.intro.intro.intro.intro
R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this✝ : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a : Ideal R → A
ha : ∀ (M : Ideal R), M ∈ s → a M ∈ I
b : Ideal R → A
hb : ∀ (M : Ideal R), M ∈ s → b M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a M * b M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hu : ∀ (M : Ideal R), M ∈ s → u M ∈ ⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M'
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
v : A := ∑ M in s, u M • b M
hv : v ∈ I'
h : ¬Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) = ⊤
M : Ideal R
hJM : Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) ≤ M
hM : M ∈ Set.Finite.toFinset hf
this : ∀ (a : A), a ∈ I → ∀ (b : A), b ∈ I' → ∃ c, ↑(algebraMap R A) c = a * b
c : R
hc : ↑(algebraMap R A) c = a M * b M
d : R
hdM : d ∈ ↑M
he : ↑(Algebra.linearMap R A) d = ↑(algebraMap R A) (u M * c)
⊢ ↑(algebraMap R A) c ∈ IsLocalization.coeSubmodule A M

tactic: exact
  Submodule.mem_map_of_mem
    (((hf.mem_toFinset.1 hM).isPrime.mem_or_mem hdM).resolve_left <| hum M hM)
state_before: case intro.intro.intro.intro.intro
R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this✝ : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a : Ideal R → A
ha : ∀ (M : Ideal R), M ∈ s → a M ∈ I
b : Ideal R → A
hb : ∀ (M : Ideal R), M ∈ s → b M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a M * b M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hu : ∀ (M : Ideal R), M ∈ s → u M ∈ ⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M'
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
v : A := ∑ M in s, u M • b M
hv : v ∈ I'
h : ¬Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) = ⊤
M : Ideal R
hJM : Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) ≤ M
hM : M ∈ Set.Finite.toFinset hf
this : ∀ (a : A), a ∈ I → ∀ (b : A), b ∈ I' → ∃ c, ↑(algebraMap R A) c = a * b
c : R
hc : ↑(algebraMap R A) c = a M * b M
d : R
hdM : u M * c ∈ ↑M
he : ↑(Algebra.linearMap R A) d = ↑(algebraMap R A) (u M * c)
⊢ ↑(algebraMap R A) c ∈ IsLocalization.coeSubmodule A M

tactic: refine' Submodule.sum_mem _ fun M' hM' => _
state_before: case intro.intro.a
R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this✝ : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a : Ideal R → A
ha : ∀ (M : Ideal R), M ∈ s → a M ∈ I
b : Ideal R → A
hb : ∀ (M : Ideal R), M ∈ s → b M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a M * b M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hu : ∀ (M : Ideal R), M ∈ s → u M ∈ ⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M'
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
v : A := ∑ M in s, u M • b M
hv : v ∈ I'
h : ¬Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) = ⊤
M : Ideal R
hJM : Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) ≤ M
hM : M ∈ Set.Finite.toFinset hf
this : ∀ (a : A), a ∈ I → ∀ (b : A), b ∈ I' → ∃ c, ↑(algebraMap R A) c = a * b
hmem : u M • (a M * b M) + ∑ x in Finset.erase s M, u x • (a M * b x) ∈ IsLocalization.coeSubmodule A M
⊢ ∑ x in Finset.erase s M, u x • (a M * b x) ∈ IsLocalization.coeSubmodule A M

tactic: rw [Finset.mem_erase] at hM'
state_before: case intro.intro.a
R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this✝ : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a : Ideal R → A
ha : ∀ (M : Ideal R), M ∈ s → a M ∈ I
b : Ideal R → A
hb : ∀ (M : Ideal R), M ∈ s → b M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a M * b M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hu : ∀ (M : Ideal R), M ∈ s → u M ∈ ⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M'
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
v : A := ∑ M in s, u M • b M
hv : v ∈ I'
h : ¬Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) = ⊤
M : Ideal R
hJM : Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) ≤ M
hM : M ∈ Set.Finite.toFinset hf
this : ∀ (a : A), a ∈ I → ∀ (b : A), b ∈ I' → ∃ c, ↑(algebraMap R A) c = a * b
hmem : u M • (a M * b M) + ∑ x in Finset.erase s M, u x • (a M * b x) ∈ IsLocalization.coeSubmodule A M
M' : Ideal R
hM' : M' ∈ Finset.erase s M
⊢ u M' • (a M * b M') ∈ IsLocalization.coeSubmodule A M

tactic: obtain ⟨c, hc⟩ := this _ (ha M hM) _ (hb M' hM'.2)
state_before: case intro.intro.a
R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this✝ : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a : Ideal R → A
ha : ∀ (M : Ideal R), M ∈ s → a M ∈ I
b : Ideal R → A
hb : ∀ (M : Ideal R), M ∈ s → b M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a M * b M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hu : ∀ (M : Ideal R), M ∈ s → u M ∈ ⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M'
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
v : A := ∑ M in s, u M • b M
hv : v ∈ I'
h : ¬Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) = ⊤
M : Ideal R
hJM : Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) ≤ M
hM : M ∈ Set.Finite.toFinset hf
this : ∀ (a : A), a ∈ I → ∀ (b : A), b ∈ I' → ∃ c, ↑(algebraMap R A) c = a * b
hmem : u M • (a M * b M) + ∑ x in Finset.erase s M, u x • (a M * b x) ∈ IsLocalization.coeSubmodule A M
M' : Ideal R
hM' : M' ≠ M ∧ M' ∈ s
⊢ u M' • (a M * b M') ∈ IsLocalization.coeSubmodule A M

tactic: rw [← hc, Algebra.smul_def, ← _root_.map_mul]
state_before: case intro.intro.a.intro
R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this✝ : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a : Ideal R → A
ha : ∀ (M : Ideal R), M ∈ s → a M ∈ I
b : Ideal R → A
hb : ∀ (M : Ideal R), M ∈ s → b M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a M * b M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hu : ∀ (M : Ideal R), M ∈ s → u M ∈ ⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M'
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
v : A := ∑ M in s, u M • b M
hv : v ∈ I'
h : ¬Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) = ⊤
M : Ideal R
hJM : Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) ≤ M
hM : M ∈ Set.Finite.toFinset hf
this : ∀ (a : A), a ∈ I → ∀ (b : A), b ∈ I' → ∃ c, ↑(algebraMap R A) c = a * b
hmem : u M • (a M * b M) + ∑ x in Finset.erase s M, u x • (a M * b x) ∈ IsLocalization.coeSubmodule A M
M' : Ideal R
hM' : M' ≠ M ∧ M' ∈ s
c : R
hc : ↑(algebraMap R A) c = a M * b M'
⊢ u M' • (a M * b M') ∈ IsLocalization.coeSubmodule A M

tactic: specialize hu M' hM'.2
state_before: case intro.intro.a.intro
R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this✝ : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a : Ideal R → A
ha : ∀ (M : Ideal R), M ∈ s → a M ∈ I
b : Ideal R → A
hb : ∀ (M : Ideal R), M ∈ s → b M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a M * b M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hu : ∀ (M : Ideal R), M ∈ s → u M ∈ ⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M'
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
v : A := ∑ M in s, u M • b M
hv : v ∈ I'
h : ¬Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) = ⊤
M : Ideal R
hJM : Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) ≤ M
hM : M ∈ Set.Finite.toFinset hf
this : ∀ (a : A), a ∈ I → ∀ (b : A), b ∈ I' → ∃ c, ↑(algebraMap R A) c = a * b
hmem : u M • (a M * b M) + ∑ x in Finset.erase s M, u x • (a M * b x) ∈ IsLocalization.coeSubmodule A M
M' : Ideal R
hM' : M' ≠ M ∧ M' ∈ s
c : R
hc : ↑(algebraMap R A) c = a M * b M'
⊢ ↑(algebraMap R A) (u M' * c) ∈ IsLocalization.coeSubmodule A M

tactic: simp_rw [Ideal.mem_iInf, Finset.mem_erase] at hu
state_before: case intro.intro.a.intro
R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this✝ : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a : Ideal R → A
ha : ∀ (M : Ideal R), M ∈ s → a M ∈ I
b : Ideal R → A
hb : ∀ (M : Ideal R), M ∈ s → b M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a M * b M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
v : A := ∑ M in s, u M • b M
hv : v ∈ I'
h : ¬Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) = ⊤
M : Ideal R
hJM : Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) ≤ M
hM : M ∈ Set.Finite.toFinset hf
this : ∀ (a : A), a ∈ I → ∀ (b : A), b ∈ I' → ∃ c, ↑(algebraMap R A) c = a * b
hmem : u M • (a M * b M) + ∑ x in Finset.erase s M, u x • (a M * b x) ∈ IsLocalization.coeSubmodule A M
M' : Ideal R
hM' : M' ≠ M ∧ M' ∈ s
c : R
hc : ↑(algebraMap R A) c = a M * b M'
hu : u M' ∈ ⨅ (M'_1 : Ideal R) (_ : M'_1 ∈ Finset.erase s M'), M'_1
⊢ ↑(algebraMap R A) (u M' * c) ∈ IsLocalization.coeSubmodule A M

tactic: exact Submodule.mem_map_of_mem (M.mul_mem_right _ <| hu M ⟨hM'.1.symm, hM⟩)
state_before: case intro.intro.a.intro
R : Type u_2
inst✝³ : CommRing R
A : Type u_1
inst✝² : CommRing A
inst✝¹ : Algebra R A
S : Submonoid R
inst✝ : IsLocalization S A
hS : S ≤ R⁰
hf : Set.Finite {I | IsMaximal I}
I I' : FractionalIdeal S A
hinv : ↑I * ↑I' = ↑1
hinv' : I * I' = 1
s : Finset (Ideal R) := Set.Finite.toFinset hf
this✝ : DecidableEq (Ideal R)
coprime : ∀ (M : Ideal R), M ∈ s → ∀ (M' : Ideal R), M' ∈ Finset.erase s M → M ⊔ M' = ⊤
nle : ∀ (M : Ideal R), M ∈ s → ¬(⨅ (M' : Ideal R) (_ : M' ∈ Finset.erase s M), M') ≤ M
a : Ideal R → A
ha : ∀ (M : Ideal R), M ∈ s → a M ∈ I
b : Ideal R → A
hb : ∀ (M : Ideal R), M ∈ s → b M ∈ I'
hm : ∀ (M : Ideal R), M ∈ s → ¬a M * b M ∈ IsLocalization.coeSubmodule A M
u : Ideal R → R
hum : ∀ (M : Ideal R), M ∈ s → ¬u M ∈ M
v : A := ∑ M in s, u M • b M
hv : v ∈ I'
h : ¬Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) = ⊤
M : Ideal R
hJM : Submodule.comap (Algebra.linearMap R A) (↑↑(Units.mkOfMulEqOne I I' hinv') * Submodule.span R {v}) ≤ M
hM : M ∈ Set.Finite.toFinset hf
this : ∀ (a : A), a ∈ I → ∀ (b : A), b ∈ I' → ∃ c, ↑(algebraMap R A) c = a * b
hmem : u M • (a M * b M) + ∑ x in Finset.erase s M, u x • (a M * b x) ∈ IsLocalization.coeSubmodule A M
M' : Ideal R
hM' : M' ≠ M ∧ M' ∈ s
c : R
hc : ↑(algebraMap R A) c = a M * b M'
hu : ∀ (i : Ideal R), i ≠ M' ∧ i ∈ Set.Finite.toFinset hf → u M' ∈ i
⊢ ↑(algebraMap R A) (u M' * c) ∈ IsLocalization.coeSubmodule A M