-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy pathHom_module.v
186 lines (179 loc) · 6.62 KB
/
Hom_module.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
(* 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 Automatic Coercions Import.
Set Implicit Arguments.
Unset Strict Implicit.
Require Export Module_util.
Require Export Ring_facts.
Require Export Module_facts.
Section Hom_module_def.
Variable R : CRING.
Variable Mod1 Mod2 : MODULE R.
Definition add_hom_module : forall f g : Hom Mod1 Mod2, Hom Mod1 Mod2.
intros f0 g.
apply
(BUILD_HOM_MODULE (R:=R) (Mod:=Mod1) (Mod':=Mod2)
(ff:=fun x : Mod1 => sgroup_law Mod2 (f0 x) (g x))).
abstract auto with algebra.
abstract (intros x y;
apply
Trans
with
(sgroup_law (module_carrier Mod2)
(sgroup_law (module_carrier Mod2)
(Ap
(sgroup_map
(monoid_sgroup_hom (module_monoid_hom f0))) x)
(Ap
(sgroup_map
(monoid_sgroup_hom (module_monoid_hom f0))) y))
(sgroup_law (module_carrier Mod2)
(Ap
(sgroup_map (monoid_sgroup_hom (module_monoid_hom g)))
x)
(Ap
(sgroup_map (monoid_sgroup_hom (module_monoid_hom g)))
y))); auto with algebra).
abstract (apply
Trans
with
(sgroup_law (module_carrier Mod2)
(monoid_unit (module_carrier Mod2))
(monoid_unit (module_carrier Mod2)));
auto with algebra).
abstract (intros a x;
apply
Trans
with
(sgroup_law (module_carrier Mod2)
(module_mult a
(Ap
(sgroup_map
(monoid_sgroup_hom (module_monoid_hom f0))) x))
(module_mult a
(Ap
(sgroup_map (monoid_sgroup_hom (module_monoid_hom g)))
x))); auto with algebra).
Defined.
Definition zero_hom_module : Hom Mod1 Mod2.
apply
(BUILD_HOM_MODULE (R:=R) (Mod:=Mod1) (Mod':=Mod2)
(ff:=fun x : Mod1 => monoid_unit Mod2)); abstract
auto with algebra.
Defined.
Definition opp_hom_module : forall f : Hom Mod1 Mod2, Hom Mod1 Mod2.
intros f0.
apply
(BUILD_HOM_MODULE (R:=R) (Mod:=Mod1) (Mod':=Mod2)
(ff:=fun x : Mod1 => group_inverse Mod2 (f0 x))).
abstract auto with algebra.
abstract (intros x y;
apply
Trans
with
(group_inverse (module_carrier Mod2)
(sgroup_law (module_carrier Mod2)
(Ap
(sgroup_map
(monoid_sgroup_hom (module_monoid_hom f0))) x)
(Ap
(sgroup_map
(monoid_sgroup_hom (module_monoid_hom f0))) y)));
auto with algebra;
apply
Trans
with
(group_inverse (module_carrier Mod2)
(sgroup_law (module_carrier Mod2)
(Ap
(sgroup_map
(monoid_sgroup_hom (module_monoid_hom f0))) y)
(Ap
(sgroup_map
(monoid_sgroup_hom (module_monoid_hom f0))) x)));
auto with algebra).
abstract (apply
Trans
with
(group_inverse (module_carrier Mod2)
(monoid_unit (module_carrier Mod2)));
auto with algebra).
abstract (intros a x;
apply
Trans
with
(group_inverse (module_carrier Mod2)
(module_mult a
(Ap
(sgroup_map
(monoid_sgroup_hom (module_monoid_hom f0))) x)));
auto with algebra).
Defined.
Definition mult_hom_module :
forall (a : R) (f : Hom Mod1 Mod2), Hom Mod1 Mod2.
intros a f0.
apply
(BUILD_HOM_MODULE (R:=R) (Mod:=Mod1) (Mod':=Mod2)
(ff:=fun x : Mod1 => module_mult a (f0 x))).
abstract auto with algebra.
abstract (intros x y;
apply
Trans
with
(module_mult a
(sgroup_law (module_carrier Mod2)
(Ap
(sgroup_map
(monoid_sgroup_hom (module_monoid_hom f0))) x)
(Ap
(sgroup_map
(monoid_sgroup_hom (module_monoid_hom f0))) y)));
auto with algebra).
abstract (apply
Trans with (module_mult a (monoid_unit (module_carrier Mod2)));
auto with algebra).
abstract (intros a0 x;
apply
Trans
with
(module_mult a
(module_mult a0
(Ap
(sgroup_map
(monoid_sgroup_hom (module_monoid_hom f0))) x)));
auto with algebra;
apply
Trans
with
(module_mult (ring_mult a a0)
(Ap (sgroup_map (monoid_sgroup_hom (module_monoid_hom f0)))
x)); auto with algebra;
apply
Trans
with
(module_mult (ring_mult a0 a)
(Ap (sgroup_map (monoid_sgroup_hom (module_monoid_hom f0)))
x)); auto with algebra).
Defined.
Definition Hom_module : MODULE R.
apply
(BUILD_MODULE (R:=R) (E:=Hom Mod1 Mod2) (genlaw:=add_hom_module)
(e:=zero_hom_module) (geninv:=opp_hom_module)
(gen_module_op:=mult_hom_module));
try
abstract (simpl in |- *; unfold Map_eq in |- *; simpl in |- *;
auto with algebra).
Defined.
End Hom_module_def.