src/HOLCF/Tr1.ML
changeset 892 d0dc8d057929
parent 430 89e1986125fe
child 1168 74be52691d62
equal deleted inserted replaced
891:a5ad535a241a 892:d0dc8d057929
    75 
    75 
    76 (* ------------------------------------------------------------------------ *) 
    76 (* ------------------------------------------------------------------------ *) 
    77 (* Exhaustion and elimination for type tr                                   *) 
    77 (* Exhaustion and elimination for type tr                                   *) 
    78 (* ------------------------------------------------------------------------ *)
    78 (* ------------------------------------------------------------------------ *)
    79 
    79 
    80 val Exh_tr = prove_goalw Tr1.thy [FF_def,TT_def] "t=UU | t = TT | t = FF"
    80 qed_goalw "Exh_tr" Tr1.thy [FF_def,TT_def] "t=UU | t = TT | t = FF"
    81  (fn prems =>
    81  (fn prems =>
    82 	[
    82 	[
    83 	(res_inst_tac [("p","rep_tr[t]")] ssumE 1),
    83 	(res_inst_tac [("p","rep_tr[t]")] ssumE 1),
    84 	(rtac disjI1 1),
    84 	(rtac disjI1 1),
    85 	(rtac ((abs_tr_iso RS allI) RS ((rep_tr_iso RS allI) RS iso_strict )
    85 	(rtac ((abs_tr_iso RS allI) RS ((rep_tr_iso RS allI) RS iso_strict )
   105 	(contr_tac 1),
   105 	(contr_tac 1),
   106 	(atac 1)
   106 	(atac 1)
   107 	]);
   107 	]);
   108 
   108 
   109 
   109 
   110 val trE = prove_goal Tr1.thy
   110 qed_goal "trE" Tr1.thy
   111 	"[| p=UU ==> Q; p = TT ==>Q; p = FF ==>Q|] ==>Q"
   111 	"[| p=UU ==> Q; p = TT ==>Q; p = FF ==>Q|] ==>Q"
   112  (fn prems =>
   112  (fn prems =>
   113 	[
   113 	[
   114 	(rtac (Exh_tr RS disjE) 1),
   114 	(rtac (Exh_tr RS disjE) 1),
   115 	(eresolve_tac prems 1),
   115 	(eresolve_tac prems 1),
   121 
   121 
   122 (* ------------------------------------------------------------------------ *) 
   122 (* ------------------------------------------------------------------------ *) 
   123 (* type tr is flat                                                          *) 
   123 (* type tr is flat                                                          *) 
   124 (* ------------------------------------------------------------------------ *)
   124 (* ------------------------------------------------------------------------ *)
   125 
   125 
   126 val flat_tr = prove_goalw Tr1.thy [flat_def] "flat(TT)"
   126 qed_goalw "flat_tr" Tr1.thy [flat_def] "flat(TT)"
   127  (fn prems =>
   127  (fn prems =>
   128 	[
   128 	[
   129 	(rtac allI 1),
   129 	(rtac allI 1),
   130 	(rtac allI 1),
   130 	(rtac allI 1),
   131 	(res_inst_tac [("p","x")] trE 1),
   131 	(res_inst_tac [("p","x")] trE 1),