src/ZF/Cardinal.ML
changeset 760 f0200e91b272
parent 571 0b03ce5b62f7
child 765 06a484afc603
--- a/src/ZF/Cardinal.ML	Wed Dec 07 12:34:47 1994 +0100
+++ b/src/ZF/Cardinal.ML	Wed Dec 07 13:12:04 1994 +0100
@@ -17,7 +17,7 @@
 goal Cardinal.thy "bnd_mono(X, %W. X - g``(Y - f``W))";
 by (rtac bnd_monoI 1);
 by (REPEAT (ares_tac [Diff_subset, subset_refl, Diff_mono, image_mono] 1));
-val decomp_bnd_mono = result();
+qed "decomp_bnd_mono";
 
 val [gfun] = goal Cardinal.thy
     "g: Y->X ==>   					\
@@ -27,7 +27,7 @@
      (decomp_bnd_mono RS lfp_Tarski RS ssubst) 1);
 by (simp_tac (ZF_ss addsimps [subset_refl, double_complement,
 			     gfun RS fun_is_rel RS image_subset]) 1);
-val Banach_last_equation = result();
+qed "Banach_last_equation";
 
 val prems = goal Cardinal.thy
     "[| f: X->Y;  g: Y->X |] ==>   \
@@ -39,7 +39,7 @@
      (resolve_tac [refl, exI, conjI, Diff_disjoint, Diff_partition])));
 by (rtac Banach_last_equation 3);
 by (REPEAT (resolve_tac (prems@[fun_is_rel, image_subset, lfp_subset]) 1));
-val decomposition = result();
+qed "decomposition";
 
 val prems = goal Cardinal.thy
     "[| f: inj(X,Y);  g: inj(Y,X) |] ==> EX h. h: bij(X,Y)";
@@ -49,7 +49,7 @@
                     addIs [bij_converse_bij]) 1);
 (* The instantiation of exI to "restrict(f,XA) Un converse(restrict(g,YB))"
    is forced by the context!! *)
-val schroeder_bernstein = result();
+qed "schroeder_bernstein";
 
 
 (** Equipollence is an equivalence relation **)
@@ -57,35 +57,35 @@
 goalw Cardinal.thy [eqpoll_def] "X eqpoll X";
 by (rtac exI 1);
 by (rtac id_bij 1);
-val eqpoll_refl = result();
+qed "eqpoll_refl";
 
 goalw Cardinal.thy [eqpoll_def] "!!X Y. X eqpoll Y ==> Y eqpoll X";
 by (fast_tac (ZF_cs addIs [bij_converse_bij]) 1);
-val eqpoll_sym = result();
+qed "eqpoll_sym";
 
 goalw Cardinal.thy [eqpoll_def]
     "!!X Y. [| X eqpoll Y;  Y eqpoll Z |] ==> X eqpoll Z";
 by (fast_tac (ZF_cs addIs [comp_bij]) 1);
-val eqpoll_trans = result();
+qed "eqpoll_trans";
 
 (** Le-pollence is a partial ordering **)
 
 goalw Cardinal.thy [lepoll_def] "!!X Y. X<=Y ==> X lepoll Y";
 by (rtac exI 1);
 by (etac id_subset_inj 1);
-val subset_imp_lepoll = result();
+qed "subset_imp_lepoll";
 
 val lepoll_refl = subset_refl RS subset_imp_lepoll;
 
 goalw Cardinal.thy [eqpoll_def, bij_def, lepoll_def]
     "!!X Y. X eqpoll Y ==> X lepoll Y";
 by (fast_tac ZF_cs 1);
-val eqpoll_imp_lepoll = result();
+qed "eqpoll_imp_lepoll";
 
 goalw Cardinal.thy [lepoll_def]
     "!!X Y. [| X lepoll Y;  Y lepoll Z |] ==> X lepoll Z";
 by (fast_tac (ZF_cs addIs [comp_inj]) 1);
-val lepoll_trans = result();
+qed "lepoll_trans";
 
 (*Asymmetry law*)
 goalw Cardinal.thy [lepoll_def,eqpoll_def]
@@ -93,17 +93,17 @@
 by (REPEAT (etac exE 1));
 by (rtac schroeder_bernstein 1);
 by (REPEAT (assume_tac 1));
