7998
|
1 |
(*
|
|
2 |
Instantiate polynomials to form a ring and prove further properties
|
|
3 |
$Id$
|
|
4 |
Author: Clemens Ballarin, started 22 January 1997
|
|
5 |
*)
|
|
6 |
|
|
7 |
open PolyRing;
|
|
8 |
|
|
9 |
(* Properties of *s:
|
|
10 |
Polynomials form a module *)
|
|
11 |
|
|
12 |
goal UnivPoly.thy "!!a::'a::ring. (a + b) *s p = a *s p + b *s p";
|
|
13 |
by (rtac up_eqI 1);
|
|
14 |
by (simp_tac (simpset() addsimps [l_distr]) 1);
|
|
15 |
qed "smult_l_distr";
|
|
16 |
|
|
17 |
goal UnivPoly.thy "!!a::'a::ring. a *s (p + q) = a *s p + a *s q";
|
|
18 |
by (rtac up_eqI 1);
|
|
19 |
by (simp_tac (simpset() addsimps [r_distr]) 1);
|
|
20 |
qed "smult_r_distr";
|
|
21 |
|
|
22 |
goal UnivPoly.thy "!!a::'a::ring. (a * b) *s p = a *s (b *s p)";
|
|
23 |
by (rtac up_eqI 1);
|
|
24 |
by (simp_tac (simpset() addsimps [m_assoc]) 1);
|
|
25 |
qed "smult_assoc1";
|
|
26 |
|
|
27 |
goal UnivPoly.thy "(<1>::'a::ring) *s p = p";
|
|
28 |
by (rtac up_eqI 1);
|
|
29 |
by (Simp_tac 1);
|
|
30 |
qed "smult_one";
|
|
31 |
|
|
32 |
(* Polynomials form an algebra *)
|
|
33 |
|
|
34 |
goal UnivPoly.thy "!!a::'a::ring. (a *s p) * q = a *s (p * q)";
|
|
35 |
by (rtac up_eqI 1);
|
|
36 |
by (simp_tac (simpset() addsimps [SUM_rdistr, m_assoc]) 1);
|
|
37 |
qed "smult_assoc2";
|
|
38 |
|
|
39 |
(* the following can be derived from the above ones,
|
|
40 |
for generality reasons, it is therefore done *)
|
|
41 |
|
|
42 |
Goal "(<0>::'a::ring) *s p = <0>";
|
|
43 |
by (rtac a_lcancel 1);
|
|
44 |
by (rtac (smult_l_distr RS sym RS trans) 1);
|
|
45 |
by (Simp_tac 1);
|
|
46 |
qed "smult_l_null";
|
|
47 |
|
|
48 |
Goal "!!a::'a::ring. a *s <0> = <0>";
|
|
49 |
by (rtac a_lcancel 1);
|
|
50 |
by (rtac (smult_r_distr RS sym RS trans) 1);
|
|
51 |
by (Simp_tac 1);
|
|
52 |
qed "smult_r_null";
|
|
53 |
|
|
54 |
Goal "!!a::'a::ring. (-a) *s p = - (a *s p)";
|
|
55 |
by (rtac a_lcancel 1);
|
|
56 |
by (rtac (r_neg RS sym RSN (2, trans)) 1);
|
|
57 |
by (rtac (smult_l_distr RS sym RS trans) 1);
|
|
58 |
by (simp_tac (simpset() addsimps [smult_l_null, r_neg]) 1);
|
|
59 |
qed "smult_l_minus";
|
|
60 |
|
|
61 |
Goal "!!a::'a::ring. a *s (-p) = - (a *s p)";
|
|
62 |
by (rtac a_lcancel 1);
|
|
63 |
by (rtac (r_neg RS sym RSN (2, trans)) 1);
|
|
64 |
by (rtac (smult_r_distr RS sym RS trans) 1);
|
|
65 |
by (simp_tac (simpset() addsimps [smult_r_null, r_neg]) 1);
|
|
66 |
qed "smult_r_minus";
|
|
67 |
|
|
68 |
val smult_minus = [smult_l_minus, smult_r_minus];
|
|
69 |
|
|
70 |
(* Integrity of smult *)
|
|
71 |
(*
|
|
72 |
Goal
|
|
73 |
"!! a::'a::domain. a *s b = <0> ==> a = <0> | b = <0>";
|
|
74 |
by (simp_tac (simpset() addsimps [disj_commute]) 1);
|
|
75 |
|
|
76 |
by (rtac (disj_commute RS trans) 1);
|
|
77 |
by (rtac contrapos2 1);
|
|
78 |
by (assume_tac 1);
|
|
79 |
by (rtac up_neqI 1);
|
|
80 |
by (Full_simp_tac 1);
|
|
81 |
by (etac conjE 1);
|
|
82 |
by (rtac not_integral 1);
|
|
83 |
by (assume_tac 1);
|
|
84 |
by (etac contrapos 1);
|
|
85 |
back();
|
|
86 |
by (rtac up_eqI 1);
|
|
87 |
by (Simp_tac 1);
|
|
88 |
|
|
89 |
by (rtac integral 1);
|
|
90 |
|
|
91 |
by (etac conjE 1);
|
|
92 |
|
|
93 |
by (rtac disjCI 1);
|
|
94 |
*)
|
|
95 |
|
|
96 |
Addsimps [smult_one, smult_l_null, smult_r_null];
|