diff -r 2d9de77d5687 -r 0dd10a900cae Quot/Examples/FSet.thy --- a/Quot/Examples/FSet.thy Wed Dec 09 06:21:09 2009 +0100 +++ b/Quot/Examples/FSet.thy Wed Dec 09 15:57:47 2009 +0100 @@ -26,20 +26,20 @@ apply(rule equivp_list_eq) done -quotient_def - EMPTY :: "'a fset" +quotient_def + EMPTY :: "EMPTY :: 'a fset" where - "EMPTY \ ([]::'a list)" + "[]::'a list" -quotient_def - INSERT :: "'a \ 'a fset \ 'a fset" +quotient_def + INSERT :: "INSERT :: 'a \ 'a fset \ 'a fset" where - "INSERT \ op #" + "op #" -quotient_def - FUNION :: "'a fset \ 'a fset \ 'a fset" +quotient_def + FUNION :: "FUNION :: 'a fset \ 'a fset \ 'a fset" where - "FUNION \ (op @)" + "op @" fun membship :: "'a \ 'a list \ bool" (infix "memb" 100) @@ -53,10 +53,10 @@ card1_nil: "(card1 []) = 0" | card1_cons: "(card1 (x # xs)) = (if (x memb xs) then (card1 xs) else (Suc (card1 xs)))" -quotient_def - CARD :: "'a fset \ nat" +quotient_def + CARD :: "CARD :: 'a fset \ nat" where - "CARD \ card1" + "card1" (* text {* Maybe make_const_def should require a theorem that says that the particular lifted function @@ -117,19 +117,19 @@ done quotient_def - IN :: "'a \ 'a fset \ bool" + IN :: "IN :: 'a \ 'a fset \ bool" where - "IN \ membship" + "membship" -quotient_def - FOLD :: "('a \ 'a \ 'a) \ ('b \ 'a) \ 'a \ 'b fset \ 'a" +quotient_def + FOLD :: "FOLD :: ('a \ 'a \ 'a) \ ('b \ 'a) \ 'a \ 'b fset \ 'a" where - "FOLD \ fold1" + "fold1" -quotient_def - fmap::"('a \ 'b) \ 'a fset \ 'b fset" +quotient_def + fmap::"fmap :: ('a \ 'b) \ 'a fset \ 'b fset" where - "fmap \ map" + "map" lemma memb_rsp: fixes z @@ -318,14 +318,14 @@ by (rule equivp_list_eq) quotient_def - EMPTY2 :: "'a fset2" + EMPTY2 :: "EMPTY2 :: 'a fset2" where - "EMPTY2 \ ([]::'a list)" + "[]::'a list" quotient_def - INSERT2 :: "'a \ 'a fset2 \ 'a fset2" + INSERT2 :: "INSERT2 :: 'a \ 'a fset2 \ 'a fset2" where - "INSERT2 \ op #" + "op #" lemma "P (x :: 'a fset2) (EMPTY :: 'c fset) \ (\e t. P x t \ P x (INSERT e t)) \ P x l" apply (lifting list_induct_part) @@ -336,14 +336,14 @@ done quotient_def - fset_rec::"'a \ ('b \ 'b fset \ 'a \ 'a) \ 'b fset \ 'a" + fset_rec::"fset_rec :: 'a \ ('b \ 'b fset \ 'a \ 'a) \ 'b fset \ 'a" where - "fset_rec \ list_rec" + "list_rec" quotient_def - fset_case::"'a \ ('b \ 'b fset \ 'a) \ 'b fset \ 'a" + fset_case::"fset_case :: 'a \ ('b \ 'b fset \ 'a) \ 'b fset \ 'a" where - "fset_case \ list_case" + "list_case" (* Probably not true without additional assumptions about the function *) lemma list_rec_rsp[quot_respect]: