-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy pathRing_facts.v
173 lines (154 loc) · 5.87 KB
/
Ring_facts.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
(* 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 Ring_cat.
Require Export Group_facts.
Require Export Abelian_group_facts.
(** Title "Basic properties of rings." *)
Section Lemmas.
Variable R : RING.
Lemma RING_assoc :
forall x y z : R,
Equal (ring_mult (ring_mult x y) z) (ring_mult x (ring_mult y z)).
exact (sgroup_assoc_prf (E:=R) (ring_monoid R)).
Qed.
Lemma RING_comp :
forall x x' y y' : R,
Equal x x' -> Equal y y' -> Equal (ring_mult x y) (ring_mult x' y').
unfold ring_mult in |- *; auto with algebra.
Qed.
Lemma RING_unit_r : forall x : R, Equal (ring_mult x (ring_unit R)) x.
exact (monoid_unit_r_prf (ring_monoid R)).
Qed.
Lemma RING_unit_l : forall x : R, Equal (ring_mult (ring_unit R) x) x.
exact (monoid_unit_l_prf (ring_monoid R)).
Qed.
Lemma RING_dist_r :
forall x y z : R,
Equal (ring_mult (sgroup_law R x y) z)
(sgroup_law R (ring_mult x z) (ring_mult y z)).
exact (ring_dist_r_prf R).
Qed.
Lemma RING_dist_l :
forall x y z : R,
Equal (ring_mult x (sgroup_law R y z))
(sgroup_law R (ring_mult x y) (ring_mult x z)).
exact (ring_dist_l_prf R).
Qed.
Hint Resolve RING_assoc RING_comp RING_unit_r RING_unit_l RING_dist_r
RING_dist_l: algebra.
Lemma RING_absorbant_r :
forall x : R, Equal (ring_mult x (monoid_unit R)) (monoid_unit R).
intros x; try assumption.
apply GROUP_reg_right with (ring_mult x (monoid_unit R)).
apply Trans with (ring_mult x (sgroup_law R (monoid_unit R) (monoid_unit R)));
auto with algebra.
apply Trans with (ring_mult x (monoid_unit R)); auto with algebra.
Qed.
Hint Resolve RING_absorbant_r: algebra.
Lemma RING_absorbant_l :
forall x : R, Equal (ring_mult (monoid_unit R) x) (monoid_unit R).
intros x; try assumption.
apply GROUP_reg_right with (ring_mult (monoid_unit R) x).
apply Trans with (ring_mult (sgroup_law R (monoid_unit R) (monoid_unit R)) x);
auto with algebra.
apply Trans with (ring_mult (monoid_unit R) x); auto with algebra.
Qed.
Hint Resolve RING_absorbant_l: algebra.
Lemma RING_op_mult_l :
forall x y : R,
Equal (ring_mult (group_inverse R x) y) (group_inverse R (ring_mult x y)).
intros x y; try assumption.
apply Sym.
apply GROUP_law_inverse.
apply Trans with (ring_mult (sgroup_law R x (group_inverse R x)) y);
auto with algebra.
apply Trans with (ring_mult (monoid_unit R) y); auto with algebra.
Qed.
Hint Resolve RING_op_mult_l: algebra.
Lemma RING_op_mult_r :
forall x y : R,
Equal (ring_mult x (group_inverse R y)) (group_inverse R (ring_mult x y)).
intros x y; try assumption.
apply Sym.
apply GROUP_law_inverse.
apply Trans with (ring_mult x (sgroup_law R y (group_inverse R y)));
auto with algebra.
apply Trans with (ring_mult x (monoid_unit R)); auto with algebra.
Qed.
End Lemmas.
Hint Resolve RING_assoc RING_comp RING_unit_r RING_unit_l RING_dist_r
RING_dist_l RING_absorbant_r RING_absorbant_l RING_op_mult_l
RING_op_mult_r: algebra.
Section Commutative_rings.
Variable R1 : CRING.
Lemma CRING_com : forall x y : R1, Equal (ring_mult x y) (ring_mult y x).
exact (cring_com_prf R1).
Qed.
Hint Immediate CRING_com: algebra.
Lemma CRING_mult4 :
forall a b c d : R1,
Equal (ring_mult (ring_mult a b) (ring_mult c d))
(ring_mult (ring_mult a c) (ring_mult b d)).
intros a b c d; try assumption.
apply Trans with (ring_mult a (ring_mult b (ring_mult c d)));
auto with algebra.
apply Trans with (ring_mult a (ring_mult (ring_mult b c) d));
auto with algebra.
apply Trans with (ring_mult a (ring_mult (ring_mult c b) d));
auto with algebra.
apply Trans with (ring_mult a (ring_mult c (ring_mult b d)));
auto with algebra.
Qed.
Hint Resolve CRING_mult4: algebra.
Lemma CRING_mult3 :
forall x y z : R1,
Equal (ring_mult x (ring_mult y z)) (ring_mult y (ring_mult x z)).
intros x y z; try assumption.
apply Trans with (ring_mult (ring_mult x y) z); auto with algebra.
apply Trans with (ring_mult (ring_mult y x) z); auto with algebra.
Qed.
Hint Resolve CRING_mult3: algebra.
Lemma CRING_mult3bis :
forall x y z : R1,
Equal (ring_mult (ring_mult x y) z) (ring_mult (ring_mult x z) y).
intros x y z; try assumption.
apply Trans with (ring_mult z (ring_mult x y)); auto with algebra.
apply Trans with (ring_mult z (ring_mult y x)); auto with algebra.
apply Trans with (ring_mult y (ring_mult z x)); auto with algebra.
apply Trans with (ring_mult (ring_mult z x) y); auto with algebra.
Qed.
Hint Resolve CRING_mult3bis: algebra.
End Commutative_rings.
Hint Resolve CRING_mult4 CRING_mult3 CRING_mult3bis: algebra.
Hint Immediate CRING_com: algebra.
Section Hom_lemmas.
Hint Resolve RING_comp: algebra.
Variable R R' : RING.
Variable f : Hom R R'.
Lemma RING_hom_prop :
forall x y : R, Equal (f (ring_mult x y)) (ring_mult (f x) (f y)).
case f; auto with algebra.
Qed.
Lemma RING_one_prop : Equal (f (ring_unit R)) (ring_unit R').
case f; auto with algebra.
Qed.
Lemma RING_hom_ext :
forall f g : Hom R R', (forall x : R, Equal (f x) (g x)) -> Equal f g.
auto with algebra.
Qed.
End Hom_lemmas.
Hint Resolve RING_hom_prop RING_one_prop: algebra.