-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy pathSub_sgroup.v
93 lines (84 loc) · 3.06 KB
/
Sub_sgroup.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
(* This program is free software; you can redistribute it and/or *)
(* modify it under the terms of the GNU Lesser General Public License *)
(* as published by the Free Software Foundation; either version 2.1 *)
(* of the License, or (at your option) any later version. *)
(* *)
(* This program is distributed in the hope that it will be useful, *)
(* but WITHOUT ANY WARRANTY; without even the implied warranty of *)
(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *)
(* GNU General Public License for more details. *)
(* *)
(* You should have received a copy of the GNU Lesser General Public *)
(* License along with this program; if not, write to the Free *)
(* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *)
(* 02110-1301 USA *)
Set Implicit Arguments.
Unset Strict Implicit.
Require Export Sgroup_facts.
Require Export Parts.
Section Def.
Variable G : SGROUP.
Section Sub_sgroup.
Variable H : part_set G.
Hypothesis
Hprop :
forall x y : G,
in_part x H -> in_part y H -> in_part (sgroup_law _ x y) H.
Definition subsgroup_law : law_of_composition H.
unfold law_of_composition in |- *.
apply
(Build_Map
(A:=cart (set_of_subtype_image (part H)) (set_of_subtype_image (part H)))
(B:=H)
(Ap:=fun
x : cart (set_of_subtype_image (part H))
(set_of_subtype_image (part H)) =>
Build_subtype
(Hprop (subtype_prf (proj1 x)) (subtype_prf (proj2 x))))).
red in |- *.
simpl in |- *.
unfold cart_eq, subtype_image_equal in |- *.
simpl in |- *.
unfold cart_eq, subtype_image_equal in |- *.
intuition.
Defined.
Definition subsgroup_sgroup : sgroup.
apply (Build_sgroup (sgroup_set:=H)).
apply (Build_sgroup_on (E:=H) (sgroup_law_map:=subsgroup_law)).
red in |- *.
simpl in |- *.
unfold subtype_image_equal in |- *.
simpl in |- *.
auto with algebra.
Defined.
End Sub_sgroup.
Record subsgroup : Type :=
{subsgroup_part : Predicate G;
subsgroup_prop :
forall x y : G,
in_part x subsgroup_part ->
in_part y subsgroup_part -> in_part (sgroup_law _ x y) subsgroup_part}.
Definition sgroup_of_subsgroup (H : subsgroup) :=
subsgroup_sgroup (subsgroup_prop (s:=H)).
End Def.
Coercion sgroup_of_subsgroup : subsgroup >-> sgroup.
Coercion subsgroup_part : subsgroup >-> Predicate.
Section Injection.
Variable G : SGROUP.
Variable H : subsgroup G.
Lemma subsgroup_in_prop :
forall x y : G, in_part x H -> in_part y H -> in_part (sgroup_law _ x y) H.
intros x y H' H'0; try assumption.
apply (subsgroup_prop (G:=G) (s:=H)); auto with algebra.
Qed.
Definition inj_subsgroup : Hom (H:SGROUP) G.
apply (Build_sgroup_hom (E:=H) (F:=G) (sgroup_map:=inj_part H)).
red in |- *.
auto with algebra.
Defined.
Lemma inj_subgroup_injective : injective inj_subsgroup.
red in |- *.
auto with algebra.
Qed.
End Injection.
Hint Resolve subsgroup_in_prop inj_subgroup_injective: algebra.