Skip to content

Commit 87dc3e1

Browse files
authored
Merge pull request #10 from gauravpartha/max_min_disjoint_lemma_2
add helper lemma for more efficient disjointness check
2 parents ffc8688 + 0b773e5 commit 87dc3e1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

BoogieLang/Util.thy

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,14 @@ lemma max_min_disjoint:
357357
using assms
358358
by (metis Diff_Diff_Int Diff_eq_empty_iff List.finite_set Max_ge Min_le_iff disjoint_iff_not_equal inf.cobounded2 leD)
359359

360+
lemma max_min_disjoint_2:
361+
assumes "\<forall> a. a \<in> A \<longrightarrow> a \<le> a_max"
362+
and "\<forall> b. b \<in> B \<longrightarrow> b_min \<le> (b :: vname)"
363+
and "a_max < b_min"
364+
shows "A \<inter> B = {}"
365+
using assms
366+
by fastforce
367+
360368
lemma dom_map_of_2:"dom (map_of R) = set (map fst R)"
361369
by (simp add: Map.dom_map_of_conv_image_fst)
362370

0 commit comments

Comments
 (0)