src/ZF/AC/HH.ML
author wenzelm
Mon, 22 Oct 2001 17:58:11 +0200
changeset 11879 1a386a1e002c
parent 11317 7f9e4c389318
permissions -rw-r--r--
javac -depend;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
     1
(*  Title:      ZF/AC/HH.ML
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
     2
    ID:         $Id$
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
     3
    Author:     Krzysztof Grabczewski
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
     4
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
     5
Some properties of the recursive definition of HH used in the proofs of
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
     6
  AC17 ==> AC1
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
     7
  AC1 ==> WO2
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
     8
  AC15 ==> WO6
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
     9
*)
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    10
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    11
(* ********************************************************************** *)
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
    12
(* Lemmas useful in each of the three proofs                              *)
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    13
(* ********************************************************************** *)
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    14
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4091
diff changeset
    15
Goal "HH(f,x,a) =  \
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
    16
\       (let z = x - (\\<Union>b \\<in> a. HH(f,x,b))  \
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
    17
\       in  if(f`z \\<in> Pow(z)-{0}, f`z, {x}))";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    18
by (resolve_tac [HH_def RS def_transrec RS trans] 1);
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1461
diff changeset
    19
by (Simp_tac 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2496
diff changeset
    20
qed "HH_def_satisfies_eq";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    21
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
    22
Goal "HH(f,x,a) \\<in> Pow(x)-{0} | HH(f,x,a)={x}";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    23
by (resolve_tac [HH_def_satisfies_eq RS ssubst] 1);
5137
60205b0de9b9 Huge tidy-up: removal of leading \!\!
paulson
parents: 5116
diff changeset
    24
by (simp_tac (simpset() addsimps [Let_def, Diff_subset RS PowI]) 1);
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1461
diff changeset
    25
by (Fast_tac 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2496
diff changeset
    26
qed "HH_values";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    27
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
    28
Goal "B \\<subseteq> A ==> X-(\\<Union>a \\<in> A. P(a)) = X-(\\<Union>a \\<in> A-B. P(a))-(\\<Union>b \\<in> B. P(b))";
2496
40efb87985b5 Removal of needless "addIs [equality]", etc.
paulson
parents: 2493
diff changeset
    29
by (Fast_tac 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2496
diff changeset
    30
qed "subset_imp_Diff_eq";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    31
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
    32
Goal "[| c \\<in> a-b; b<a |] ==> c=b | b<c & c<a";
1207
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1200
diff changeset
    33
by (etac ltE 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2496
diff changeset
    34
by (dtac Ord_linear 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
    35
by (fast_tac (claset() addSIs [ltI] addIs [Ord_in_Ord]) 2);
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
    36
by (fast_tac (claset() addEs [Ord_in_Ord]) 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2496
diff changeset
    37
qed "Ord_DiffE";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    38
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
    39
val prems = goal thy "(!!y. y \\<in> A ==> P(y) = {x}) ==> x - (\\<Union>y \\<in> A. P(y)) = x";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
    40
by (asm_full_simp_tac (simpset() addsimps prems) 1);
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
    41
by (fast_tac (claset() addSDs [prem] addSEs [mem_irrefl]) 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2496
diff changeset
    42
qed "Diff_UN_eq_self";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    43
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
    44
Goal "x - (\\<Union>b \\<in> a. HH(f,x,b)) = x - (\\<Union>b \\<in> a1. HH(f,x,b))  \
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
    45
\               ==> HH(f,x,a) = HH(f,x,a1)";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    46
by (resolve_tac [HH_def_satisfies_eq RS
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
    47
                (HH_def_satisfies_eq RS sym RSN (3, trans RS trans))] 1);
1207
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1200
diff changeset
    48
by (etac subst_context 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2496
diff changeset
    49
qed "HH_eq";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    50
5137
60205b0de9b9 Huge tidy-up: removal of leading \!\!
paulson
parents: 5116
diff changeset
    51
Goal "[| HH(f,x,b)={x}; b<a |] ==> HH(f,x,a)={x}";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    52
by (res_inst_tac [("P","b<a")] impE 1 THEN REPEAT (assume_tac 2));
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    53
by (eresolve_tac [lt_Ord2 RS trans_induct] 1);
1207
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1200
diff changeset
    54
by (rtac impI 1);
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    55
by (resolve_tac [HH_eq RS trans] 1 THEN (assume_tac 2));
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    56
by (resolve_tac [leI RS le_imp_subset RS subset_imp_Diff_eq RS ssubst] 1
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
    57
        THEN (assume_tac 1));
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    58
by (res_inst_tac [("t","%z. z-?X")] subst_context 1);
1207
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1200
diff changeset
    59
by (rtac Diff_UN_eq_self 1);
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1200
diff changeset
    60
by (dtac Ord_DiffE 1 THEN (assume_tac 1));
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
    61
by (fast_tac (claset() addEs [ltE]) 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2496
diff changeset
    62
qed "HH_is_x_gt_too";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    63
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
    64
Goal "[| HH(f,x,a) \\<in> Pow(x)-{0}; b<a |] ==> HH(f,x,b) \\<in> Pow(x)-{0}";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    65
by (resolve_tac [HH_values RS disjE] 1 THEN (assume_tac 1));
1207
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1200
diff changeset
    66
by (dtac HH_is_x_gt_too 1 THEN (assume_tac 1));
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1200
diff changeset
    67
by (dtac subst 1 THEN (assume_tac 1));
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
    68
by (fast_tac (claset() addSEs [mem_irrefl]) 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2496
diff changeset
    69
qed "HH_subset_x_lt_too";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    70
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
    71
Goal "HH(f,x,a) \\<in> Pow(x)-{0}   \
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
    72
\               ==> HH(f,x,a) \\<in> Pow(x - (\\<Union>b \\<in> a. HH(f,x,b)))-{0}";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    73
by (dresolve_tac [HH_def_satisfies_eq RS subst] 1);
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    74
by (resolve_tac [HH_def_satisfies_eq RS ssubst] 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
    75
by (asm_full_simp_tac (simpset() addsimps [Let_def, Diff_subset RS PowI]) 1);
5116
8eb343ab5748 Renamed expand_if to split_if and setloop split_tac to addsplits,
paulson
parents: 5068
diff changeset
    76
by (dresolve_tac [split_if RS iffD1] 1);
5137
60205b0de9b9 Huge tidy-up: removal of leading \!\!
paulson
parents: 5116
diff changeset
    77
by (Simp_tac 1);
1200
d4551b1a6da7 Many small changes to make proofs run faster
lcp
parents: 1196
diff changeset
    78
by (fast_tac (subset_cs addSEs [mem_irrefl]) 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2496
diff changeset
    79
qed "HH_subset_x_imp_subset_Diff_UN";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    80
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
    81
Goal "[| HH(f,x,v)=HH(f,x,w); HH(f,x,v): Pow(x)-{0}; v \\<in> w |] ==> P";
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
    82
by (forw_inst_tac [("P","%y. y \\<in> Pow(x)-{0}")] subst 1 THEN (assume_tac 1));
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    83
by (dres_inst_tac [("a","w")] HH_subset_x_imp_subset_Diff_UN 1);
1207
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1200
diff changeset
    84
by (dtac subst_elem 1 THEN (assume_tac 1));
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
    85
by (fast_tac (claset() addSIs [singleton_iff RS iffD2, equals0I]) 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2496
diff changeset
    86
qed "HH_eq_arg_lt";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    87
5137
60205b0de9b9 Huge tidy-up: removal of leading \!\!
paulson
parents: 5116
diff changeset
    88
Goal "[| HH(f,x,v)=HH(f,x,w); HH(f,x,w): Pow(x)-{0};  \
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
    89
\               Ord(v); Ord(w) |] ==> v=w";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    90
by (res_inst_tac [("j","w")] Ord_linear_lt 1 THEN TRYALL assume_tac);
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    91
by (resolve_tac [sym RS (ltD RSN (3, HH_eq_arg_lt))] 2
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
    92
        THEN REPEAT (assume_tac 2));
1207
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1200
diff changeset
    93
by (dtac subst_elem 1 THEN (assume_tac 1));
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    94
by (fast_tac (FOL_cs addDs [ltD] addSEs [HH_eq_arg_lt]) 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2496
diff changeset
    95
qed "HH_eq_imp_arg_eq";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    96
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4091
diff changeset
    97
Goalw [lepoll_def, inj_def]
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
    98
        "[| HH(f, x, i) \\<in> Pow(x)-{0}; Ord(i) |] ==> i lepoll Pow(x)-{0}";
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
    99
by (res_inst_tac [("x","\\<lambda>j \\<in> i. HH(f, x, j)")] exI 1);
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1461
diff changeset
   100
by (Asm_simp_tac 1);
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   101
by (fast_tac (FOL_cs addSEs [HH_eq_imp_arg_eq, Ord_in_Ord, HH_subset_x_lt_too]
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
   102
                addSIs [lam_type, ballI, ltI] addIs [bexI]) 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2496
diff changeset
   103
qed "HH_subset_x_imp_lepoll";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   104
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4091
diff changeset
   105
Goal "HH(f, x, Hartog(Pow(x)-{0})) = {x}";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   106
by (resolve_tac [HH_values RS disjE] 1 THEN (assume_tac 2));
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   107
by (fast_tac (FOL_cs addSDs [HH_subset_x_imp_lepoll]
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
   108
                addSIs [Ord_Hartog] addSEs [HartogE]) 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2496
diff changeset
   109
qed "HH_Hartog_is_x";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   110
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4091
diff changeset
   111
Goal "HH(f, x, LEAST i. HH(f, x, i) = {x}) = {x}";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
   112
by (fast_tac (claset() addSIs [Ord_Hartog, HH_Hartog_is_x, LeastI]) 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2496
diff changeset
   113
qed "HH_Least_eq_x";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   114
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
   115
Goal "a \\<in> (LEAST i. HH(f,x,i)={x}) ==> HH(f,x,a) \\<in> Pow(x)-{0}";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   116
by (resolve_tac [HH_values RS disjE] 1 THEN (assume_tac 1));
1207
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1200
diff changeset
   117
by (rtac less_LeastE 1);
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   118
by (eresolve_tac [Ord_Least RSN (2, ltI)] 2);
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   119
by (assume_tac 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2496
diff changeset
   120
qed "less_Least_subset_x";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   121
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   122
(* ********************************************************************** *)
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
   123
(* Lemmas used in the proofs of AC1 ==> WO2 and AC17 ==> AC1              *)
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   124
(* ********************************************************************** *)
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   125
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4091
diff changeset
   126
Goalw [inj_def]
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
   127
        "(\\<lambda>a \\<in> (LEAST i. HH(f,x,i)={x}). HH(f,x,a))  \
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
   128
\        \\<in> inj(LEAST i. HH(f,x,i)={x}, Pow(x)-{0})";
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1461
diff changeset
   129
by (Asm_full_simp_tac 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
   130
by (fast_tac (claset()  addSIs [lam_type] addDs [less_Least_subset_x]
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
   131
                addSEs [HH_eq_imp_arg_eq, Ord_Least RS Ord_in_Ord]) 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2496
diff changeset
   132
qed "lam_Least_HH_inj_Pow";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   133
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
   134
Goal "\\<forall>a \\<in> (LEAST i. HH(f,x,i)={x}). \\<exists>z \\<in> x. HH(f,x,a) = {z}  \
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
   135
\               ==> (\\<lambda>a \\<in> (LEAST i. HH(f,x,i)={x}). HH(f,x,a))  \
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
   136
\                       \\<in> inj(LEAST i. HH(f,x,i)={x}, {{y}. y \\<in> x})";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   137
by (resolve_tac [lam_Least_HH_inj_Pow RS inj_strengthen_type] 1);
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1461
diff changeset
   138
by (Asm_full_simp_tac 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2496
diff changeset
   139
qed "lam_Least_HH_inj";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   140
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4091
diff changeset
   141
Goalw [surj_def]
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
   142
        "[| x - (\\<Union>a \\<in> A. F(a)) = 0;  \
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
   143
\               \\<forall>a \\<in> A. \\<exists>z \\<in> x. F(a) = {z} |]  \
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
   144
\               ==> (\\<lambda>a \\<in> A. F(a)) \\<in> surj(A, {{y}. y \\<in> x})";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
   145
by (asm_full_simp_tac (simpset() addsimps [lam_type, Diff_eq_0_iff]) 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2496
diff changeset
   146
by Safe_tac;
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1461
diff changeset
   147
by (set_mp_tac 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
   148
by (deepen_tac (claset() addSIs [bexI] addSEs [equalityE]) 4 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2496
diff changeset
   149
qed "lam_surj_sing";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   150
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
   151
Goal "y \\<in> Pow(x)-{0} ==> x \\<noteq> 0";
5241
e5129172cb2b Renamed equals0D to equals0E; tidied
paulson
parents: 5147
diff changeset
   152
by Auto_tac;
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2496
diff changeset
   153
qed "not_emptyI2";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   154
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
   155
Goal "f`(x - (\\<Union>j \\<in> i. HH(f,x,j))): Pow(x - (\\<Union>j \\<in> i. HH(f,x,j)))-{0}  \
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
   156
\       ==> HH(f, x, i) \\<in> Pow(x) - {0}";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   157
by (resolve_tac [HH_def_satisfies_eq RS ssubst] 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
   158
by (asm_full_simp_tac (simpset() addsimps [Let_def, Diff_subset RS PowI,
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
   159
                not_emptyI2 RS if_P]) 1);
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1461
diff changeset
   160
by (Fast_tac 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2496
diff changeset
   161
qed "f_subset_imp_HH_subset";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   162
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
   163
val [prem] = goal thy "(!!z. z \\<in> Pow(x)-{0} ==> f`z \\<in> Pow(z)-{0}) ==>  \
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
   164
\       x - (\\<Union>j \\<in> (LEAST i. HH(f,x,i)={x}). HH(f,x,j)) = 0";
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
   165
by (excluded_middle_tac "?P \\<in> {0}" 1);
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1461
diff changeset
   166
by (Fast_tac 2);
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   167
by (dresolve_tac [Diff_subset RS PowI RS DiffI RS prem RS
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
   168
                f_subset_imp_HH_subset] 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
   169
by (fast_tac (claset() addSDs [HH_Least_eq_x RS sym RSN (2, subst_elem)]
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
   170
                addSEs [mem_irrefl]) 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2496
diff changeset
   171
qed "f_subsets_imp_UN_HH_eq_x";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   172
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
   173
Goal "HH(f,x,i)=f`(x - (\\<Union>j \\<in> i. HH(f,x,j))) | HH(f,x,i)={x}";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   174
by (resolve_tac [HH_def_satisfies_eq RS ssubst] 1);
5137
60205b0de9b9 Huge tidy-up: removal of leading \!\!
paulson
parents: 5116
diff changeset
   175
by (simp_tac (simpset() addsimps [Let_def, Diff_subset RS PowI]) 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2496
diff changeset
   176
qed "HH_values2";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   177
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
   178
Goal "HH(f,x,i): Pow(x)-{0} ==> HH(f,x,i)=f`(x - (\\<Union>j \\<in> i. HH(f,x,j)))";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   179
by (resolve_tac [HH_values2 RS disjE] 1 THEN (assume_tac 1));
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
   180
by (fast_tac (claset() addSEs [equalityE, mem_irrefl]
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1207
diff changeset
   181
        addSDs [singleton_subsetD]) 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2496
diff changeset
   182
qed "HH_subset_imp_eq";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   183
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
   184
Goal "[| f \\<in> (Pow(x)-{0}) -> {{z}. z \\<in> x};  \
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
   185
\       a \\<in> (LEAST i. HH(f,x,i)={x}) |] ==> \\<exists>z \\<in> x. HH(f,x,a) = {z}";
1207
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1200
diff changeset
   186
by (dtac less_Least_subset_x 1);
7499
23e090051cb8 isatool expandshort;
wenzelm
parents: 5268
diff changeset
   187
by (ftac HH_subset_imp_eq 1);
1207
3f460842e919 Ran expandshort and changed spelling of Grabczewski
lcp
parents: 1200
diff changeset
   188
by (dtac apply_type 1);
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   189
by (resolve_tac [Diff_subset RS PowI RS DiffI] 1);
2493
bdeb5024353a Removal of sum_cs and eq_cs
paulson
parents: 2469
diff changeset
   190
by (fast_tac 
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
   191
    (claset() addSDs [HH_subset_x_imp_subset_Diff_UN RS not_emptyI2]) 1);
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
   192
by (fast_tac (claset() addss (simpset())) 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2496
diff changeset
   193
qed "f_sing_imp_HH_sing";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   194
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4091
diff changeset
   195
Goalw [bij_def] 
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
   196
        "[| x - (\\<Union>j \\<in> (LEAST i. HH(f,x,i)={x}). HH(f,x,j)) = 0;  \
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
   197
\       f \\<in> (Pow(x)-{0}) -> {{z}. z \\<in> x} |]  \
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
   198
\       ==> (\\<lambda>a \\<in> (LEAST i. HH(f,x,i)={x}). HH(f,x,a))  \
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
   199
\                       \\<in> bij(LEAST i. HH(f,x,i)={x}, {{y}. y \\<in> x})";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
   200
by (fast_tac (claset() addSIs [lam_Least_HH_inj, lam_surj_sing,
2493
bdeb5024353a Removal of sum_cs and eq_cs
paulson
parents: 2469
diff changeset
   201
                              f_sing_imp_HH_sing]) 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2496
diff changeset
   202
qed "f_sing_lam_bij";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   203
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
   204
Goal "f \\<in> (\\<Pi>X \\<in> Pow(x)-{0}. F(X))  \
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
   205
\       ==> (\\<lambda>X \\<in> Pow(x)-{0}. {f`X}) \\<in> (\\<Pi>X \\<in> Pow(x)-{0}. {{z}. z \\<in> F(X)})";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   206
by (fast_tac (FOL_cs addSIs [lam_type, RepFun_eqI, singleton_eq_iff RS iffD2]
2493
bdeb5024353a Removal of sum_cs and eq_cs
paulson
parents: 2469
diff changeset
   207
                     addDs [apply_type]) 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2496
diff changeset
   208
qed "lam_singI";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
   209
2493
bdeb5024353a Removal of sum_cs and eq_cs
paulson
parents: 2469
diff changeset
   210
val bij_Least_HH_x = 
bdeb5024353a Removal of sum_cs and eq_cs
paulson
parents: 2469
diff changeset
   211
    (lam_singI RSN (2, [f_sing_lam_bij, lam_sing_bij RS bij_converse_bij]
bdeb5024353a Removal of sum_cs and eq_cs
paulson
parents: 2469
diff changeset
   212
                    MRS comp_bij)) |> standard;