-val eqpollI = result();
+qed "eqpollI";
 
 val [major,minor] = goal Cardinal.thy
     "[| X eqpoll Y; [| X lepoll Y; Y lepoll X |] ==> P |] ==> P";
 by (rtac minor 1);
 by (REPEAT (resolve_tac [major, eqpoll_imp_lepoll, eqpoll_sym] 1));
-val eqpollE = result();
+qed "eqpollE";
 
 goal Cardinal.thy "X eqpoll Y <-> X lepoll Y & Y lepoll X";
 by (fast_tac (ZF_cs addIs [eqpollI] addSEs [eqpollE]) 1);
-val eqpoll_iff = result();
+qed "eqpoll_iff";
 
 
 (** LEAST -- the least number operator [from HOL/Univ.ML] **)
@@ -115,7 +115,7 @@
 by (REPEAT (etac conjE 1));
 by (etac (premOrd RS Ord_linear_lt) 1);
 by (ALLGOALS (fast_tac (ZF_cs addSIs [premP] addSDs [premNot])));
-val Least_equality = result();
+qed "Least_equality";
 
 goal Cardinal.thy "!!i. [| P(i);  Ord(i) |] ==> P(LEAST x.P(x))";
 by (etac rev_mp 1);
@@ -125,7 +125,7 @@
 by (EVERY1 [rtac (Least_equality RS ssubst), assume_tac, assume_tac]);
 by (assume_tac 2);
 by (fast_tac (ZF_cs addSEs [ltE]) 1);
-val LeastI = result();
+qed "LeastI";
 
 (*Proof is almost identical to the one above!*)
 goal Cardinal.thy "!!i. [| P(i);  Ord(i) |] ==> (LEAST x.P(x)) le i";
@@ -136,20 +136,20 @@
 by (EVERY1 [rtac (Least_equality RS ssubst), assume_tac, assume_tac]);
 by (etac le_refl 2);
 by (fast_tac (ZF_cs addEs [ltE, lt_trans1] addIs [leI, ltI]) 1);
-val Least_le = result();
+qed "Least_le";
 
 (*LEAST really is the smallest*)
 goal Cardinal.thy "!!i. [| P(i);  i < (LEAST x.P(x)) |] ==> Q";
 by (rtac (Least_le RSN (2,lt_trans2) RS lt_irrefl) 1);
 by (REPEAT (eresolve_tac [asm_rl, ltE] 1));
-val less_LeastE = result();
+qed "less_LeastE";
 
 (*If there is no such P then LEAST is vacuously 0*)
 goalw Cardinal.thy [Least_def]
     "!!P. [| ~ (EX i. Ord(i) & P(i)) |] ==> (LEAST x.P(x)) = 0";
 by (rtac the_0 1);
 by (fast_tac ZF_cs 1);
-val Least_0 = result();
+qed "Least_0";
 
 goal Cardinal.thy "Ord(LEAST x.P(x))";
 by (excluded_middle_tac "EX i. Ord(i) & P(i)" 1);
@@ -158,7 +158,7 @@
 by (REPEAT_SOME assume_tac);
 by (etac (Least_0 RS ssubst) 1);
 by (rtac Ord_0 1);
-val Ord_Least = result();
+qed "Ord_Least";
 
 
 (** Basic properties of cardinals **)
@@ -167,13 +167,13 @@
 val prems = goal Cardinal.thy
     "[| !!y. P(y) <-> Q(y) |] ==> (LEAST x.P(x)) = (LEAST x.Q(x))";
 by (simp_tac (FOL_ss addsimps prems) 1);
-val Least_cong = result();
+qed "Least_cong";
 
 (*Need AC to prove   X lepoll Y ==> |X| le |Y| ; see well_ord_lepoll_imp_le  *)
 goalw Cardinal.thy [eqpoll_def,cardinal_def] "!!X Y. X eqpoll Y ==> |X| = |Y|";
 by (rtac Least_cong 1);
 by (fast_tac (ZF_cs addEs [comp_bij,bij_converse_bij]) 1);
-val cardinal_cong = result();
+qed "cardinal_cong";
 
 (*Under AC, the premise becomes trivial; one consequence is ||A|| = |A|*)
 goalw Cardinal.thy [eqpoll_def, cardinal_def]
@@ -182,7 +182,7 @@
 by (etac Ord_ordertype 2);
 by (rtac exI 1);
 by (etac (ordermap_bij RS bij_converse_bij) 1);
