author | wenzelm |
Fri, 06 Oct 2000 17:35:58 +0200 | |
changeset 10168 | 50be659d4222 |
parent 9491 | 1a36151ee2fc |
child 11316 | b4e71bd751e4 |
permissions | -rw-r--r-- |
1461 | 1 |
(* Title: ZF/ex/acc |
0 | 2 |
ID: $Id$ |
1461 | 3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
0 | 4 |
Copyright 1993 University of Cambridge |
5 |
||
6 |
Inductive definition of acc(r) |
|
7 |
||
8 |
See Ch. Paulin-Mohring, Inductive Definitions in the System Coq. |
|
9 |
Research Report 92-49, LIP, ENS Lyon. Dec 1992. |
|
10 |
*) |
|
11 |
||
434 | 12 |
(*The introduction rule must require a:field(r) |
13 |
Otherwise acc(r) would be a proper class! *) |
|
14 |
||
515 | 15 |
(*The intended introduction rule*) |
16 |
val prems = goal Acc.thy |
|
17 |
"[| !!b. <b,a>:r ==> b: acc(r); a: field(r) |] ==> a: acc(r)"; |
|
5618 | 18 |
by (fast_tac (claset() addIs prems@acc.intrs) 1); |
782
200a16083201
added bind_thm for theorems defined by "standard ..."
clasohm
parents:
515
diff
changeset
|
19 |
qed "accI"; |
515 | 20 |
|
5137 | 21 |
Goal "[| b: acc(r); <a,b>: r |] ==> a: acc(r)"; |
515 | 22 |
by (etac acc.elim 1); |
2469 | 23 |
by (Fast_tac 1); |
782
200a16083201
added bind_thm for theorems defined by "standard ..."
clasohm
parents:
515
diff
changeset
|
24 |
qed "acc_downward"; |
0 | 25 |
|
434 | 26 |
val [major,indhyp] = goal Acc.thy |
1461 | 27 |
"[| a : acc(r); \ |
28 |
\ !!x. [| x: acc(r); ALL y. <y,x>:r --> P(y) |] ==> P(x) \ |
|
434 | 29 |
\ |] ==> P(a)"; |
515 | 30 |
by (rtac (major RS acc.induct) 1); |
438 | 31 |
by (rtac indhyp 1); |
2469 | 32 |
by (Fast_tac 2); |
515 | 33 |
by (resolve_tac acc.intrs 1); |
438 | 34 |
by (assume_tac 2); |
804 | 35 |
by (etac (Collect_subset RS Pow_mono RS subsetD) 1); |
782
200a16083201
added bind_thm for theorems defined by "standard ..."
clasohm
parents:
515
diff
changeset
|
36 |
qed "acc_induct"; |
0 | 37 |
|
5068 | 38 |
Goal "wf[acc(r)](r)"; |
438 | 39 |
by (rtac wf_onI2 1); |
40 |
by (etac acc_induct 1); |
|
2469 | 41 |
by (Fast_tac 1); |
782
200a16083201
added bind_thm for theorems defined by "standard ..."
clasohm
parents:
515
diff
changeset
|
42 |
qed "wf_on_acc"; |
434 | 43 |
|
44 |
(* field(r) <= acc(r) ==> wf(r) *) |
|
45 |
val acc_wfI = wf_on_acc RS wf_on_subset_A RS wf_on_field_imp_wf; |
|
0 | 46 |
|
47 |
val [major] = goal Acc.thy "wf(r) ==> field(r) <= acc(r)"; |
|
48 |
by (rtac subsetI 1); |
|
49 |
by (etac (major RS wf_induct2) 1); |
|
50 |
by (rtac subset_refl 1); |
|
804 | 51 |
by (rtac accI 1); |
0 | 52 |
by (assume_tac 2); |
2469 | 53 |
by (Fast_tac 1); |
782
200a16083201
added bind_thm for theorems defined by "standard ..."
clasohm
parents:
515
diff
changeset
|
54 |
qed "acc_wfD"; |
0 | 55 |
|
5068 | 56 |
Goal "wf(r) <-> field(r) <= acc(r)"; |
0 | 57 |
by (EVERY1 [rtac iffI, etac acc_wfD, etac acc_wfI]); |
782
200a16083201
added bind_thm for theorems defined by "standard ..."
clasohm
parents:
515
diff
changeset
|
58 |
qed "wf_acc_iff"; |