Skip to content

Commit 8e3c989

Browse files
NoahW314eric-wieser
andcommitted
feat(Algebra/Algebra/Operations): add Submodule.mul_eq_bot (#37626)
Generalize `Ideal.mul_eq_bot` to work for submodules as well. Co-authored-by: NoahW314 <noahwalker3.14@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
1 parent dbcdd9f commit 8e3c989

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

Mathlib/Algebra/Algebra/Operations.lean

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,19 @@ theorem mul_bot : M * ⊥ = ⊥ :=
248248
theorem bot_mul : ⊥ * M = ⊥ :=
249249
bot_smul _
250250

251+
@[simp]
252+
theorem mul_eq_bot [NoZeroDivisors A] {M N : Submodule R A} :
253+
M * N = ⊥ ↔ M = ⊥ ∨ N = ⊥ :=
254+
fun hmn =>
255+
or_iff_not_imp_left.mpr fun M_ne_bot =>
256+
N.eq_bot_iff.mpr fun n hn =>
257+
let ⟨m, hm, ne0⟩ := M.ne_bot_iff.mp M_ne_bot
258+
Or.resolve_left (mul_eq_zero.mp ((M * N).eq_bot_iff.mp hmn _ (mul_mem_mul hm hn))) ne0,
259+
fun h => by obtain rfl | rfl := h; exacts [bot_mul _, mul_bot _]⟩
260+
261+
instance [NoZeroDivisors A] : NoZeroDivisors (Submodule R A) where
262+
eq_zero_or_eq_zero_of_mul_eq_zero := mul_eq_bot.1
263+
251264
protected theorem one_mul : (1 : Submodule R A) * M = M :=
252265
Submodule.one_smul _
253266

Mathlib/RingTheory/Ideal/Operations.lean

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -395,17 +395,7 @@ protected theorem pow_succ : I ^ (n + 1) = I * I ^ n := by
395395

396396
end IsTwoSided
397397

398-
@[simp]
399-
theorem mul_eq_bot [NoZeroDivisors R] : I * J = ⊥ ↔ I = ⊥ ∨ J = ⊥ :=
400-
fun hij =>
401-
or_iff_not_imp_left.mpr fun I_ne_bot =>
402-
J.eq_bot_iff.mpr fun j hj =>
403-
let ⟨i, hi, ne0⟩ := I.ne_bot_iff.mp I_ne_bot
404-
Or.resolve_left (mul_eq_zero.mp ((I * J).eq_bot_iff.mp hij _ (mul_mem_mul hi hj))) ne0,
405-
fun h => by obtain rfl | rfl := h; exacts [bot_mul _, mul_bot _]⟩
406-
407-
instance [NoZeroDivisors R] : NoZeroDivisors (Ideal R) where
408-
eq_zero_or_eq_zero_of_mul_eq_zero := mul_eq_bot.1
398+
theorem mul_eq_bot [NoZeroDivisors R] : I * J = ⊥ ↔ I = ⊥ ∨ J = ⊥ := Submodule.mul_eq_bot
409399

410400
instance {S A : Type*} [Semiring S] [SMul R S] [AddCommMonoid A] [Module R A] [Module S A]
411401
[IsScalarTower R S A] [IsTorsionFree R A] {I : Submodule S A} : IsTorsionFree R I :=

0 commit comments

Comments
 (0)