src/HOLCF/Cprod3.ML
changeset 1267 bca91b4e1710
parent 1168 74be52691d62
child 1274 ea0668a1c0ba
equal deleted inserted replaced
1266:3ae9fe3c0f68 1267:bca91b4e1710
    25 	(rtac (monofun_fst RS ch2ch_monofun) 1),
    25 	(rtac (monofun_fst RS ch2ch_monofun) 1),
    26 	(rtac ch2ch_fun 1),
    26 	(rtac ch2ch_fun 1),
    27 	(rtac (monofun_pair1 RS ch2ch_monofun) 1),
    27 	(rtac (monofun_pair1 RS ch2ch_monofun) 1),
    28 	(atac 1),
    28 	(atac 1),
    29 	(rtac allI 1),
    29 	(rtac allI 1),
    30 	(simp_tac prod_ss 1),
    30 	(Simp_tac 1),
    31 	(rtac sym 1),
    31 	(rtac sym 1),
    32 	(simp_tac prod_ss 1),
    32 	(Simp_tac 1),
    33 	(rtac (lub_const RS thelubI) 1)
    33 	(rtac (lub_const RS thelubI) 1)
    34 	]);
    34 	]);
    35 
    35 
    36 qed_goal "contlub_pair1" Cprod3.thy "contlub(Pair)"
    36 qed_goal "contlub_pair1" Cprod3.thy "contlub(Pair)"
    37  (fn prems =>
    37  (fn prems =>
    56  (fn prems =>
    56  (fn prems =>
    57 	[
    57 	[
    58 	(cut_facts_tac prems 1),
    58 	(cut_facts_tac prems 1),
    59 	(res_inst_tac [("f1","Pair")] (arg_cong RS cong) 1),
    59 	(res_inst_tac [("f1","Pair")] (arg_cong RS cong) 1),
    60 	(rtac sym 1),
    60 	(rtac sym 1),
    61 	(simp_tac prod_ss 1),
    61 	(Simp_tac 1),
    62 	(rtac (lub_const RS thelubI) 1),
    62 	(rtac (lub_const RS thelubI) 1),
    63 	(rtac lub_equal 1),
    63 	(rtac lub_equal 1),
    64 	(atac 1),
    64 	(atac 1),
    65 	(rtac (monofun_snd RS ch2ch_monofun) 1),
    65 	(rtac (monofun_snd RS ch2ch_monofun) 1),
    66 	(rtac (monofun_pair2 RS ch2ch_monofun) 1),
    66 	(rtac (monofun_pair2 RS ch2ch_monofun) 1),
    67 	(atac 1),
    67 	(atac 1),
    68 	(rtac allI 1),
    68 	(rtac allI 1),
    69 	(simp_tac prod_ss 1)
    69 	(Simp_tac 1)
    70 	]);
    70 	]);
    71 
    71 
    72 qed_goal "contlub_pair2" Cprod3.thy "contlub(Pair(x))"
    72 qed_goal "contlub_pair2" Cprod3.thy "contlub(Pair(x))"
    73  (fn prems =>
    73  (fn prems =>
    74 	[
    74 	[
   101 	[
   101 	[
   102 	(rtac contlubI 1),
   102 	(rtac contlubI 1),
   103 	(strip_tac 1),
   103 	(strip_tac 1),
   104 	(rtac (lub_cprod RS thelubI RS ssubst) 1),
   104 	(rtac (lub_cprod RS thelubI RS ssubst) 1),
   105 	(atac 1),
   105 	(atac 1),
   106 	(simp_tac prod_ss 1)
   106 	(Simp_tac 1)
   107 	]);
   107 	]);
   108 
   108 
   109 qed_goal "contlub_snd" Cprod3.thy "contlub(snd)"
   109 qed_goal "contlub_snd" Cprod3.thy "contlub(snd)"
   110  (fn prems =>
   110  (fn prems =>
   111 	[
   111 	[
   112 	(rtac contlubI 1),
   112 	(rtac contlubI 1),
   113 	(strip_tac 1),
   113 	(strip_tac 1),
   114 	(rtac (lub_cprod RS thelubI RS ssubst) 1),
   114 	(rtac (lub_cprod RS thelubI RS ssubst) 1),
   115 	(atac 1),
   115 	(atac 1),
   116 	(simp_tac prod_ss 1)
   116 	(Simp_tac 1)
   117 	]);
   117 	]);
   118 
   118 
   119 qed_goal "cont_fst" Cprod3.thy "cont(fst)"
   119 qed_goal "cont_fst" Cprod3.thy "cont(fst)"
   120 (fn prems =>
   120 (fn prems =>
   121 	[
   121 	[
   212 	[
   212 	[
   213 	(cut_facts_tac prems 1),
   213 	(cut_facts_tac prems 1),
   214 	(rtac (beta_cfun_cprod RS ssubst) 1),
   214 	(rtac (beta_cfun_cprod RS ssubst) 1),
   215 	(rtac (beta_cfun RS ssubst) 1),
   215 	(rtac (beta_cfun RS ssubst) 1),
   216 	(rtac cont_fst 1),
   216 	(rtac cont_fst 1),
   217 	(simp_tac prod_ss  1)
   217 	(Simp_tac  1)
   218 	]);
   218 	]);
   219 
   219 
   220 qed_goalw "csnd2" Cprod3.thy [csnd_def,cpair_def] 
   220 qed_goalw "csnd2" Cprod3.thy [csnd_def,cpair_def] 
   221 	"csnd`<x,y>=y"
   221 	"csnd`<x,y>=y"
   222  (fn prems =>
   222  (fn prems =>
   223 	[
   223 	[
   224 	(cut_facts_tac prems 1),
   224 	(cut_facts_tac prems 1),
   225 	(rtac (beta_cfun_cprod RS ssubst) 1),
   225 	(rtac (beta_cfun_cprod RS ssubst) 1),
   226 	(rtac (beta_cfun RS ssubst) 1),
   226 	(rtac (beta_cfun RS ssubst) 1),
   227 	(rtac cont_snd 1),
   227 	(rtac cont_snd 1),
   228 	(simp_tac prod_ss  1)
   228 	(Simp_tac  1)
   229 	]);
   229 	]);
   230 
   230 
   231 qed_goalw "surjective_pairing_Cprod2" Cprod3.thy 
   231 qed_goalw "surjective_pairing_Cprod2" Cprod3.thy 
   232 	[cfst_def,csnd_def,cpair_def] "<cfst`p , csnd`p> = p"
   232 	[cfst_def,csnd_def,cpair_def] "<cfst`p , csnd`p> = p"
   233  (fn prems =>
   233  (fn prems =>
   293 	"csplit`f`<x,y> = f`x`y"
   293 	"csplit`f`<x,y> = f`x`y"
   294  (fn prems =>
   294  (fn prems =>
   295 	[
   295 	[
   296 	(rtac (beta_cfun RS ssubst) 1),
   296 	(rtac (beta_cfun RS ssubst) 1),
   297 	(cont_tacR 1),
   297 	(cont_tacR 1),
   298 	(simp_tac Cfun_ss 1),
   298 	(Simp_tac 1),
   299 	(simp_tac (Cfun_ss addsimps [cfst2,csnd2]) 1)
   299 	(simp_tac (!simpset addsimps [cfst2,csnd2]) 1)
   300 	]);
   300 	]);
   301 
   301 
   302 qed_goalw "csplit3" Cprod3.thy [csplit_def]
   302 qed_goalw "csplit3" Cprod3.thy [csplit_def]
   303   "csplit`cpair`z=z"
   303   "csplit`cpair`z=z"
   304  (fn prems =>
   304  (fn prems =>
   305 	[
   305 	[
   306 	(rtac (beta_cfun RS ssubst) 1),
   306 	(rtac (beta_cfun RS ssubst) 1),
   307 	(cont_tacR 1),
   307 	(cont_tacR 1),
   308 	(simp_tac (Cfun_ss addsimps [surjective_pairing_Cprod2]) 1)
   308 	(simp_tac (!simpset addsimps [surjective_pairing_Cprod2]) 1)
   309 	]);
   309 	]);
   310 
   310 
   311 (* ------------------------------------------------------------------------ *)
   311 (* ------------------------------------------------------------------------ *)
   312 (* install simplifier for Cprod                                             *)
   312 (* install simplifier for Cprod                                             *)
   313 (* ------------------------------------------------------------------------ *)
   313 (* ------------------------------------------------------------------------ *)
   314 
   314 
   315 val Cprod_rews = [cfst2,csnd2,csplit2];
   315 Addsimps [cfst2,csnd2,csplit2];
   316 
   316 
   317 val Cprod_ss = Cfun_ss addsimps Cprod_rews;
       
   318