Theorem: maximalIdeal_isPrincipal_of_isDedekindDomain
File: Mathlib/RingTheory/DiscreteValuationRing/TFAE.lean

tactic: by_cases ne_bot : maximalIdeal R = ⊥
state_before: R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
⊢ Submodule.IsPrincipal (maximalIdeal R)

tactic: obtain ⟨a, ha₁, ha₂⟩ : ∃ a ∈ maximalIdeal R, a ≠ (0 : R) := by
  by_contra' h'; apply ne_bot; rwa [eq_bot_iff]
state_before: case neg
R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
⊢ Submodule.IsPrincipal (maximalIdeal R)

tactic: have hle : Ideal.span {a} ≤ maximalIdeal R := by rwa [Ideal.span_le, Set.singleton_subset_iff]
state_before: case neg.intro.intro
R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
⊢ Submodule.IsPrincipal (maximalIdeal R)

tactic: have : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a} := by
  rw [← this]; apply Ideal.exists_radical_pow_le_of_fg; exact IsNoetherian.noetherian _
state_before: case neg.intro.intro
R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this : Ideal.radical (Ideal.span {a}) = maximalIdeal R
⊢ Submodule.IsPrincipal (maximalIdeal R)

tactic: cases' hn : Nat.find this with n
state_before: case neg.intro.intro
R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
⊢ Submodule.IsPrincipal (maximalIdeal R)

tactic: obtain ⟨b, hb₁, hb₂⟩ : ∃ b ∈ maximalIdeal R ^ n, ¬b ∈ Ideal.span {a} := by
  by_contra' h'; rw [Nat.find_eq_iff] at hn ; exact hn.2 n n.lt_succ_self fun x hx => h' x hx
state_before: case neg.intro.intro.succ
R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
⊢ Submodule.IsPrincipal (maximalIdeal R)

