author | wenzelm |
Sun, 07 Jan 2001 21:35:34 +0100 | |
changeset 10816 | 8b2eafed6183 |
parent 10789 | 260fa2c67e3e |
child 13735 | 7de9342aca7a |
permissions | -rw-r--r-- |
7998 | 1 |
(* |
2 |
Factorisation within a factorial domain |
|
3 |
$Id$ |
|
4 |
Author: Clemens Ballarin, started 25 November 1997 |
|
5 |
*) |
|
6 |
||
7 |
goalw Ring.thy [assoc_def] "!! c::'a::factorial. \ |
|
10789
260fa2c67e3e
Changed priority of dvd from 70 to 50 as befits a relation.
nipkow
parents:
10448
diff
changeset
|
8 |
\ [| irred c; irred a; irred b; c dvd a*b |] ==> c assoc a | c assoc b"; |
7998 | 9 |
by (ftac factorial_prime 1); |
10 |
by (rewrite_goals_tac [irred_def, prime_def]); |
|
11 |
by (Blast_tac 1); |
|
12 |
qed "irred_dvd_lemma"; |
|
13 |
||
14 |
goalw Ring.thy [assoc_def] "!! c::'a::factorial. \ |
|
15 |
\ [| irred c; a dvd <1> |] ==> \ |
|
16 |
\ (ALL b : set factors. irred b) & c dvd foldr op* factors a --> \ |
|
17 |
\ (EX d. c assoc d & d : set factors)"; |
|
18 |
by (induct_tac "factors" 1); |
|
19 |
(* Base case: c dvd a contradicts irred c *) |
|
20 |
by (full_simp_tac (simpset() addsimps [irred_def]) 1); |
|
21 |
by (blast_tac (claset() addIs [dvd_trans_ring]) 1); |
|
22 |
(* Induction step *) |
|
23 |
by (ftac factorial_prime 1); |
|
24 |
by (full_simp_tac (simpset() addsimps [irred_def, prime_def]) 1); |
|
25 |
by (Blast_tac 1); |
|
26 |
qed "irred_dvd_list_lemma"; |
|
27 |
||
28 |
goal Ring.thy "!! c::'a::factorial. \ |
|
29 |
\ [| irred c; ALL b : set factors. irred b; a dvd <1>; \ |
|
30 |
\ c dvd foldr op* factors a |] ==> \ |
|
31 |
\ EX d. c assoc d & d : set factors"; |
|
32 |
by (rtac (irred_dvd_list_lemma RS mp) 1); |
|
33 |
by (Auto_tac); |
|
34 |
qed "irred_dvd_list"; |
|
35 |
||
36 |
Goalw [Factorisation_def] "!! c::'a::factorial. \ |
|
37 |
\ [| irred c; Factorisation x factors u; c dvd x |] ==> \ |
|
38 |
\ EX d. c assoc d & d : set factors"; |
|
39 |
by (rtac (irred_dvd_list_lemma RS mp) 1); |
|
40 |
by (Auto_tac); |
|
41 |
qed "Factorisation_dvd"; |
|
42 |
||
43 |
Goalw [Factorisation_def] "!! c::'a::factorial. \ |
|
44 |
\ [| Factorisation x factors u; a : set factors |] ==> irred a"; |
|
45 |
by (Blast_tac 1); |
|
46 |
qed "Factorisation_irred"; |
|
47 |