equal
deleted
inserted
replaced
57 |
57 |
58 instance .. |
58 instance .. |
59 |
59 |
60 end |
60 end |
61 |
61 |
62 class semilatticeL = join + L + |
62 class semilatticeL = order + sup + L + |
63 fixes Top :: "vname set \<Rightarrow> 'a" |
63 fixes Top :: "vname set \<Rightarrow> 'a" |
64 assumes join_ge1 [simp]: "x \<in> L X \<Longrightarrow> y \<in> L X \<Longrightarrow> x \<le> x \<squnion> y" |
64 assumes sup_ge1 [simp]: "x \<in> L X \<Longrightarrow> y \<in> L X \<Longrightarrow> x \<le> x \<squnion> y" |
65 and join_ge2 [simp]: "x \<in> L X \<Longrightarrow> y \<in> L X \<Longrightarrow> y \<le> x \<squnion> y" |
65 and sup_ge2 [simp]: "x \<in> L X \<Longrightarrow> y \<in> L X \<Longrightarrow> y \<le> x \<squnion> y" |
66 and join_least[simp]: "x \<le> z \<Longrightarrow> y \<le> z \<Longrightarrow> x \<squnion> y \<le> z" |
66 and sup_least[simp]: "x \<le> z \<Longrightarrow> y \<le> z \<Longrightarrow> x \<squnion> y \<le> z" |
67 and Top[simp]: "x \<in> L X \<Longrightarrow> x \<le> Top X" |
67 and Top[simp]: "x \<in> L X \<Longrightarrow> x \<le> Top X" |
68 and Top_in_L[simp]: "Top X \<in> L X" |
68 and Top_in_L[simp]: "Top X \<in> L X" |
69 and join_in_L[simp]: "x \<in> L X \<Longrightarrow> y \<in> L X \<Longrightarrow> x \<squnion> y \<in> L X" |
69 and sup_in_L[simp]: "x \<in> L X \<Longrightarrow> y \<in> L X \<Longrightarrow> x \<squnion> y \<in> L X" |
70 |
70 |
71 notation (input) Top ("\<top>\<^bsub>_\<^esub>") |
71 notation (input) Top ("\<top>\<^bsub>_\<^esub>") |
72 notation (latex output) Top ("\<top>\<^bsub>\<^raw:\isa{>_\<^raw:}>\<^esub>") |
72 notation (latex output) Top ("\<top>\<^bsub>\<^raw:\isa{>_\<^raw:}>\<^esub>") |
73 |
73 |
74 instantiation option :: (semilatticeL)semilatticeL |
74 instantiation option :: (semilatticeL)semilatticeL |
169 case goal4 thus ?case by (metis less_eq_st_def antisym ext_st) |
169 case goal4 thus ?case by (metis less_eq_st_def antisym ext_st) |
170 qed |
170 qed |
171 |
171 |
172 end |
172 end |
173 |
173 |
174 instantiation st :: (join) join |
174 instantiation st :: (sup) sup |
175 begin |
175 begin |
176 |
176 |
177 definition join_st :: "'a st \<Rightarrow> 'a st \<Rightarrow> 'a st" where |
177 definition sup_st :: "'a st \<Rightarrow> 'a st \<Rightarrow> 'a st" where |
178 "F \<squnion> (G::'a st) = St (\<lambda>x. fun F x \<squnion> fun G x) (dom F)" |
178 "F \<squnion> (G::'a st) = St (\<lambda>x. fun F x \<squnion> fun G x) (dom F)" |
179 |
179 |
180 instance .. |
180 instance .. |
181 |
181 |
182 end |
182 end |
195 begin |
195 begin |
196 |
196 |
197 definition Top_st :: "vname set \<Rightarrow> 'a st" where "Top(X) = St (\<lambda>x. \<top>) X" |
197 definition Top_st :: "vname set \<Rightarrow> 'a st" where "Top(X) = St (\<lambda>x. \<top>) X" |
198 |
198 |
199 instance |
199 instance |
200 proof qed(auto simp add: less_eq_st_def join_st_def Top_st_def L_st_def) |
200 proof qed(auto simp add: less_eq_st_def sup_st_def Top_st_def L_st_def) |
201 |
201 |
202 end |
202 end |
203 |
203 |
204 |
204 |
205 text{* Trick to make code generator happy. *} |
205 text{* Trick to make code generator happy. *} |