@@ -93,87 +93,193 @@ theorem one_le {P : Submodule R A} : (1 : Submodule R A) ≤ P ↔ (1 : A) ∈ P
9393 -- Porting note: simpa no longer closes refl goals, so added `SetLike.mem_coe`
9494 simp only [one_eq_span, span_le, Set.singleton_subset_iff, SetLike.mem_coe]
9595
96+ variable {M : Type *} [AddCommMonoid M] [Module R M] [Module A M] [IsScalarTower R A M]
97+
98+ instance : SMul (Submodule R A) (Submodule R M) where
99+ smul A' M' :=
100+ { __ := A'.toAddSubmonoid • M'.toAddSubmonoid
101+ smul_mem' := fun r m hm ↦ AddSubmonoid.smul_induction_on hm
102+ (fun a ha m hm ↦ by rw [← smul_assoc]; exact AddSubmonoid.smul_mem_smul (A'.smul_mem r ha) hm)
103+ fun m₁ m₂ h₁ h₂ ↦ by rw [smul_add]; exact (A'.1 • M'.1 ).add_mem h₁ h₂ }
104+
105+ section
106+
107+ variable {I J : Submodule R A} {N P : Submodule R M}
108+
109+ theorem smul_toAddSubmonoid : (I • N).toAddSubmonoid = I.toAddSubmonoid • N.toAddSubmonoid := rfl
110+
111+ theorem smul_mem_smul {r} {n} (hr : r ∈ I) (hn : n ∈ N) : r • n ∈ I • N :=
112+ AddSubmonoid.smul_mem_smul hr hn
113+
114+ theorem smul_le : I • N ≤ P ↔ ∀ r ∈ I, ∀ n ∈ N, r • n ∈ P :=
115+ AddSubmonoid.smul_le
116+
117+ @ [simp, norm_cast]
118+ lemma coe_set_smul : (I : Set A) • N = I • N :=
119+ set_smul_eq_of_le _ _ _
120+ (fun _ _ hr hx ↦ smul_mem_smul hr hx)
121+ (smul_le.mpr fun _ hr _ hx ↦ mem_set_smul_of_mem_mem hr hx)
122+
123+ @[elab_as_elim]
124+ theorem smul_induction_on {p : M → Prop } {x} (H : x ∈ I • N) (smul : ∀ r ∈ I, ∀ n ∈ N, p (r • n))
125+ (add : ∀ x y, p x → p y → p (x + y)) : p x :=
126+ AddSubmonoid.smul_induction_on H smul add
127+
128+ /-- Dependent version of `Submodule.smul_induction_on`. -/
129+ @[elab_as_elim]
130+ theorem smul_induction_on' {x : M} (hx : x ∈ I • N) {p : ∀ x, x ∈ I • N → Prop }
131+ (smul : ∀ (r : A) (hr : r ∈ I) (n : M) (hn : n ∈ N), p (r • n) (smul_mem_smul hr hn))
132+ (add : ∀ x hx y hy, p x hx → p y hy → p (x + y) (add_mem ‹_› ‹_›)) : p x hx := by
133+ refine Exists.elim ?_ fun (h : x ∈ I • N) (H : p x h) ↦ H
134+ exact smul_induction_on hx (fun a ha x hx ↦ ⟨_, smul _ ha _ hx⟩)
135+ fun x y ⟨_, hx⟩ ⟨_, hy⟩ ↦ ⟨_, add _ _ _ _ hx hy⟩
136+
137+ theorem smul_mono (hij : I ≤ J) (hnp : N ≤ P) : I • N ≤ J • P :=
138+ AddSubmonoid.smul_le_smul hij hnp
139+
140+ theorem smul_mono_left (h : I ≤ J) : I • N ≤ J • N :=
141+ smul_mono h le_rfl
142+
143+ instance : CovariantClass (Submodule R A) (Submodule R M) HSMul.hSMul LE.le :=
144+ ⟨fun _ _ => smul_mono le_rfl⟩
145+
146+ @ [deprecated smul_mono_right (since := "2024-03-31" )]
147+ protected theorem smul_mono_right (h : N ≤ P) : I • N ≤ I • P :=
148+ _root_.smul_mono_right I h
149+
150+ variable (I J N P)
151+
152+ @[simp]
153+ theorem smul_bot : I • (⊥ : Submodule R M) = ⊥ :=
154+ toAddSubmonoid_injective <| AddSubmonoid.addSubmonoid_smul_bot _
155+
156+ @[simp]
157+ theorem bot_smul : (⊥ : Submodule R A) • N = ⊥ :=
158+ le_bot_iff.mp <| smul_le.mpr <| by rintro _ rfl _ _; rw [zero_smul]; exact zero_mem _
159+
160+ theorem smul_sup : I • (N ⊔ P) = I • N ⊔ I • P :=
161+ toAddSubmonoid_injective <| by
162+ simp only [smul_toAddSubmonoid, sup_toAddSubmonoid, AddSubmonoid.addSubmonoid_smul_sup]
163+
164+ theorem sup_smul : (I ⊔ J) • N = I • N ⊔ J • N :=
165+ le_antisymm (smul_le.mpr fun mn hmn p hp ↦ by
166+ obtain ⟨m, hm, n, hn, rfl⟩ := mem_sup.mp hmn
167+ rw [add_smul]; exact add_mem_sup (smul_mem_smul hm hp) <| smul_mem_smul hn hp)
168+ (sup_le (smul_mono_left le_sup_left) <| smul_mono_left le_sup_right)
169+
170+ protected theorem smul_assoc {B} [Semiring B] [Module R B] [Module A B] [Module B M]
171+ [IsScalarTower R A B] [IsScalarTower R B M] [IsScalarTower A B M]
172+ (I : Submodule R A) (J : Submodule R B) (N : Submodule R M) :
173+ (I • J) • N = I • J • N :=
174+ le_antisymm
175+ (smul_le.2 fun _ hrsij t htn ↦ smul_induction_on hrsij
176+ (fun r hr s hs ↦ smul_assoc r s t ▸ smul_mem_smul hr (smul_mem_smul hs htn))
177+ fun x y ↦ (add_smul x y t).symm ▸ add_mem)
178+ (smul_le.2 fun r hr _ hsn ↦ smul_induction_on hsn
179+ (fun j hj n hn ↦ (smul_assoc r j n).symm ▸ smul_mem_smul (smul_mem_smul hr hj) hn)
180+ fun m₁ m₂ ↦ (smul_add r m₁ m₂) ▸ add_mem)
181+
182+ @ [deprecated smul_inf_le (since := "2024-03-31" )]
183+ protected theorem smul_inf_le (M₁ M₂ : Submodule R M) :
184+ I • (M₁ ⊓ M₂) ≤ I • M₁ ⊓ I • M₂ := smul_inf_le _ _ _
185+
186+ theorem smul_iSup {ι : Sort *} {I : Submodule R A} {t : ι → Submodule R M} :
187+ I • (⨆ i, t i)= ⨆ i, I • t i :=
188+ toAddSubmonoid_injective <| by
189+ simp only [smul_toAddSubmonoid, iSup_toAddSubmonoid, AddSubmonoid.smul_iSup]
190+
191+ theorem iSup_smul {ι : Sort *} {t : ι → Submodule R A} {N : Submodule R M} :
192+ (⨆ i, t i) • N = ⨆ i, t i • N :=
193+ le_antisymm (smul_le.mpr fun t ht s hs ↦ iSup_induction _ (C := (· • s ∈ _)) ht
194+ (fun i t ht ↦ mem_iSup_of_mem i <| smul_mem_smul ht hs)
195+ (by simp_rw [zero_smul]; apply zero_mem) fun x y ↦ by simp_rw [add_smul]; apply add_mem)
196+ (iSup_le fun i ↦ Submodule.smul_mono_left <| le_iSup _ i)
197+
198+ @ [deprecated smul_iInf_le (since := "2024-03-31" )]
199+ protected theorem smul_iInf_le {ι : Sort *} {I : Submodule R A} {t : ι → Submodule R M} :
200+ I • iInf t ≤ ⨅ i, I • t i :=
201+ smul_iInf_le
202+
203+ protected theorem one_smul : (1 : Submodule R A) • N = N := by
204+ refine le_antisymm (smul_le.mpr fun r hr m hm ↦ ?_) fun m hm ↦ ?_
205+ · obtain ⟨r, rfl⟩ := hr
206+ rw [LinearMap.toSpanSingleton_apply, smul_one_smul]; exact N.smul_mem r hm
207+ · rw [← one_smul A m]; exact smul_mem_smul (one_le.mp le_rfl) hm
208+
209+ theorem smul_subset_smul : (↑I : Set A) • (↑N : Set M) ⊆ (↑(I • N) : Set M) :=
210+ AddSubmonoid.smul_subset_smul
211+
212+ end
213+
96214variable [IsScalarTower R A A]
97215
98216/-- Multiplication of sub-R-modules of an R-module A that is also a semiring. The submodule `M * N`
99217consists of finite sums of elements `m * n` for `m ∈ M` and `n ∈ N`. -/
100218instance mul : Mul (Submodule R A) where
101- mul M N :=
102- { __ := M.toAddSubmonoid * N.toAddSubmonoid
103- smul_mem' := fun r a ha ↦ AddSubmonoid.mul_induction_on ha
104- (fun m h n h' ↦ by rw [← smul_mul_assoc]; exact AddSubmonoid.mul_mem_mul (M.smul_mem r h) h')
105- fun a₁ a₂ h₁ h₂ ↦ by rw [smul_add]; apply (M.1 * N.1 ).add_mem h₁ h₂ }
219+ mul := (· • ·)
106220
107221variable (S T : Set A) {M N P Q : Submodule R A} {m n : A}
108222
109223theorem mul_mem_mul (hm : m ∈ M) (hn : n ∈ N) : m * n ∈ M * N :=
110- AddSubmonoid.mul_mem_mul hm hn
224+ smul_mem_smul hm hn
111225
112226theorem mul_le : M * N ≤ P ↔ ∀ m ∈ M, ∀ n ∈ N, m * n ∈ P :=
113- AddSubmonoid.mul_le
227+ smul_le
114228
115229theorem mul_toAddSubmonoid (M N : Submodule R A) :
116230 (M * N).toAddSubmonoid = M.toAddSubmonoid * N.toAddSubmonoid := rfl
117231
118232@[elab_as_elim]
119233protected theorem mul_induction_on {C : A → Prop } {r : A} (hr : r ∈ M * N)
120234 (hm : ∀ m ∈ M, ∀ n ∈ N, C (m * n)) (ha : ∀ x y, C x → C y → C (x + y)) : C r :=
121- AddSubmonoid.mul_induction_on hr hm ha
235+ smul_induction_on hr hm ha
122236
123237/-- A dependent version of `mul_induction_on`. -/
124238@[elab_as_elim]
125239protected theorem mul_induction_on' {C : ∀ r, r ∈ M * N → Prop }
126240 (mem_mul_mem : ∀ m (hm : m ∈ M) n (hn : n ∈ N), C (m * n) (mul_mem_mul hm hn))
127241 (add : ∀ x hx y hy, C x hx → C y hy → C (x + y) (add_mem hx hy)) {r : A} (hr : r ∈ M * N) :
128- C r hr := by
129- refine Exists.elim ?_ fun (hr : r ∈ M * N) (hc : C r hr) ↦ hc
130- exact Submodule.mul_induction_on hr
131- (fun x hx y hy ↦ ⟨_, mem_mul_mem _ hx _ hy⟩)
132- fun x y ⟨_, hx⟩ ⟨_, hy⟩ ↦ ⟨_, add _ _ _ _ hx hy⟩
242+ C r hr :=
243+ smul_induction_on' hr mem_mul_mem add
133244
134245variable (M)
135246
136247@[simp]
137248theorem mul_bot : M * ⊥ = ⊥ :=
138- toAddSubmonoid_injective (AddSubmonoid.mul_bot _)
249+ smul_bot _
139250
140251@[simp]
141252theorem bot_mul : ⊥ * M = ⊥ :=
142- toAddSubmonoid_injective (AddSubmonoid.bot_mul _)
253+ bot_smul _
143254
144- protected theorem one_mul : (1 : Submodule R A) * M = M := by
145- refine le_antisymm (mul_le.mpr fun r hr m hm ↦ ?_) fun m hm ↦ ?_
146- · obtain ⟨r, rfl⟩ := hr
147- rw [LinearMap.toSpanSingleton_apply, smul_one_mul]; exact M.smul_mem r hm
148- · rw [← one_mul m]; exact mul_mem_mul (one_le.mp le_rfl) hm
255+ protected theorem one_mul : (1 : Submodule R A) * M = M :=
256+ Submodule.one_smul _
149257
150258variable {M}
151259
152260@[mono]
153261theorem mul_le_mul (hmp : M ≤ P) (hnq : N ≤ Q) : M * N ≤ P * Q :=
154- AddSubmonoid.mul_le_mul hmp hnq
262+ smul_mono hmp hnq
155263
156264theorem mul_le_mul_left (h : M ≤ N) : M * P ≤ N * P :=
157- AddSubmonoid.mul_le_mul_left h
265+ smul_mono_left h
158266
159267theorem mul_le_mul_right (h : N ≤ P) : M * N ≤ M * P :=
160- AddSubmonoid.mul_le_mul_right h
268+ smul_mono_right _ h
161269
162270theorem mul_comm_of_commute (h : ∀ m ∈ M, ∀ n ∈ N, Commute m n) : M * N = N * M :=
163271 toAddSubmonoid_injective <| AddSubmonoid.mul_comm_of_commute h
164272
165273variable (M N P)
166274
167275theorem mul_sup : M * (N ⊔ P) = M * N ⊔ M * P :=
168- toAddSubmonoid_injective <| by
169- simp only [mul_toAddSubmonoid, sup_toAddSubmonoid, AddSubmonoid.mul_sup]
276+ smul_sup _ _ _
170277
171278theorem sup_mul : (M ⊔ N) * P = M * P ⊔ N * P :=
172- toAddSubmonoid_injective <| by
173- simp only [mul_toAddSubmonoid, sup_toAddSubmonoid, AddSubmonoid.sup_mul]
279+ sup_smul _ _ _
174280
175281theorem mul_subset_mul : (↑M : Set A) * (↑N : Set A) ⊆ (↑(M * N) : Set A) :=
176- AddSubmonoid.mul_subset_mul
282+ smul_subset_smul _ _
177283
178284lemma restrictScalars_mul {A B C} [Semiring A] [Semiring B] [Semiring C]
179285 [SMul A B] [Module A C] [Module B C] [IsScalarTower A C C] [IsScalarTower B C C]
@@ -184,12 +290,10 @@ lemma restrictScalars_mul {A B C} [Semiring A] [Semiring B] [Semiring C]
184290variable {ι : Sort uι}
185291
186292theorem iSup_mul (s : ι → Submodule R A) (t : Submodule R A) : (⨆ i, s i) * t = ⨆ i, s i * t :=
187- toAddSubmonoid_injective <| by
188- simp only [mul_toAddSubmonoid, iSup_toAddSubmonoid, AddSubmonoid.iSup_mul]
293+ iSup_smul
189294
190295theorem mul_iSup (t : Submodule R A) (s : ι → Submodule R A) : (t * ⨆ i, s i) = ⨆ i, t * s i :=
191- toAddSubmonoid_injective <| by
192- simp only [mul_toAddSubmonoid, iSup_toAddSubmonoid, AddSubmonoid.mul_iSup]
296+ smul_iSup
193297
194298/-- Sub-`R`-modules of an `R`-module form an idempotent semiring. -/
195299instance : NonUnitalSemiring (Submodule R A) where
0 commit comments