18 (* lemmas concerning FOL and pure ZF theory *) |
18 (* lemmas concerning FOL and pure ZF theory *) |
19 (* ********************************************************************** *) |
19 (* ********************************************************************** *) |
20 |
20 |
21 (* used only in WO1_DC.ML *) |
21 (* used only in WO1_DC.ML *) |
22 (*Note simpler proof*) |
22 (*Note simpler proof*) |
23 Goal "[| ALL x:A. f`x=g`x; f:Df->Cf; g:Dg->Cg; A<=Df; A<=Dg |] ==> f``A=g``A"; |
23 Goal "[| \\<forall>x \\<in> A. f`x=g`x; f \\<in> Df->Cf; g \\<in> Dg->Cg; A \\<subseteq> Df; A \\<subseteq> Dg |] ==> f``A=g``A"; |
24 by (asm_simp_tac (simpset() addsimps [image_fun]) 1); |
24 by (asm_simp_tac (simpset() addsimps [image_fun]) 1); |
25 qed "images_eq"; |
25 qed "images_eq"; |
26 |
26 |
27 (* used in : AC10-AC15.ML AC16WO4.ML WO6WO1.ML *) |
27 (* used in \\<in> AC10-AC15.ML AC16WO4.ML WO6WO1.ML *) |
28 (*I don't know where to put this one.*) |
28 (*I don't know where to put this one.*) |
29 goal Cardinal.thy |
29 goal Cardinal.thy |
30 "!!m A B. [| A lepoll succ(m); B<=A; B~=0 |] ==> A-B lepoll m"; |
30 "!!m A B. [| A lepoll succ(m); B \\<subseteq> A; B\\<noteq>0 |] ==> A-B lepoll m"; |
31 by (rtac not_emptyE 1 THEN (assume_tac 1)); |
31 by (rtac not_emptyE 1 THEN (assume_tac 1)); |
32 by (ftac singleton_subsetI 1); |
32 by (ftac singleton_subsetI 1); |
33 by (ftac subsetD 1 THEN (assume_tac 1)); |
33 by (ftac subsetD 1 THEN (assume_tac 1)); |
34 by (res_inst_tac [("A2","A")] |
34 by (res_inst_tac [("A2","A")] |
35 (Diff_sing_lepoll RSN (2, subset_imp_lepoll RS lepoll_trans)) 1 |
35 (Diff_sing_lepoll RSN (2, subset_imp_lepoll RS lepoll_trans)) 1 |
72 |
72 |
73 Goal "(THE z. {x}={z}) = x"; |
73 Goal "(THE z. {x}={z}) = x"; |
74 by (fast_tac (claset() addSEs [singleton_eq_iff RS iffD1 RS sym]) 1); |
74 by (fast_tac (claset() addSEs [singleton_eq_iff RS iffD1 RS sym]) 1); |
75 qed "the_element"; |
75 qed "the_element"; |
76 |
76 |
77 Goal "(lam x:A. {x}) : bij(A, {{x}. x:A})"; |
77 Goal "(\\<lambda>x \\<in> A. {x}) \\<in> bij(A, {{x}. x \\<in> A})"; |
78 by (res_inst_tac [("d","%z. THE x. z={x}")] lam_bijective 1); |
78 by (res_inst_tac [("d","%z. THE x. z={x}")] lam_bijective 1); |
79 by (TRYALL (eresolve_tac [RepFunI, RepFunE])); |
79 by (TRYALL (eresolve_tac [RepFunI, RepFunE])); |
80 by (REPEAT (asm_full_simp_tac (simpset() addsimps [the_element]) 1)); |
80 by (REPEAT (asm_full_simp_tac (simpset() addsimps [the_element]) 1)); |
81 qed "lam_sing_bij"; |
81 qed "lam_sing_bij"; |
82 |
82 |
83 val [major, minor] = Goalw [inj_def] |
83 val [major, minor] = Goalw [inj_def] |
84 "[| f:inj(A, B); !!a. a:A ==> f`a : C |] ==> f:inj(A,C)"; |
84 "[| f \\<in> inj(A, B); !!a. a \\<in> A ==> f`a \\<in> C |] ==> f \\<in> inj(A,C)"; |
85 by (fast_tac (claset() addSEs [minor] |
85 by (fast_tac (claset() addSEs [minor] |
86 addSIs [major RS CollectD1 RS Pi_type, major RS CollectD2]) 1); |
86 addSIs [major RS CollectD1 RS Pi_type, major RS CollectD2]) 1); |
87 qed "inj_strengthen_type"; |
87 qed "inj_strengthen_type"; |
88 |
88 |
89 Goalw [Finite_def] "~Finite(nat)"; |
89 Goalw [Finite_def] "~Finite(nat)"; |
92 qed "nat_not_Finite"; |
92 qed "nat_not_Finite"; |
93 |
93 |
94 val le_imp_lepoll = le_imp_subset RS subset_imp_lepoll; |
94 val le_imp_lepoll = le_imp_subset RS subset_imp_lepoll; |
95 |
95 |
96 (* ********************************************************************** *) |
96 (* ********************************************************************** *) |
97 (* Another elimination rule for EX! *) |
97 (* Another elimination rule for \\<exists>! *) |
98 (* ********************************************************************** *) |
98 (* ********************************************************************** *) |
99 |
99 |
100 Goal "[| EX! x. P(x); P(x); P(y) |] ==> x=y"; |
100 Goal "[| \\<exists>! x. P(x); P(x); P(y) |] ==> x=y"; |
101 by (etac ex1E 1); |
101 by (etac ex1E 1); |
102 by (res_inst_tac [("b","xa")] (sym RSN (2, trans)) 1); |
102 by (res_inst_tac [("b","xa")] (sym RSN (2, trans)) 1); |
103 by (Fast_tac 1); |
103 by (Fast_tac 1); |
104 by (Fast_tac 1); |
104 by (Fast_tac 1); |
105 qed "ex1_two_eq"; |
105 qed "ex1_two_eq"; |
106 |
106 |
107 (* ********************************************************************** *) |
107 (* ********************************************************************** *) |
108 (* image of a surjection *) |
108 (* image of a surjection *) |
109 (* ********************************************************************** *) |
109 (* ********************************************************************** *) |
110 |
110 |
111 Goalw [surj_def] "f : surj(A, B) ==> f``A = B"; |
111 Goalw [surj_def] "f \\<in> surj(A, B) ==> f``A = B"; |
112 by (etac CollectE 1); |
112 by (etac CollectE 1); |
113 by (resolve_tac [subset_refl RSN (2, image_fun) RS ssubst] 1 |
113 by (resolve_tac [subset_refl RSN (2, image_fun) RS ssubst] 1 |
114 THEN (assume_tac 1)); |
114 THEN (assume_tac 1)); |
115 by (fast_tac (claset() addSEs [apply_type] addIs [equalityI]) 1); |
115 by (fast_tac (claset() addSEs [apply_type] addIs [equalityI]) 1); |
116 qed "surj_image_eq"; |
116 qed "surj_image_eq"; |
117 |
117 |
118 |
118 |
119 Goal "succ(x) lepoll y ==> y ~= 0"; |
119 Goal "succ(x) lepoll y ==> y \\<noteq> 0"; |
120 by (fast_tac (claset() addSDs [lepoll_0_is_0]) 1); |
120 by (fast_tac (claset() addSDs [lepoll_0_is_0]) 1); |
121 qed "succ_lepoll_imp_not_empty"; |
121 qed "succ_lepoll_imp_not_empty"; |
122 |
122 |
123 Goal "x eqpoll succ(n) ==> x ~= 0"; |
123 Goal "x eqpoll succ(n) ==> x \\<noteq> 0"; |
124 by (fast_tac (claset() addSEs [eqpoll_sym RS eqpoll_0_is_0 RS succ_neq_0]) 1); |
124 by (fast_tac (claset() addSEs [eqpoll_sym RS eqpoll_0_is_0 RS succ_neq_0]) 1); |
125 qed "eqpoll_succ_imp_not_empty"; |
125 qed "eqpoll_succ_imp_not_empty"; |
126 |
126 |