@@ -6,27 +6,48 @@ Authors: Kenny Lau
6
6
Multiplication of submodules of an algebra.
7
7
-/
8
8
9
- import ring_theory.algebra ring_theory.noetherian
9
+ import ring_theory.algebra algebra.pointwise ring_theory.ideals
10
+ import tactic.chain
10
11
11
12
universes u v
12
13
13
- open lattice submodule
14
+ open lattice algebra
14
15
15
- namespace algebra
16
+ local attribute [instance] set.pointwise_mul_semiring
17
+
18
+ namespace submodule
16
19
17
20
variables {R : Type u} [comm_ring R]
18
21
19
22
section ring
20
23
21
24
variables {A : Type v} [ring A] [algebra R A]
25
+ variables (S T : set A) {M N P Q : submodule R A} {m n : A}
26
+
27
+ instance : has_one (submodule R A) :=
28
+ ⟨submodule.map (of_id R A).to_linear_map (⊤ : ideal R)⟩
29
+
30
+ theorem one_eq_map_top :
31
+ (1 : submodule R A) = submodule.map (of_id R A).to_linear_map (⊤ : ideal R) := rfl
32
+
33
+ theorem one_eq_span : (1 : submodule R A) = span R {1 } :=
34
+ begin
35
+ apply submodule.ext,
36
+ intro a,
37
+ erw [mem_map, mem_span_singleton],
38
+ apply exists_congr,
39
+ intro r,
40
+ simpa [smul_def],
41
+ end
42
+
43
+ theorem one_le : (1 : submodule R A) ≤ P ↔ (1 : A) ∈ P :=
44
+ by simpa only [one_eq_span, span_le, set.singleton_subset_iff]
22
45
23
46
set_option class.instance_max_depth 50
24
47
instance : has_mul (submodule R A) :=
25
48
⟨λ M N, ⨆ s : M, N.map $ algebra.lmul R A s.1 ⟩
26
49
set_option class.instance_max_depth 32
27
50
28
- variables (S T : set A) {M N P Q : submodule R A} {m n : A}
29
-
30
51
theorem mul_mem_mul (hm : m ∈ M) (hn : n ∈ N) : m * n ∈ M * N :=
31
52
(le_supr _ ⟨m, hm⟩ : _ ≤ M * N) ⟨n, hn, rfl⟩
32
53
@@ -42,27 +63,21 @@ theorem mul_le : M * N ≤ P ↔ ∀ (m ∈ M) (n ∈ N), m * n ∈ P :=
42
63
(@mul_le _ _ _ _ _ _ _ ⟨C, h0, ha, hs⟩).2 hm hr
43
64
44
65
variables R
45
- theorem span_mul_span : span R S * span R T = span R ((S.prod T).image (λ p, p. 1 * p. 2 ) ) :=
46
- le_antisymm
47
- (mul_le. 2 $ λ x1 hx1 x2 hx2, span_induction hx1
48
- (λ y1 hy1, span_induction hx2
49
- (λ y2 hy2, subset_span ⟨(y1, y2), ⟨hy1, hy2⟩, rfl⟩)
50
- ((mul_zero y1).symm ▸ zero_mem _)
51
- (λ r1 r2, (mul_add y1 r1 r2).symm ▸ add_mem _)
52
- (λ s r, (algebra.mul_smul_comm s y1 r).symm ▸ smul_mem _ _))
53
- ((zero_mul x2).symm ▸ zero_mem _)
54
- (λ r1 r2, (add_mul r1 r2 x2).symm ▸ add_mem _)
55
- (λ s r, (algebra.smul_mul_assoc s r x2).symm ▸ smul_mem _ _))
56
- (span_le. 2 (set.image_subset_iff. 2 $ λ ⟨x1, x2⟩ ⟨hx1, hx2⟩,
57
- mul_mem_mul (subset_span hx1) (subset_span hx2)))
66
+ theorem span_mul_span : span R S * span R T = span R (S * T ) :=
67
+ begin
68
+ apply le_antisymm,
69
+ { rw mul_le, intros a ha b hb,
70
+ apply span_induction ha,
71
+ work_on_goal 0 { intros, apply span_induction hb,
72
+ work_on_goal 0 { intros, exact subset_span ⟨_, ‹_›, _, ‹_›, rfl⟩ } },
73
+ all_goals { intros, simp only [mul_zero, zero_mul, zero_mem,
74
+ left_distrib, right_distrib, mul_smul_comm, smul_mul_assoc],
75
+ try {apply add_mem _ _ _}, try {apply smul_mem _ _ _} }, assumption' },
76
+ { rw span_le, rintros _ ⟨a, ha, b, hb, rfl⟩,
77
+ exact mul_mem_mul (subset_span ha) (subset_span hb) }
78
+ end
58
79
variables {R}
59
80
60
- theorem fg_mul (hm : M.fg) (hn : N.fg) : (M * N).fg :=
61
- let ⟨m, hf1, hm⟩ := fg_def.1 hm, ⟨n, hf2, hn⟩ := fg_def.1 hn in
62
- fg_def.2 ⟨(m.prod n).image (λ p, p.1 * p.2 ),
63
- set.finite_image _ (set.finite_prod hf1 hf2),
64
- span_mul_span R m n ▸ hm ▸ hn ▸ rfl⟩
65
-
66
81
variables (M N P Q)
67
82
set_option class.instance_max_depth 50
68
83
protected theorem mul_assoc : (M * N) * P = M * (N * P) :=
@@ -79,6 +94,13 @@ eq_bot_iff.2 $ mul_le.2 $ λ m hm n hn, by rw [submodule.mem_bot] at hn ⊢; rw
79
94
80
95
@[simp] theorem bot_mul : ⊥ * M = ⊥ :=
81
96
eq_bot_iff.2 $ mul_le.2 $ λ m hm n hn, by rw [submodule.mem_bot] at hm ⊢; rw [hm, zero_mul]
97
+
98
+ @[simp] protected theorem one_mul : (1 : submodule R A) * M = M :=
99
+ by { conv_lhs { rw [one_eq_span, ← span_eq M] }, erw [span_mul_span, one_mul, span_eq] }
100
+
101
+ @[simp] protected theorem mul_one : M * 1 = M :=
102
+ by { conv_lhs { rw [one_eq_span, ← span_eq M] }, erw [span_mul_span, mul_one, span_eq] }
103
+
82
104
variables {M N P Q}
83
105
84
106
@[mono] theorem mul_le_mul (hmp : M ≤ P) (hnq : N ≤ Q) : M * N ≤ P * Q :=
@@ -102,19 +124,17 @@ le_antisymm (mul_le.2 $ λ mn hmn p hp, let ⟨m, hm, n, hn, hmn⟩ := mem_sup.1
102
124
(sup_le (mul_le_mul_left le_sup_left) (mul_le_mul_left le_sup_right))
103
125
variables {M N P}
104
126
105
- instance : semigroup (submodule R A) :=
106
- { mul := (*),
107
- mul_assoc := algebra.mul_assoc }
108
-
109
- instance : mul_zero_class (submodule R A) :=
110
- { zero_mul := bot_mul,
111
- mul_zero := mul_bot,
112
- .. submodule.add_comm_monoid, .. algebra.semigroup }
113
-
114
- instance : distrib (submodule R A) :=
115
- { left_distrib := mul_sup,
127
+ instance : semiring (submodule R A) :=
128
+ { one_mul := submodule.one_mul,
129
+ mul_one := submodule.mul_one,
130
+ mul_assoc := submodule.mul_assoc,
131
+ zero_mul := bot_mul,
132
+ mul_zero := mul_bot,
133
+ left_distrib := mul_sup,
116
134
right_distrib := sup_mul,
117
- .. submodule.add_comm_monoid, .. algebra.semigroup }
135
+ ..submodule.add_comm_monoid,
136
+ ..submodule.has_one,
137
+ ..submodule.has_mul }
118
138
119
139
end ring
120
140
@@ -131,10 +151,10 @@ protected theorem mul_comm : M * N = N * M :=
131
151
le_antisymm (mul_le.2 $ λ r hrm s hsn, mul_mem_mul_rev hsn hrm)
132
152
(mul_le.2 $ λ r hrn s hsm, mul_mem_mul_rev hsm hrn)
133
153
134
- instance : comm_semigroup (submodule R A) :=
135
- { mul_comm := algebra .mul_comm,
136
- .. algebra.semigroup }
154
+ instance : comm_semiring (submodule R A) :=
155
+ { mul_comm := submodule .mul_comm,
156
+ .. submodule.semiring }
137
157
138
158
end comm_ring
139
159
140
- end algebra
160
+ end submodule
0 commit comments