@@ -31,9 +31,10 @@ group.
31
31
32
32
open Pointwise
33
33
34
- variable {M N : Type *} [Monoid M] [AddMonoid N]
34
+ variable {M N : Type *} [Monoid M]
35
35
36
36
section Submonoid
37
+ variable [Monoid N] {P : Submonoid M} {Q : Submonoid N}
37
38
38
39
/-- A submonoid of `M` is finitely generated if it is the closure of a finite subset of `M`. -/
39
40
@[to_additive]
@@ -62,52 +63,61 @@ theorem Submonoid.fg_iff_add_fg (P : Submonoid M) : P.FG ↔ P.toAddSubmonoid.FG
62
63
(Submonoid.fg_iff _).mpr
63
64
⟨Additive.ofMul ⁻¹' T, by simp [← AddSubmonoid.toSubmonoid'_closure, hT], hf⟩⟩
64
65
65
- theorem AddSubmonoid.fg_iff_mul_fg (P : AddSubmonoid N) : P.FG ↔ P.toSubmonoid.FG := by
66
+ theorem AddSubmonoid.fg_iff_mul_fg {M : Type *} [AddMonoid M] (P : AddSubmonoid M) :
67
+ P.FG ↔ P.toSubmonoid.FG := by
66
68
convert (Submonoid.fg_iff_add_fg (toSubmonoid P)).symm
67
69
70
+ /-- The product of finitely generated submonoids is finitely generated. -/
71
+ @[to_additive "The product of finitely generated submonoids is finitely generated."]
72
+ lemma Submonoid.FG.prod (hP : P.FG) (hQ : Q.FG) : (P.prod Q).FG := by
73
+ classical
74
+ obtain ⟨bM, hbM⟩ := hP
75
+ obtain ⟨bN, hbN⟩ := hQ
76
+ refine ⟨bM ×ˢ singleton 1 ∪ singleton 1 ×ˢ bN, ?_⟩
77
+ push_cast
78
+ simp [Submonoid.closure_union, hbM, hbN]
79
+
68
80
end Submonoid
69
81
70
82
section Monoid
71
83
72
- variable (M N)
73
-
74
- /-- A monoid is finitely generated if it is finitely generated as a submonoid of itself. -/
75
- class Monoid.FG : Prop where
76
- out : (⊤ : Submonoid M).FG
77
-
78
84
/-- An additive monoid is finitely generated if it is finitely generated as an additive submonoid of
79
85
itself. -/
80
- class AddMonoid.FG : Prop where
81
- out : (⊤ : AddSubmonoid N).FG
86
+ @[mk_iff]
87
+ class AddMonoid.FG (M : Type *) [AddMonoid M] : Prop where
88
+ fg_top : (⊤ : AddSubmonoid M).FG
82
89
83
- attribute [to_additive] Monoid.FG
84
-
85
- variable {M N}
90
+ variable (M) in
91
+ /-- A monoid is finitely generated if it is finitely generated as a submonoid of itself. -/
92
+ @[to_additive]
93
+ class Monoid.FG : Prop where
94
+ fg_top : (⊤ : Submonoid M).FG
86
95
96
+ @[to_additive]
87
97
theorem Monoid.fg_def : Monoid.FG M ↔ (⊤ : Submonoid M).FG :=
88
98
⟨fun h => h.1 , fun h => ⟨h⟩⟩
89
99
90
- theorem AddMonoid.fg_def : AddMonoid.FG N ↔ (⊤ : AddSubmonoid N).FG :=
91
- ⟨fun h => h.1 , fun h => ⟨h⟩⟩
92
-
93
100
/-- An equivalent expression of `Monoid.FG` in terms of `Set.Finite` instead of `Finset`. -/
94
101
@[to_additive
95
102
"An equivalent expression of `AddMonoid.FG` in terms of `Set.Finite` instead of `Finset`." ]
96
103
theorem Monoid.fg_iff :
97
104
Monoid.FG M ↔ ∃ S : Set M, Submonoid.closure S = (⊤ : Submonoid M) ∧ S.Finite :=
98
- ⟨fun h => (Submonoid.fg_iff ⊤).1 h.out , fun h => ⟨(Submonoid.fg_iff ⊤).2 h⟩⟩
105
+ ⟨fun _ => (Submonoid.fg_iff ⊤).1 FG.fg_top , fun h => ⟨(Submonoid.fg_iff ⊤).2 h⟩⟩
99
106
100
- theorem Monoid.fg_iff_add_fg : Monoid.FG M ↔ AddMonoid.FG (Additive M) :=
101
- ⟨fun h => ⟨(Submonoid.fg_iff_add_fg ⊤).1 h.out⟩, fun h => ⟨(Submonoid.fg_iff_add_fg ⊤).2 h.out⟩⟩
107
+ theorem Monoid.fg_iff_add_fg : Monoid.FG M ↔ AddMonoid.FG (Additive M) where
108
+ mp _ := ⟨(Submonoid.fg_iff_add_fg ⊤).1 FG.fg_top⟩
109
+ mpr h := ⟨(Submonoid.fg_iff_add_fg ⊤).2 h.fg_top⟩
102
110
103
- theorem AddMonoid.fg_iff_mul_fg : AddMonoid.FG N ↔ Monoid.FG (Multiplicative N) :=
104
- ⟨fun h => ⟨(AddSubmonoid.fg_iff_mul_fg ⊤).1 h.out⟩, fun h =>
105
- ⟨(AddSubmonoid.fg_iff_mul_fg ⊤).2 h.out⟩⟩
111
+ theorem AddMonoid.fg_iff_mul_fg {M : Type *} [AddMonoid M] :
112
+ AddMonoid.FG M ↔ Monoid.FG (Multiplicative M) where
113
+ mp _ := ⟨(AddSubmonoid.fg_iff_mul_fg ⊤).1 FG.fg_top⟩
114
+ mpr h := ⟨(AddSubmonoid.fg_iff_mul_fg ⊤).2 h.fg_top⟩
106
115
107
116
instance AddMonoid.fg_of_monoid_fg [Monoid.FG M] : AddMonoid.FG (Additive M) :=
108
117
Monoid.fg_iff_add_fg.1 ‹_›
109
118
110
- instance Monoid.fg_of_addMonoid_fg [AddMonoid.FG N] : Monoid.FG (Multiplicative N) :=
119
+ instance Monoid.fg_of_addMonoid_fg {M : Type *} [AddMonoid M] [AddMonoid.FG M] :
120
+ Monoid.FG (Multiplicative M) :=
111
121
AddMonoid.fg_iff_mul_fg.1 ‹_›
112
122
113
123
@[to_additive]
@@ -139,7 +149,7 @@ theorem Submonoid.FG.map_injective {M' : Type*} [Monoid M'] {P : Submonoid M} (e
139
149
@[to_additive (attr := simp)]
140
150
theorem Monoid.fg_iff_submonoid_fg (N : Submonoid M) : Monoid.FG N ↔ N.FG := by
141
151
conv_rhs => rw [← N.mrange_subtype, MonoidHom.mrange_eq_map]
142
- exact ⟨fun h => h.out .map N.subtype, fun h => ⟨h.map_injective N.subtype Subtype.coe_injective⟩⟩
152
+ exact ⟨fun h ↦ h.fg_top .map N.subtype, fun h => ⟨h.map_injective N.subtype Subtype.coe_injective⟩⟩
143
153
144
154
@[to_additive]
145
155
theorem Monoid.fg_of_surjective {M' : Type *} [Monoid M'] [Monoid.FG M] (f : M →* M')
@@ -227,11 +237,11 @@ section Group
227
237
228
238
variable (G H)
229
239
230
- /-- A group is finitely generated if it is finitely generated as a submonoid of itself. -/
240
+ /-- A group is finitely generated if it is finitely generated as a subgroup of itself. -/
231
241
class Group.FG : Prop where
232
242
out : (⊤ : Subgroup G).FG
233
243
234
- /-- An additive group is finitely generated if it is finitely generated as an additive submonoid of
244
+ /-- An additive group is finitely generated if it is finitely generated as an additive subgroup of
235
245
itself. -/
236
246
class AddGroup.FG : Prop where
237
247
out : (⊤ : AddSubgroup H).FG
@@ -388,3 +398,14 @@ instance QuotientGroup.fg [Group.FG G] (N : Subgroup G) [Subgroup.Normal N] : Gr
388
398
Group.fg_of_surjective <| QuotientGroup.mk'_surjective N
389
399
390
400
end QuotientGroup
401
+
402
+ namespace Prod
403
+ variable [Monoid N]
404
+
405
+ open Monoid in
406
+ /-- The product of finitely generated monoids is finitely generated. -/
407
+ @[to_additive "The product of finitely generated monoids is finitely generated."]
408
+ instance instMonoidFG [FG M] [FG N] : FG (M × N) where
409
+ fg_top := by rw [← Submonoid.top_prod_top]; exact .prod ‹FG M›.fg_top ‹FG N›.fg_top
410
+
411
+ end Prod
0 commit comments