tactic: have hb₃ : ∀ m ∈ maximalIdeal R, ∃ k : R, k * a = b * m := by
  intro m hm; rw [← Ideal.mem_span_singleton']; apply Nat.find_spec this
  rw [hn, pow_succ']; exact Ideal.mul_mem_mul hb₁ hm
state_before: case neg.intro.intro.succ.intro.intro
R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
⊢ Submodule.IsPrincipal (maximalIdeal R)

tactic: have hb₄ : b ≠ 0 := by rintro rfl; apply hb₂; exact zero_mem _
state_before: case neg.intro.intro.succ.intro.intro
R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
⊢ Submodule.IsPrincipal (maximalIdeal R)

tactic: let K := FractionRing R
state_before: case neg.intro.intro.succ.intro.intro
R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
⊢ Submodule.IsPrincipal (maximalIdeal R)

tactic: let x : K := algebraMap R K b / algebraMap R K a
state_before: case neg.intro.intro.succ.intro.intro
R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
⊢ Submodule.IsPrincipal (maximalIdeal R)

tactic: let M := Submodule.map (Algebra.ofId R K).toLinearMap (maximalIdeal R)
state_before: case neg.intro.intro.succ.intro.intro
R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
⊢ Submodule.IsPrincipal (maximalIdeal R)

tactic: have ha₃ : algebraMap R K a ≠ 0 := IsFractionRing.to_map_eq_zero_iff.not.mpr ha₂
state_before: case neg.intro.intro.succ.intro.intro
R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
⊢ Submodule.IsPrincipal (maximalIdeal R)

tactic: by_cases hx : ∀ y ∈ M, x * y ∈ M
state_before: case neg.intro.intro.succ.intro.intro
R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
⊢ Submodule.IsPrincipal (maximalIdeal R)

tactic: rw [ne_bot]
state_before: case pos
R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : maximalIdeal R = ⊥
⊢ Submodule.IsPrincipal (maximalIdeal R)

tactic: infer_instance
state_before: case pos
R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : maximalIdeal R = ⊥
⊢ Submodule.IsPrincipal ⊥

tactic: by_contra' h'
state_before: R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
⊢ ∃ a, a ∈ maximalIdeal R ∧ a ≠ 0

tactic: apply ne_bot
state_before: R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
h' : ∀ (a : R), a ∈ maximalIdeal R → a = 0
⊢ False

tactic: rwa [eq_bot_iff]
state_before: R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
h' : ∀ (a : R), a ∈ maximalIdeal R → a = 0
⊢ maximalIdeal R = ⊥

tactic: rwa [Ideal.span_le, Set.singleton_subset_iff]
state_before: R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
⊢ Ideal.span {a} ≤ maximalIdeal R

tactic: rw [Ideal.radical_eq_sInf]
state_before: R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
⊢ Ideal.radical (Ideal.span {a}) = maximalIdeal R

tactic: apply le_antisymm
state_before: R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
⊢ sInf {J | Ideal.span {a} ≤ J ∧ Ideal.IsPrime J} = maximalIdeal R

tactic: exact sInf_le ⟨hle, inferInstance⟩
state_before: case a
R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
⊢ sInf {J | Ideal.span {a} ≤ J ∧ Ideal.IsPrime J} ≤ maximalIdeal R

tactic: refine'
  le_sInf fun I hI =>
    (eq_maximalIdeal <| IsDedekindDomain.dimensionLEOne _ (fun e => ha₂ _) hI.2).ge
state_before: case a
R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
⊢ maximalIdeal R ≤ sInf {J | Ideal.span {a} ≤ J ∧ Ideal.IsPrime J}

tactic: rw [← Ideal.span_singleton_eq_bot, eq_bot_iff, ← e]
state_before: case a
R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
I : Ideal R
hI : I ∈ {J | Ideal.span {a} ≤ J ∧ Ideal.IsPrime J}
e : I = ⊥
⊢ a = 0

tactic: exact hI.1
state_before: case a
R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
I : Ideal R
hI : I ∈ {J | Ideal.span {a} ≤ J ∧ Ideal.IsPrime J}
e : I = ⊥
⊢ Ideal.span {a} ≤ I

tactic: rw [← this]
state_before: R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this : Ideal.radical (Ideal.span {a}) = maximalIdeal R
⊢ ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}

tactic: apply Ideal.exists_radical_pow_le_of_fg
state_before: R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this : Ideal.radical (Ideal.span {a}) = maximalIdeal R
⊢ ∃ n, Ideal.radical (Ideal.span {a}) ^ n ≤ Ideal.span {a}

tactic: exact IsNoetherian.noetherian _
state_before: case h
R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this : Ideal.radical (Ideal.span {a}) = maximalIdeal R
⊢ Ideal.FG (Ideal.radical (Ideal.span {a}))

tactic: have := Nat.find_spec this
state_before: case neg.intro.intro.zero
R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
hn : Nat.find this = Nat.zero
⊢ Submodule.IsPrincipal (maximalIdeal R)

tactic: rw [hn, pow_zero, Ideal.one_eq_top] at this
state_before: case neg.intro.intro.zero
R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
hn : Nat.find this✝ = Nat.zero
this : maximalIdeal R ^ Nat.find this✝ ≤ Ideal.span {a}
⊢ Submodule.IsPrincipal (maximalIdeal R)

tactic: exact (Ideal.IsMaximal.ne_top inferInstance (eq_top_iff.mpr <| this.trans hle)).elim
state_before: case neg.intro.intro.zero
R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
hn : Nat.find this✝ = Nat.zero
this : ⊤ ≤ Ideal.span {a}
⊢ Submodule.IsPrincipal (maximalIdeal R)

tactic: by_contra' h'
state_before: R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
⊢ ∃ b, b ∈ maximalIdeal R ^ n ∧ ¬b ∈ Ideal.span {a}

tactic: rw [Nat.find_eq_iff] at hn
state_before: R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
h' : ∀ (b : R), b ∈ maximalIdeal R ^ n → b ∈ Ideal.span {a}
⊢ False

tactic: exact hn.2 n n.lt_succ_self fun x hx => h' x hx
state_before: R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn :
  maximalIdeal R ^ Nat.succ n ≤ Ideal.span {a} ∧ ∀ (n_1 : ℕ), n_1 < Nat.succ n → ¬maximalIdeal R ^ n_1 ≤ Ideal.span {a}
h' : ∀ (b : R), b ∈ maximalIdeal R ^ n → b ∈ Ideal.span {a}
⊢ False

tactic: intro m hm
state_before: R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
⊢ ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m

tactic: rw [← Ideal.mem_span_singleton']
state_before: R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
m : R
hm : m ∈ maximalIdeal R
⊢ ∃ k, k * a = b * m

tactic: apply Nat.find_spec this
state_before: R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
m : R
hm : m ∈ maximalIdeal R
⊢ b * m ∈ Ideal.span {a}

tactic: rw [hn, pow_succ']
state_before: case a
R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
m : R
hm : m ∈ maximalIdeal R
⊢ b * m ∈ maximalIdeal R ^ Nat.find this

tactic: exact Ideal.mul_mem_mul hb₁ hm
state_before: case a
R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
m : R
hm : m ∈ maximalIdeal R
⊢ b * m ∈ maximalIdeal R ^ n * maximalIdeal R

tactic: rintro rfl
state_before: R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
⊢ b ≠ 0

tactic: apply hb₂
state_before: R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
hb₁ : 0 ∈ maximalIdeal R ^ n
hb₂ : ¬0 ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = 0 * m
⊢ False

tactic: exact zero_mem _
state_before: R : Type u_1
inst✝⁶ : CommRing R
K : Type ?u.14279
inst✝⁵ : Field K
inst✝⁴ : Algebra R K
inst✝³ : IsFractionRing R K
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
hb₁ : 0 ∈ maximalIdeal R ^ n
hb₂ : ¬0 ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = 0 * m
⊢ 0 ∈ Ideal.span {a}

tactic: have := isIntegral_of_smul_mem_submodule M ?_ ?_ x hx
state_before: case pos
R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ∀ (y : K), y ∈ M → x * y ∈ M
⊢ Submodule.IsPrincipal (maximalIdeal R)

tactic: obtain ⟨y, e⟩ := IsIntegrallyClosed.algebraMap_eq_of_integral this
state_before: case pos.refine_3
R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this✝ = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ∀ (y : K), y ∈ M → x * y ∈ M
this : IsIntegral R x
⊢ Submodule.IsPrincipal (maximalIdeal R)

tactic: refine' (hb₂ (Ideal.mem_span_singleton'.mpr ⟨y, _⟩)).elim
state_before: case pos.refine_3.intro
R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this✝ = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ∀ (y : K), y ∈ M → x * y ∈ M
this : IsIntegral R x
y : R
e : ↑(algebraMap R (FractionRing R)) y = x
⊢ Submodule.IsPrincipal (maximalIdeal R)

tactic: apply IsFractionRing.injective R K
state_before: case pos.refine_3.intro
R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this✝ = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ∀ (y : K), y ∈ M → x * y ∈ M
this : IsIntegral R x
y : R
e : ↑(algebraMap R (FractionRing R)) y = x
⊢ y * a = b

tactic: rw [map_mul, e, div_mul_cancel _ ha₃]
state_before: case pos.refine_3.intro.a
R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this✝ = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ∀ (y : K), y ∈ M → x * y ∈ M
this : IsIntegral R x
y : R
e : ↑(algebraMap R (FractionRing R)) y = x
⊢ ↑(algebraMap R K) (y * a) = ↑(algebraMap R K) b

tactic: rw [Submodule.ne_bot_iff]
state_before: case pos.refine_1
R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ∀ (y : K), y ∈ M → x * y ∈ M
⊢ M ≠ ⊥

tactic: refine' ⟨_, ⟨a, ha₁, rfl⟩, _⟩
state_before: case pos.refine_1
R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ∀ (y : K), y ∈ M → x * y ∈ M
⊢ ∃ x, x ∈ M ∧ x ≠ 0

tactic: exact (IsFractionRing.to_map_eq_zero_iff (K := K)).not.mpr ha₂
state_before: case pos.refine_1
R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ∀ (y : K), y ∈ M → x * y ∈ M
⊢ ↑(AlgHom.toLinearMap (Algebra.ofId R K)) a ≠ 0

tactic: apply Submodule.FG.map
state_before: case pos.refine_2
R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ∀ (y : K), y ∈ M → x * y ∈ M
⊢ Submodule.FG M

tactic: exact IsNoetherian.noetherian _
state_before: case pos.refine_2.hs
R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ∀ (y : K), y ∈ M → x * y ∈ M
⊢ Submodule.FG (maximalIdeal R)

tactic: have :
    (M.map (DistribMulAction.toLinearMap R K x)).comap (Algebra.ofId R K).toLinearMap = ⊤ := by
  by_contra h; apply hx
  rintro m' ⟨m, hm, rfl : algebraMap R K m = m'⟩
  obtain ⟨k, hk⟩ := hb₃ m hm
  have hk' : x * algebraMap R K m = algebraMap R K k := by
    rw [← mul_div_right_comm, ← map_mul, ← hk, map_mul, mul_div_cancel _ ha₃]
  exact ⟨k, le_maximalIdeal h ⟨_, ⟨_, hm, rfl⟩, hk'⟩, hk'.symm⟩
state_before: case neg
R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ¬∀ (y : K), y ∈ M → x * y ∈ M
⊢ Submodule.IsPrincipal (maximalIdeal R)

tactic: obtain ⟨y, hy₁, hy₂⟩ : ∃ y ∈ maximalIdeal R, b * y = a := by
  rw [Ideal.eq_top_iff_one, Submodule.mem_comap] at this
  obtain ⟨_, ⟨y, hy, rfl⟩, hy' : x * algebraMap R K y = algebraMap R K 1⟩ := this
  rw [map_one, ← mul_div_right_comm, div_eq_one_iff_eq ha₃, ← map_mul] at hy'
  exact ⟨y, hy, IsFractionRing.injective R K hy'⟩
state_before: case neg
R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this✝ = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ¬∀ (y : K), y ∈ M → x * y ∈ M
this :
  Submodule.comap (AlgHom.toLinearMap (Algebra.ofId R K)) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤
⊢ Submodule.IsPrincipal (maximalIdeal R)

tactic: refine' ⟨⟨y, _⟩⟩
state_before: case neg.intro.intro
R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this✝ = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ¬∀ (y : K), y ∈ M → x * y ∈ M
this :
  Submodule.comap (AlgHom.toLinearMap (Algebra.ofId R K)) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤
y : R
hy₁ : y ∈ maximalIdeal R
hy₂ : b * y = a
⊢ Submodule.IsPrincipal (maximalIdeal R)

tactic: apply le_antisymm
state_before: case neg.intro.intro
R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this✝ = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ¬∀ (y : K), y ∈ M → x * y ∈ M
this :
  Submodule.comap (AlgHom.toLinearMap (Algebra.ofId R K)) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤
y : R
hy₁ : y ∈ maximalIdeal R
hy₂ : b * y = a
⊢ maximalIdeal R = Submodule.span R {y}

tactic: by_contra h
state_before: R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ¬∀ (y : K), y ∈ M → x * y ∈ M
⊢ Submodule.comap (AlgHom.toLinearMap (Algebra.ofId R K)) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤

tactic: apply hx
state_before: R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ¬∀ (y : K), y ∈ M → x * y ∈ M
h : ¬Submodule.comap (AlgHom.toLinearMap (Algebra.ofId R K)) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤
⊢ False

tactic: rintro m' ⟨m, hm, rfl : algebraMap R K m = m'⟩
state_before: R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ¬∀ (y : K), y ∈ M → x * y ∈ M
h : ¬Submodule.comap (AlgHom.toLinearMap (Algebra.ofId R K)) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤
⊢ ∀ (y : K), y ∈ M → x * y ∈ M

tactic: obtain ⟨k, hk⟩ := hb₃ m hm
state_before: case intro.intro
R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ¬∀ (y : K), y ∈ M → x * y ∈ M
h : ¬Submodule.comap (AlgHom.toLinearMap (Algebra.ofId R K)) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤
m : R
hm : m ∈ ↑(maximalIdeal R)
⊢ x * ↑(algebraMap R K) m ∈ M

tactic: have hk' : x * algebraMap R K m = algebraMap R K k := by
  rw [← mul_div_right_comm, ← map_mul, ← hk, map_mul, mul_div_cancel _ ha₃]
state_before: case intro.intro.intro
R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ¬∀ (y : K), y ∈ M → x * y ∈ M
h : ¬Submodule.comap (AlgHom.toLinearMap (Algebra.ofId R K)) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤
m : R
hm : m ∈ ↑(maximalIdeal R)
k : R
hk : k * a = b * m
⊢ x * ↑(algebraMap R K) m ∈ M

tactic: exact ⟨k, le_maximalIdeal h ⟨_, ⟨_, hm, rfl⟩, hk'⟩, hk'.symm⟩
state_before: case intro.intro.intro
R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ¬∀ (y : K), y ∈ M → x * y ∈ M
h : ¬Submodule.comap (AlgHom.toLinearMap (Algebra.ofId R K)) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤
m : R
hm : m ∈ ↑(maximalIdeal R)
k : R
hk : k * a = b * m
hk' : x * ↑(algebraMap R K) m = ↑(algebraMap R K) k
⊢ x * ↑(algebraMap R K) m ∈ M

tactic: rw [← mul_div_right_comm, ← map_mul, ← hk, map_mul, mul_div_cancel _ ha₃]
state_before: R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ¬∀ (y : K), y ∈ M → x * y ∈ M
h : ¬Submodule.comap (AlgHom.toLinearMap (Algebra.ofId R K)) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤
m : R
hm : m ∈ ↑(maximalIdeal R)
k : R
hk : k * a = b * m
⊢ x * ↑(algebraMap R K) m = ↑(algebraMap R K) k

tactic: rw [Ideal.eq_top_iff_one, Submodule.mem_comap] at this
state_before: R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this✝ = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ¬∀ (y : K), y ∈ M → x * y ∈ M
this :
  Submodule.comap (AlgHom.toLinearMap (Algebra.ofId R K)) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤
⊢ ∃ y, y ∈ maximalIdeal R ∧ b * y = a

tactic: obtain ⟨_, ⟨y, hy, rfl⟩, hy' : x * algebraMap R K y = algebraMap R K 1⟩ := this
state_before: R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this✝ = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ¬∀ (y : K), y ∈ M → x * y ∈ M
this : ↑(AlgHom.toLinearMap (Algebra.ofId R K)) 1 ∈ Submodule.map (DistribMulAction.toLinearMap R K x) M
⊢ ∃ y, y ∈ maximalIdeal R ∧ b * y = a

tactic: rw [map_one, ← mul_div_right_comm, div_eq_one_iff_eq ha₃, ← map_mul] at hy'
state_before: case intro.intro.intro.intro
R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ¬∀ (y : K), y ∈ M → x * y ∈ M
y : R
hy : y ∈ ↑(maximalIdeal R)
hy' : x * ↑(algebraMap R K) y = ↑(algebraMap R K) 1
⊢ ∃ y, y ∈ maximalIdeal R ∧ b * y = a

tactic: exact ⟨y, hy, IsFractionRing.injective R K hy'⟩
state_before: case intro.intro.intro.intro
R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ¬∀ (y : K), y ∈ M → x * y ∈ M
y : R
hy : y ∈ ↑(maximalIdeal R)
hy' : ↑(algebraMap R K) (b * y) = ↑(algebraMap R K) a
⊢ ∃ y, y ∈ maximalIdeal R ∧ b * y = a

tactic: intro m hm
state_before: case neg.intro.intro.a
R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this✝ = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ¬∀ (y : K), y ∈ M → x * y ∈ M
this :
  Submodule.comap (AlgHom.toLinearMap (Algebra.ofId R K)) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤
y : R
hy₁ : y ∈ maximalIdeal R
hy₂ : b * y = a
⊢ maximalIdeal R ≤ Submodule.span R {y}

tactic: obtain ⟨k, hk⟩ := hb₃ m hm
state_before: case neg.intro.intro.a
R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this✝ = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ¬∀ (y : K), y ∈ M → x * y ∈ M
this :
  Submodule.comap (AlgHom.toLinearMap (Algebra.ofId R K)) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤
y : R
hy₁ : y ∈ maximalIdeal R
hy₂ : b * y = a
m : R
hm : m ∈ maximalIdeal R
⊢ m ∈ Submodule.span R {y}

tactic: rw [← hy₂, mul_comm, mul_assoc] at hk
state_before: case neg.intro.intro.a.intro
R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this✝ = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ¬∀ (y : K), y ∈ M → x * y ∈ M
this :
  Submodule.comap (AlgHom.toLinearMap (Algebra.ofId R K)) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤
y : R
hy₁ : y ∈ maximalIdeal R
hy₂ : b * y = a
m : R
hm : m ∈ maximalIdeal R
k : R
hk : k * a = b * m
⊢ m ∈ Submodule.span R {y}

tactic: rw [← mul_left_cancel₀ hb₄ hk, mul_comm]
state_before: case neg.intro.intro.a.intro
R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this✝ = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ¬∀ (y : K), y ∈ M → x * y ∈ M
this :
  Submodule.comap (AlgHom.toLinearMap (Algebra.ofId R K)) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤
y : R
hy₁ : y ∈ maximalIdeal R
hy₂ : b * y = a
m : R
hm : m ∈ maximalIdeal R
k : R
hk : b * (y * k) = b * m
⊢ m ∈ Submodule.span R {y}

tactic: exact Ideal.mem_span_singleton'.mpr ⟨_, rfl⟩
state_before: case neg.intro.intro.a.intro
R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this✝ = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ¬∀ (y : K), y ∈ M → x * y ∈ M
this :
  Submodule.comap (AlgHom.toLinearMap (Algebra.ofId R K)) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤
y : R
hy₁ : y ∈ maximalIdeal R
hy₂ : b * y = a
m : R
hm : m ∈ maximalIdeal R
k : R
hk : b * (y * k) = b * m
⊢ k * y ∈ Submodule.span R {y}

tactic: rwa [Submodule.span_le, Set.singleton_subset_iff]
state_before: case neg.intro.intro.a
R : Type u_1
inst✝⁶ : CommRing R
K✝ : Type ?u.14279
inst✝⁵ : Field K✝
inst✝⁴ : Algebra R K✝
inst✝³ : IsFractionRing R K✝
inst✝² : LocalRing R
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ne_bot : ¬maximalIdeal R = ⊥
a : R
ha₁ : a ∈ maximalIdeal R
ha₂ : a ≠ 0
hle : Ideal.span {a} ≤ maximalIdeal R
this✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R
this✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}
n : ℕ
hn : Nat.find this✝ = Nat.succ n
b : R
hb₁ : b ∈ maximalIdeal R ^ n
hb₂ : ¬b ∈ Ideal.span {a}
hb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m
hb₄ : b ≠ 0
K : Type u_1 := FractionRing R
x : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a
M : Submodule R K := Submodule.map (AlgHom.toLinearMap (Algebra.ofId R K)) (maximalIdeal R)
ha₃ : ↑(algebraMap R K) a ≠ 0
hx : ¬∀ (y : K), y ∈ M → x * y ∈ M
this :
  Submodule.comap (AlgHom.toLinearMap (Algebra.ofId R K)) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤
y : R
hy₁ : y ∈ maximalIdeal R
hy₂ : b * y = a
⊢ Submodule.span R {y} ≤ maximalIdeal R