src/HOLCF/Ssum3.ML
changeset 3842 b55686a7b22c
parent 2640 ee4dfce170a0
child 4098 71e05eb27fb6
equal deleted inserted replaced
3841:22bbc1676768 3842:b55686a7b22c
   154 (* ------------------------------------------------------------------------ *)
   154 (* ------------------------------------------------------------------------ *)
   155 (* first 5 ugly lemmas                                                      *)
   155 (* first 5 ugly lemmas                                                      *)
   156 (* ------------------------------------------------------------------------ *)
   156 (* ------------------------------------------------------------------------ *)
   157 
   157 
   158 qed_goal "ssum_lemma9" Ssum3.thy 
   158 qed_goal "ssum_lemma9" Ssum3.thy 
   159 "[| is_chain(Y); lub(range(Y)) = Isinl(x)|] ==> !i.? x.Y(i)=Isinl(x)"
   159 "[| is_chain(Y); lub(range(Y)) = Isinl(x)|] ==> !i.? x. Y(i)=Isinl(x)"
   160  (fn prems =>
   160  (fn prems =>
   161         [
   161         [
   162         (cut_facts_tac prems 1),
   162         (cut_facts_tac prems 1),
   163         (strip_tac 1),
   163         (strip_tac 1),
   164         (res_inst_tac [("p","Y(i)")] IssumE 1),
   164         (res_inst_tac [("p","Y(i)")] IssumE 1),
   172         (etac is_ub_thelub 1)
   172         (etac is_ub_thelub 1)
   173         ]);
   173         ]);
   174 
   174 
   175 
   175 
   176 qed_goal "ssum_lemma10" Ssum3.thy 
   176 qed_goal "ssum_lemma10" Ssum3.thy 
   177 "[| is_chain(Y); lub(range(Y)) = Isinr(x)|] ==> !i.? x.Y(i)=Isinr(x)"
   177 "[| is_chain(Y); lub(range(Y)) = Isinr(x)|] ==> !i.? x. Y(i)=Isinr(x)"
   178  (fn prems =>
   178  (fn prems =>
   179         [
   179         [
   180         (cut_facts_tac prems 1),
   180         (cut_facts_tac prems 1),
   181         (strip_tac 1),
   181         (strip_tac 1),
   182         (res_inst_tac [("p","Y(i)")] IssumE 1),
   182         (res_inst_tac [("p","Y(i)")] IssumE 1),
   613         (asm_simp_tac (Ssum0_ss addsimps [cont_Isinl]) 1)
   613         (asm_simp_tac (Ssum0_ss addsimps [cont_Isinl]) 1)
   614         ]);
   614         ]);
   615 
   615 
   616 qed_goalw "thelub_ssum2b" Ssum3.thy [sinl_def,sinr_def,sswhen_def] 
   616 qed_goalw "thelub_ssum2b" Ssum3.thy [sinl_def,sinr_def,sswhen_def] 
   617 "[| is_chain(Y); !i.? x. Y(i) = sinr`x |] ==>\ 
   617 "[| is_chain(Y); !i.? x. Y(i) = sinr`x |] ==>\ 
   618 \   lub(range(Y)) = sinr`(lub(range(%i. sswhen`(LAM y. UU)`(LAM x.x)`(Y i))))"
   618 \   lub(range(Y)) = sinr`(lub(range(%i. sswhen`(LAM y. UU)`(LAM x. x)`(Y i))))"
   619  (fn prems =>
   619  (fn prems =>
   620         [
   620         [
   621         (cut_facts_tac prems 1),
   621         (cut_facts_tac prems 1),
   622         (stac beta_cfun 1),
   622         (stac beta_cfun 1),
   623 	tac,
   623 	tac,
   639         [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2,
   639         [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2,
   640         cont_Iwhen3]) 1)
   640         cont_Iwhen3]) 1)
   641         ]);
   641         ]);
   642 
   642 
   643 qed_goalw "thelub_ssum2a_rev" Ssum3.thy [sinl_def,sinr_def] 
   643 qed_goalw "thelub_ssum2a_rev" Ssum3.thy [sinl_def,sinr_def] 
   644         "[| is_chain(Y); lub(range(Y)) = sinl`x|] ==> !i.? x.Y(i)=sinl`x"
   644         "[| is_chain(Y); lub(range(Y)) = sinl`x|] ==> !i.? x. Y(i)=sinl`x"
   645  (fn prems =>
   645  (fn prems =>
   646         [
   646         [
   647         (cut_facts_tac prems 1),
   647         (cut_facts_tac prems 1),
   648         (asm_simp_tac (Ssum0_ss addsimps 
   648         (asm_simp_tac (Ssum0_ss addsimps 
   649         [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2,
   649         [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2,
   653         [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2,
   653         [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2,
   654         cont_Iwhen3]) 1)
   654         cont_Iwhen3]) 1)
   655         ]);
   655         ]);
   656 
   656 
   657 qed_goalw "thelub_ssum2b_rev" Ssum3.thy [sinl_def,sinr_def] 
   657 qed_goalw "thelub_ssum2b_rev" Ssum3.thy [sinl_def,sinr_def] 
   658         "[| is_chain(Y); lub(range(Y)) = sinr`x|] ==> !i.? x.Y(i)=sinr`x"
   658         "[| is_chain(Y); lub(range(Y)) = sinr`x|] ==> !i.? x. Y(i)=sinr`x"
   659  (fn prems =>
   659  (fn prems =>
   660         [
   660         [
   661         (cut_facts_tac prems 1),
   661         (cut_facts_tac prems 1),
   662         (asm_simp_tac (Ssum0_ss addsimps 
   662         (asm_simp_tac (Ssum0_ss addsimps 
   663         [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2,
   663         [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2,
   668         cont_Iwhen3]) 1)
   668         cont_Iwhen3]) 1)
   669         ]);
   669         ]);
   670 
   670 
   671 qed_goal "thelub_ssum3" Ssum3.thy  
   671 qed_goal "thelub_ssum3" Ssum3.thy  
   672 "is_chain(Y) ==>\ 
   672 "is_chain(Y) ==>\ 
   673 \   lub(range(Y)) = sinl`(lub(range(%i. sswhen`(LAM x. x)`(LAM y.UU)`(Y i))))\
   673 \   lub(range(Y)) = sinl`(lub(range(%i. sswhen`(LAM x. x)`(LAM y. UU)`(Y i))))\
   674 \ | lub(range(Y)) = sinr`(lub(range(%i. sswhen`(LAM y. UU)`(LAM x.x)`(Y i))))"
   674 \ | lub(range(Y)) = sinr`(lub(range(%i. sswhen`(LAM y. UU)`(LAM x. x)`(Y i))))"
   675  (fn prems =>
   675  (fn prems =>
   676         [
   676         [
   677         (cut_facts_tac prems 1),
   677         (cut_facts_tac prems 1),
   678         (rtac (ssum_chainE RS disjE) 1),
   678         (rtac (ssum_chainE RS disjE) 1),
   679         (atac 1),
   679         (atac 1),