src/ZF/AC/AC17_AC1.ML
changeset 11380 e76366922751
parent 11317 7f9e4c389318
equal deleted inserted replaced
11379:0c90ffd3f3e2 11380:e76366922751
     1 (*  Title:      ZF/AC/AC17_AC1.ML
     1 (*  Title:      ZF/AC/AC1_AC17.ML
     2     ID:         $Id$
     2     ID:         $Id$
     3     Author:     Krzysztof Grabczewski
     3     Author:     Krzysztof Grabczewski
     4 
     4 
     5 The proof of AC1 ==> AC17
     5 The equivalence of AC0, AC1 and AC17
       
     6 
       
     7 Also, the proofs needed to show that each of AC2, AC3, ..., AC6 is equivalent
       
     8 to AC0 and AC1.
     6 *)
     9 *)
       
    10 
       
    11 
       
    12 (** AC0 is equivalent to AC1.  
       
    13     AC0 comes from Suppes, AC1 from Rubin & Rubin **)
       
    14 
       
    15 Goal "[| f:(\\<Pi>X \\<in> A. X); D \\<subseteq> A |] ==> \\<exists>g. g:(\\<Pi>X \\<in> D. X)";
       
    16 by (fast_tac (claset() addSIs [restrict_type, apply_type]) 1);
       
    17 val lemma1 = result();
       
    18 
       
    19 Goalw AC_defs "AC0 ==> AC1"; 
       
    20 by (blast_tac (claset() addIs [lemma1]) 1); 
       
    21 qed "AC0_AC1";
       
    22 
       
    23 Goalw AC_defs "AC1 ==> AC0";
       
    24 by (Blast_tac 1); 
       
    25 qed "AC1_AC0";
       
    26 
       
    27 
       
    28 (**** The proof of AC1 ==> AC17 ****)
       
    29 
       
    30 Goal "f \\<in> (\\<Pi>X \\<in> Pow(A) - {0}. X) ==> f \\<in> (Pow(A) - {0} -> A)";
       
    31 by (rtac Pi_type 1 THEN (assume_tac 1));
       
    32 by (dtac apply_type 1 THEN (assume_tac 1));
       
    33 by (Fast_tac 1);
       
    34 val lemma1 = result();
       
    35 
       
    36 Goalw AC_defs "AC1 ==> AC17";
       
    37 by (rtac allI 1);
       
    38 by (rtac ballI 1);
       
    39 by (eres_inst_tac [("x","Pow(A)-{0}")] allE 1);
       
    40 by (etac impE 1);
       
    41 by (Fast_tac 1);
       
    42 by (etac exE 1);
       
    43 by (rtac bexI 1);
       
    44 by (etac lemma1 2);
       
    45 by (rtac apply_type 1 THEN (assume_tac 1));
       
    46 by (fast_tac (claset() addSDs [lemma1] addSEs [apply_type]) 1);
       
    47 qed "AC1_AC17";
       
    48 
       
    49 
       
    50 (**** The proof of AC17 ==> AC1 ****)
     7 
    51 
     8 (* *********************************************************************** *)
    52 (* *********************************************************************** *)
     9 (* more properties of HH                                                   *)
    53 (* more properties of HH                                                   *)
    10 (* *********************************************************************** *)
    54 (* *********************************************************************** *)
    11 
    55 
    85 by (assume_tac 1);
   129 by (assume_tac 1);
    86 by (dtac lemma3 1 THEN (assume_tac 1));
   130 by (dtac lemma3 1 THEN (assume_tac 1));
    87 by (fast_tac (claset() addSDs [HH_Least_eq_x RS sym RSN (2, subst_elem),
   131 by (fast_tac (claset() addSDs [HH_Least_eq_x RS sym RSN (2, subst_elem),
    88                 f_subset_imp_HH_subset] addSEs [mem_irrefl]) 1);
   132                 f_subset_imp_HH_subset] addSEs [mem_irrefl]) 1);
    89 qed "AC17_AC1";
   133 qed "AC17_AC1";
       
   134 
       
   135 
       
   136 (* **********************************************************************
       
   137     AC1 ==> AC2 ==> AC1
       
   138     AC1 ==> AC4 ==> AC3 ==> AC1
       
   139     AC4 ==> AC5 ==> AC4
       
   140     AC1 <-> AC6
       
   141 ************************************************************************* *)
       
   142 
       
   143 (* ********************************************************************** *)
       
   144 (* AC1 ==> AC2                                                            *)
       
   145 (* ********************************************************************** *)
       
   146 
       
   147 Goal "[| f:(\\<Pi>X \\<in> A. X);  B \\<in> A;  0\\<notin>A |] ==> {f`B} \\<subseteq> B Int {f`C. C \\<in> A}";
       
   148 by (fast_tac (claset() addSEs [apply_type]) 1);
       
   149 val lemma1 = result();
       
   150 
       
   151 Goalw [pairwise_disjoint_def]
       
   152         "[| pairwise_disjoint(A); B \\<in> A; C \\<in> A; D \\<in> B; D \\<in> C |] ==> f`B = f`C";
       
   153 by (Fast_tac 1);
       
   154 val lemma2 = result();
       
   155 
       
   156 Goalw AC_defs "AC1 ==> AC2"; 
       
   157 by (rtac allI 1);
       
   158 by (rtac impI 1);
       
   159 by (REPEAT (eresolve_tac [asm_rl,conjE,allE,exE,impE] 1));
       
   160 by (REPEAT (resolve_tac [exI,ballI,equalityI] 1));
       
   161 by (rtac lemma1 2 THEN (REPEAT (assume_tac 2)));
       
   162 by (fast_tac (claset() addSEs [lemma2] addEs [apply_type]) 1);
       
   163 qed "AC1_AC2";
       
   164 
       
   165 
       
   166 (* ********************************************************************** *)
       
   167 (* AC2 ==> AC1                                                            *)
       
   168 (* ********************************************************************** *)
       
   169 
       
   170 Goal "0\\<notin>A ==> 0 \\<notin> {B*{B}. B \\<in> A}";
       
   171 by (fast_tac (claset() addSDs [sym RS (Sigma_empty_iff RS iffD1)]) 1);
       
   172 val lemma1 = result();
       
   173 
       
   174 Goal "[| X*{X} Int C = {y}; X \\<in> A |]  \
       
   175 \               ==> (THE y. X*{X} Int C = {y}): X*A";
       
   176 by (rtac subst_elem 1);
       
   177 by (fast_tac (claset() addSIs [the_equality]
       
   178                 addSEs [sym RS trans RS (singleton_eq_iff RS iffD1)]) 2);
       
   179 by (blast_tac (claset() addSEs [equalityE]) 1);
       
   180 val lemma2 = result();
       
   181 
       
   182 Goal "\\<forall>D \\<in> {E*{E}. E \\<in> A}. \\<exists>y. D Int C = {y}  \
       
   183 \     ==> (\\<lambda>x \\<in> A. fst(THE z. (x*{x} Int C = {z}))) \\<in> (\\<Pi>X \\<in> A. X)";
       
   184 by (fast_tac (claset() addSEs [lemma2] 
       
   185                        addSIs [lam_type, RepFunI, fst_type]) 1);
       
   186 val lemma3 = result();
       
   187 
       
   188 Goalw (AC_defs@AC_aux_defs) "AC2 ==> AC1";
       
   189 by (REPEAT (resolve_tac [allI, impI] 1));
       
   190 by (REPEAT (eresolve_tac [allE, impE] 1));
       
   191 by (fast_tac (claset() addSEs [lemma3]) 2);
       
   192 by (fast_tac (claset() addSIs [lemma1, equals0I]) 1);
       
   193 qed "AC2_AC1";
       
   194 
       
   195 
       
   196 (* ********************************************************************** *)
       
   197 (* AC1 ==> AC4                                                            *)
       
   198 (* ********************************************************************** *)
       
   199 
       
   200 Goal "0 \\<notin> {R``{x}. x \\<in> domain(R)}";
       
   201 by (Blast_tac 1);
       
   202 val lemma = result();
       
   203 
       
   204 Goalw AC_defs "AC1 ==> AC4";
       
   205 by (REPEAT (resolve_tac [allI, impI] 1));
       
   206 by (REPEAT (eresolve_tac [allE, lemma RSN (2, impE), exE] 1));
       
   207 by (best_tac (claset() addSIs [lam_type] addSEs [apply_type]) 1);
       
   208 qed "AC1_AC4";
       
   209 
       
   210 
       
   211 (* ********************************************************************** *)
       
   212 (* AC4 ==> AC3                                                            *)
       
   213 (* ********************************************************************** *)
       
   214 
       
   215 Goal "f \\<in> A->B ==> (\\<Union>z \\<in> A. {z}*f`z) \\<subseteq> A*Union(B)";
       
   216 by (fast_tac (claset() addSDs [apply_type]) 1);
       
   217 val lemma1 = result();
       
   218 
       
   219 Goal "domain(\\<Union>z \\<in> A. {z}*f(z)) = {a \\<in> A. f(a)\\<noteq>0}";
       
   220 by (Blast_tac 1);
       
   221 val lemma2 = result();
       
   222 
       
   223 Goal "x \\<in> A ==> (\\<Union>z \\<in> A. {z}*f(z))``{x} = f(x)";
       
   224 by (Fast_tac 1);
       
   225 val lemma3 = result();
       
   226 
       
   227 Goalw AC_defs "AC4 ==> AC3";
       
   228 by (REPEAT (resolve_tac [allI,ballI] 1));
       
   229 by (REPEAT (eresolve_tac [allE,impE] 1));
       
   230 by (etac lemma1 1);
       
   231 by (asm_full_simp_tac (simpset() addsimps [lemma2, lemma3]
       
   232                                  addcongs [Pi_cong]) 1);
       
   233 qed "AC4_AC3";
       
   234 
       
   235 (* ********************************************************************** *)
       
   236 (* AC3 ==> AC1                                                            *)
       
   237 (* ********************************************************************** *)
       
   238 
       
   239 Goal "b\\<notin>A ==> (\\<Pi>x \\<in> {a \\<in> A. id(A)`a\\<noteq>b}. id(A)`x) = (\\<Pi>x \\<in> A. x)";
       
   240 by (asm_full_simp_tac (simpset() addsimps [id_def] addcongs [Pi_cong]) 1);
       
   241 by (res_inst_tac [("b","A")] subst_context 1);
       
   242 by (Fast_tac 1);
       
   243 val lemma = result();
       
   244 
       
   245 Goalw AC_defs "AC3 ==> AC1";
       
   246 by (fast_tac (claset() addSIs [id_type] addEs [lemma RS subst]) 1);
       
   247 qed "AC3_AC1";
       
   248 
       
   249 (* ********************************************************************** *)
       
   250 (* AC4 ==> AC5                                                            *)
       
   251 (* ********************************************************************** *)
       
   252 
       
   253 Goalw (range_def::AC_defs) "AC4 ==> AC5";
       
   254 by (REPEAT (resolve_tac [allI,ballI] 1));
       
   255 by (REPEAT (eresolve_tac [allE,impE] 1));
       
   256 by (eresolve_tac [fun_is_rel RS converse_type] 1);
       
   257 by (etac exE 1);
       
   258 by (rtac bexI 1);
       
   259 by (rtac Pi_type 2 THEN (assume_tac 2));
       
   260 by (fast_tac (claset() addSDs [apply_type]
       
   261         addSEs [fun_is_rel RS converse_type RS subsetD RS SigmaD2]) 2);
       
   262 by (rtac ballI 1);
       
   263 by (rtac apply_equality 1 THEN (assume_tac 2));
       
   264 by (etac domainE 1);
       
   265 by (ftac range_type 1 THEN (assume_tac 1));
       
   266 by (fast_tac (claset() addDs [apply_equality]) 1);
       
   267 qed "AC4_AC5";
       
   268 
       
   269 
       
   270 (* ********************************************************************** *)
       
   271 (* AC5 ==> AC4, Rubin & Rubin, p. 11                                      *)
       
   272 (* ********************************************************************** *)
       
   273 
       
   274 Goal "R \\<subseteq> A*B ==> (\\<lambda>x \\<in> R. fst(x)) \\<in> R -> A";
       
   275 by (fast_tac (claset() addSIs [lam_type, fst_type]) 1);
       
   276 val lemma1 = result();
       
   277 
       
   278 Goalw [range_def] "R \\<subseteq> A*B ==> range(\\<lambda>x \\<in> R. fst(x)) = domain(R)";
       
   279 by (force_tac (claset() addIs [lamI RS subst_elem] addSEs [lamE], 
       
   280 	       simpset()) 1);
       
   281 val lemma2 = result();
       
   282 
       
   283 Goal "[| \\<exists>f \\<in> A->C. P(f,domain(f)); A=B |] ==>  \\<exists>f \\<in> B->C. P(f,B)";
       
   284 by (etac bexE 1);
       
   285 by (ftac domain_of_fun 1);
       
   286 by (Fast_tac 1);
       
   287 val lemma3 = result();
       
   288 
       
   289 Goal "[| R \\<subseteq> A*B; g \\<in> C->R; \\<forall>x \\<in> C. (\\<lambda>z \\<in> R. fst(z))` (g`x) = x |] \
       
   290 \               ==> (\\<lambda>x \\<in> C. snd(g`x)): (\\<Pi>x \\<in> C. R``{x})";
       
   291 by (rtac lam_type 1);
       
   292 by (force_tac (claset() addDs [apply_type], simpset()) 1);
       
   293 val lemma4 = result();
       
   294 
       
   295 Goalw AC_defs "AC5 ==> AC4";
       
   296 by (Clarify_tac 1);
       
   297 by (REPEAT (eresolve_tac [allE,ballE] 1));
       
   298 by (eresolve_tac [lemma1 RSN (2, notE)] 2 THEN (assume_tac 2));
       
   299 by (dresolve_tac [lemma2 RSN (2, lemma3)] 1 THEN (assume_tac 1));
       
   300 by (fast_tac (claset() addSEs [lemma4]) 1);
       
   301 qed "AC5_AC4";
       
   302 
       
   303 
       
   304 (* ********************************************************************** *)
       
   305 (* AC1 <-> AC6                                                            *)
       
   306 (* ********************************************************************** *)
       
   307 
       
   308 Goalw AC_defs "AC1 <-> AC6";
       
   309 by (Blast_tac 1);
       
   310 qed "AC1_iff_AC6";