src/ZF/AC/AC7_AC9.ML
author paulson
Tue, 08 Jan 2002 16:09:09 +0100
changeset 12667 7e6eaaa125f2
parent 11317 7f9e4c389318
permissions -rw-r--r--
Added some simprules proofs. Converted theories CardinalArith and OrdQuant to Isar style
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
     1
(*  Title:      ZF/AC/AC7-AC9.ML
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
     2
    ID:         $Id$
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
     3
    Author:     Krzysztof Grabczewski
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
     4
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
     5
The proofs needed to state that AC7, AC8 and AC9 are equivalent to the previous
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
     6
instances of AC.
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
     7
*)
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
     8
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
     9
(* ********************************************************************** *)
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
    10
(* Lemmas used in the proofs AC7 ==> AC6 and AC9 ==> AC1                  *)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
    11
(*  - Sigma_fun_space_not0                                                *)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
    12
(*  - Sigma_fun_space_eqpoll                                              *)
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    13
(* ********************************************************************** *)
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    14
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 11151
diff changeset
    15
Goal "[| 0\\<notin>A; B \\<in> A |] ==> (nat->Union(A)) * B \\<noteq> 0";
5325
f7a5e06adea1 Yet more removal of "goal" commands, especially "goal ZF.thy", so ZF.thy
paulson
parents: 5265
diff changeset
    16
