src/ZF/InfDatatype.ML
author lcp
Thu, 08 Dec 1994 14:18:31 +0100
changeset 768 59c0a821e468
parent 760 f0200e91b272
child 801 316121afb5b5
permissions -rw-r--r--
UN_upper_cardinal: updated to refer to Card_le_imp_lepoll and lepoll_imp_Card_le
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
488
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents:
diff changeset
     1
(*  Title: 	ZF/InfDatatype.ML
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents:
diff changeset
     2
    ID:         $Id$
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents:
diff changeset
     3
    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents:
diff changeset
     4
    Copyright   1994  University of Cambridge
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents:
diff changeset
     5
534
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
     6
Datatype Definitions involving function space and/or infinite-branching
488
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents:
diff changeset
     7
*)
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents:
diff changeset
     8
534
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
     9
(*** FINITE BRANCHING ***)
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    10
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    11
(** Closure under finite powerset **)
516
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    12
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    13
val Fin_Univ_thy = merge_theories (Univ.thy,Finite.thy);
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    14
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    15
goal Fin_Univ_thy
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    16
   "!!i. [| b: Fin(Vfrom(A,i));  Limit(i) |] ==> EX j. b <= Vfrom(A,j) & j<i";
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    17
by (eresolve_tac [Fin_induct] 1);
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    18
by (fast_tac (ZF_cs addSDs [Limit_has_0]) 1);
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    19
by (safe_tac ZF_cs);
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    20
by (eresolve_tac [Limit_VfromE] 1);
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    21
by (assume_tac 1);
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    22
by (res_inst_tac [("x", "xa Un j")] exI 1);
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    23
by (best_tac (ZF_cs addIs [subset_refl RS Vfrom_mono RS subsetD, 
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    24
			   Un_least_lt]) 1);
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    25
val Fin_Vfrom_lemma = result();
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    26
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    27
goal Fin_Univ_thy "!!i. Limit(i) ==> Fin(Vfrom(A,i)) <= Vfrom(A,i)";
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    28
by (rtac subsetI 1);
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    29
by (dresolve_tac [Fin_Vfrom_lemma] 1);
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    30
by (safe_tac ZF_cs);
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    31
by (resolve_tac [Vfrom RS ssubst] 1);
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    32
by (fast_tac (ZF_cs addSDs [ltD]) 1);
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    33
val Fin_VLimit = result();
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    34
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    35
val Fin_subset_VLimit = 
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    36
    [Fin_mono, Fin_VLimit] MRS subset_trans |> standard;
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    37
534
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    38
goalw Fin_Univ_thy [univ_def] "Fin(univ(A)) <= univ(A)";
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    39
by (rtac (Limit_nat RS Fin_VLimit) 1);
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    40
val Fin_univ = result();
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    41
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    42
(** Closure under finite powers (functions from a fixed natural number) **)
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    43
516
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    44
goal Fin_Univ_thy
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    45
    "!!i. [| n: nat;  Limit(i) |] ==> n -> Vfrom(A,i) <= Vfrom(A,i)";
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    46
by (eresolve_tac [nat_fun_subset_Fin RS subset_trans] 1);
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    47
by (REPEAT (ares_tac [Fin_subset_VLimit, Sigma_subset_VLimit,
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    48
		      nat_subset_VLimit, subset_refl] 1));
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    49
val nat_fun_VLimit = result();
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    50
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    51
val nat_fun_subset_VLimit = 
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    52
    [Pi_mono, nat_fun_VLimit] MRS subset_trans |> standard;
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    53
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    54
goalw Fin_Univ_thy [univ_def] "!!i. n: nat ==> n -> univ(A) <= univ(A)";
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    55
by (etac (Limit_nat RSN (2,nat_fun_VLimit)) 1);
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    56
val nat_fun_univ = result();
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    57
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    58
534
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    59
(** Closure under finite function space **)
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    60
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    61
(*General but seldom-used version; normally the domain is fixed*)
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    62
goal Fin_Univ_thy
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    63
    "!!i. Limit(i) ==> Vfrom(A,i) -||> Vfrom(A,i) <= Vfrom(A,i)";
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    64
by (resolve_tac [FiniteFun.dom_subset RS subset_trans] 1);
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    65
by (REPEAT (ares_tac [Fin_subset_VLimit, Sigma_subset_VLimit, subset_refl] 1));
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    66
val FiniteFun_VLimit1 = result();
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    67
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    68
goalw Fin_Univ_thy [univ_def] "univ(A) -||> univ(A) <= univ(A)";
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    69
by (rtac (Limit_nat RS FiniteFun_VLimit1) 1);
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    70
val FiniteFun_univ1 = result();
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    71
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    72
(*Version for a fixed domain*)
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    73
goal Fin_Univ_thy
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    74
   "!!i.  [| W <= Vfrom(A,i); Limit(i) |] ==> W -||> Vfrom(A,i) <= Vfrom(A,i)";
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    75
by (eresolve_tac [subset_refl RSN (2, FiniteFun_mono) RS subset_trans] 1);
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    76
by (eresolve_tac [FiniteFun_VLimit1] 1);
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    77
val FiniteFun_VLimit = result();
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    78
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    79
goalw Fin_Univ_thy [univ_def]
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    80
    "!!W. W <= univ(A) ==> W -||> univ(A) <= univ(A)";
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    81
by (etac (Limit_nat RSN (2, FiniteFun_VLimit)) 1);
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    82
val FiniteFun_univ = result();
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    83
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    84
goal Fin_Univ_thy
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    85
    "!!W. [| f: W -||> univ(A);  W <= univ(A) |] ==> f : univ(A)";
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    86
by (eresolve_tac [FiniteFun_univ RS subsetD] 1);
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    87
by (assume_tac 1);
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    88
val FiniteFun_in_univ = result();
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    89
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    90
(*Remove <= from the rule above*)
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    91
val FiniteFun_in_univ' = subsetI RSN (2, FiniteFun_in_univ);
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    92
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    93
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
    94
