-
Notifications
You must be signed in to change notification settings - Fork 0
/
BDD_select.thy
23 lines (17 loc) · 931 Bytes
/
BDD_select.thy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
theory BDD_select
imports Main BDD_basic
begin
definition select :: "nat \<Rightarrow> BDD \<Rightarrow> BDD \<Rightarrow> BDD" where
"select a t e = (if t = e then t else Select a t e)"
lemma select_noop [simp]: "norm n t \<Longrightarrow> norm n e \<Longrightarrow> t \<noteq> e \<Longrightarrow> select v t e = Select v t e"
by (auto simp: select_def)
theorem norm_select [simp]: "n > a \<Longrightarrow> norm a t \<Longrightarrow> norm a e \<Longrightarrow> norm n (select a t e)"
by (simp add: select_def)
theorem ordered_select [simp]: "n > a \<Longrightarrow> ordered a t \<Longrightarrow> ordered a e \<Longrightarrow> ordered n (select a t e)"
by (simp add: select_def)
theorem select_correct [simp]: "contains (select a t e) f = contains (Select a t e) f"
apply (rule iffI)
apply (auto simp add: select_def)
apply (metis (full_types) contains_sel_e contains_sel_t)
using contains.cases by auto
end