1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 set "baseuri" "cic:/matita/algebra/groups/".
17 include "algebra/monoids.ma".
18 include "nat/le_arith.ma".
20 record isGroup (M:Monoid) (opp: M -> M) : Prop ≝
21 { opp_is_left_inverse: is_left_inverse M opp;
22 opp_is_right_inverse: is_right_inverse M opp
27 opp: monoid -> monoid;
28 group_properties: isGroup ? opp
31 coercion cic:/matita/algebra/groups/monoid.con.
36 interpretation "Monoid coercion" 'monoid G =
37 (cic:/matita/algebra/groups/monoid.con G).
40 for @{ 'type_of_group $G }.
42 interpretation "Type_of_group coercion" 'type_of_group G =
43 (cic:/matita/algebra/groups/Type_of_Group.con G).
46 for @{ 'semigroup_of_group $G }.
48 interpretation "Semigroup_of_group coercion" 'semigroup_of_group G =
49 (cic:/matita/algebra/groups/SemiGroup_of_Group.con G).
51 notation "hvbox(x \sup (-1))" with precedence 89
54 interpretation "Group inverse" 'gopp x =
55 (cic:/matita/algebra/groups/opp.con _ x).
57 definition left_cancellable ≝
58 λT:Type. λop: T -> T -> T.
59 ∀x. injective ? ? (op x).
61 definition right_cancellable ≝
62 λT:Type. λop: T -> T -> T.
63 ∀x. injective ? ? (λz.op z x).
65 theorem eq_op_x_y_op_x_z_to_eq:
66 ∀G:Group. left_cancellable G (op G).
68 unfold left_cancellable;
71 rewrite < (e_is_left_unit ? ? (monoid_properties G));
72 rewrite < (e_is_left_unit ? ? (monoid_properties G) z);
73 rewrite < (opp_is_left_inverse ? ? (group_properties G) x);
74 rewrite > (semigroup_properties G);
75 rewrite > (semigroup_properties G);
81 theorem eq_op_x_y_op_z_y_to_eq:
82 ∀G:Group. right_cancellable G (op G).
84 unfold right_cancellable;
86 simplify;fold simplify (op G);
88 rewrite < (e_is_right_unit ? ? (monoid_properties G));
89 rewrite < (e_is_right_unit ? ? (monoid_properties G) z);
90 rewrite < (opp_is_right_inverse ? ? (group_properties G) x);
91 rewrite < (semigroup_properties G);
92 rewrite < (semigroup_properties G);
98 record finite_enumerable (T:Type) : Type ≝
102 index_of_sur: ∀x.index_of x ≤ order;
103 index_of_repr: ∀n. n≤order → index_of (repr n) = n;
104 repr_index_of: ∀x. repr (index_of x) = x
107 notation "hvbox(C \sub i)" with precedence 89
108 for @{ 'repr $C $i }.
110 (* CSC: multiple interpretations in the same file are not considered in the
112 interpretation "Finite_enumerable representation" 'repr C i =
113 (cic:/matita/algebra/groups/repr.con C _ i).*)
115 notation "hvbox(|C|)" with precedence 89
118 interpretation "Finite_enumerable order" 'card C =
119 (cic:/matita/algebra/groups/order.con C _).
121 record finite_enumerable_SemiGroup : Type ≝
122 { semigroup: SemiGroup;
123 is_finite_enumerable: finite_enumerable semigroup
126 coercion cic:/matita/algebra/groups/semigroup.con.
127 coercion cic:/matita/algebra/groups/is_finite_enumerable.con.
130 for @{ 'semigroup_of_finite_enumerable_semigroup $S }.
132 interpretation "Semigroup_of_finite_enumerable_semigroup"
133 'semigroup_of_finite_enumerable_semigroup S
135 (cic:/matita/algebra/groups/semigroup.con S).
138 for @{ 'type_of_finite_enumerable_semigroup $S }.
140 interpretation "Type_of_finite_enumerable_semigroup"
141 'type_of_finite_enumerable_semigroup S
143 (cic:/matita/algebra/groups/Type_of_finite_enumerable_SemiGroup.con S).
145 interpretation "Finite_enumerable representation" 'repr S i =
146 (cic:/matita/algebra/groups/repr.con S
147 (cic:/matita/algebra/groups/is_finite_enumerable.con S) i).
149 notation "hvbox(ι e)" with precedence 60
150 for @{ 'index_of_finite_enumerable_semigroup $e }.
152 interpretation "Index_of_finite_enumerable representation"
153 'index_of_finite_enumerable_semigroup e
155 (cic:/matita/algebra/groups/index_of.con _
156 (cic:/matita/algebra/groups/is_finite_enumerable.con _) e).
159 ∀G:finite_enumerable_SemiGroup.
160 left_cancellable ? (op G) →
161 right_cancellable ? (op G) →
164 letin f ≝ (λn.ι(G \sub O · G \sub n));
165 cut (∀n.n ≤ order ? (is_finite_enumerable G) → ∃m.f m = n);
166 [ letin EX ≝ (Hcut O ?);
173 letin HH ≝ (eq_f ? ? (repr ? (is_finite_enumerable G)) ? ? H2);
175 rewrite > (repr_index_of ? (is_finite_enumerable G)) in HH;
176 apply (ex_intro ? ? (G \sub a));
177 letin GOGO ≝ (refl_eq ? (repr ? (is_finite_enumerable G) O));
179 rewrite < HH in GOGO;
180 rewrite < HH in GOGO:(? ? % ?);
181 rewrite > (semigroup_properties G) in GOGO;
182 letin GaGa ≝ (H ? ? ? GOGO);
186 [ unfold is_left_unit; intro;
187 letin GaxGax ≝ (refl_eq ? (G \sub a ·x));
189 rewrite < GaGa in GaxGax:(? ? % ?);
190 rewrite > (semigroup_properties G) in GaxGax;
191 apply (H ? ? ? GaxGax)
192 | unfold is_right_unit; intro;
193 letin GaxGax ≝ (refl_eq ? (x·G \sub a));
195 rewrite < GaGa in GaxGax:(? ? % ?);
196 rewrite < (semigroup_properties G) in GaxGax;
197 apply (H1 ? ? ? GaxGax)