by (blast_tac (claset() addSDs [Sigma_empty_iff RS iffD1, 
9683
f87c8c449018 added some xsymbols, and tidied
paulson
parents: 5470
diff changeset
    17
				Union_empty_iff RS iffD1]) 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2873
diff changeset
    18
qed "Sigma_fun_space_not0";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    19
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4716
diff changeset
    20
Goalw [inj_def]
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 11151
diff changeset
    21
        "C \\<in> A ==> (\\<lambda>g \\<in> (nat->Union(A))*C.  \
7f9e4c389318 X-symbols for set theory
paulson
parents: 11151
diff changeset
    22
\               (\\<lambda>n \\<in> nat. if(n=0, snd(g), fst(g)`(n #- 1))))  \
7f9e4c389318 X-symbols for set theory
paulson
parents: 11151
diff changeset
    23
\               \\<in> inj((nat->Union(A))*C, (nat->Union(A)) ) ";
1207
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1196
diff changeset
    24
by (rtac CollectI 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
    25
by (fast_tac (claset() addSIs [lam_type,RepFunI,if_type,snd_type,apply_type,
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
    26
                                fst_type,diff_type,nat_succI,nat_0I]) 1);
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    27
by (REPEAT (resolve_tac [ballI, impI] 1));
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1461
diff changeset
    28
by (Asm_full_simp_tac 1);
1207
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1196
diff changeset
    29
by (REPEAT (etac SigmaE 1));
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    30
by (REPEAT (hyp_subst_tac 1));
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1461
diff changeset
    31
by (Asm_full_simp_tac 1);
1207
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1196
diff changeset
    32
by (rtac conjI 1);
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    33
by (dresolve_tac [nat_0I RSN (2, lam_eqE)] 2);
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1461
diff changeset
    34
by (Asm_full_simp_tac 2);
1207
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1196
diff changeset
    35
by (rtac fun_extension 1 THEN  REPEAT (assume_tac 1));
1196
d43c1f7a53fe Numerous small improvements by KG and LCP
lcp
parents: 1123
diff changeset
    36
by (dresolve_tac [nat_succI RSN (2, lam_eqE)] 1 THEN (assume_tac 1));
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
    37
by (asm_full_simp_tac (simpset() addsimps [succ_not_0 RS if_not_P]) 1);
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    38
val lemma = result();
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    39
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 11151
diff changeset
    40
Goal "[| C \\<in> A; 0\\<notin>A |] ==> (nat->Union(A)) * C eqpoll (nat->Union(A))";
1207
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1196
diff changeset
    41
by (rtac eqpollI 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
    42
by (fast_tac (claset() addSEs [prod_lepoll_self, not_sym RS not_emptyE,
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
    43
                subst_elem] addEs [swap]) 2);
1207
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1196
diff changeset
    44
by (rewtac lepoll_def);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
    45
by (fast_tac (claset() addSIs [lemma]) 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2873
diff changeset
    46
qed "Sigma_fun_space_eqpoll";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    47
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    48
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    49
(* ********************************************************************** *)
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
    50
(* AC6 ==> AC7                                                            *)
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    51
(* ********************************************************************** *)
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    52
5137
60205b0de9b9 Huge tidy-up: removal of leading \!\!
paulson
parents: 5068
diff changeset
    53
Goalw AC_defs "AC6 ==> AC7";
5265
9d1d4c43c76d Disjointness reasoning by AddEs [equals0E, sym RS equals0E]
paulson
parents: 5241
diff changeset
    54
by (Blast_tac 1);
1196
d43c1f7a53fe Numerous small improvements by KG and LCP
lcp
parents: 1123
diff changeset
    55
qed "AC6_AC7";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    56
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    57
(* ********************************************************************** *)
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
    58
(* AC7 ==> AC6, Rubin & Rubin p. 12, Theorem 2.8                          *)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
    59
(* The case of the empty family of sets added in order to complete        *)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
    60
(* the proof.                                                             *)
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    61
(* ********************************************************************** *)
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    62
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 11151
diff changeset
    63
Goal "y \\<in> (\\<Pi>B \\<in> A. Y*B) ==> (\\<lambda>B \\<in> A. snd(y`B)): (\\<Pi>B \\<in> A. B)";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
    64
by (fast_tac (claset() addSIs [lam_type, snd_type, apply_type]) 1);
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    65
val lemma1_1 = result();
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    66
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 11151
diff changeset
    67
Goal "y \\<in> (\\<Pi>B \\<in> {Y*C. C \\<in> A}. B) ==> (\\<lambda>B \\<in> A. y`(Y*B)): (\\<Pi>B \\<in> A. Y*B)";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
    68
by (fast_tac (claset() addSIs [lam_type, apply_type]) 1);
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    69
val lemma1_2 = result();
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    70
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 11151
diff changeset
    71
Goal "(\\<Pi>B \\<in> {(nat->Union(A))*C. C \\<in> A}. B) \\<noteq> 0 ==> (\\<Pi>B \\<in> A. B) \\<noteq> 0";
5470
855654b691db eliminated equals0E
paulson
parents: 5325
diff changeset
    72
by (fast_tac (claset() addSIs [equals0I,lemma1_1, lemma1_2]) 1);
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    73
val lemma1 = result();
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    74
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 11151
diff changeset
    75
Goal "0 \\<notin> A ==> 0 \\<notin> {(nat -> Union(A)) * C. C \\<in> A}";
5241
e5129172cb2b Renamed equals0D to equals0E; tidied
paulson
parents: 5147
diff changeset
    76
by (fast_tac (claset() addEs [Sigma_fun_space_not0 RS not_sym RS notE]) 1);
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    77
val lemma2 = result();
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    78
5137
60205b0de9b9 Huge tidy-up: removal of leading \!\!
paulson
parents: 5068
diff changeset
    79
Goalw AC_defs "AC7 ==> AC6";
1207
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1196
diff changeset
    80
by (rtac allI 1);
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1196
diff changeset
    81
by (rtac impI 1);
9683
f87c8c449018 added some xsymbols, and tidied
paulson
parents: 5470
diff changeset
    82
by (case_tac "A=0" 1);
f87c8c449018 added some xsymbols, and tidied
paulson
parents: 5470
diff changeset
    83
by (Asm_simp_tac 1);
1207
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1196
diff changeset
    84
by (rtac lemma1 1);
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1196
diff changeset
    85
by (etac allE 1);
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1196
diff changeset
    86
by (etac impE 1 THEN (assume_tac 2));
9683
f87c8c449018 added some xsymbols, and tidied
paulson
parents: 5470
diff changeset
    87
by (blast_tac (claset() addSIs [lemma2] 
f87c8c449018 added some xsymbols, and tidied
paulson
parents: 5470
diff changeset
    88
                addIs [eqpoll_sym, eqpoll_trans, Sigma_fun_space_eqpoll]) 1); 
1196
d43c1f7a53fe Numerous small improvements by KG and LCP
lcp
parents: 1123
diff changeset
    89
qed "AC7_AC6";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    90
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    91
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    92
(* ********************************************************************** *)
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
    93
(* AC1 ==> AC8                                                            *)
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    94
(* ********************************************************************** *)
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    95
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4716
diff changeset
    96
Goalw [eqpoll_def]
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 11151
diff changeset
    97
        "\\<forall>B \\<in> A. \\<exists>B1 B2. B=<B1,B2> & B1 eqpoll B2  \
7f9e4c389318 X-symbols for set theory
paulson
parents: 11151
diff changeset
    98
\       ==> 0 \\<notin> { bij(fst(B),snd(B)). B \\<in> A }";
5241
e5129172cb2b Renamed equals0D to equals0E; tidied
paulson
parents: 5147
diff changeset
    99
by Auto_tac;
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   100
val lemma1 = result();
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   101
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 11151
diff changeset
   102
Goal "[| f \\<in> (\\<Pi>X \\<in> RepFun(A,p). X); D \\<in> A |] ==> (\\<lambda>x \\<in> A. f`p(x))`D \\<in> p(D)";
1196
d43c1f7a53fe Numerous small improvements by KG and LCP
lcp
parents: 1123
diff changeset
   103
by (resolve_tac [beta RS ssubst] 1 THEN (assume_tac 1));
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
   104
by (fast_tac (claset() addSEs [apply_type]) 1);
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   105
val lemma2 = result();
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   106
5137
60205b0de9b9 Huge tidy-up: removal of leading \!\!
paulson
parents: 5068
diff changeset
   107
Goalw AC_defs "AC1 ==> AC8";
5241
e5129172cb2b Renamed equals0D to equals0E; tidied
paulson
parents: 5147
diff changeset
   108
by (Clarify_tac 1);
e5129172cb2b Renamed equals0D to equals0E; tidied
paulson
parents: 5147
diff changeset
   109
by (dtac lemma1 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
   110
by (fast_tac (claset() addSEs [lemma2]) 1);
1196
d43c1f7a53fe Numerous small improvements by KG and LCP
lcp
parents: 1123
diff changeset
   111
qed "AC1_AC8";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   112
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   113
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   114
(* ********************************************************************** *)
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
   115
(* AC8 ==> AC9                                                            *)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
   116
(*  - this proof replaces the following two from Rubin & Rubin:           *)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
   117
(*    AC8 ==> AC1 and AC1 ==> AC9                                         *)
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   118
(* ********************************************************************** *)
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   119
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 11151
diff changeset
   120
Goal "\\<forall>B1 \\<in> A. \\<forall>B2 \\<in> A. B1 eqpoll B2  \
7f9e4c389318 X-symbols for set theory
paulson
parents: 11151
diff changeset
   121
\     ==> \\<forall>B \\<in> A*A. \\<exists>B1 B2. B=<B1,B2> & B1 eqpoll B2";
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1461
diff changeset
   122
by (Fast_tac 1);
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   123
val lemma1 = result();
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   124
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 11151
diff changeset
   125
Goal "f \\<in> bij(fst(<a,b>),snd(<a,b>)) ==> f \\<in> bij(a,b)";
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1461
diff changeset
   126
by (Asm_full_simp_tac 1);
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   127
val lemma2 = result();
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   128
5137
60205b0de9b9 Huge tidy-up: removal of leading \!\!
paulson
parents: 5068
diff changeset
   129
Goalw AC_defs "AC8 ==> AC9";
1207
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1196
diff changeset
   130
by (rtac allI 1);
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1196
diff changeset
   131
by (rtac impI 1);
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1196
diff changeset
   132
by (etac allE 1);
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1196
diff changeset
   133
by (etac impE 1);
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1196
diff changeset
   134
by (etac lemma1 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
   135
by (fast_tac (claset() addSEs [lemma2]) 1);
1196
d43c1f7a53fe Numerous small improvements by KG and LCP
lcp
parents: 1123
diff changeset
   136
qed "AC8_AC9";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   137
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   138
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   139
(* ********************************************************************** *)
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
   140
(* AC9 ==> AC1                                                            *)
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   141
(* The idea of this proof comes from "Equivalents of the Axiom of Choice" *)
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
   142
(* by Rubin & Rubin. But (x * y) is not necessarily equipollent to        *)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
   143
(* (x * y) Un {0} when y is a set of total functions acting from nat to   *)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
   144
(* Union(A) -- therefore we have used the set (y * nat) instead of y.     *)
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   145
(* ********************************************************************** *)
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   146
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   147
(* Rules nedded to prove lemma1 *)
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   148
val snd_lepoll_SigmaI = prod_lepoll_self RS 
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   149
        ((prod_commute_eqpoll RS eqpoll_imp_lepoll) RSN (2,lepoll_trans));
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1461
diff changeset
   150
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   151
11151
4042eb2fde2f Blast bug fix made old proof too slow
paulson
parents: 9683
diff changeset
   152
Goal "[|0 \\<notin> A; B \\<in> A|] ==> nat \\<lesssim> ((nat \\<rightarrow> Union(A)) \\<times> B) \\<times> nat";
4042eb2fde2f Blast bug fix made old proof too slow
paulson
parents: 9683
diff changeset
   153
by (blast_tac (claset() addDs [Sigma_fun_space_not0]
4042eb2fde2f Blast bug fix made old proof too slow
paulson
parents: 9683
diff changeset
   154
                        addIs [snd_lepoll_SigmaI]) 1);
4042eb2fde2f Blast bug fix made old proof too slow
paulson
parents: 9683
diff changeset
   155
qed "nat_lepoll_lemma";
4042eb2fde2f Blast bug fix made old proof too slow
paulson
parents: 9683
diff changeset
   156
4042eb2fde2f Blast bug fix made old proof too slow
paulson
parents: 9683
diff changeset
   157
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 11151
diff changeset
   158
Goal "[| 0\\<notin>A;  A\\<noteq>0;  \
7f9e4c389318 X-symbols for set theory
paulson
parents: 11151
diff changeset
   159
\        C = {((nat->Union(A))*B)*nat. B \\<in> A}  Un \
7f9e4c389318 X-symbols for set theory
paulson
parents: 11151
diff changeset
   160
\            {cons(0,((nat->Union(A))*B)*nat). B \\<in> A}; \
9683
f87c8c449018 added some xsymbols, and tidied
paulson
parents: 5470
diff changeset
   161
\        B1: C;  B2: C |]  \
f87c8c449018 added some xsymbols, and tidied
paulson
parents: 5470
diff changeset
   162
\     ==> B1 eqpoll B2";
11151
4042eb2fde2f Blast bug fix made old proof too slow
paulson
parents: 9683
diff changeset
   163
by (blast_tac
12667
7e6eaaa125f2 Added some simprules proofs.
paulson
parents: 11317
diff changeset
   164
    (claset() delrules [eqpoll_refl]
7e6eaaa125f2 Added some simprules proofs.
paulson
parents: 11317
diff changeset
   165
	      addSIs [nat_lepoll_lemma, nat_cons_eqpoll RS eqpoll_trans, 
11151
4042eb2fde2f Blast bug fix made old proof too slow
paulson
parents: 9683
diff changeset
   166
                      eqpoll_refl RSN (2, prod_eqpoll_cong)]
4042eb2fde2f Blast bug fix made old proof too slow
paulson
parents: 9683
diff changeset
   167
              addIs [eqpoll_trans, eqpoll_sym, Sigma_fun_space_eqpoll]) 1);
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   168
val lemma1 = result();
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   169
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 11151
diff changeset
   170
Goal "\\<forall>B1 \\<in> {(F*B)*N. B \\<in> A} Un {cons(0,(F*B)*N). B \\<in> A}.  \
7f9e4c389318 X-symbols for set theory
paulson
parents: 11151
diff changeset
   171
\     \\<forall>B2 \\<in> {(F*B)*N. B \\<in> A} Un {cons(0,(F*B)*N). B \\<in> A}.  \
7f9e4c389318 X-symbols for set theory
paulson
parents: 11151
diff changeset
   172
\       f`<B1,B2> \\<in> bij(B1, B2)  \
7f9e4c389318 X-symbols for set theory
paulson
parents: 11151
diff changeset
   173
\   ==> (\\<lambda>B \\<in> A. snd(fst((f`<cons(0,(F*B)*N),(F*B)*N>)`0))) \\<in> (\\<Pi>X \\<in> A. X)";
1207
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1196
diff changeset
   174
by (rtac lam_type 1);
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1196
diff changeset
   175
by (rtac snd_type 1);
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1196
diff changeset
   176
by (rtac fst_type 1);
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   177
by (resolve_tac [consI1 RSN (2, apply_type)] 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
   178
by (fast_tac (claset() addSIs [fun_weaken_type, bij_is_fun]) 1);
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   179
val lemma2 = result();
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   180
5137
60205b0de9b9 Huge tidy-up: removal of leading \!\!
paulson
parents: 5068
diff changeset
   181
Goalw AC_defs "AC9 ==> AC1";
1207
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1196
diff changeset
   182
by (rtac allI 1);
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1196
diff changeset
   183
by (rtac impI 1);
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1196
diff changeset
   184
by (etac allE 1);
9683
f87c8c449018 added some xsymbols, and tidied
paulson
parents: 5470
diff changeset
   185
by (case_tac "A=0" 1);
f87c8c449018 added some xsymbols, and tidied
paulson
parents: 5470
diff changeset
   186
by (blast_tac (claset() addDs [lemma1,lemma2]) 2); 
f87c8c449018 added some xsymbols, and tidied
paulson
parents: 5470
diff changeset
   187
by Auto_tac;  
1196
d43c1f7a53fe Numerous small improvements by KG and LCP
lcp
parents: 1123
diff changeset
   188
qed "AC9_AC1";