src/ZF/Zorn.ML
author wenzelm
Tue, 24 Nov 1998 12:03:09 +0100
changeset 5953 d6017ce6b93e
parent 5774 c675d4a8c26a
child 6053 8a1059aa01f0
permissions -rw-r--r--
setup Blast.setup; setup Clasimp.setup;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1079
diff changeset
     1
(*  Title:      ZF/Zorn.ML
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
     2
    ID:         $Id$
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1079
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
     4
    Copyright   1994  University of Cambridge
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
     5
516
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 485
diff changeset
     6
Proofs from the paper
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
     7
    Abrial & Laffitte, 
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
     8
    Towards the Mechanization of the Proofs of Some 
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
     9
    Classical Theorems of Set Theory. 
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    10
*)
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    11
516
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 485
diff changeset
    12
open Zorn;
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    13
516
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 485
diff changeset
    14
(*** Section 1.  Mathematical Preamble ***)
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 485
diff changeset
    15
5774
paulson
parents: 5666
diff changeset
    16
Goal "(ALL x:C. x<=A | B<=x) ==> Union(C)<=A | B<=Union(C)";
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2493
diff changeset
    17
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 593
diff changeset
    18
qed "Union_lemma0";
516
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 485
diff changeset
    19
5774
paulson
parents: 5666
diff changeset
    20
Goal "[| c:C; ALL x:C. A<=x | x<=B |] ==> A<=Inter(C) | Inter(C)<=B";
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2493
diff changeset
    21
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 593
diff changeset
    22
qed "Inter_lemma0";
516
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 485
diff changeset
    23
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 485
diff changeset
    24
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 485
diff changeset
    25
(*** Section 2.  The Transfinite Construction ***)
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 485
diff changeset
    26
5666
822db50b3ec5 fixed some indenting; changed a VERY slow blast_tac to fast_tac
paulson
parents: 5469
diff changeset
    27
Goalw [increasing_def] "f: increasing(A) ==> f: Pow(A)->Pow(A)";
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
    28
