@@ -14,8 +14,8 @@ The main application lies in proving that higher homotopy groups (`πₙ` for `n
14
14
15
15
## Main declarations
16
16
17
- * `eckmann_hilton.comm_monoid`: If a type carries two unital binary operations that distribute
18
- over each other , then these operations are equal, and form a commutative monoid structure .
17
+ * `eckmann_hilton.comm_monoid`: If a type carries a unital magma structure that distributes
18
+ over a unital binary operation , then the magma is a commutative monoid.
19
19
* `eckmann_hilton.comm_group`: If a type carries a group structure that distributes
20
20
over a unital binary operation, then the group is commutative.
21
21
@@ -31,12 +31,11 @@ local notation a `<`m`>` b := m a b
31
31
32
32
/-- `is_unital m e` expresses that `e : X` is a left and right unit
33
33
for the binary operation `m : X → X → X`. -/
34
- class is_unital (m : X → X → X) (e : X) : Prop :=
35
- (one_mul : ∀ x : X, (e <m> x) = x)
36
- (mul_one : ∀ x : X, (x <m> e) = x)
34
+ structure is_unital (m : X → X → X) (e : X) extends is_left_id _ m e, is_right_id _ m e : Prop .
37
35
38
- @[to_additive add_group.is_unital]
39
- lemma group.is_unital [G : group X] : is_unital (*) (1 : X) := { ..G }
36
+ @[to_additive eckmann_hilton.add_zero_class.is_unital]
37
+ lemma mul_one_class.is_unital [G : mul_one_class X] : is_unital (*) (1 : X) :=
38
+ is_unital.mk (by apply_instance) (by apply_instance)
40
39
41
40
variables {m₁ m₂ : X → X → X} {e₁ e₂ : X}
42
41
variables (h₁ : is_unital m₁ e₁) (h₂ : is_unital m₂ e₂)
@@ -49,55 +48,56 @@ then they have the same unit elements.
49
48
In fact, the two operations are the same, and give a commutative monoid structure,
50
49
see `eckmann_hilton.comm_monoid`. -/
51
50
lemma one : e₁ = e₂ :=
52
- by simpa only [h₁.one_mul , h₁.mul_one , h₂.one_mul , h₂.mul_one ] using distrib e₂ e₁ e₁ e₂
51
+ by simpa only [h₁.left_id , h₁.right_id , h₂.left_id , h₂.right_id ] using distrib e₂ e₁ e₁ e₂
53
52
54
53
/-- If a type carries two unital binary operations that distribute over each other,
55
54
then these operations are equal.
56
55
57
56
In fact, they give a commutative monoid structure, see `eckmann_hilton.comm_monoid`. -/
58
- lemma mul : ( m₁ = m₂) :=
57
+ lemma mul : m₁ = m₂ :=
59
58
begin
60
59
funext a b,
61
60
calc m₁ a b = m₁ (m₂ a e₁) (m₂ e₁ b) :
62
- by simp only [one h₁ h₂ distrib, h₁.one_mul , h₁.mul_one , h₂.one_mul , h₂.mul_one ]
61
+ by simp only [one h₁ h₂ distrib, h₁.left_id , h₁.right_id , h₂.left_id , h₂.right_id ]
63
62
... = m₂ a b :
64
- by simp only [distrib, h₁.one_mul , h₁.mul_one , h₂.one_mul , h₂.mul_one ]
63
+ by simp only [distrib, h₁.left_id , h₁.right_id , h₂.left_id , h₂.right_id ]
65
64
end
66
65
67
66
/-- If a type carries two unital binary operations that distribute over each other,
68
67
then these operations are commutative.
69
68
70
69
In fact, they give a commutative monoid structure, see `eckmann_hilton.comm_monoid`. -/
71
70
lemma mul_comm : is_commutative _ m₂ :=
72
- ⟨λ a b, by simpa [mul h₁ h₂ distrib, h₂.one_mul , h₂.mul_one ] using distrib e₂ a b e₂⟩
71
+ ⟨λ a b, by simpa [mul h₁ h₂ distrib, h₂.left_id , h₂.right_id ] using distrib e₂ a b e₂⟩
73
72
74
73
/-- If a type carries two unital binary operations that distribute over each other,
75
74
then these operations are associative.
76
75
77
76
In fact, they give a commutative monoid structure, see `eckmann_hilton.comm_monoid`. -/
78
77
lemma mul_assoc : is_associative _ m₂ :=
79
- ⟨λ a b c, by simpa [mul h₁ h₂ distrib, h₂.one_mul, h₂.mul_one] using distrib a b e₂ c⟩
80
-
81
- /-- If a type carries two unital binary operations that distribute over each other,
82
- then these operations are equal, and form a commutative monoid structure. -/
83
- @[to_additive " If a type carries two unital binary operations that distribute over each other,
84
- then these operations are equal, and form a additive commutative monoid structure." ]
85
- def comm_monoid : comm_monoid X :=
86
- { mul := m₂,
87
- one := e₂,
88
- mul_comm := (mul_comm h₁ h₂ distrib).comm,
89
- mul_assoc := (mul_assoc h₁ h₂ distrib).assoc,
90
- ..h₂ }
78
+ ⟨λ a b c, by simpa [mul h₁ h₂ distrib, h₂.left_id, h₂.right_id] using distrib a b e₂ c⟩
91
79
92
80
omit h₁ h₂ distrib
93
81
82
+ /-- If a type carries a unital magma structure that distributes over a unital binary
83
+ operations, then the magma structure is a commutative monoid. -/
84
+ @[to_additive " If a type carries a unital additive magma structure that distributes over a
85
+ unital binary operations, then the additive magma structure is a commutative additive monoid." ]
86
+ def comm_monoid [h : mul_one_class X]
87
+ (distrib : ∀ a b c d, ((a * b) <m₁> (c * d)) = ((a <m₁> c) * (b <m₁> d))) : comm_monoid X :=
88
+ { mul := (*),
89
+ one := 1 ,
90
+ mul_comm := (mul_comm h₁ mul_one_class.is_unital distrib).comm,
91
+ mul_assoc := (mul_assoc h₁ mul_one_class.is_unital distrib).assoc,
92
+ ..h }
93
+
94
94
/-- If a type carries a group structure that distributes over a unital binary operation,
95
95
then the group is commutative. -/
96
96
@[to_additive " If a type carries an additive group structure that distributes
97
97
over a unital binary operation, then the additive group is commutative." ]
98
98
def comm_group [G : group X]
99
99
(distrib : ∀ a b c d, ((a * b) <m₁> (c * d)) = ((a <m₁> c) * (b <m₁> d))) : comm_group X :=
100
- { mul_comm := (eckmann_hilton.comm_monoid h₁ group.is_unital distrib).mul_comm ,
100
+ { .. (eckmann_hilton.comm_monoid h₁ distrib),
101
101
..G }
102
102
103
103
end eckmann_hilton
0 commit comments