FSet.thy
changeset 419 b1cd040ff5f7
parent 416 3f3927f793d4
child 420 dcfe009c98aa
equal deleted inserted replaced
418:f24fd4689d00 419:b1cd040ff5f7
   302   @ @{thms ho_all_prs ho_ex_prs} *}
   302   @ @{thms ho_all_prs ho_ex_prs} *}
   303 
   303 
   304 ML {* val (rty, rel, rel_refl, rel_eqv) = lookup_quot_data @{context} qty *}
   304 ML {* val (rty, rel, rel_refl, rel_eqv) = lookup_quot_data @{context} qty *}
   305 ML {* val (trans2, reps_same, absrep, quot) = lookup_quot_thms @{context} "fset"; *}
   305 ML {* val (trans2, reps_same, absrep, quot) = lookup_quot_thms @{context} "fset"; *}
   306 ML {* val consts = lookup_quot_consts defs *}
   306 ML {* val consts = lookup_quot_consts defs *}
   307 ML {* fun lift_tac_fset lthy t = lift_tac lthy t [rel_eqv] rty [quot] trans2 rsp_thms defs *}
   307 ML {* fun lift_tac_fset lthy t = lift_tac lthy t [rel_eqv] rty [quot] rsp_thms defs *}
   308 
   308 
   309 lemma "IN x EMPTY = False"
   309 lemma "IN x EMPTY = False"
   310 by (tactic {* lift_tac_fset @{context} @{thm m1} 1 *})
   310 by (tactic {* lift_tac_fset @{context} @{thm m1} 1 *})
   311 
   311 
   312 lemma "IN x (INSERT y xa) = (x = y \<or> IN x xa)"
   312 lemma "IN x (INSERT y xa) = (x = y \<or> IN x xa)"
   374   apply (auto simp add: FUN_REL_EQ)
   374   apply (auto simp add: FUN_REL_EQ)
   375   sorry
   375   sorry
   376 
   376 
   377 ML {* val rsp_thms = @{thms list_rec_rsp list_case_rsp} @ rsp_thms *}
   377 ML {* val rsp_thms = @{thms list_rec_rsp list_case_rsp} @ rsp_thms *}
   378 ML {* val defs = @{thms fset_rec_def fset_case_def} @ defs *}
   378 ML {* val defs = @{thms fset_rec_def fset_case_def} @ defs *}
   379 ML {* fun lift_tac_fset lthy t = lift_tac lthy t [rel_eqv] rty [quot] trans2 rsp_thms defs *}
   379 ML {* fun lift_tac_fset lthy t = lift_tac lthy t [rel_eqv] rty [quot] rsp_thms defs *}
   380 
   380 
   381 lemma "fset_rec (f1::'t) x (INSERT a xa) = x a xa (fset_rec f1 x xa)"
   381 lemma "fset_rec (f1::'t) x (INSERT a xa) = x a xa (fset_rec f1 x xa)"
   382 apply (tactic {* lift_tac_fset @{context} @{thm list.recs(2)} 1 *})
   382 apply (tactic {* lift_tac_fset @{context} @{thm list.recs(2)} 1 *})
   383 done
   383 done
   384 
   384 
   395   apply (rule b)
   395   apply (rule b)
   396   apply (assumption)
   396   apply (assumption)
   397   done
   397   done
   398 
   398 
   399 
   399 
   400 ML {* fun r_mk_comb_tac_fset lthy = r_mk_comb_tac lthy rty [quot] [rel_refl] trans2 rsp_thms *}
   400 ML {* fun r_mk_comb_tac_fset lthy = r_mk_comb_tac lthy rty [quot] [rel_refl] [trans2] rsp_thms *}
   401 
   401 
   402 
   402 
   403 
   403 
   404 
   404 
   405 (* Construction site starts here *)
   405 (* Construction site starts here *)