by (etac CollectD1 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 593
diff changeset
    29
qed "increasingD1";
516
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 485
diff changeset
    30
5666
822db50b3ec5 fixed some indenting; changed a VERY slow blast_tac to fast_tac
paulson
parents: 5469
diff changeset
    31
Goalw [increasing_def] "[| f: increasing(A); x<=A |] ==> x <= f`x";
516
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 485
diff changeset
    32
by (eresolve_tac [CollectD2 RS spec RS mp] 1);
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 485
diff changeset
    33
by (assume_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 593
diff changeset
    34
qed "increasingD2";
516
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 485
diff changeset
    35
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    36
(*Introduction rules*)
516
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 485
diff changeset
    37
val [TFin_nextI, Pow_TFin_UnionI] = TFin.intrs;
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    38
val TFin_UnionI = PowI RS Pow_TFin_UnionI;
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    39
516
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 485
diff changeset
    40
val TFin_is_subset = TFin.dom_subset RS subsetD RS PowD;
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    41
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    42
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    43
(** Structural induction on TFin(S,next) **)
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    44
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5268
diff changeset
    45
val major::prems = Goal
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    46
  "[| n: TFin(S,next);  \
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    47
\     !!x. [| x : TFin(S,next);  P(x);  next: increasing(S) |] ==> P(next`x); \
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    48
\     !!Y. [| Y <= TFin(S,next);  ALL y:Y. P(y) |] ==> P(Union(Y)) \
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    49
\  |] ==> P(n)";
516
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 485
diff changeset
    50
by (rtac (major RS TFin.induct) 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 2929
diff changeset
    51
by (ALLGOALS (fast_tac (claset() addIs prems)));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 593
diff changeset
    52
qed "TFin_induct";
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    53
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    54
(*Perform induction on n, then prove the major premise using prems. *)
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    55
fun TFin_ind_tac a prems i = 
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    56
    EVERY [res_inst_tac [("n",a)] TFin_induct i,
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1079
diff changeset
    57
           rename_last_tac a ["1"] (i+1),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1079
diff changeset
    58
           rename_last_tac a ["2"] (i+2),
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1079
diff changeset
    59
           ares_tac prems i];
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    60
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    61
(*** Section 3.  Some Properties of the Transfinite Construction ***)
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    62
803
4c8333ab3eae changed useless "qed" calls for lemmas back to uses of "result",
lcp
parents: 760
diff changeset
    63
bind_thm ("increasing_trans", 
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1079
diff changeset
    64
          TFin_is_subset RSN (3, increasingD2 RSN (2,subset_trans)));
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    65
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    66
(*Lemma 1 of section 3.1*)
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5268
diff changeset
    67
Goal "[| n: TFin(S,next);  m: TFin(S,next);  \
f8848433d240 got rid of some goal thy commands
paulson
parents: 5268
diff changeset
    68
\        ALL x: TFin(S,next) . x<=m --> x=m | next`x<=m \
f8848433d240 got rid of some goal thy commands
paulson
parents: 5268
diff changeset
    69
\     |] ==> n<=m | next`m<=n";
f8848433d240 got rid of some goal thy commands
paulson
parents: 5268
diff changeset
    70
by (etac TFin_induct 1);
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2493
diff changeset
    71
by (etac Union_lemma0 2);               (*or just Blast_tac*)
2929
4eefc6c22d41 Changed some fast_tac to blast_tac
paulson
parents: 2925
diff changeset
    72
by (blast_tac (subset_cs addIs [increasing_trans]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 593
diff changeset
    73
qed "TFin_linear_lemma1";
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    74
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    75
(*Lemma 2 of section 3.2.  Interesting in its own right!
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    76
  Requires next: increasing(S) in the second induction step. *)
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    77
val [major,ninc] = goal Zorn.thy
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    78
    "[| m: TFin(S,next);  next: increasing(S) \
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    79
\    |] ==> ALL n: TFin(S,next) . n<=m --> n=m | next`n<=m";
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
    80
by (rtac (major RS TFin_induct) 1);
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
    81
by (rtac (impI RS ballI) 1);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    82
(*case split using TFin_linear_lemma1*)
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    83
by (res_inst_tac [("n1","n"), ("m1","x")] 
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    84
    (TFin_linear_lemma1 RS disjE) 1  THEN  REPEAT (assume_tac 1));
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    85
by (dres_inst_tac [("x","n")] bspec 1 THEN assume_tac 1);
2929
4eefc6c22d41 Changed some fast_tac to blast_tac
paulson
parents: 2925
diff changeset
    86
by (blast_tac (subset_cs addIs [increasing_trans]) 1);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    87
by (REPEAT (ares_tac [disjI1,equalityI] 1));
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    88
(*second induction step*)
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
    89
by (rtac (impI RS ballI) 1);
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
    90
by (rtac (Union_lemma0 RS disjE) 1);
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
    91
by (etac disjI2 3);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    92
by (REPEAT (ares_tac [disjI1,equalityI] 2));
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
    93
by (rtac ballI 1);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    94
by (ball_tac 1);
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    95
by (set_mp_tac 1);
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    96
by (res_inst_tac [("n1","n"), ("m1","x")] 
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
    97
    (TFin_linear_lemma1 RS disjE) 1  THEN  REPEAT (assume_tac 1));
2929
4eefc6c22d41 Changed some fast_tac to blast_tac
paulson
parents: 2925
diff changeset
    98
by (blast_tac subset_cs 1);
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
    99
by (rtac (ninc RS increasingD2 RS subset_trans RS disjI1) 1);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   100
by (REPEAT (ares_tac [TFin_is_subset] 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 593
diff changeset
   101
qed "TFin_linear_lemma2";
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   102
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   103
(*a more convenient form for Lemma 2*)
5666
822db50b3ec5 fixed some indenting; changed a VERY slow blast_tac to fast_tac
paulson
parents: 5469
diff changeset
   104
Goal "[| n<=m;  m: TFin(S,next);  n: TFin(S,next);  next: increasing(S) |] \
822db50b3ec5 fixed some indenting; changed a VERY slow blast_tac to fast_tac
paulson
parents: 5469
diff changeset
   105
\     ==> n=m | next`n<=m";
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   106
by (rtac (TFin_linear_lemma2 RS bspec RS mp) 1);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   107
by (REPEAT (assume_tac 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 593
diff changeset
   108
qed "TFin_subsetD";
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   109
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   110
(*Consequences from section 3.3 -- Property 3.2, the ordering is total*)
5666
822db50b3ec5 fixed some indenting; changed a VERY slow blast_tac to fast_tac
paulson
parents: 5469
diff changeset
   111
Goal "[| m: TFin(S,next);  n: TFin(S,next);  next: increasing(S) |] \
822db50b3ec5 fixed some indenting; changed a VERY slow blast_tac to fast_tac
paulson
parents: 5469
diff changeset
   112
\     ==> n<=m | m<=n";
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   113
by (rtac (TFin_linear_lemma2 RSN (3,TFin_linear_lemma1) RS disjE) 1);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   114
by (REPEAT (assume_tac 1) THEN etac disjI2 1);
2929
4eefc6c22d41 Changed some fast_tac to blast_tac
paulson
parents: 2925
diff changeset
   115
by (blast_tac (subset_cs addIs [increasingD2 RS subset_trans, 
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1079
diff changeset
   116
                               TFin_is_subset]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 593
diff changeset
   117
qed "TFin_subset_linear";
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   118
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   119
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   120
(*Lemma 3 of section 3.3*)
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5268
diff changeset
   121
Goal "[| n: TFin(S,next);  m: TFin(S,next);  m = next`m |] ==> n<=m";
f8848433d240 got rid of some goal thy commands
paulson
parents: 5268
diff changeset
   122
by (etac TFin_induct 1);
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   123
by (dtac TFin_subsetD 1);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   124
by (REPEAT (assume_tac 1));
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 2929
diff changeset
   125
by (fast_tac (claset() addEs [ssubst]) 1);
2929
4eefc6c22d41 Changed some fast_tac to blast_tac
paulson
parents: 2925
diff changeset
   126
by (blast_tac (subset_cs addIs [TFin_is_subset]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 593
diff changeset
   127
qed "equal_next_upper";
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   128
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   129
(*Property 3.3 of section 3.3*)
5666
822db50b3ec5 fixed some indenting; changed a VERY slow blast_tac to fast_tac
paulson
parents: 5469
diff changeset
   130
Goal "[| m: TFin(S,next);  next: increasing(S) |]  \
822db50b3ec5 fixed some indenting; changed a VERY slow blast_tac to fast_tac
paulson
parents: 5469
diff changeset
   131
\     ==> m = next`m <-> m = Union(TFin(S,next))";
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   132
by (rtac iffI 1);
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   133
by (rtac (Union_upper RS equalityI) 1);
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   134
by (rtac (equal_next_upper RS Union_least) 2);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   135
by (REPEAT (assume_tac 1));
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   136
by (etac ssubst 1);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   137
by (rtac (increasingD2 RS equalityI) 1 THEN assume_tac 1);
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   138
by (ALLGOALS
2929
4eefc6c22d41 Changed some fast_tac to blast_tac
paulson
parents: 2925
diff changeset
   139
    (blast_tac (subset_cs addIs [TFin_UnionI, TFin_nextI, TFin_is_subset])));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 593
diff changeset
   140
qed "equal_next_Union";
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   141
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   142
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   143
(*** Section 4.  Hausdorff's Theorem: every set contains a maximal chain ***)
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   144
(*** NB: We assume the partial ordering is <=, the subset relation! **)
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   145
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   146
(** Defining the "next" operation for Hausdorff's Theorem **)
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   147
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4152
diff changeset
   148
Goalw [chain_def] "chain(A) <= Pow(A)";
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   149
by (rtac Collect_subset 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 593
diff changeset
   150
qed "chain_subset_Pow";
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   151
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4152
diff changeset
   152
Goalw [super_def] "super(A,c) <= chain(A)";
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   153
by (rtac Collect_subset 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 593
diff changeset
   154
qed "super_subset_chain";
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   155
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4152
diff changeset
   156
Goalw [maxchain_def] "maxchain(A) <= chain(A)";
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   157
by (rtac Collect_subset 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 593
diff changeset
   158
qed "maxchain_subset_chain";
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   159
5666
822db50b3ec5 fixed some indenting; changed a VERY slow blast_tac to fast_tac
paulson
parents: 5469
diff changeset
   160
Goal "[| ch : (PROD X:Pow(chain(S)) - {0}. X);  \
822db50b3ec5 fixed some indenting; changed a VERY slow blast_tac to fast_tac
paulson
parents: 5469
diff changeset
   161
\        X : chain(S);  X ~: maxchain(S) |]     \
822db50b3ec5 fixed some indenting; changed a VERY slow blast_tac to fast_tac
paulson
parents: 5469
diff changeset
   162
\     ==> ch ` super(S,X) : super(S,X)";
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   163
by (etac apply_type 1);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   164
by (rewrite_goals_tac [super_def, maxchain_def]);
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2493
diff changeset
   165
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 593
diff changeset
   166
qed "choice_super";
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   167
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   168
Goal "[| ch : (PROD X:Pow(chain(S)) - {0}. X);      \
5666
822db50b3ec5 fixed some indenting; changed a VERY slow blast_tac to fast_tac
paulson
parents: 5469
diff changeset
   169
\            X : chain(S);  X ~: maxchain(S) |]     \
822db50b3ec5 fixed some indenting; changed a VERY slow blast_tac to fast_tac
paulson
parents: 5469
diff changeset
   170
\     ==> ch ` super(S,X) ~= X";
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   171
by (rtac notI 1);
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   172
by (dtac choice_super 1);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   173
by (assume_tac 1);
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   174
by (assume_tac 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 2929
diff changeset
   175
by (asm_full_simp_tac (simpset() addsimps [super_def]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 593
diff changeset
   176
qed "choice_not_equals";
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   177
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   178
(*This justifies Definition 4.4*)
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   179
Goal "ch: (PROD X: Pow(chain(S))-{0}. X) ==>        \
5666
822db50b3ec5 fixed some indenting; changed a VERY slow blast_tac to fast_tac
paulson
parents: 5469
diff changeset
   180
\     EX next: increasing(S). ALL X: Pow(S).       \
822db50b3ec5 fixed some indenting; changed a VERY slow blast_tac to fast_tac
paulson
parents: 5469
diff changeset
   181
\                  next`X = if(X: chain(S)-maxchain(S), ch`super(S,X), X)";
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   182
by (rtac bexI 1);
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   183
by (rtac ballI 1);
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   184
by (rtac beta 1);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   185
by (assume_tac 1);
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   186
by (rewtac increasing_def);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   187
by (rtac CollectI 1);
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   188
by (rtac lam_type 1);
5137
60205b0de9b9 Huge tidy-up: removal of leading \!\!
paulson
parents: 5116
diff changeset
   189
by (Asm_simp_tac 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 2929
diff changeset
   190
by (fast_tac (claset() addSIs [super_subset_chain RS subsetD,
5666
822db50b3ec5 fixed some indenting; changed a VERY slow blast_tac to fast_tac
paulson
parents: 5469
diff changeset
   191
			       chain_subset_Pow RS subsetD,
822db50b3ec5 fixed some indenting; changed a VERY slow blast_tac to fast_tac
paulson
parents: 5469
diff changeset
   192
			       choice_super]) 1);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   193
(*Now, verify that it increases*)
5137
60205b0de9b9 Huge tidy-up: removal of leading \!\!
paulson
parents: 5116
diff changeset
   194
by (asm_simp_tac (simpset() addsimps [Pow_iff, subset_refl]) 1);
4152
451104c223e2 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
   195
by Safe_tac;
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   196
by (dtac choice_super 1);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   197
by (REPEAT (assume_tac 1));
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   198
by (rewtac super_def);
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2493
diff changeset
   199
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 593
diff changeset
   200
qed "Hausdorff_next_exists";
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   201
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   202
(*Lemma 4*)
5268
59ef39008514 even more tidying of Goal commands
paulson
parents: 5265
diff changeset
   203
Goal " [| c: TFin(S,next);                              \
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1079
diff changeset
   204
\         ch: (PROD X: Pow(chain(S))-{0}. X);           \
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1079
diff changeset
   205
\         next: increasing(S);                          \
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1079
diff changeset
   206
\         ALL X: Pow(S). next`X =       \
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1079
diff changeset
   207
\                         if(X: chain(S)-maxchain(S), ch`super(S,X), X) \
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   208
\      |] ==> c: chain(S)";
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   209
by (etac TFin_induct 1);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   210
by (asm_simp_tac 
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 2929
diff changeset
   211
    (simpset() addsimps [chain_subset_Pow RS subsetD, 
5137
60205b0de9b9 Huge tidy-up: removal of leading \!\!
paulson
parents: 5116
diff changeset
   212
			 choice_super RS (super_subset_chain RS subsetD)]) 1);
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   213
by (rewtac chain_def);
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2493
diff changeset
   214
by (rtac CollectI 1 THEN Blast_tac 1);
4152
451104c223e2 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
   215
by Safe_tac;
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   216
by (res_inst_tac  [("m1","B"), ("n1","Ba")] (TFin_subset_linear RS disjE) 1);
5469
024d887eae50 fixed PROOF FAILED
paulson
parents: 5321
diff changeset
   217
by (ALLGOALS Fast_tac);   (*Blast_tac's slow*)
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 593
diff changeset
   218
qed "TFin_chain_lemma4";
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   219
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4152
diff changeset
   220
Goal "EX c. c : maxchain(S)";
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   221
by (rtac (AC_Pi_Pow RS exE) 1);
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   222
by (rtac (Hausdorff_next_exists RS bexE) 1);
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   223
by (assume_tac 1);
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   224
by (rename_tac "ch next" 1);
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   225
by (subgoal_tac "Union(TFin(S,next)) : chain(S)" 1);
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   226
by (REPEAT (ares_tac [TFin_chain_lemma4, subset_refl RS TFin_UnionI] 2));
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   227
by (res_inst_tac [("x", "Union(TFin(S,next))")] exI 1);
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   228
by (rtac classical 1);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   229
by (subgoal_tac "next ` Union(TFin(S,next)) = Union(TFin(S,next))" 1);
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   230
by (resolve_tac [equal_next_Union RS iffD2 RS sym] 2);
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   231
by (resolve_tac [subset_refl RS TFin_UnionI] 2);
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   232
by (assume_tac 2);
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   233
by (rtac refl 2);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   234
by (asm_full_simp_tac 
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 2929
diff changeset
   235
    (simpset() addsimps [subset_refl RS TFin_UnionI RS
5137
60205b0de9b9 Huge tidy-up: removal of leading \!\!
paulson
parents: 5116
diff changeset
   236
			 (TFin.dom_subset RS subsetD)]) 1);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   237
by (eresolve_tac [choice_not_equals RS notE] 1);
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   238
by (REPEAT (assume_tac 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 593
diff changeset
   239
qed "Hausdorff";
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   240
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   241
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   242
(*** Section 5.  Zorn's Lemma: if all chains in S have upper bounds in S 
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   243
                               then S contains a maximal element ***)
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   244
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   245
(*Used in the proof of Zorn's Lemma*)
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4152
diff changeset
   246
Goalw [chain_def]
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   247
    "[| c: chain(A);  z: A;  ALL x:c. x<=z |] ==> cons(z,c) : chain(A)";
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2493
diff changeset
   248
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 593
diff changeset
   249
qed "chain_extend";
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   250
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   251
Goal "ALL c: chain(S). Union(c) : S ==> EX y:S. ALL z:S. y<=z --> y=z";
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   252
by (resolve_tac [Hausdorff RS exE] 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 2929
diff changeset
   253
by (asm_full_simp_tac (simpset() addsimps [maxchain_def]) 1);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   254
by (rename_tac "c" 1);
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   255
by (res_inst_tac [("x", "Union(c)")] bexI 1);
5469
024d887eae50 fixed PROOF FAILED
paulson
parents: 5321
diff changeset
   256
by (Blast_tac 2);
4152
451104c223e2 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
   257
by Safe_tac;
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   258
by (rename_tac "z" 1);
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   259
by (rtac classical 1);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   260
by (subgoal_tac "cons(z,c): super(S,c)" 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 2929
diff changeset
   261
by (blast_tac (claset() addEs [equalityE]) 1);
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   262
by (rewtac super_def);
4152
451104c223e2 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
   263
by Safe_tac;
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 2929
diff changeset
   264
by (fast_tac (claset() addEs [chain_extend]) 1);
5666
822db50b3ec5 fixed some indenting; changed a VERY slow blast_tac to fast_tac
paulson
parents: 5469
diff changeset
   265
by (fast_tac (claset() addEs [equalityE]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 593
diff changeset
   266
qed "Zorn";
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   267
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   268
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   269
(*** Section 6.  Zermelo's Theorem: every set can be well-ordered ***)
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   270
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   271
(*Lemma 5*)
5666
822db50b3ec5 fixed some indenting; changed a VERY slow blast_tac to fast_tac
paulson
parents: 5469
diff changeset
   272
Goal "[| n: TFin(S,next);  Z <= TFin(S,next);  z:Z;  ~ Inter(Z) : Z |]  \
822db50b3ec5 fixed some indenting; changed a VERY slow blast_tac to fast_tac
paulson
parents: 5469
diff changeset
   273
\     ==> ALL m:Z. n<=m";
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5268
diff changeset
   274
by (etac TFin_induct 1);
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2493
diff changeset
   275
by (Blast_tac 2);                  (*second induction step is easy*)
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   276
by (rtac ballI 1);
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   277
by (rtac (bspec RS TFin_subsetD RS disjE) 1);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   278
by (REPEAT_SOME (eresolve_tac [asm_rl,subsetD]));
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   279
by (subgoal_tac "x = Inter(Z)" 1);
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2493
diff changeset
   280
by (Blast_tac 1);
b0ae2e13db93 Using Blast_tac
paulson
parents: 2493
diff changeset
   281
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 593
diff changeset
   282
qed "TFin_well_lemma5";
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   283
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   284
(*Well-ordering of TFin(S,next)*)
5137
60205b0de9b9 Huge tidy-up: removal of leading \!\!
paulson
parents: 5116
diff changeset
   285
Goal "[| Z <= TFin(S,next);  z:Z |] ==> Inter(Z) : Z";
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   286
by (rtac classical 1);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   287
by (subgoal_tac "Z = {Union(TFin(S,next))}" 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 2929
diff changeset
   288
by (asm_simp_tac (simpset() addsimps [Inter_singleton]) 1);
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   289
by (etac equal_singleton 1);
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   290
by (rtac (Union_upper RS equalityI) 1);
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   291
by (rtac (subset_refl RS TFin_UnionI RS TFin_well_lemma5 RS bspec) 2);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   292
by (REPEAT_SOME (eresolve_tac [asm_rl,subsetD]));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 593
diff changeset
   293
qed "well_ord_TFin_lemma";
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   294
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   295
(*This theorem just packages the previous result*)
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   296
Goal "next: increasing(S) ==> \
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   297
\         well_ord(TFin(S,next), Subset_rel(TFin(S,next)))";
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   298
by (rtac well_ordI 1);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   299
by (rewrite_goals_tac [Subset_rel_def, linear_def]);
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   300
(*Prove the linearity goal first*)
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   301
by (REPEAT (rtac ballI 2));
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   302
by (excluded_middle_tac "x=y" 2);
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2493
diff changeset
   303
by (Blast_tac 3);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   304
(*The x~=y case remains*)
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   305
by (res_inst_tac [("n1","x"), ("m1","y")] 
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   306
    (TFin_subset_linear RS disjE) 2  THEN  REPEAT (assume_tac 2));
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2493
diff changeset
   307
by (Blast_tac 2);
b0ae2e13db93 Using Blast_tac
paulson
parents: 2493
diff changeset
   308
by (Blast_tac 2);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   309
(*Now prove the well_foundedness goal*)
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   310
by (rtac wf_onI 1);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   311
by (forward_tac [well_ord_TFin_lemma] 1 THEN assume_tac 1);
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   312
by (dres_inst_tac [("x","Inter(Z)")] bspec 1 THEN assume_tac 1);
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2493
diff changeset
   313
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 593
diff changeset
   314
qed "well_ord_TFin";
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   315
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   316
(** Defining the "next" operation for Zermelo's Theorem **)
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   317
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   318
(*This justifies Definition 6.1*)
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   319
Goal "ch: (PROD X: Pow(S)-{0}. X) ==>               \
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1079
diff changeset
   320
\          EX next: increasing(S). ALL X: Pow(S).       \
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   321
\                     next`X = if(X=S, S, cons(ch`(S-X), X))";
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   322
by (rtac bexI 1);
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   323
by (rtac ballI 1);
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   324
by (rtac beta 1);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   325
by (assume_tac 1);
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   326
by (rewtac increasing_def);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   327
by (rtac CollectI 1);
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   328
by (rtac lam_type 1);
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   329
(*Verify that it increases*)
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   330
by (rtac allI 2);
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   331
by (rtac impI 2);
5137
60205b0de9b9 Huge tidy-up: removal of leading \!\!
paulson
parents: 5116
diff changeset
   332
by (asm_simp_tac (simpset() addsimps [Pow_iff, subset_consI, subset_refl]) 2);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   333
(*Type checking is surprisingly hard!*)
5137
60205b0de9b9 Huge tidy-up: removal of leading \!\!
paulson
parents: 5116
diff changeset
   334
by (asm_simp_tac
60205b0de9b9 Huge tidy-up: removal of leading \!\!
paulson
parents: 5116
diff changeset
   335
    (simpset() addsimps [Pow_iff, cons_subset_iff, subset_refl]) 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 2929
diff changeset
   336
by (blast_tac (claset() addSIs [choice_Diff RS DiffD1]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 593
diff changeset
   337
qed "Zermelo_next_exists";
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   338
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   339
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   340
(*The construction of the injection*)
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   341
Goal "[| ch: (PROD X: Pow(S)-{0}. X);                 \
5666
822db50b3ec5 fixed some indenting; changed a VERY slow blast_tac to fast_tac
paulson
parents: 5469
diff changeset
   342
\        next: increasing(S);                         \
822db50b3ec5 fixed some indenting; changed a VERY slow blast_tac to fast_tac
paulson
parents: 5469
diff changeset
   343
\        ALL X: Pow(S). next`X = if(X=S, S, cons(ch`(S-X), X)) |] \
822db50b3ec5 fixed some indenting; changed a VERY slow blast_tac to fast_tac
paulson
parents: 5469
diff changeset
   344
\     ==> (lam x:S. Union({y: TFin(S,next). x~: y}))       \
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   345
\              : inj(S, TFin(S,next) - {S})";
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   346
by (res_inst_tac [("d", "%y. ch`(S-y)")] lam_injective 1);
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   347
by (rtac DiffI 1);
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   348
by (resolve_tac [Collect_subset RS TFin_UnionI] 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 2929
diff changeset
   349
by (blast_tac (claset() addSIs [Collect_subset RS TFin_UnionI]
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1461
diff changeset
   350
                      addEs [equalityE]) 1);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   351
by (subgoal_tac "x ~: Union({y: TFin(S,next). x~: y})" 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 2929
diff changeset
   352
by (blast_tac (claset() addEs [equalityE]) 2);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   353
by (subgoal_tac "Union({y: TFin(S,next). x~: y}) ~= S" 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 2929
diff changeset
   354
by (blast_tac (claset() addEs [equalityE]) 2);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   355
(*For proving x : next`Union(...);
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   356
  Abrial & Laffitte's justification appears to be faulty.*)
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   357
by (subgoal_tac "~ next ` Union({y: TFin(S,next). x~: y}) <= \
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   358
\                  Union({y: TFin(S,next). x~: y})" 1);
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   359
by (asm_simp_tac 
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 2929
diff changeset
   360
    (simpset() delsimps [Union_iff]
2493
bdeb5024353a Removal of sum_cs and eq_cs
paulson
parents: 2469
diff changeset
   361
              addsimps [Collect_subset RS TFin_UnionI RS TFin_is_subset,
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1079
diff changeset
   362
                     Pow_iff, cons_subset_iff, subset_refl,
5137
60205b0de9b9 Huge tidy-up: removal of leading \!\!
paulson
parents: 5116
diff changeset
   363
                     choice_Diff RS DiffD2]) 2);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   364
by (subgoal_tac "x : next ` Union({y: TFin(S,next). x~: y})" 1);
2929
4eefc6c22d41 Changed some fast_tac to blast_tac
paulson
parents: 2925
diff changeset
   365
by (blast_tac (subset_cs addSIs [Collect_subset RS TFin_UnionI, TFin_nextI]) 2);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   366
(*End of the lemmas!*)
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   367
by (asm_full_simp_tac 
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 2929
diff changeset
   368
    (simpset() addsimps [Collect_subset RS TFin_UnionI RS TFin_is_subset,
5137
60205b0de9b9 Huge tidy-up: removal of leading \!\!
paulson
parents: 5116
diff changeset
   369
                     Pow_iff, cons_subset_iff, subset_refl]) 1);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   370
by (REPEAT (eresolve_tac [asm_rl, consE, sym, notE] 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 593
diff changeset
   371
qed "choice_imp_injection";
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   372
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   373
(*The wellordering theorem*)
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4152
diff changeset
   374
Goal "EX r. well_ord(S,r)";
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   375
by (rtac (AC_Pi_Pow RS exE) 1);
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   376
by (rtac (Zermelo_next_exists RS bexE) 1);
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   377
by (assume_tac 1);
804
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   378
by (rtac exI 1);
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   379
by (rtac well_ord_rvimage 1);
02430d273ebf ran expandshort script
lcp
parents: 803
diff changeset
   380
by (etac well_ord_TFin 2);
485
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   381
by (resolve_tac [choice_imp_injection RS inj_weaken_type] 1);
5e00a676a211 Axiom of choice, cardinality results, etc.
lcp
parents:
diff changeset
   382
by (REPEAT (ares_tac [Diff_subset] 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 593
diff changeset
   383
qed "AC_well_ord";