author | paulson |
Wed, 13 Feb 2002 10:44:07 +0100 | |
changeset 12883 | 3f86b73d592d |
parent 9907 | 473a6604da94 |
permissions | -rw-r--r-- |
1461 | 1 |
(* Title: ZF/InfDatatype.ML |
488 | 2 |
ID: $Id$ |
1461 | 3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
488 | 4 |
Copyright 1994 University of Cambridge |
5 |
||
801 | 6 |
Infinite-branching datatype definitions |
488 | 7 |
*) |
8 |
||
9907 | 9 |
bind_thm ("fun_Limit_VfromE", |
3888 | 10 |
[apply_funtype, InfCard_csucc RS InfCard_is_Limit] MRS |
9907 | 11 |
transfer (the_context ()) Limit_VfromE |
12 |
|> standard); |
|
488 | 13 |
|
9174
6ef054f33f83
FORCED TO RENAME "W" DUE TO COMPOSE VARIABLE-CLASH BUG
paulson
parents:
6053
diff
changeset
|
14 |
Goal "[| f: D -> Vfrom(A,csucc(K)); |D| le K; InfCard(K) |] \ |
6ef054f33f83
FORCED TO RENAME "W" DUE TO COMPOSE VARIABLE-CLASH BUG
paulson
parents:
6053
diff
changeset
|
15 |
\ ==> EX j. f: D -> Vfrom(A,j) & j < csucc(K)"; |
6ef054f33f83
FORCED TO RENAME "W" DUE TO COMPOSE VARIABLE-CLASH BUG
paulson
parents:
6053
diff
changeset
|
16 |
by (res_inst_tac [("x", "UN d:D. LEAST i. f`d : Vfrom(A,i)")] exI 1); |
1461 | 17 |
by (rtac conjI 1); |
18 |
by (rtac le_UN_Ord_lt_csucc 2); |
|
517 | 19 |
by (rtac ballI 4 THEN |
1461 | 20 |
etac fun_Limit_VfromE 4 THEN REPEAT_SOME assume_tac); |
4091 | 21 |
by (fast_tac (claset() addEs [Least_le RS lt_trans1, ltE]) 2); |
1461 | 22 |
by (rtac Pi_type 1); |
9174
6ef054f33f83
FORCED TO RENAME "W" DUE TO COMPOSE VARIABLE-CLASH BUG
paulson
parents:
6053
diff
changeset
|
23 |
by (rename_tac "d" 2); |
1461 | 24 |
by (etac fun_Limit_VfromE 2 THEN REPEAT_SOME assume_tac); |
9174
6ef054f33f83
FORCED TO RENAME "W" DUE TO COMPOSE VARIABLE-CLASH BUG
paulson
parents:
6053
diff
changeset
|
25 |
by (subgoal_tac "f`d : Vfrom(A, LEAST i. f`d : Vfrom(A,i))" 1); |
4091 | 26 |
by (fast_tac (claset() addEs [LeastI, ltE]) 2); |
516 | 27 |
by (eresolve_tac [[subset_refl, UN_upper] MRS Vfrom_mono RS subsetD] 1); |
28 |
by (assume_tac 1); |
|
760 | 29 |
qed "fun_Vcsucc_lemma"; |
516 | 30 |
|
9174
6ef054f33f83
FORCED TO RENAME "W" DUE TO COMPOSE VARIABLE-CLASH BUG
paulson
parents:
6053
diff
changeset
|
31 |
Goal "[| D <= Vfrom(A,csucc(K)); |D| le K; InfCard(K) |] \ |
6ef054f33f83
FORCED TO RENAME "W" DUE TO COMPOSE VARIABLE-CLASH BUG
paulson
parents:
6053
diff
changeset
|
32 |
\ ==> EX j. D <= Vfrom(A,j) & j < csucc(K)"; |
6ef054f33f83
FORCED TO RENAME "W" DUE TO COMPOSE VARIABLE-CLASH BUG
paulson
parents:
6053
diff
changeset
|
33 |
by (asm_full_simp_tac (simpset() addsimps [subset_iff_id,fun_Vcsucc_lemma]) 1); |
760 | 34 |
qed "subset_Vcsucc"; |
488 | 35 |
|
517 | 36 |
(*Version for arbitrary index sets*) |
9174
6ef054f33f83
FORCED TO RENAME "W" DUE TO COMPOSE VARIABLE-CLASH BUG
paulson
parents:
6053
diff
changeset
|
37 |
Goal "[| |D| le K; InfCard(K); D <= Vfrom(A,csucc(K)) |] ==> \ |
6ef054f33f83
FORCED TO RENAME "W" DUE TO COMPOSE VARIABLE-CLASH BUG
paulson
parents:
6053
diff
changeset
|
38 |
\ D -> Vfrom(A,csucc(K)) <= Vfrom(A,csucc(K))"; |
4091 | 39 |
by (safe_tac (claset() addSDs [fun_Vcsucc_lemma, subset_Vcsucc])); |
488 | 40 |
by (resolve_tac [Vfrom RS ssubst] 1); |
1461 | 41 |
by (dtac fun_is_rel 1); |
488 | 42 |
(*This level includes the function, and is below csucc(K)*) |
517 | 43 |
by (res_inst_tac [("a1", "succ(succ(j Un ja))")] (UN_I RS UnI2) 1); |
488 | 44 |
by (eresolve_tac [subset_trans RS PowI] 2); |
4091 | 45 |
by (fast_tac (claset() addIs [Pair_in_Vfrom, Vfrom_UnI1, Vfrom_UnI2]) 2); |
488 | 46 |
by (REPEAT (ares_tac [ltD, InfCard_csucc, InfCard_is_Limit, |
1461 | 47 |
Limit_has_succ, Un_least_lt] 1)); |
760 | 48 |
qed "fun_Vcsucc"; |
488 | 49 |
|
9174
6ef054f33f83
FORCED TO RENAME "W" DUE TO COMPOSE VARIABLE-CLASH BUG
paulson
parents:
6053
diff
changeset
|
50 |
Goal "[| f: D -> Vfrom(A, csucc(K)); |D| le K; InfCard(K); \ |
6ef054f33f83
FORCED TO RENAME "W" DUE TO COMPOSE VARIABLE-CLASH BUG
paulson
parents:
6053
diff
changeset
|
51 |
\ D <= Vfrom(A,csucc(K)) |] \ |
6ef054f33f83
FORCED TO RENAME "W" DUE TO COMPOSE VARIABLE-CLASH BUG
paulson
parents:
6053
diff
changeset
|
52 |
\ ==> f: Vfrom(A,csucc(K))"; |
517 | 53 |
by (REPEAT (ares_tac [fun_Vcsucc RS subsetD] 1)); |
760 | 54 |
qed "fun_in_Vcsucc"; |
517 | 55 |
|
524
b1bf18e83302
ZF/InfDatatype: simplified, extended results for infinite branching
lcp
parents:
517
diff
changeset
|
56 |
(*Remove <= from the rule above*) |
9907 | 57 |
bind_thm ("fun_in_Vcsucc'", subsetI RSN (4, fun_in_Vcsucc)); |
517 | 58 |
|
524
b1bf18e83302
ZF/InfDatatype: simplified, extended results for infinite branching
lcp
parents:
517
diff
changeset
|
59 |
(** Version where K itself is the index set **) |
517 | 60 |
|
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5067
diff
changeset
|
61 |
Goal "InfCard(K) ==> K -> Vfrom(A,csucc(K)) <= Vfrom(A,csucc(K))"; |
517 | 62 |
by (forward_tac [InfCard_is_Card RS Card_is_Ord] 1); |
63 |
by (REPEAT (ares_tac [fun_Vcsucc, Ord_cardinal_le, |
|
1461 | 64 |
i_subset_Vfrom, |
65 |
lt_csucc RS leI RS le_imp_subset RS subset_trans] 1)); |
|
760 | 66 |
qed "Card_fun_Vcsucc"; |
517 | 67 |
|
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5067
diff
changeset
|
68 |
Goal "[| f: K -> Vfrom(A, csucc(K)); InfCard(K) \ |
488 | 69 |
\ |] ==> f: Vfrom(A,csucc(K))"; |
517 | 70 |
by (REPEAT (ares_tac [Card_fun_Vcsucc RS subsetD] 1)); |
760 | 71 |
qed "Card_fun_in_Vcsucc"; |
488 | 72 |
|
801 | 73 |
(*Proved explicitly, in theory InfDatatype, to allow the bind_thm calls below*) |
9211 | 74 |
Goal "InfCard(K) ==> Limit(csucc(K))"; |
75 |
by (etac (InfCard_csucc RS InfCard_is_Limit) 1); |
|
76 |
qed "Limit_csucc"; |
|
801 | 77 |
|
78 |
bind_thm ("Pair_in_Vcsucc", Limit_csucc RSN (3, Pair_in_VLimit)); |
|
79 |
bind_thm ("Inl_in_Vcsucc", Limit_csucc RSN (2, Inl_in_VLimit)); |
|
80 |
bind_thm ("Inr_in_Vcsucc", Limit_csucc RSN (2, Inr_in_VLimit)); |
|
81 |
bind_thm ("zero_in_Vcsucc", Limit_csucc RS zero_in_VLimit); |
|
82 |
bind_thm ("nat_into_Vcsucc", Limit_csucc RSN (2, nat_into_VLimit)); |
|
488 | 83 |
|
524
b1bf18e83302
ZF/InfDatatype: simplified, extended results for infinite branching
lcp
parents:
517
diff
changeset
|
84 |
(*For handling Cardinals of the form (nat Un |X|) *) |
b1bf18e83302
ZF/InfDatatype: simplified, extended results for infinite branching
lcp
parents:
517
diff
changeset
|
85 |
|
801 | 86 |
bind_thm ("InfCard_nat_Un_cardinal", |
1461 | 87 |
[InfCard_nat, Card_cardinal] MRS InfCard_Un); |
524
b1bf18e83302
ZF/InfDatatype: simplified, extended results for infinite branching
lcp
parents:
517
diff
changeset
|
88 |
|
801 | 89 |
bind_thm ("le_nat_Un_cardinal", |
1461 | 90 |
[Ord_nat, Card_cardinal RS Card_is_Ord] MRS Un_upper2_le); |
524
b1bf18e83302
ZF/InfDatatype: simplified, extended results for infinite branching
lcp
parents:
517
diff
changeset
|
91 |
|
801 | 92 |
bind_thm ("UN_upper_cardinal", |
1461 | 93 |
UN_upper RS subset_imp_lepoll RS lepoll_imp_Card_le); |
524
b1bf18e83302
ZF/InfDatatype: simplified, extended results for infinite branching
lcp
parents:
517
diff
changeset
|
94 |
|
488 | 95 |
(*For most K-branching datatypes with domain Vfrom(A, csucc(K)) *) |
9907 | 96 |
bind_thms ("inf_datatype_intrs", |
524
b1bf18e83302
ZF/InfDatatype: simplified, extended results for infinite branching
lcp
parents:
517
diff
changeset
|
97 |
[InfCard_nat, InfCard_nat_Un_cardinal, |
b1bf18e83302
ZF/InfDatatype: simplified, extended results for infinite branching
lcp
parents:
517
diff
changeset
|
98 |
Pair_in_Vcsucc, Inl_in_Vcsucc, Inr_in_Vcsucc, |
b1bf18e83302
ZF/InfDatatype: simplified, extended results for infinite branching
lcp
parents:
517
diff
changeset
|
99 |
zero_in_Vcsucc, A_into_Vfrom, nat_into_Vcsucc, |
9907 | 100 |
Card_fun_in_Vcsucc, fun_in_Vcsucc', UN_I] @ Data_Arg.intrs); |