src/ZF/AC/AC_Equiv.ML
author lcp
Tue, 25 Apr 1995 11:06:52 +0200
changeset 1071 96dfc9977bf5
parent 1057 5097aa914449
child 1123 5dfdc1464966
permissions -rw-r--r--
Simple updates for compatibility with KG
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
1071
96dfc9977bf5 Simple updates for compatibility with KG
lcp
parents: 1057
diff changeset
    10
val WO_defs = [WO1_def, WO2_def, WO3_def, WO4_def, WO5_def, WO6_def, WO8_def];
96dfc9977bf5 Simple updates for compatibility with KG
lcp
parents: 1057
diff changeset
    11
 
96dfc9977bf5 Simple updates for compatibility with KG
lcp
parents: 1057
diff changeset
    12
val AC_defs = [AC0_def, AC1_def, AC2_def, AC3_def, AC4_def, AC5_def, 
96dfc9977bf5 Simple updates for compatibility with KG
lcp
parents: 1057
diff changeset
    13
               AC6_def, AC7_def, AC8_def, AC9_def, AC10_def, AC11_def, 
96dfc9977bf5 Simple updates for compatibility with KG
lcp
parents: 1057
diff changeset
    14
               AC12_def, AC13_def, AC14_def, AC15_def, AC16_def, 
96dfc9977bf5 Simple updates for compatibility with KG
lcp
parents: 1057
diff changeset
    15
               AC17_def, AC18_def, AC19_def];
96dfc9977bf5 Simple updates for compatibility with KG
lcp
parents: 1057
diff changeset
    16
 
991
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    17
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
    18
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    19
(* ******************************************** *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    20
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    21
(* Theorems analogous to ones presented in "ZF/Ordinal.ML" *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    22
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    23
(* lemma for nat_le_imp_lepoll *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    24
val [prem] = goalw Cardinal.thy [lepoll_def]
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    25
             "m:nat ==> ALL n: nat. m le n --> m lepoll n";
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    26
by (nat_ind_tac "m" [prem] 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    27
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
    28
by (rtac ballI 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    29
by (eres_inst_tac [("n","n")] natE 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    30
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
    31
by (fast_tac (ZF_cs addSDs [le0D]) 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    32
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
    33
val nat_le_imp_lepoll_lemma = result();
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
(* used in : AC10-AC15.ML WO1-WO6.ML WO6WO1.ML*)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    36
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
    37
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
(*             lemmas concerning FOL and pure ZF theory                   *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    40
(* ********************************************************************** *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    41
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    42
(* The following two theorms are useful when rewriting only one instance  *) 
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    43
(* of a definition							  *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    44
(* first one for definitions of formulae and the second for terms	  *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    45
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    46
val prems = goal ZF.thy "(A == B) ==> A <-> B";
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    47
by (asm_simp_tac (ZF_ss addsimps prems) 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    48
val def_imp_iff = result();
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    49
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    50
val prems = goal ZF.thy "(A == B) ==> P(A) <-> P(B)";
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    51
by (asm_simp_tac (ZF_ss addsimps prems) 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    52
val def_imp_iff_P = result();
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    53
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    54
(* used only in lemmas4-7.ML *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    55
(*Note modified statement and proof*)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    56
goal ZF.thy "!!X. X~=0 ==> (A->X)~=0";
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    57
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
    58
val fun_space_not0I = 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 only in WO1_DC.ML *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    61
(*Note simpler proof*)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    62
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
    63
\         A<=Df; A<=Dg |] ==> f``A=g``A";
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    64
by (asm_simp_tac (ZF_ss addsimps [image_fun]) 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    65
val images_eq = result();
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    66
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    67
(* used in : AC10-AC15.ML AC16WO4.ML WO6WO1.ML *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    68
(*I don't know where to put this one.*)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    69
goal Cardinal.thy
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    70
     "!!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
    71
by (resolve_tac [not_emptyE] 1 THEN (atac 1));
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    72
by (forward_tac [singleton_subsetI] 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    73
by (forward_tac [subsetD] 1 THEN (atac 1));
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    74
by (res_inst_tac [("A2","A")] 
1057
5097aa914449 Renamed diff_sing_lepoll to Diff_sing_lepoll.
lcp
parents: 1037
diff changeset
    75
     (Diff_sing_lepoll RSN (2, subset_imp_lepoll RS lepoll_trans)) 1 
991
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    76
    THEN (REPEAT (atac 2)));
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    77
by (fast_tac ZF_cs 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    78
val Diff_lepoll = result();
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
(*              lemmas concerning lepoll and eqpoll relations             *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    82
(* ********************************************************************** *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    83
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    84
(* ********************************************************************** *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    85
(*                    Theorems concerning ordinals                        *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    86
(* ********************************************************************** *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    87
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    88
(* lemma for ordertype_Int *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    89
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
    90
by (resolve_tac [equalityI] 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    91
by (step_tac ZF_cs 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    92
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
    93
    THEN (atac 1));
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    94
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
    95
    THEN (REPEAT (atac 1)));
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    96
by (fast_tac (ZF_cs addIs [id_conv RS ssubst]) 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    97
val rvimage_id = result();
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    98
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
    99
(* used only in Hartog.ML *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
   100
goal Cardinal.thy
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
   101
	"!!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
   102
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
   103
    (rvimage_id RS subst) 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
   104
by (eresolve_tac [id_bij RS bij_ordertype_vimage] 1);
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
   105
val ordertype_Int = result();
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
   106
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
   107
(* used only in AC16_lemmas.ML *)
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
   108
goalw CardinalArith.thy [InfCard_def]
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
   109
	"!!i. [| ~Finite(i); Card(i) |] ==> InfCard(i)";
547931cbbf08 New example of AC Equivalences by Krzysztof Grabczewski
lcp
parents:
diff changeset
   110
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
   111
val Inf_Card_is_InfCard = result();