19 |
19 |
20 hide_type (open) set |
20 hide_type (open) set |
21 |
21 |
22 subsection {* Operations *} |
22 subsection {* Operations *} |
23 |
23 |
24 lemma [quot_respect]: |
|
25 "(op = ===> set_eq ===> op =) (op \<in>) (op \<in>)" |
|
26 "(op = ===> set_eq) Collect Collect" |
|
27 "(set_eq ===> op =) Set.is_empty Set.is_empty" |
|
28 "(op = ===> set_eq ===> set_eq) Set.insert Set.insert" |
|
29 "(op = ===> set_eq ===> set_eq) Set.remove Set.remove" |
|
30 "(op = ===> set_eq ===> set_eq) image image" |
|
31 "(op = ===> set_eq ===> set_eq) Set.project Set.project" |
|
32 "(set_eq ===> op =) Ball Ball" |
|
33 "(set_eq ===> op =) Bex Bex" |
|
34 "(set_eq ===> op =) Finite_Set.card Finite_Set.card" |
|
35 "(set_eq ===> set_eq ===> op =) (op \<subseteq>) (op \<subseteq>)" |
|
36 "(set_eq ===> set_eq ===> op =) (op \<subset>) (op \<subset>)" |
|
37 "(set_eq ===> set_eq ===> set_eq) (op \<inter>) (op \<inter>)" |
|
38 "(set_eq ===> set_eq ===> set_eq) (op \<union>) (op \<union>)" |
|
39 "set_eq {} {}" |
|
40 "set_eq UNIV UNIV" |
|
41 "(set_eq ===> set_eq) uminus uminus" |
|
42 "(set_eq ===> set_eq ===> set_eq) minus minus" |
|
43 "(set_eq ===> op =) Inf Inf" |
|
44 "(set_eq ===> op =) Sup Sup" |
|
45 "(op = ===> set_eq) List.set List.set" |
|
46 "(set_eq ===> (op = ===> set_eq) ===> set_eq) UNION UNION" |
|
47 by (auto simp: fun_rel_eq) |
|
48 |
|
49 quotient_definition "member :: 'a => 'a Quotient_Cset.set => bool" |
24 quotient_definition "member :: 'a => 'a Quotient_Cset.set => bool" |
50 is "op \<in>" |
25 is "op \<in>" by simp |
51 quotient_definition "Set :: ('a => bool) => 'a Quotient_Cset.set" |
26 quotient_definition "Set :: ('a => bool) => 'a Quotient_Cset.set" |
52 is Collect |
27 is Collect done |
53 quotient_definition is_empty where "is_empty :: 'a Quotient_Cset.set \<Rightarrow> bool" |
28 quotient_definition is_empty where "is_empty :: 'a Quotient_Cset.set \<Rightarrow> bool" |
54 is Set.is_empty |
29 is Set.is_empty by simp |
55 quotient_definition insert where "insert :: 'a \<Rightarrow> 'a Quotient_Cset.set \<Rightarrow> 'a Quotient_Cset.set" |
30 quotient_definition insert where "insert :: 'a \<Rightarrow> 'a Quotient_Cset.set \<Rightarrow> 'a Quotient_Cset.set" |
56 is Set.insert |
31 is Set.insert by simp |
57 quotient_definition remove where "remove :: 'a \<Rightarrow> 'a Quotient_Cset.set \<Rightarrow> 'a Quotient_Cset.set" |
32 quotient_definition remove where "remove :: 'a \<Rightarrow> 'a Quotient_Cset.set \<Rightarrow> 'a Quotient_Cset.set" |
58 is Set.remove |
33 is Set.remove by simp |
59 quotient_definition map where "map :: ('a \<Rightarrow> 'b) \<Rightarrow> 'a Quotient_Cset.set \<Rightarrow> 'b Quotient_Cset.set" |
34 quotient_definition map where "map :: ('a \<Rightarrow> 'b) \<Rightarrow> 'a Quotient_Cset.set \<Rightarrow> 'b Quotient_Cset.set" |
60 is image |
35 is image by simp |
61 quotient_definition filter where "filter :: ('a \<Rightarrow> bool) \<Rightarrow> 'a Quotient_Cset.set \<Rightarrow> 'a Quotient_Cset.set" |
36 quotient_definition filter where "filter :: ('a \<Rightarrow> bool) \<Rightarrow> 'a Quotient_Cset.set \<Rightarrow> 'a Quotient_Cset.set" |
62 is Set.project |
37 is Set.project by simp |
63 quotient_definition "forall :: 'a Quotient_Cset.set \<Rightarrow> ('a \<Rightarrow> bool) \<Rightarrow> bool" |
38 quotient_definition "forall :: 'a Quotient_Cset.set \<Rightarrow> ('a \<Rightarrow> bool) \<Rightarrow> bool" |
64 is Ball |
39 is Ball by simp |
65 quotient_definition "exists :: 'a Quotient_Cset.set \<Rightarrow> ('a \<Rightarrow> bool) \<Rightarrow> bool" |
40 quotient_definition "exists :: 'a Quotient_Cset.set \<Rightarrow> ('a \<Rightarrow> bool) \<Rightarrow> bool" |
66 is Bex |
41 is Bex by simp |
67 quotient_definition card where "card :: 'a Quotient_Cset.set \<Rightarrow> nat" |
42 quotient_definition card where "card :: 'a Quotient_Cset.set \<Rightarrow> nat" |
68 is Finite_Set.card |
43 is Finite_Set.card by simp |
69 quotient_definition set where "set :: 'a list => 'a Quotient_Cset.set" |
44 quotient_definition set where "set :: 'a list => 'a Quotient_Cset.set" |
70 is List.set |
45 is List.set done |
71 quotient_definition subset where "subset :: 'a Quotient_Cset.set \<Rightarrow> 'a Quotient_Cset.set \<Rightarrow> bool" |
46 quotient_definition subset where "subset :: 'a Quotient_Cset.set \<Rightarrow> 'a Quotient_Cset.set \<Rightarrow> bool" |
72 is "op \<subseteq> :: 'a set \<Rightarrow> 'a set \<Rightarrow> bool" |
47 is "op \<subseteq> :: 'a set \<Rightarrow> 'a set \<Rightarrow> bool" by simp |
73 quotient_definition psubset where "psubset :: 'a Quotient_Cset.set \<Rightarrow> 'a Quotient_Cset.set \<Rightarrow> bool" |
48 quotient_definition psubset where "psubset :: 'a Quotient_Cset.set \<Rightarrow> 'a Quotient_Cset.set \<Rightarrow> bool" |
74 is "op \<subset> :: 'a set \<Rightarrow> 'a set \<Rightarrow> bool" |
49 is "op \<subset> :: 'a set \<Rightarrow> 'a set \<Rightarrow> bool" by simp |
75 quotient_definition inter where "inter :: 'a Quotient_Cset.set \<Rightarrow> 'a Quotient_Cset.set \<Rightarrow> 'a Quotient_Cset.set" |
50 quotient_definition inter where "inter :: 'a Quotient_Cset.set \<Rightarrow> 'a Quotient_Cset.set \<Rightarrow> 'a Quotient_Cset.set" |
76 is "op \<inter> :: 'a set \<Rightarrow> 'a set \<Rightarrow> 'a set" |
51 is "op \<inter> :: 'a set \<Rightarrow> 'a set \<Rightarrow> 'a set" by simp |
77 quotient_definition union where "union :: 'a Quotient_Cset.set \<Rightarrow> 'a Quotient_Cset.set \<Rightarrow> 'a Quotient_Cset.set" |
52 quotient_definition union where "union :: 'a Quotient_Cset.set \<Rightarrow> 'a Quotient_Cset.set \<Rightarrow> 'a Quotient_Cset.set" |
78 is "op \<union> :: 'a set \<Rightarrow> 'a set \<Rightarrow> 'a set" |
53 is "op \<union> :: 'a set \<Rightarrow> 'a set \<Rightarrow> 'a set" by simp |
79 quotient_definition empty where "empty :: 'a Quotient_Cset.set" |
54 quotient_definition empty where "empty :: 'a Quotient_Cset.set" |
80 is "{} :: 'a set" |
55 is "{} :: 'a set" done |
81 quotient_definition UNIV where "UNIV :: 'a Quotient_Cset.set" |
56 quotient_definition UNIV where "UNIV :: 'a Quotient_Cset.set" |
82 is "Set.UNIV :: 'a set" |
57 is "Set.UNIV :: 'a set" done |
83 quotient_definition uminus where "uminus :: 'a Quotient_Cset.set \<Rightarrow> 'a Quotient_Cset.set" |
58 quotient_definition uminus where "uminus :: 'a Quotient_Cset.set \<Rightarrow> 'a Quotient_Cset.set" |
84 is "uminus_class.uminus :: 'a set \<Rightarrow> 'a set" |
59 is "uminus_class.uminus :: 'a set \<Rightarrow> 'a set" by simp |
85 quotient_definition minus where "minus :: 'a Quotient_Cset.set \<Rightarrow> 'a Quotient_Cset.set \<Rightarrow> 'a Quotient_Cset.set" |
60 quotient_definition minus where "minus :: 'a Quotient_Cset.set \<Rightarrow> 'a Quotient_Cset.set \<Rightarrow> 'a Quotient_Cset.set" |
86 is "(op -) :: 'a set \<Rightarrow> 'a set \<Rightarrow> 'a set" |
61 is "(op -) :: 'a set \<Rightarrow> 'a set \<Rightarrow> 'a set" by simp |
87 quotient_definition Inf where "Inf :: ('a :: Inf) Quotient_Cset.set \<Rightarrow> 'a" |
62 quotient_definition Inf where "Inf :: ('a :: Inf) Quotient_Cset.set \<Rightarrow> 'a" |
88 is "Inf_class.Inf :: ('a :: Inf) set \<Rightarrow> 'a" |
63 is "Inf_class.Inf :: ('a :: Inf) set \<Rightarrow> 'a" by simp |
89 quotient_definition Sup where "Sup :: ('a :: Sup) Quotient_Cset.set \<Rightarrow> 'a" |
64 quotient_definition Sup where "Sup :: ('a :: Sup) Quotient_Cset.set \<Rightarrow> 'a" |
90 is "Sup_class.Sup :: ('a :: Sup) set \<Rightarrow> 'a" |
65 is "Sup_class.Sup :: ('a :: Sup) set \<Rightarrow> 'a" by simp |
91 quotient_definition UNION where "UNION :: 'a Quotient_Cset.set \<Rightarrow> ('a \<Rightarrow> 'b Quotient_Cset.set) \<Rightarrow> 'b Quotient_Cset.set" |
66 quotient_definition UNION where "UNION :: 'a Quotient_Cset.set \<Rightarrow> ('a \<Rightarrow> 'b Quotient_Cset.set) \<Rightarrow> 'b Quotient_Cset.set" |
92 is "Complete_Lattices.UNION :: 'a set \<Rightarrow> ('a \<Rightarrow> 'b set) \<Rightarrow> 'b set" |
67 is "Complete_Lattices.UNION :: 'a set \<Rightarrow> ('a \<Rightarrow> 'b set) \<Rightarrow> 'b set" by simp |
93 |
68 |
94 hide_const (open) is_empty insert remove map filter forall exists card |
69 hide_const (open) is_empty insert remove map filter forall exists card |
95 set subset psubset inter union empty UNIV uminus minus Inf Sup UNION |
70 set subset psubset inter union empty UNIV uminus minus Inf Sup UNION |
96 |
71 |
97 hide_fact (open) is_empty_def insert_def remove_def map_def filter_def |
72 hide_fact (open) is_empty_def insert_def remove_def map_def filter_def |