(*** INFINITE BRANCHING ***)
516
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
    95
488
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents:
diff changeset
    96
val fun_Limit_VfromE = 
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents:
diff changeset
    97
    [apply_funtype, InfCard_csucc RS InfCard_is_Limit] MRS Limit_VfromE
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents:
diff changeset
    98
	|> standard;
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents:
diff changeset
    99
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents:
diff changeset
   100
goal InfDatatype.thy
517
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   101
    "!!K. [| f: W -> Vfrom(A,csucc(K));  |W| le K;  InfCard(K)	\
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   102
\         |] ==> EX j. f: W -> Vfrom(A,j) & j < csucc(K)";
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   103
by (res_inst_tac [("x", "UN w:W. LEAST i. f`w : Vfrom(A,i)")] exI 1);
516
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
   104
by (resolve_tac [conjI] 1);
517
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   105
by (resolve_tac [le_UN_Ord_lt_csucc] 2);
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   106
by (rtac ballI 4  THEN
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   107
    eresolve_tac [fun_Limit_VfromE] 4 THEN REPEAT_SOME assume_tac);
516
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
   108
by (fast_tac (ZF_cs addEs [Least_le RS lt_trans1, ltE]) 2);
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
   109
by (resolve_tac [Pi_type] 1);
517
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   110
by (rename_tac "w" 2);
516
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
   111
by (eresolve_tac [fun_Limit_VfromE] 2 THEN REPEAT_SOME assume_tac);
517
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   112
by (subgoal_tac "f`w : Vfrom(A, LEAST i. f`w : Vfrom(A,i))" 1);
516
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
   113
by (fast_tac (ZF_cs addEs [LeastI, ltE]) 2);
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
   114
by (eresolve_tac [[subset_refl, UN_upper] MRS Vfrom_mono RS subsetD] 1);
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
   115
