diff -r 767baada01dc -r 74348dc2f8bb FSet.thy --- a/FSet.thy Wed Dec 02 14:11:46 2009 +0100 +++ b/FSet.thy Wed Dec 02 14:37:21 2009 +0100 @@ -419,6 +419,33 @@ apply (tactic {* lift_tac_fset @{context} @{thm list_induct_part} 1 *}) done +quotient fset2 = "'a list" / "list_eq" + apply(rule equiv_list_eq) + done + +quotient_def + EMPTY2 :: "'a fset2" +where + "EMPTY2 \ ([]::'a list)" + +quotient_def + INSERT2 :: "'a \ 'a fset2 \ 'a fset2" +where + "INSERT2 \ op #" + +ML {* val defs = @{thms EMPTY2_def INSERT2_def} @ defs *} +ML {* val quot = @{thms QUOTIENT_fset QUOTIENT_fset2} *} +ML {* fun inj_repabs_tac_fset lthy = inj_repabs_tac lthy rty quot [rel_refl] [trans2] *} +ML {* fun lift_tac_fset lthy t = lift_tac lthy t [rel_eqv] rty quot defs *} + +lemma "P (x :: 'a fset2) (EMPTY :: 'c fset) \ (\e t. P x t \ P x (INSERT e t)) \ P x l" +apply (tactic {* lift_tac_fset @{context} @{thm list_induct_part} 1 *}) +done + +lemma "P (x :: 'a fset) (EMPTY2 :: 'c fset2) \ (\e t. P x t \ P x (INSERT2 e t)) \ P x l" +apply (tactic {* lift_tac_fset @{context} @{thm list_induct_part} 1 *}) +done + quotient_def fset_rec::"'a \ ('b \ 'b fset \ 'a \ 'a) \ 'b fset \ 'a" where