equal
deleted
inserted
replaced
13 (fn _=> [ (resolve_tac [extension RS iff_trans] 1), |
13 (fn _=> [ (resolve_tac [extension RS iff_trans] 1), |
14 (fast_tac upair_cs 1) ]); |
14 (fast_tac upair_cs 1) ]); |
15 |
15 |
16 val Pair_iff = prove_goalw ZF.thy [Pair_def] |
16 val Pair_iff = prove_goalw ZF.thy [Pair_def] |
17 "<a,b> = <c,d> <-> a=c & b=d" |
17 "<a,b> = <c,d> <-> a=c & b=d" |
18 (fn _=> [ (SIMP_TAC (FOL_ss addrews [doubleton_iff]) 1), |
18 (fn _=> [ (simp_tac (FOL_ss addsimps [doubleton_iff]) 1), |
19 (fast_tac FOL_cs 1) ]); |
19 (fast_tac FOL_cs 1) ]); |
20 |
20 |
21 val Pair_inject = standard (Pair_iff RS iffD1 RS conjE); |
21 val Pair_inject = standard (Pair_iff RS iffD1 RS conjE); |
22 |
22 |
23 val Pair_inject1 = prove_goal ZF.thy "<a,b> = <c,d> ==> a=c" |
23 val Pair_inject1 = prove_goal ZF.thy "<a,b> = <c,d> ==> a=c" |
87 (rtac (major RS SigmaD2) 1) ]); |
87 (rtac (major RS SigmaD2) 1) ]); |
88 |
88 |
89 val Sigma_cong = prove_goalw ZF.thy [Sigma_def] |
89 val Sigma_cong = prove_goalw ZF.thy [Sigma_def] |
90 "[| A=A'; !!x. x:A' ==> B(x)=B'(x) |] ==> \ |
90 "[| A=A'; !!x. x:A' ==> B(x)=B'(x) |] ==> \ |
91 \ Sigma(A,B) = Sigma(A',B')" |
91 \ Sigma(A,B) = Sigma(A',B')" |
92 (fn prems=> [ (prove_cong_tac (prems@[RepFun_cong]) 1) ]); |
92 (fn prems=> [ (simp_tac (FOL_ss addsimps prems addcongs [RepFun_cong]) 1) ]); |
93 |
93 |
94 val Sigma_empty1 = prove_goal ZF.thy "Sigma(0,B) = 0" |
94 val Sigma_empty1 = prove_goal ZF.thy "Sigma(0,B) = 0" |
95 (fn _ => [ (fast_tac (lemmas_cs addIs [equalityI] addSEs [SigmaE]) 1) ]); |
95 (fn _ => [ (fast_tac (lemmas_cs addIs [equalityI] addSEs [SigmaE]) 1) ]); |
96 |
96 |
97 val Sigma_empty2 = prove_goal ZF.thy "A*0 = 0" |
97 val Sigma_empty2 = prove_goal ZF.thy "A*0 = 0" |
111 \ |] ==> split(%x y.c(x,y), p) : C(p)" |
111 \ |] ==> split(%x y.c(x,y), p) : C(p)" |
112 (fn major::prems=> |
112 (fn major::prems=> |
113 [ (rtac (major RS SigmaE) 1), |
113 [ (rtac (major RS SigmaE) 1), |
114 (etac ssubst 1), |
114 (etac ssubst 1), |
115 (REPEAT (ares_tac (prems @ [split RS ssubst]) 1)) ]); |
115 (REPEAT (ares_tac (prems @ [split RS ssubst]) 1)) ]); |
116 |
|
117 (*This congruence rule uses NO typing information...*) |
|
118 val split_cong = prove_goalw ZF.thy [split_def] |
|
119 "[| p=p'; !!x y.c(x,y) = c'(x,y) |] ==> \ |
|
120 \ split(%x y.c(x,y), p) = split(%x y.c'(x,y), p')" |
|
121 (fn prems=> [ (prove_cong_tac (prems@[the_cong]) 1) ]); |
|
122 |
|
123 |
116 |
124 (*** conversions for fst and snd ***) |
117 (*** conversions for fst and snd ***) |
125 |
118 |
126 val fst_conv = prove_goalw ZF.thy [fst_def] "fst(<a,b>) = a" |
119 val fst_conv = prove_goalw ZF.thy [fst_def] "fst(<a,b>) = a" |
127 (fn _=> [ (rtac split 1) ]); |
120 (fn _=> [ (rtac split 1) ]); |