-val well_ord_cardinal_eqpoll = result();
+qed "well_ord_cardinal_eqpoll";
 
 val Ord_cardinal_eqpoll = well_ord_Memrel RS well_ord_cardinal_eqpoll 
                           |> standard;
@@ -192,38 +192,38 @@
 by (rtac (eqpoll_sym RS eqpoll_trans) 1);
 by (etac well_ord_cardinal_eqpoll 1);
 by (asm_simp_tac (ZF_ss addsimps [well_ord_cardinal_eqpoll]) 1);
-val well_ord_cardinal_eqE = result();
+qed "well_ord_cardinal_eqE";
 
 
 (** Observations from Kunen, page 28 **)
 
 goalw Cardinal.thy [cardinal_def] "!!i. Ord(i) ==> |i| le i";
 by (etac (eqpoll_refl RS Least_le) 1);
-val Ord_cardinal_le = result();
+qed "Ord_cardinal_le";
 
 goalw Cardinal.thy [Card_def] "!!K. Card(K) ==> |K| = K";
 by (etac sym 1);
-val Card_cardinal_eq = result();
+qed "Card_cardinal_eq";
 
 val prems = goalw Cardinal.thy [Card_def,cardinal_def]
     "[| Ord(i);  !!j. j<i ==> ~(j eqpoll i) |] ==> Card(i)";
 by (rtac (Least_equality RS ssubst) 1);
 by (REPEAT (ares_tac ([refl,eqpoll_refl]@prems) 1));
-val CardI = result();
+qed "CardI";
 
 goalw Cardinal.thy [Card_def, cardinal_def] "!!i. Card(i) ==> Ord(i)";
 by (etac ssubst 1);
 by (rtac Ord_Least 1);
-val Card_is_Ord = result();
+qed "Card_is_Ord";
 
 goalw Cardinal.thy [cardinal_def] "Ord(|A|)";
 by (rtac Ord_Least 1);
-val Ord_cardinal = result();
+qed "Ord_cardinal";
 
 goal Cardinal.thy "Card(0)";
 by (rtac (Ord_0 RS CardI) 1);
 by (fast_tac (ZF_cs addSEs [ltE]) 1);
-val Card_0 = result();
+qed "Card_0";
 
 val [premK,premL] = goal Cardinal.thy
     "[| Card(K);  Card(L) |] ==> Card(K Un L)";
@@ -232,7 +232,7 @@
     (ZF_ss addsimps [premL, le_imp_subset, subset_Un_iff RS iffD1]) 1);
 by (asm_simp_tac
     (ZF_ss addsimps [premK, le_imp_subset, subset_Un_iff2 RS iffD1]) 1);
-val Card_Un = result();
+qed "Card_Un";
 
 (*Infinite unions of cardinals?  See Devlin, Lemma 6.7, page 98*)
 
@@ -245,7 +245,7 @@
 by (assume_tac 2);
 by (etac eqpoll_trans 1);
 by (REPEAT (ares_tac [LeastI] 1));