by (assume_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 692
diff changeset
   116
qed "fun_Vcsucc_lemma";
516
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
   117
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
   118
goal InfDatatype.thy
517
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   119
    "!!K. [| W <= Vfrom(A,csucc(K));  |W| le K;  InfCard(K)	\
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   120
\         |] ==> EX j. W <= Vfrom(A,j) & j < csucc(K)";
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   121
by (asm_full_simp_tac (ZF_ss addsimps [subset_iff_id, fun_Vcsucc_lemma]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 692
diff changeset
   122
qed "subset_Vcsucc";
488
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents:
diff changeset
   123
517
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   124
(*Version for arbitrary index sets*)
488
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents:
diff changeset
   125
goal InfDatatype.thy
534
cd8bec47e175 ZF/Finite: added the finite function space, A-||>B
lcp
parents: 524
diff changeset
   126
    "!!K. [| |W| le K;  InfCard(K);  W <= Vfrom(A,csucc(K)) |] ==> \
517
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   127
\         W -> Vfrom(A,csucc(K)) <= Vfrom(A,csucc(K))";
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   128
by (safe_tac (ZF_cs addSDs [fun_Vcsucc_lemma, subset_Vcsucc]));
488
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents:
diff changeset
   129
by (resolve_tac [Vfrom RS ssubst] 1);
692
0ca24b09f4a6 ZF/InfDatatype/fun_Vcsucc: removed use of PiE
lcp
parents: 534
diff changeset
   130
by (dresolve_tac [fun_is_rel] 1);
488
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents:
diff changeset
   131
(*This level includes the function, and is below csucc(K)*)
517
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   132
by (res_inst_tac [("a1", "succ(succ(j Un ja))")] (UN_I RS UnI2) 1);
488
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents:
diff changeset
   133
by (eresolve_tac [subset_trans RS PowI] 2);
517
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   134
by (fast_tac (ZF_cs addIs [Pair_in_Vfrom, Vfrom_UnI1, Vfrom_UnI2]) 2);
488
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents:
diff changeset
   135
by (REPEAT (ares_tac [ltD, InfCard_csucc, InfCard_is_Limit, 
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents:
diff changeset
   136
		      Limit_has_succ, Un_least_lt] 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 692
diff changeset
   137
qed "fun_Vcsucc";
488
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents:
diff changeset
   138
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents:
diff changeset
   139
goal InfDatatype.thy
517
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   140
    "!!K. [| f: W -> Vfrom(A, csucc(K));  |W| le K;  InfCard(K);	\
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   141
\            W <= Vfrom(A,csucc(K)) 					\
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   142
\         |] ==> f: Vfrom(A,csucc(K))";
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   143
by (REPEAT (ares_tac [fun_Vcsucc RS subsetD] 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 692
diff changeset
   144
qed "fun_in_Vcsucc";
517
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   145
524
b1bf18e83302 ZF/InfDatatype: simplified, extended results for infinite branching
lcp
parents: 517
diff changeset
   146
(*Remove <= from the rule above*)
b1bf18e83302 ZF/InfDatatype: simplified, extended results for infinite branching
lcp
parents: 517
diff changeset
   147
val fun_in_Vcsucc' = subsetI RSN (4, fun_in_Vcsucc);
517
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   148
524
b1bf18e83302 ZF/InfDatatype: simplified, extended results for infinite branching
lcp
parents: 517
diff changeset
   149
(** Version where K itself is the index set **)
517
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   150
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   151
goal InfDatatype.thy
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   152
    "!!K. InfCard(K) ==> K -> Vfrom(A,csucc(K)) <= Vfrom(A,csucc(K))";
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   153
by (forward_tac [InfCard_is_Card RS Card_is_Ord] 1);
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   154
by (REPEAT (ares_tac [fun_Vcsucc, Ord_cardinal_le,
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   155
		      i_subset_Vfrom,
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   156
		      lt_csucc RS leI RS le_imp_subset RS subset_trans] 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 692
diff changeset
   157
qed "Card_fun_Vcsucc";
517
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   158
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   159
goal InfDatatype.thy
488
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents:
diff changeset
   160
    "!!K. [| f: K -> Vfrom(A, csucc(K));  InfCard(K) \
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents:
diff changeset
   161
\         |] ==> f: Vfrom(A,csucc(K))";
517
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 516
diff changeset
   162
by (REPEAT (ares_tac [Card_fun_Vcsucc RS subsetD] 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 692
diff changeset
   163
qed "Card_fun_in_Vcsucc";
488
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents:
diff changeset
   164
516
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
   165
val Pair_in_Vcsucc = Limit_csucc RSN (3, Pair_in_VLimit) |> standard;
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
   166
val Inl_in_Vcsucc  = Limit_csucc RSN (2, Inl_in_VLimit) |> standard;
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
   167
val Inr_in_Vcsucc  = Limit_csucc RSN (2, Inr_in_VLimit) |> standard;
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
   168
val zero_in_Vcsucc = Limit_csucc RS zero_in_VLimit |> standard;
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 488
diff changeset
   169
val nat_into_Vcsucc = Limit_csucc RSN (2, nat_into_VLimit) |> standard;
488
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents:
diff changeset
   170
524
b1bf18e83302 ZF/InfDatatype: simplified, extended results for infinite branching
lcp
parents: 517
diff changeset
   171
(*For handling Cardinals of the form  (nat Un |X|) *)
b1bf18e83302 ZF/InfDatatype: simplified, extended results for infinite branching
lcp
parents: 517
diff changeset
   172
b1bf18e83302 ZF/InfDatatype: simplified, extended results for infinite branching
lcp
parents: 517
diff changeset
   173
val InfCard_nat_Un_cardinal = [InfCard_nat, Card_cardinal] MRS InfCard_Un
b1bf18e83302 ZF/InfDatatype: simplified, extended results for infinite branching
lcp
parents: 517
diff changeset
   174
                              |> standard;
b1bf18e83302 ZF/InfDatatype: simplified, extended results for infinite branching
lcp
parents: 517
diff changeset
   175
b1bf18e83302 ZF/InfDatatype: simplified, extended results for infinite branching
lcp
parents: 517
diff changeset
   176
val le_nat_Un_cardinal = 
b1bf18e83302 ZF/InfDatatype: simplified, extended results for infinite branching
lcp
parents: 517
diff changeset
   177
    [Ord_nat, Card_cardinal RS Card_is_Ord] MRS Un_upper2_le  |> standard;
b1bf18e83302 ZF/InfDatatype: simplified, extended results for infinite branching
lcp
parents: 517
diff changeset
   178
768
59c0a821e468 UN_upper_cardinal: updated to refer to Card_le_imp_lepoll
lcp
parents: 760
diff changeset
   179
val UN_upper_cardinal = 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
   180
                        |> standard;
b1bf18e83302 ZF/InfDatatype: simplified, extended results for infinite branching
lcp
parents: 517
diff changeset
   181
488
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents:
diff changeset
   182
(*For most K-branching datatypes with domain Vfrom(A, csucc(K)) *)
52f7447d4f1b Addition of infinite branching datatypes
lcp
parents:
diff changeset
   183
val inf_datatype_intrs =  
524
b1bf18e83302 ZF/InfDatatype: simplified, extended results for infinite branching
lcp
parents: 517
diff changeset
   184
    [InfCard_nat, InfCard_nat_Un_cardinal,
b1bf18e83302 ZF/InfDatatype: simplified, extended results for infinite branching
lcp
parents: 517
diff changeset
   185
     Pair_in_Vcsucc, Inl_in_Vcsucc, Inr_in_Vcsucc, 
b1bf18e83302 ZF/InfDatatype: simplified, extended results for infinite branching
lcp
parents: 517
diff changeset
   186
     zero_in_Vcsucc, A_into_Vfrom, nat_into_Vcsucc,
b1bf18e83302 ZF/InfDatatype: simplified, extended results for infinite branching
lcp
parents: 517
diff changeset
   187
     Card_fun_in_Vcsucc, fun_in_Vcsucc', UN_I] @ datatype_intrs;