265 |
265 |
266 definition Un_tables :: "('a, 'b) tables set \<Rightarrow> ('a, 'b) tables" |
266 definition Un_tables :: "('a, 'b) tables set \<Rightarrow> ('a, 'b) tables" |
267 where "Un_tables ts = (\<lambda>k. \<Union>t\<in>ts. t k)" |
267 where "Un_tables ts = (\<lambda>k. \<Union>t\<in>ts. t k)" |
268 |
268 |
269 definition overrides_t :: "('a, 'b) tables \<Rightarrow> ('a, 'b) tables \<Rightarrow> ('a, 'b) tables" |
269 definition overrides_t :: "('a, 'b) tables \<Rightarrow> ('a, 'b) tables \<Rightarrow> ('a, 'b) tables" |
270 (infixl "\<oplus>\<oplus>" 100) |
270 (infixl \<open>\<oplus>\<oplus>\<close> 100) |
271 where "s \<oplus>\<oplus> t = (\<lambda>k. if t k = {} then s k else t k)" |
271 where "s \<oplus>\<oplus> t = (\<lambda>k. if t k = {} then s k else t k)" |
272 |
272 |
273 definition |
273 definition |
274 hidings_entails :: "('a, 'b) tables \<Rightarrow> ('a, 'c) tables \<Rightarrow> ('b \<Rightarrow> 'c \<Rightarrow> bool) \<Rightarrow> bool" |
274 hidings_entails :: "('a, 'b) tables \<Rightarrow> ('a, 'c) tables \<Rightarrow> ('b \<Rightarrow> 'c \<Rightarrow> bool) \<Rightarrow> bool" |
275 ("_ hidings _ entails _" 20) |
275 (\<open>_ hidings _ entails _\<close> 20) |
276 where "(t hidings s entails R) = (\<forall>k. \<forall>x\<in>t k. \<forall>y\<in>s k. R x y)" |
276 where "(t hidings s entails R) = (\<forall>k. \<forall>x\<in>t k. \<forall>y\<in>s k. R x y)" |
277 |
277 |
278 definition |
278 definition |
279 \<comment> \<open>variant for unique table:\<close> |
279 \<comment> \<open>variant for unique table:\<close> |
280 hiding_entails :: "('a, 'b) table \<Rightarrow> ('a, 'c) table \<Rightarrow> ('b \<Rightarrow> 'c \<Rightarrow> bool) \<Rightarrow> bool" |
280 hiding_entails :: "('a, 'b) table \<Rightarrow> ('a, 'c) table \<Rightarrow> ('b \<Rightarrow> 'c \<Rightarrow> bool) \<Rightarrow> bool" |
281 ("_ hiding _ entails _" 20) |
281 (\<open>_ hiding _ entails _\<close> 20) |
282 where "(t hiding s entails R) = (\<forall>k. \<forall>x\<in>t k: \<forall>y\<in>s k: R x y)" |
282 where "(t hiding s entails R) = (\<forall>k. \<forall>x\<in>t k: \<forall>y\<in>s k: R x y)" |
283 |
283 |
284 definition |
284 definition |
285 \<comment> \<open>variant for a unique table and conditional overriding:\<close> |
285 \<comment> \<open>variant for a unique table and conditional overriding:\<close> |
286 cond_hiding_entails :: "('a, 'b) table \<Rightarrow> ('a, 'c) table |
286 cond_hiding_entails :: "('a, 'b) table \<Rightarrow> ('a, 'c) table |
287 \<Rightarrow> ('b \<Rightarrow> 'c \<Rightarrow> bool) \<Rightarrow> ('b \<Rightarrow> 'c \<Rightarrow> bool) \<Rightarrow> bool" |
287 \<Rightarrow> ('b \<Rightarrow> 'c \<Rightarrow> bool) \<Rightarrow> ('b \<Rightarrow> 'c \<Rightarrow> bool) \<Rightarrow> bool" |
288 ("_ hiding _ under _ entails _" 20) |
288 (\<open>_ hiding _ under _ entails _\<close> 20) |
289 where "(t hiding s under C entails R) = (\<forall>k. \<forall>x\<in>t k: \<forall>y\<in>s k: C x y \<longrightarrow> R x y)" |
289 where "(t hiding s under C entails R) = (\<forall>k. \<forall>x\<in>t k: \<forall>y\<in>s k: C x y \<longrightarrow> R x y)" |
290 |
290 |
291 |
291 |
292 subsubsection "Untables" |
292 subsubsection "Untables" |
293 |
293 |