-val Card_cardinal = result();
+qed "Card_cardinal";
 
 (*Kunen's Lemma 10.5*)
 goal Cardinal.thy "!!i j. [| |i| le j;  j le i |] ==> |j| = |i|";
@@ -256,7 +256,7 @@
 by (rtac (eqpoll_sym RS eqpoll_imp_lepoll) 1);
 by (rtac Ord_cardinal_eqpoll 1);
 by (REPEAT (eresolve_tac [ltE, Ord_succD] 1));
-val cardinal_eq_lemma = result();
+qed "cardinal_eq_lemma";
 
 goal Cardinal.thy "!!i j. i le j ==> |i| le |j|";
 by (res_inst_tac [("i","|i|"),("j","|j|")] Ord_linear_le 1);
@@ -266,7 +266,7 @@
 by (etac le_trans 1);
 by (etac ltE 1);
 by (etac Ord_cardinal_le 1);
-val cardinal_mono = result();
+qed "cardinal_mono";
 
 (*Since we have |succ(nat)| le |nat|, the converse of cardinal_mono fails!*)
 goal Cardinal.thy "!!i j. [| |i| < |j|;  Ord(i);  Ord(j) |] ==> i < j";
@@ -274,22 +274,22 @@
 by (REPEAT_SOME assume_tac);
 by (etac (lt_trans2 RS lt_irrefl) 1);
 by (etac cardinal_mono 1);
-val cardinal_lt_imp_lt = result();
+qed "cardinal_lt_imp_lt";
 
 goal Cardinal.thy "!!i j. [| |i| < K;  Ord(i);  Card(K) |] ==> i < K";
 by (asm_simp_tac (ZF_ss addsimps 
 		  [cardinal_lt_imp_lt, Card_is_Ord, Card_cardinal_eq]) 1);
-val Card_lt_imp_lt = result();
+qed "Card_lt_imp_lt";
 
 goal Cardinal.thy "!!i j. [| Ord(i);  Card(K) |] ==> (|i| < K) <-> (i < K)";
 by (fast_tac (ZF_cs addEs [Card_lt_imp_lt, Ord_cardinal_le RS lt_trans1]) 1);
-val Card_lt_iff = result();
+qed "Card_lt_iff";
 
 goal Cardinal.thy "!!i j. [| Ord(i);  Card(K) |] ==> (K le |i|) <-> (K le i)";
 by (asm_simp_tac (ZF_ss addsimps 
 		  [Card_lt_iff, Card_is_Ord, Ord_cardinal, 
 		   not_lt_iff_le RS iff_sym]) 1);
-val Card_le_iff = result();
+qed "Card_le_iff";
 
 
 (** The swap operator [NOT USED] **)
@@ -297,18 +297,18 @@
 goalw Cardinal.thy [swap_def]
     "!!A. [| x:A;  y:A |] ==> swap(A,x,y) : A->A";
 by (REPEAT (ares_tac [lam_type,if_type] 1));
-val swap_type = result();
+qed "swap_type";
 
 goalw Cardinal.thy [swap_def]
     "!!A. [| x:A;  y:A;  z:A |] ==> swap(A,x,y)`(swap(A,x,y)`z) = z";
 by (asm_simp_tac (ZF_ss setloop split_tac [expand_if]) 1);
-val swap_swap_identity = result();
+qed "swap_swap_identity";
 
 goal Cardinal.thy "!!A. [| x:A;  y:A |] ==> swap(A,x,y) : bij(A,A)";
 by (rtac nilpotent_imp_bijective 1);
 by (REPEAT (ares_tac [swap_type, comp_eq_id_iff RS iffD2,
 		      ballI, swap_swap_identity] 1));
-val swap_bij = result();
+qed "swap_bij";
 
 (*** The finite cardinals ***)
 
@@ -326,7 +326,7 @@
 (*Adding  prem  earlier would cause the simplifier to loop*)
 by (cut_facts_tac [prem] 1);
 by (fast_tac (ZF_cs addSEs [mem_irrefl]) 1);
-val inj_succ_succD = result();
+qed "inj_succ_succD";
 
 val [prem] = goalw Cardinal.thy [lepoll_def]
     "m:nat ==> ALL n: nat. m lepoll n --> m le n";
@@ -336,7 +336,7 @@
 by (eres_inst_tac [("n","n")] natE 1);
 by (asm_simp_tac (ZF_ss addsimps [inj_def, succI1 RS Pi_empty2]) 1);
 by (fast_tac (ZF_cs addSIs [succ_leI] addSDs [inj_succ_succD]) 1);
-val nat_lepoll_imp_le_lemma = result();
+qed "nat_lepoll_imp_le_lemma";
 val nat_lepoll_imp_le = nat_lepoll_imp_le_lemma RS bspec RS mp |> standard;
 
 goal Cardinal.thy
@@ -345,7 +345,7 @@
 by (asm_simp_tac (ZF_ss addsimps [eqpoll_refl]) 2);
 by (fast_tac (ZF_cs addIs [nat_lepoll_imp_le, le_anti_sym] 
                     addSEs [eqpollE]) 1);
-val nat_eqpoll_iff = result();
+qed "nat_eqpoll_iff";
 
 goalw Cardinal.thy [Card_def,cardinal_def]
     "!!n. n: nat ==> Card(n)";
@@ -353,13 +353,13 @@
 by (REPEAT_FIRST (ares_tac [eqpoll_refl, nat_into_Ord, refl]));
 by (asm_simp_tac (ZF_ss addsimps [lt_nat_in_nat RS nat_eqpoll_iff]) 1);
 by (fast_tac (ZF_cs addSEs [lt_irrefl]) 1);
-val nat_into_Card = result();
+qed "nat_into_Card";
 
 (*Part of Kunen's Lemma 10.6*)
 goal Cardinal.thy "!!n. [| succ(n) lepoll n;  n:nat |] ==> P";
 by (rtac (nat_lepoll_imp_le RS lt_irrefl) 1);
 by (REPEAT (ares_tac [nat_succI] 1));
-val succ_lepoll_natE = result();
+qed "succ_lepoll_natE";
 
 
 (*** The first infinite cardinal: Omega, or nat ***)
@@ -371,7 +371,7 @@
 by (rtac lepoll_trans 1 THEN assume_tac 2);
 by (etac ltE 1);
 by (REPEAT (ares_tac [Ord_succ_subsetI RS subset_imp_lepoll] 1));
-val lt_not_lepoll = result();
+qed "lt_not_lepoll";
 
 goal Cardinal.thy "!!i n. [| Ord(i);  n:nat |] ==> i eqpoll n <-> i=n";
 by (rtac iffI 1);
@@ -382,20 +382,20 @@
     REPEAT (assume_tac 1));
 by (rtac (lt_not_lepoll RS notE) 1 THEN (REPEAT (assume_tac 1)));
 by (etac eqpoll_imp_lepoll 1);
-val Ord_nat_eqpoll_iff = result();
+qed "Ord_nat_eqpoll_iff";
 
 goalw Cardinal.thy [Card_def,cardinal_def] "Card(nat)";
 by (rtac (Least_equality RS ssubst) 1);
 by (REPEAT_FIRST (ares_tac [eqpoll_refl, Ord_nat, refl]));
 by (etac ltE 1);
 by (asm_simp_tac (ZF_ss addsimps [eqpoll_iff, lt_not_lepoll, ltI]) 1);
-val Card_nat = result();
+qed "Card_nat";
 
 (*Allows showing that |i| is a limit cardinal*)
 goal Cardinal.thy  "!!i. nat le i ==> nat le |i|";
 by (rtac (Card_nat RS Card_cardinal_eq RS subst) 1);
 by (etac cardinal_mono 1);
-val nat_le_cardinal = result();
+qed "nat_le_cardinal";
 
 
 (*** Towards Cardinal Arithmetic ***)
@@ -421,18 +421,18 @@
                         setloop etac consE') 1);
 by (asm_simp_tac (ZF_ss addsimps [inj_is_fun RS apply_type, left_inverse]
                         setloop etac consE') 1);
-val cons_lepoll_cong = result();
+qed "cons_lepoll_cong";
 
 goal Cardinal.thy
     "!!A B. [| A eqpoll B;  a ~: A;  b ~: B |] ==> cons(a,A) eqpoll cons(b,B)";
 by (asm_full_simp_tac (ZF_ss addsimps [eqpoll_iff, cons_lepoll_cong]) 1);
-val cons_eqpoll_cong = result();
+qed "cons_eqpoll_cong";
 
 (*Congruence law for  succ  under equipollence*)
 goalw Cardinal.thy [succ_def]
     "!!A B. A eqpoll B ==> succ(A) eqpoll succ(B)";
 by (REPEAT (ares_tac [cons_eqpoll_cong, mem_not_refl] 1));
-val succ_eqpoll_cong = result();
+qed "succ_eqpoll_cong";
 
 (*Congruence law for + under equipollence*)
 goalw Cardinal.thy [eqpoll_def]
@@ -444,7 +444,7 @@
     lam_bijective 1);
 by (safe_tac (ZF_cs addSEs [sumE]));
 by (ALLGOALS (asm_simp_tac bij_inverse_ss));
-val sum_eqpoll_cong = result();
+qed "sum_eqpoll_cong";
 
 (*Congruence law for * under equipollence*)
 goalw Cardinal.thy [eqpoll_def]
@@ -456,7 +456,7 @@
     lam_bijective 1);
 by (safe_tac ZF_cs);
 by (ALLGOALS (asm_simp_tac bij_inverse_ss));
-val prod_eqpoll_cong = result();
+qed "prod_eqpoll_cong";
 
 goalw Cardinal.thy [eqpoll_def]
     "!!f. [| f: inj(A,B);  A Int B = 0 |] ==> A Un (B - range(f)) eqpoll B";
@@ -474,4 +474,4 @@
     (ZF_ss addsimps [inj_converse_fun RS apply_funtype, right_inverse]
            setloop split_tac [expand_if]) 1);
 by (fast_tac (ZF_cs addEs [equals0D]) 1);
-val inj_disjoint_eqpoll = result();
+qed "inj_disjoint_eqpoll";