src/ZF/AC/AC_Equiv.ML
author lcp
Fri, 31 Mar 1995 11:39:47 +0200
changeset 991 547931cbbf08
child 1037 03063caa960a
permissions -rw-r--r--
New example of AC Equivalences by Krzysztof Grabczewski
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
991
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
     1
(*  Title: 	ZF/AC/AC_Equiv.ML
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
     2
    ID:         $Id$
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
     3
    Author: 	Krzysztof Gr`abczewski
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
     4
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
     5
*)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
     6
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
     7
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
     8
open AC_Equiv;
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
     9
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    10
val AC_aux_defs = [pairwise_disjoint_def, sets_of_size_between_def];
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    11
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    12
(* ******************************************** *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    13
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    14
(* Theorems analogous to ones presented in "ZF/Ordinal.ML" *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    15
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    16
(* lemma for nat_le_imp_lepoll *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    17
val [prem] = goalw Cardinal.thy [lepoll_def]
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    18
             "m:nat ==> ALL n: nat. m le n --> m lepoll n";
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    19
by (nat_ind_tac "m" [prem] 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    20
by (fast_tac (ZF_cs addSIs [le_imp_subset RS id_subset_inj]) 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    21
by (rtac ballI 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    22
by (eres_inst_tac [("n","n")] natE 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    23
by (asm_simp_tac (ZF_ss addsimps [inj_def, succI1 RS Pi_empty2]) 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    24
by (fast_tac (ZF_cs addSDs [le0D]) 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    25
by (fast_tac (ZF_cs addSIs [le_imp_subset RS id_subset_inj]) 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    26
val nat_le_imp_lepoll_lemma = result();
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    27
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    28
(* used in : AC10-AC15.ML WO1-WO6.ML WO6WO1.ML*)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    29
val nat_le_imp_lepoll = nat_le_imp_lepoll_lemma RS bspec RS mp |> standard;
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    30
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    31
(* ********************************************************************** *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    32
(*             lemmas concerning FOL and pure ZF theory                   *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    33
(* ********************************************************************** *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    34
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    35
(* The following two theorms are useful when rewriting only one instance  *) 
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    36
(* of a definition							  *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    37
(* first one for definitions of formulae and the second for terms	  *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    38
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    39
val prems = goal ZF.thy "(A == B) ==> A <-> B";
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    40
by (asm_simp_tac (ZF_ss addsimps prems) 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    41
val def_imp_iff = result();
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    42
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    43
val prems = goal ZF.thy "(A == B) ==> P(A) <-> P(B)";
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    44
by (asm_simp_tac (ZF_ss addsimps prems) 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    45
val def_imp_iff_P = result();
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    46
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    47
(* used only in lemmas4-7.ML *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    48
(*Note modified statement and proof*)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    49
goal ZF.thy "!!X. X~=0 ==> (A->X)~=0";
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    50
by (fast_tac (ZF_cs addSIs [equals0I,lam_type] addSEs [equals0D]) 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    51
val fun_space_not0I = result();
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    52
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    53
(* used only in WO1_DC.ML *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    54
(*Note simpler proof*)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    55
goal ZF.thy "!!A f g. [| ALL x:A. f`x=g`x; f:Df->Cf; g:Dg->Cg;  \
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    56
\         A<=Df; A<=Dg |] ==> f``A=g``A";
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    57
by (asm_simp_tac (ZF_ss addsimps [image_fun]) 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    58
val images_eq = result();
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    59
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    60
(* used in : AC10-AC15.ML AC16WO4.ML WO6WO1.ML *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    61
(*I don't know where to put this one.*)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    62
goal Cardinal.thy
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    63
     "!!m A B. [| A lepoll succ(m); B<=A; B~=0 |] ==> A-B lepoll m";
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    64
by (resolve_tac [not_emptyE] 1 THEN (atac 1));
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    65
by (forward_tac [singleton_subsetI] 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    66
by (forward_tac [subsetD] 1 THEN (atac 1));
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    67
by (res_inst_tac [("A2","A")] 
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    68
     (diff_sing_lepoll RSN (2, subset_imp_lepoll RS lepoll_trans)) 1 
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    69
    THEN (REPEAT (atac 2)));
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    70
by (fast_tac ZF_cs 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    71
val Diff_lepoll = result();
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    72
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    73
(* ********************************************************************** *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    74
(*              lemmas concerning lepoll and eqpoll relations             *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    75
(* ********************************************************************** *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    76
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    77
(* ********************************************************************** *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    78
(*                    Theorems concerning ordinals                        *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    79
(* ********************************************************************** *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    80
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    81
(* lemma for ordertype_Int *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    82
goalw Cardinal.thy [rvimage_def] "rvimage(A,id(A),r) = r Int A*A";
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    83
by (resolve_tac [equalityI] 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    84
by (step_tac ZF_cs 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    85
by (dres_inst_tac [("P","%a. <id(A)`xb,a>:r")] (id_conv RS subst) 1
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    86
    THEN (atac 1));
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    87
by (dres_inst_tac [("P","%a. <a,ya>:r")] (id_conv RS subst) 1
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    88
    THEN (REPEAT (atac 1)));
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    89
by (fast_tac (ZF_cs addIs [id_conv RS ssubst]) 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    90
val rvimage_id = result();
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    91
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    92
(* used only in Hartog.ML *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    93
goal Cardinal.thy
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    94
	"!!A r. well_ord(A,r) ==> ordertype(A, r Int A*A) = ordertype(A,r)";
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    95
by (res_inst_tac [("P","%a. ordertype(A,a)=ordertype(A,r)")] 
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    96
    (rvimage_id RS subst) 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    97
by (eresolve_tac [id_bij RS bij_ordertype_vimage] 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    98
val ordertype_Int = result();
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    99
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
   100
(* used only in WO6WO1.ML *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
   101
(* corrected according to LCP'a advise *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
   102
goal Cardinal.thy 
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
   103
      "!!i j k. [| k < i++j; Ord(i); Ord(j) |] ==>  \
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
   104
\                  k<i | (EX! l. l<j & k = i++l)";
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
   105
by (dresolve_tac [lt_oadd_disj] 1 THEN (REPEAT (atac 1)));
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
   106
by (fast_tac (ZF_cs addIs [ex1I, ltI] addSEs [oadd_inject RS sym, lt_Ord]
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
   107
		addEs [Ord_in_Ord]) 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
   108
val lt_oadd_disj1 = result();
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
   109
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
   110
(* used only in AC16_lemmas.ML *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
   111
goalw CardinalArith.thy [InfCard_def]
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
   112
	"!!i. [| ~Finite(i); Card(i) |] ==> InfCard(i)";
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
   113
by (asm_simp_tac (ZF_ss addsimps [Card_is_Ord RS nat_le_infinite_Ord]) 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
   114
val Inf_Card_is_InfCard = result();