src/HOL/Real/Hyperreal/Filter.ML
author paulson
Fri, 27 Nov 1998 11:24:27 +0100
changeset 5979 11cbf236ca16
child 6024 cb87f103d114
permissions -rw-r--r--
Addition of Hyperreal theories Zorn and Filter
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5979
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
     1
(*  Title       : Filter.ML
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
     2
    Author      : Jacques D. Fleuriot
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
     3
    Copyright   : 1998  University of Cambridge
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
     4
    Description : Filters and Ultrafilter
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
     5
*) 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
     6
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
     7
open Filter;
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
     8
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
     9
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    10
(*------------------------------------------------------------------
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    11
      Properties of Filters and Freefilters - 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    12
      rules for intro, destruction etc.
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    13
 ------------------------------------------------------------------*)
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    14
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    15
Goalw [is_Filter_def] "is_Filter X S ==> X <= Pow(S)";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    16
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    17
qed "is_FilterD1";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    18
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    19
Goalw [is_Filter_def] "is_Filter X S ==> X ~= {}";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    20
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    21
qed "is_FilterD2";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    22
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    23
Goalw [is_Filter_def] "is_Filter X S ==> {} ~: X";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    24
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    25
qed "is_FilterD3";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    26
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    27
Goalw [Filter_def] "is_Filter X S ==> X : Filter S";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    28
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    29
qed "mem_FiltersetI";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    30
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    31
Goalw [Filter_def] "X : Filter S ==> is_Filter X S";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    32
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    33
qed "mem_FiltersetD";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    34
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    35
Goal "X : Filter S ==> {} ~: X";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    36
by (etac (mem_FiltersetD RS is_FilterD3) 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    37
qed "Filter_empty_not_mem";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    38
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    39
bind_thm ("Filter_empty_not_memE",(Filter_empty_not_mem RS notE));
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    40
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    41
Goalw [Filter_def,is_Filter_def] 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    42
      "[| X: Filter S; A: X; B: X |] ==> A Int B : X";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    43
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    44
qed "mem_FiltersetD1";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    45
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    46
Goalw [Filter_def,is_Filter_def] 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    47
      "[| X: Filter S; A: X; A <= B; B <= S|] ==> B : X";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    48
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    49
qed "mem_FiltersetD2";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    50
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    51
Goalw [Filter_def,is_Filter_def] 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    52
      "[| X: Filter S; A: X |] ==> A : Pow S";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    53
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    54
qed "mem_FiltersetD3";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    55
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    56
Goalw [Filter_def,is_Filter_def] 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    57
      "X: Filter S  ==> S : X";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    58
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    59
qed "mem_FiltersetD4";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    60
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    61
Goalw [is_Filter_def] 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    62
      "[| X <= Pow(S);\
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    63
\              S : X; \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    64
\              X ~= {}; \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    65
\              {} ~: X; \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    66
\              ALL u: X. ALL v: X. u Int v : X; \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    67
\              ALL u v. u: X & u<=v & v<=S --> v: X \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    68
\           |] ==> is_Filter X S";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    69
by (Blast_tac 1); 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    70
qed "is_FilterI";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    71
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    72
Goal "[| X <= Pow(S);\
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    73
\              S : X; \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    74
\              X ~= {}; \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    75
\              {} ~: X; \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    76
\              ALL u: X. ALL v: X. u Int v : X; \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    77
\              ALL u v. u: X & u<=v & v<=S --> v: X \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    78
\           |] ==> X: Filter S";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    79
by (blast_tac (claset() addIs [mem_FiltersetI,is_FilterI]) 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    80
qed "mem_FiltersetI2";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    81
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    82
Goalw [is_Filter_def]
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    83
      "is_Filter X S ==> X <= Pow(S) & \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    84
\                          S : X & \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    85
\                          X ~= {} & \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    86
\                          {} ~: X  & \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    87
\                          (ALL u: X. ALL v: X. u Int v : X) & \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    88
\                          (ALL u v. u: X & u <= v & v<=S --> v: X)";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    89
by (Fast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    90
qed "is_FilterE_lemma";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    91
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    92
Goalw [is_Filter_def]
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    93
      "X : Filter S ==> X <= Pow(S) &\
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    94
\                          S : X & \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    95
\                          X ~= {} & \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    96
\                          {} ~: X  & \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    97
\                          (ALL u: X. ALL v: X. u Int v : X) & \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    98
\                          (ALL u v. u: X & u <= v & v<=S --> v: X)";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
    99
by (etac (mem_FiltersetD RS is_FilterE_lemma) 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   100
qed "memFiltersetE_lemma";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   101
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   102
Goalw [Filter_def,Freefilter_def] 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   103
      "X: Freefilter S ==> X: Filter S";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   104
by (Fast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   105
qed "Freefilter_Filter";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   106
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   107
Goalw [Freefilter_def] 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   108
      "X: Freefilter S ==> ALL y: X. ~finite(y)";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   109
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   110
qed "mem_Freefilter_not_finite";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   111
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   112
Goal "[| X: Freefilter S; x: X |] ==> ~ finite x";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   113
by (blast_tac (claset() addSDs [mem_Freefilter_not_finite]) 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   114
qed "mem_FreefiltersetD1";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   115
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   116
bind_thm ("mem_FreefiltersetE1", (mem_FreefiltersetD1 RS notE));
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   117
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   118
Goal "[| X: Freefilter S; finite x|] ==> x ~: X";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   119
by (blast_tac (claset() addSDs [mem_Freefilter_not_finite]) 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   120
qed "mem_FreefiltersetD2";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   121
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   122
Goalw [Freefilter_def] 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   123
      "[| X: Filter S; ALL x. ~(x: X & finite x) |] ==> X: Freefilter S";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   124
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   125
qed "mem_FreefiltersetI1";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   126
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   127
Goalw [Freefilter_def]
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   128
      "[| X: Filter S; ALL x. (x ~: X | ~ finite x) |] ==> X: Freefilter S";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   129
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   130
qed "mem_FreefiltersetI2";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   131
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   132
Goal "[| X: Filter S; A: X; B: X |] ==> A Int B ~= {}";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   133
by (forw_inst_tac [("A","A"),("B","B")] mem_FiltersetD1 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   134
by (auto_tac (claset() addSDs [Filter_empty_not_mem],simpset()));
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   135
qed "Filter_Int_not_empty";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   136
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   137
bind_thm ("Filter_Int_not_emptyE",(Filter_Int_not_empty RS notE));
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   138
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   139
(*----------------------------------------------------------------------------------
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   140
              Ultrafilters and Free ultrafilters
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   141
 ----------------------------------------------------------------------------------*)
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   142
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   143
Goalw [Ultrafilter_def] "X : Ultrafilter S ==> X: Filter S";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   144
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   145
qed "Ultrafilter_Filter";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   146
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   147
Goalw [Ultrafilter_def] 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   148
      "X : Ultrafilter S ==> !A: Pow(S). A : X | S - A: X";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   149
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   150
qed "mem_UltrafiltersetD2";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   151
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   152
Goalw [Ultrafilter_def] 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   153
      "[|X : Ultrafilter S; A <= S; A ~: X |] ==> S - A: X";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   154
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   155
qed "mem_UltrafiltersetD3";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   156
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   157
Goalw [Ultrafilter_def] 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   158
      "[|X : Ultrafilter S; A <= S; S - A ~: X |] ==> A: X";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   159
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   160
qed "mem_UltrafiltersetD4";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   161
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   162
Goalw [Ultrafilter_def]
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   163
     "[| X: Filter S; \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   164
\             ALL A: Pow(S). A: X | S - A : X |] ==> X: Ultrafilter S";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   165
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   166
qed "mem_UltrafiltersetI";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   167
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   168
Goalw [Ultrafilter_def,FreeUltrafilter_def]
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   169
     "X: FreeUltrafilter S ==> X: Ultrafilter S";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   170
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   171
qed "FreeUltrafilter_Ultrafilter";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   172
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   173
Goalw [FreeUltrafilter_def]
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   174
     "X: FreeUltrafilter S ==> ALL y: X. ~finite(y)";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   175
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   176
qed "mem_FreeUltrafilter_not_finite";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   177
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   178
Goal "[| X: FreeUltrafilter S; x: X |] ==> ~ finite x";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   179
by (blast_tac (claset() addSDs [mem_FreeUltrafilter_not_finite]) 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   180
qed "mem_FreeUltrafiltersetD1";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   181
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   182
bind_thm ("mem_FreeUltrafiltersetE1", (mem_FreeUltrafiltersetD1 RS notE));
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   183
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   184
Goal "[| X: FreeUltrafilter S; finite x|] ==> x ~: X";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   185
by (blast_tac (claset() addSDs [mem_FreeUltrafilter_not_finite]) 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   186
qed "mem_FreeUltrafiltersetD2";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   187
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   188
Goalw [FreeUltrafilter_def] 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   189
      "[| X: Ultrafilter S; \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   190
\              ALL x. ~(x: X & finite x) |] ==> X: FreeUltrafilter S";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   191
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   192
qed "mem_FreeUltrafiltersetI1";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   193
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   194
Goalw [FreeUltrafilter_def]
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   195
      "[| X: Ultrafilter S; \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   196
\              ALL x. (x ~: X | ~ finite x) |] ==> X: FreeUltrafilter S";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   197
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   198
qed "mem_FreeUltrafiltersetI2";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   199
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   200
Goalw [FreeUltrafilter_def,Freefilter_def,Ultrafilter_def]
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   201
     "(X: FreeUltrafilter S) = (X: Freefilter S & (ALL x:Pow(S). x: X | S - x: X))";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   202
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   203
qed "FreeUltrafilter_iff";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   204
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   205
(*-------------------------------------------------------------------
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   206
   A Filter F on S is an ultrafilter iff it is a maximal filter 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   207
   i.e. whenever G is a filter on I and F <= F then F = G
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   208
 --------------------------------------------------------------------*)
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   209
(*---------------------------------------------------------------------
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   210
  lemmas that shows existence of an extension to what was assumed to
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   211
  be a maximal filter. Will be used to derive contradiction in proof of
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   212
  property of ultrafilter 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   213
 ---------------------------------------------------------------------*)
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   214
Goal "[| F ~= {}; A <= S |] ==> \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   215
\        EX x. x: {X. X <= S & (EX f:F. A Int f <= X)}";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   216
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   217
qed "lemma_set_extend";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   218
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   219
Goal "a: X ==> X ~= {}";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   220
by (Step_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   221
qed "lemma_set_not_empty";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   222
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   223
Goal "x Int F <= {} ==> F <= - x";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   224
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   225
qed "lemma_empty_Int_subset_Compl";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   226
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   227
Goalw [Filter_def,is_Filter_def]
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   228
      "[| F: Filter S; A ~: F; A <= S|] \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   229
\          ==> ALL B. B ~: F | ~ B <= A";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   230
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   231
qed "mem_Filterset_disjI";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   232
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   233
Goal "F : Ultrafilter S ==> \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   234
\         (F: Filter S & (ALL G: Filter S. F <= G --> F = G))";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   235
by (auto_tac (claset(),simpset() addsimps [Ultrafilter_def]));
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   236
by (dres_inst_tac [("x","x")] bspec 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   237
by (etac mem_FiltersetD3 1 THEN assume_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   238
by (Step_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   239
by (dtac subsetD 1 THEN assume_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   240
by (blast_tac (claset() addSDs [Filter_Int_not_empty]) 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   241
qed "Ultrafilter_max_Filter";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   242
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   243
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   244
(*--------------------------------------------------------------------------------
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   245
     This is a very long and tedious proof; need to break it into parts.
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   246
     Have proof that {X. X <= S & (EX f: F. A Int f <= X)} is a filter as 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   247
     a lemma
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   248
--------------------------------------------------------------------------------*)
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   249
Goalw [Ultrafilter_def] 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   250
      "[| F: Filter S; \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   251
\              ALL G: Filter S. F <= G --> F = G |] ==> F : Ultrafilter S";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   252
by (Step_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   253
by (rtac ccontr 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   254
by (forward_tac [mem_FiltersetD RS is_FilterD2] 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   255
by (forw_inst_tac [("x","{X. X <= S & (EX f: F. A Int f <= X)}")] bspec 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   256
by (EVERY1[rtac mem_FiltersetI2, Blast_tac, Asm_full_simp_tac]);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   257
by (blast_tac (claset() addDs [mem_FiltersetD3]) 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   258
by (etac (lemma_set_extend RS exE) 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   259
by (assume_tac 1 THEN etac lemma_set_not_empty 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   260
by (REPEAT(rtac ballI 2) THEN Asm_full_simp_tac 2);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   261
by (rtac conjI 2 THEN Blast_tac 2);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   262
by (REPEAT(etac conjE 2) THEN REPEAT(etac bexE 2));
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   263
by (res_inst_tac [("x","f Int fa")] bexI 2);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   264
by (etac mem_FiltersetD1 3);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   265
by (assume_tac 3 THEN assume_tac 3);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   266
by (Fast_tac 2);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   267
by (EVERY[REPEAT(rtac allI 2), rtac impI 2,Asm_full_simp_tac 2]);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   268
by (EVERY[REPEAT(etac conjE 2), etac bexE 2]);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   269
by (res_inst_tac [("x","f")] bexI 2);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   270
by (rtac subsetI 2);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   271
by (Fast_tac 2 THEN assume_tac 2);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   272
by (Step_tac 2);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   273
by (Blast_tac 3);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   274
by (eres_inst_tac [("c","A")] equalityCE 3);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   275
by (REPEAT(Blast_tac 3));
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   276
by (dres_inst_tac [("A","xa")] mem_FiltersetD3 2 THEN assume_tac 2);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   277
by (Blast_tac 2);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   278
by (dtac lemma_empty_Int_subset_Compl 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   279
by (EVERY1[forward_tac [mem_Filterset_disjI], assume_tac, Fast_tac]);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   280
by (dtac mem_FiltersetD3 1 THEN assume_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   281
by (dres_inst_tac [("x","f")] spec 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   282
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   283
qed "max_Filter_Ultrafilter";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   284
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   285
Goal "(F : Ultrafilter S) = (F: Filter S & (ALL G: Filter S. F <= G --> F = G))";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   286
by (blast_tac (claset() addSIs [Ultrafilter_max_Filter,max_Filter_Ultrafilter]) 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   287
qed "Ultrafilter_iff";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   288
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   289
(*--------------------------------------------------------------------
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   290
             A few properties of freefilters
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   291
 -------------------------------------------------------------------*)
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   292
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   293
Goal "F1 Int F2 = ((F1 Int Y) Int F2) Un ((F2 Int - Y) Int F1)";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   294
by (Auto_tac);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   295
qed "lemma_Compl_cancel_eq";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   296
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   297
Goal "finite X ==> finite (X Int Y)";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   298
by (etac (Int_lower1 RS finite_subset) 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   299
qed "finite_IntI1";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   300
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   301
Goal "finite Y ==> finite (X Int Y)";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   302
by (etac (Int_lower2 RS finite_subset) 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   303
qed "finite_IntI2";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   304
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   305
Goal "[| finite (F1 Int Y); \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   306
\                 finite (F2 Int - Y) \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   307
\              |] ==> finite (F1 Int F2)";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   308
by (res_inst_tac [("Y1","Y")] (lemma_Compl_cancel_eq RS ssubst) 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   309
by (rtac finite_UnI 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   310
by (auto_tac (claset() addSIs [finite_IntI1,finite_IntI2],simpset()));
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   311
qed "finite_Int_Compl_cancel";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   312
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   313
Goal "U: Freefilter S  ==> \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   314
\         ~ (EX f1: U. EX f2: U. finite (f1 Int x) \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   315
\                            & finite (f2 Int (- x)))";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   316
by (Step_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   317
by (forw_inst_tac [("A","f1"),("B","f2")] 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   318
    (Freefilter_Filter RS mem_FiltersetD1) 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   319
by (dres_inst_tac [("x","f1 Int f2")] mem_FreefiltersetD1 3);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   320
by (dtac finite_Int_Compl_cancel 4);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   321
by (Auto_tac);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   322
qed "Freefilter_lemma_not_finite";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   323
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   324
(* the lemmas below follow *)
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   325
Goal "U: Freefilter S ==> \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   326
\          ALL f: U. ~ finite (f Int x) | ~finite (f Int (- x))";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   327
by (blast_tac (claset() addSDs [Freefilter_lemma_not_finite,bspec]) 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   328
qed "Freefilter_Compl_not_finite_disjI";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   329
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   330
Goal "U: Freefilter S ==> \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   331
\          (ALL f: U. ~ finite (f Int x)) | (ALL f:U. ~finite (f Int (- x)))";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   332
by (blast_tac (claset() addSDs [Freefilter_lemma_not_finite,bspec]) 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   333
qed "Freefilter_Compl_not_finite_disjI2";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   334
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   335
Goal "- UNIV = {}";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   336
by (Auto_tac );
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   337
qed "Compl_UNIV_eq";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   338
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   339
Addsimps [Compl_UNIV_eq];
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   340
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   341
Goal "- {} = UNIV";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   342
by (Auto_tac );
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   343
qed "Compl_empty_eq";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   344
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   345
Addsimps [Compl_empty_eq];
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   346
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   347
val [prem] = goal thy "~ finite (UNIV:: 'a set) ==> \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   348
\            {A:: 'a set. finite (- A)} : Filter UNIV";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   349
by (cut_facts_tac [prem] 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   350
by (rtac mem_FiltersetI2 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   351
by (auto_tac (claset(),simpset() addsimps [Compl_Int]));
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   352
by (eres_inst_tac [("c","UNIV")] equalityCE 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   353
by (Auto_tac);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   354
by (etac (Compl_anti_mono RS finite_subset) 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   355
by (assume_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   356
qed "cofinite_Filter";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   357
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   358
Goal "~finite(UNIV :: 'a set) ==> ~finite (X :: 'a set) | ~finite (- X)";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   359
by (dres_inst_tac [("A1","X")] (Compl_partition RS ssubst) 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   360
by (Asm_full_simp_tac 1); 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   361
qed "not_finite_UNIV_disjI";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   362
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   363
Goal "[| ~finite(UNIV :: 'a set); \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   364
\                 finite (X :: 'a set) \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   365
\              |] ==>  ~finite (- X)";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   366
by (dres_inst_tac [("X","X")] not_finite_UNIV_disjI 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   367
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   368
qed "not_finite_UNIV_Compl";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   369
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   370
val [prem] = goal thy "~ finite (UNIV:: 'a set) ==> \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   371
\            !X: {A:: 'a set. finite (- A)}. ~ finite X";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   372
by (cut_facts_tac [prem] 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   373
by (auto_tac (claset() addDs [not_finite_UNIV_disjI],simpset()));
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   374
qed "mem_cofinite_Filter_not_finite";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   375
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   376
val [prem] = goal thy "~ finite (UNIV:: 'a set) ==> \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   377
\            {A:: 'a set. finite (- A)} : Freefilter UNIV";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   378
by (cut_facts_tac [prem] 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   379
by (rtac mem_FreefiltersetI2 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   380
by (rtac cofinite_Filter 1 THEN assume_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   381
by (blast_tac (claset() addSDs [mem_cofinite_Filter_not_finite]) 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   382
qed "cofinite_Freefilter";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   383
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   384
Goal "UNIV - x = - x";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   385
by (Auto_tac);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   386
qed "UNIV_diff_Compl";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   387
Addsimps [UNIV_diff_Compl];
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   388
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   389
Goalw [Ultrafilter_def,FreeUltrafilter_def]
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   390
     "[| ~finite(UNIV :: 'a set); (U :: 'a set set): FreeUltrafilter UNIV\
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   391
\         |] ==> {X. finite(- X)} <= U";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   392
by (forward_tac [cofinite_Filter] 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   393
by (Step_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   394
by (forw_inst_tac [("X","- x :: 'a set")] not_finite_UNIV_Compl 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   395
by (assume_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   396
by (Step_tac 1 THEN Fast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   397
by (dres_inst_tac [("x","x")] bspec 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   398
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   399
by (asm_full_simp_tac (simpset() addsimps [UNIV_diff_Compl]) 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   400
qed "FreeUltrafilter_contains_cofinite_set";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   401
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   402
(*--------------------------------------------------------------------
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   403
   We prove: 1. Existence of maximal filter i.e. ultrafilter
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   404
             2. Freeness property i.e ultrafilter is free
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   405
             Use a locale to prove various lemmas and then 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   406
             export main result- The Ultrafilter Theorem
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   407
 -------------------------------------------------------------------*)
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   408
Open_locale "UFT"; 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   409
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   410
Goalw [chain_def, thm "superfrechet_def", thm "frechet_def"]
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   411
   "!!(c :: 'a set set set). c : chain (superfrechet S) ==>  Union c <= Pow S";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   412
by (Step_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   413
by (dtac subsetD 1 THEN assume_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   414
by (Step_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   415
by (dres_inst_tac [("X","X")] mem_FiltersetD3 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   416
by (Auto_tac);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   417
qed "chain_Un_subset_Pow";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   418
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   419
Goalw [chain_def,Filter_def,is_Filter_def,
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   420
           thm "superfrechet_def", thm "frechet_def"] 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   421
          "!!(c :: 'a set set set). c: chain (superfrechet S) \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   422
\         ==> !x: c. {} < x";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   423
by (blast_tac (claset() addSIs [psubsetI]) 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   424
qed "mem_chain_psubset_empty";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   425
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   426
Goal "!!(c :: 'a set set set). \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   427
\            [| c: chain (superfrechet S);\
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   428
\               c ~= {} \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   429
\            |]\
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   430
\            ==> Union(c) ~= {}";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   431
by (dtac mem_chain_psubset_empty 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   432
by (Step_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   433
by (dtac bspec 1 THEN assume_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   434
by (auto_tac (claset() addDs [Union_upper,bspec],
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   435
    simpset() addsimps [psubset_def]));
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   436
qed "chain_Un_not_empty";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   437
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   438
Goalw [is_Filter_def,Filter_def,chain_def,thm "superfrechet_def"] 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   439
           "!!(c :: 'a set set set). \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   440
\           c : chain (superfrechet S)  \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   441
\           ==> {} ~: Union(c)";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   442
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   443
qed "Filter_empty_not_mem_Un";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   444
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   445
Goal "c: chain (superfrechet S) \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   446
\         ==> ALL u : Union(c). ALL v: Union(c). u Int v : Union(c)";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   447
by (Step_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   448
by (forw_inst_tac [("x","X"),("y","Xa")] chainD 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   449
by (REPEAT(assume_tac 1));
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   450
by (dtac chainD2 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   451
by (etac disjE 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   452
by (res_inst_tac [("X","Xa")] UnionI 1 THEN assume_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   453
by (dres_inst_tac [("A","X")] subsetD 1 THEN assume_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   454
by (dres_inst_tac [("c","Xa")] subsetD 1 THEN assume_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   455
by (res_inst_tac [("X","X")] UnionI 2 THEN assume_tac 2);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   456
by (dres_inst_tac [("A","Xa")] subsetD 2 THEN assume_tac 2);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   457
by (dres_inst_tac [("c","X")] subsetD 2 THEN assume_tac 2);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   458
by (auto_tac (claset() addIs [mem_FiltersetD1], 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   459
     simpset() addsimps [thm "superfrechet_def"]));
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   460
qed "Filter_Un_Int";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   461
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   462
Goal "c: chain (superfrechet S) \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   463
\         ==> ALL u v. u: Union(c) & \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   464
\                 (u :: 'a set) <= v & v <= S --> v: Union(c)";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   465
by (Step_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   466
by (dtac chainD2 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   467
by (dtac subsetD 1 THEN assume_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   468
by (rtac UnionI 1 THEN assume_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   469
by (auto_tac (claset() addIs [mem_FiltersetD2], 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   470
     simpset() addsimps [thm "superfrechet_def"]));
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   471
qed "Filter_Un_subset";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   472
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   473
Goalw [chain_def,thm "superfrechet_def"]
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   474
      "!!(c :: 'a set set set). \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   475
\            [| c: chain (superfrechet S);\
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   476
\               x: c \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   477
\            |] ==> x : Filter S";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   478
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   479
qed "lemma_mem_chain_Filter";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   480
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   481
Goalw [chain_def,thm "superfrechet_def"]
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   482
     "!!(c :: 'a set set set). \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   483
\            [| c: chain (superfrechet S);\
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   484
\               x: c \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   485
\            |] ==> frechet S <= x";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   486
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   487
qed "lemma_mem_chain_frechet_subset";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   488
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   489
Goal "!!(c :: 'a set set set). \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   490
\         [| c ~= {}; \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   491
\            c : chain (superfrechet (UNIV :: 'a set))\
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   492
\         |] ==> Union c : superfrechet (UNIV)";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   493
by (simp_tac (simpset() addsimps 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   494
    [thm "superfrechet_def",thm "frechet_def"]) 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   495
by (Step_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   496
by (rtac mem_FiltersetI2 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   497
by (etac chain_Un_subset_Pow 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   498
by (rtac UnionI 1 THEN assume_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   499
by (etac (lemma_mem_chain_Filter RS mem_FiltersetD4) 1 THEN assume_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   500
by (etac chain_Un_not_empty 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   501
by (etac Filter_empty_not_mem_Un 2);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   502
by (etac Filter_Un_Int 2);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   503
by (etac Filter_Un_subset 2);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   504
by (subgoal_tac "xa : frechet (UNIV)" 2);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   505
by (rtac UnionI 2 THEN assume_tac 2);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   506
by (rtac (lemma_mem_chain_frechet_subset RS subsetD) 2);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   507
by (auto_tac (claset(),simpset() addsimps [thm "frechet_def"]));
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   508
qed "Un_chain_mem_cofinite_Filter_set";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   509
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   510
Goal "EX U: superfrechet (UNIV). \
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   511
\               ALL G: superfrechet (UNIV). U <= G --> U = G";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   512
by (rtac Zorn_Lemma2 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   513
by (cut_facts_tac [thm "not_finite_UNIV" RS cofinite_Filter] 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   514
by (Step_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   515
by (res_inst_tac [("Q","c={}")] (excluded_middle RS disjE) 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   516
by (res_inst_tac [("x","Union c")] bexI 1 THEN Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   517
by (rtac Un_chain_mem_cofinite_Filter_set 1 THEN REPEAT(assume_tac 1));
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   518
by (res_inst_tac [("x","frechet (UNIV)")] bexI 1 THEN Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   519
by (auto_tac (claset(),simpset() addsimps 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   520
        [thm "superfrechet_def", thm "frechet_def"]));
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   521
qed "max_cofinite_Filter_Ex";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   522
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   523
Goal "EX U: superfrechet UNIV. (\
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   524
\               ALL G: superfrechet UNIV. U <= G --> U = G) \ 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   525
\                             & (ALL x: U. ~finite x)";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   526
by (cut_facts_tac [thm "not_finite_UNIV" RS 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   527
         (export max_cofinite_Filter_Ex)] 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   528
by (Step_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   529
by (res_inst_tac [("x","U")] bexI 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   530
by (auto_tac (claset(),simpset() addsimps 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   531
        [thm "superfrechet_def", thm "frechet_def"]));
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   532
by (dres_inst_tac [("c","- x")] subsetD 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   533
by (Asm_simp_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   534
by (forw_inst_tac [("A","x"),("B","- x")] mem_FiltersetD1 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   535
by (dtac Filter_empty_not_mem 3);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   536
by (ALLGOALS(Asm_full_simp_tac ));
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   537
qed "max_cofinite_Freefilter_Ex";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   538
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   539
(*--------------------------------------------------------------------------------
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   540
               There exists a free ultrafilter on any infinite set
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   541
 --------------------------------------------------------------------------------*)
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   542
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   543
Goalw [FreeUltrafilter_def] "EX U. U: FreeUltrafilter (UNIV :: 'a set)";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   544
by (cut_facts_tac [thm "not_finite_UNIV" RS (export max_cofinite_Freefilter_Ex)] 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   545
by (asm_full_simp_tac (simpset() addsimps 
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   546
    [thm "superfrechet_def", Ultrafilter_iff, thm "frechet_def"]) 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   547
by (Step_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   548
by (res_inst_tac [("x","U")] exI 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   549
by (Step_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   550
by (Blast_tac 1);
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   551
qed "FreeUltrafilter_ex";
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   552
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   553
val FreeUltrafilter_Ex  = export FreeUltrafilter_ex;
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   554
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   555
Close_locale();
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   556
11cbf236ca16 Addition of Hyperreal theories Zorn and Filter
paulson
parents:
diff changeset
   557