more abstract intervals
authornipkow
Fri, 22 Feb 2013 20:12:53 +0100
changeset 51245 311fe56541ea
parent 51244 d8ca566b22b3
child 51249 5013ed756a78
more abstract intervals
src/HOL/IMP/Abs_Int2_ivl.thy
src/HOL/IMP/Abs_Int3.thy
--- a/src/HOL/IMP/Abs_Int2_ivl.thy	Fri Feb 22 17:24:09 2013 +0100
+++ b/src/HOL/IMP/Abs_Int2_ivl.thy	Fri Feb 22 20:12:53 2013 +0100
@@ -6,42 +6,83 @@
 
 subsection "Interval Analysis"
 
-datatype ivl = Ivl "int option" "int option"
+datatype lb = Minf | Lb int
+datatype ub = Pinf | Ub int
+
+datatype ivl = Ivl lb ub
 
 definition "\<gamma>_ivl i = (case i of
-  Ivl (Some l) (Some h) \<Rightarrow> {l..h} |
-  Ivl (Some l) None \<Rightarrow> {l..} |
-  Ivl None (Some h) \<Rightarrow> {..h} |
-  Ivl None None \<Rightarrow> UNIV)"
+  Ivl (Lb l) (Ub h) \<Rightarrow> {l..h} |
+  Ivl (Lb l) Pinf \<Rightarrow> {l..} |
+  Ivl Minf (Ub h) \<Rightarrow> {..h} |
+  Ivl Minf Pinf \<Rightarrow> UNIV)"
 
-abbreviation Ivl_Some_Some :: "int \<Rightarrow> int \<Rightarrow> ivl"  ("{_\<dots>_}") where
-"{lo\<dots>hi} == Ivl (Some lo) (Some hi)"
-abbreviation Ivl_Some_None :: "int \<Rightarrow> ivl"  ("{_\<dots>}") where
-"{lo\<dots>} == Ivl (Some lo) None"
-abbreviation Ivl_None_Some :: "int \<Rightarrow> ivl"  ("{\<dots>_}") where
-"{\<dots>hi} == Ivl None (Some hi)"
-abbreviation Ivl_None_None :: "ivl"  ("{\<dots>}") where
-"{\<dots>} == Ivl None None"
+abbreviation Ivl_Lb_Ub :: "int \<Rightarrow> int \<Rightarrow> ivl"  ("{_\<dots>_}") where
+"{lo\<dots>hi} == Ivl (Lb lo) (Ub hi)"
+abbreviation Ivl_Lb_Pinf :: "int \<Rightarrow> ivl"  ("{_\<dots>}") where
+"{lo\<dots>} == Ivl (Lb lo) Pinf"
+abbreviation Ivl_Minf_Ub :: "int \<Rightarrow> ivl"  ("{\<dots>_}") where
+"{\<dots>hi} == Ivl Minf (Ub hi)"
+abbreviation Ivl_Minf_Pinf :: "ivl"  ("{\<dots>}") where
+"{\<dots>} == Ivl Minf Pinf"
+
+lemmas lub_splits = lb.splits ub.splits
 
 definition "num_ivl n = {n\<dots>n}"
 
 fun in_ivl :: "int \<Rightarrow> ivl \<Rightarrow> bool" where
-"in_ivl k (Ivl (Some l) (Some h)) \<longleftrightarrow> l \<le> k \<and> k \<le> h" |
-"in_ivl k (Ivl (Some l) None) \<longleftrightarrow> l \<le> k" |
-"in_ivl k (Ivl None (Some h)) \<longleftrightarrow> k \<le> h" |
-"in_ivl k (Ivl None None) \<longleftrightarrow> True"
+"in_ivl k (Ivl (Lb l) (Ub h)) \<longleftrightarrow> l \<le> k \<and> k \<le> h" |
+"in_ivl k (Ivl (Lb l) Pinf) \<longleftrightarrow> l \<le> k" |
+"in_ivl k (Ivl Minf (Ub h)) \<longleftrightarrow> k \<le> h" |
+"in_ivl k (Ivl Minf Pinf) \<longleftrightarrow> True"
 
-instantiation option :: (plus)plus
+
+instantiation lb :: order
 begin
 
-fun plus_option where
-"Some x + Some y = Some(x+y)" |
-"_ + _ = None"
+definition less_eq_lb where
+"l1 \<le> l2 = (case l1 of Minf \<Rightarrow> True | Lb i1 \<Rightarrow> (case l2 of Minf \<Rightarrow> False | Lb i2 \<Rightarrow> i1 \<le> i2))"
+
+definition less_lb :: "lb \<Rightarrow> lb \<Rightarrow> bool" where
+"((l1::lb) < l2) = (l1 \<le> l2 & ~ l1 \<ge> l2)"
 
-instance ..
+instance
+proof
+  case goal1 show ?case by(rule less_lb_def)
+next
+  case goal2 show ?case by(auto simp: less_eq_lb_def split:lub_splits)
+next
+  case goal3 thus ?case by(auto simp: less_eq_lb_def split:lub_splits)
+next
+  case goal4 thus ?case by(auto simp: less_eq_lb_def split:lub_splits)
+qed
 
 end
 
+instantiation ub :: order
+begin
+
+definition less_eq_ub where
+"u1 \<le> u2 = (case u2 of Pinf \<Rightarrow> True | Ub i2 \<Rightarrow> (case u1 of Pinf \<Rightarrow> False | Ub i1 \<Rightarrow> i1 \<le> i2))"
+
+definition less_ub :: "ub \<Rightarrow> ub \<Rightarrow> bool" where
+"((u1::ub) < u2) = (u1 \<le> u2 & ~ u1 \<ge> u2)"
+
+instance
+proof
+  case goal1 show ?case by(rule less_ub_def)
+next
+  case goal2 show ?case by(auto simp: less_eq_ub_def split:lub_splits)
+next
+  case goal3 thus ?case by(auto simp: less_eq_ub_def split:lub_splits)
+next
+  case goal4 thus ?case by(auto simp: less_eq_ub_def split:lub_splits)
+qed
+
+end
+
+lemmas le_lub_defs = less_eq_lb_def less_eq_ub_def
+
 definition empty where "empty = {1\<dots>0}"
 
 fun is_empty where
@@ -49,63 +90,49 @@
 "is_empty _ = False"
 
 lemma [simp]: "is_empty(Ivl l h) =
-  (case l of Some l \<Rightarrow> (case h of Some h \<Rightarrow> h<l | None \<Rightarrow> False) | None \<Rightarrow> False)"
-by(auto split:option.split)
+  (case l of Lb l \<Rightarrow> (case h of Ub h \<Rightarrow> h<l | Pinf \<Rightarrow> False) | Minf \<Rightarrow> False)"
+by(auto split: lub_splits)
 
 lemma [simp]: "is_empty i \<Longrightarrow> \<gamma>_ivl i = {}"
-by(auto simp add: \<gamma>_ivl_def split: ivl.split option.split)
+by(auto simp add: \<gamma>_ivl_def split: ivl.split lub_splits)
 
-definition "plus_ivl i1 i2 = (if is_empty i1 | is_empty i2 then empty else
-  case (i1,i2) of (Ivl l1 h1, Ivl l2 h2) \<Rightarrow> Ivl (l1+l2) (h1+h2))"
 
 instantiation ivl :: semilattice
 begin
 
-definition le_option :: "bool \<Rightarrow> int option \<Rightarrow> int option \<Rightarrow> bool" where
-"le_option pos x y =
- (case x of (Some i) \<Rightarrow> (case y of Some j \<Rightarrow> i\<le>j | None \<Rightarrow> pos)
-  | None \<Rightarrow> (case y of Some j \<Rightarrow> \<not>pos | None \<Rightarrow> True))"
-
 fun le_aux where
-"le_aux (Ivl l1 h1) (Ivl l2 h2) = (le_option False l2 l1 & le_option True h1 h2)"
+"le_aux (Ivl l1 h1) (Ivl l2 h2) = (l2 \<le> l1 & h1 \<le> h2)"
 
 definition le_ivl where
 "i1 \<sqsubseteq> i2 =
  (if is_empty i1 then True else
   if is_empty i2 then False else le_aux i1 i2)"
 
-definition min_option :: "bool \<Rightarrow> int option \<Rightarrow> int option \<Rightarrow> int option" where
-"min_option pos o1 o2 = (if le_option pos o1 o2 then o1 else o2)"
-
-definition max_option :: "bool \<Rightarrow> int option \<Rightarrow> int option \<Rightarrow> int option" where
-"max_option pos o1 o2 = (if le_option pos o1 o2 then o2 else o1)"
-
 definition "i1 \<squnion> i2 =
  (if is_empty i1 then i2 else if is_empty i2 then i1
-  else case (i1,i2) of (Ivl l1 h1, Ivl l2 h2) \<Rightarrow>
-          Ivl (min_option False l1 l2) (max_option True h1 h2))"
+  else case (i1,i2) of (Ivl l1 h1, Ivl l2 h2) \<Rightarrow> Ivl (min l1 l2) (max h1 h2))"
 
 definition "\<top> = {\<dots>}"
 
 instance
 proof
   case goal1 thus ?case
-    by(cases x, simp add: le_ivl_def le_option_def split: option.split)
+    by(cases x, simp add: le_ivl_def)
 next
   case goal2 thus ?case
-    by(cases x, cases y, cases z, auto simp: le_ivl_def le_option_def split: option.splits if_splits)
+    by(cases x, cases y, cases z, auto simp: le_ivl_def split: if_splits)
 next
   case goal3 thus ?case
-    by(cases x, cases y, simp add: le_ivl_def join_ivl_def le_option_def min_option_def max_option_def split: option.splits)
+    by(cases x, cases y, simp add: le_ivl_def join_ivl_def le_lub_defs min_def max_def split: lub_splits)
 next
   case goal4 thus ?case
-    by(cases x, cases y, simp add: le_ivl_def join_ivl_def le_option_def min_option_def max_option_def split: option.splits)
+    by(cases x, cases y, simp add: le_ivl_def join_ivl_def le_lub_defs min_def max_def split: lub_splits)
 next
   case goal5 thus ?case
-    by(cases x, cases y, cases z, auto simp add: le_ivl_def join_ivl_def le_option_def min_option_def max_option_def split: option.splits if_splits)
+    by(cases x, cases y, cases z, auto simp add: le_ivl_def join_ivl_def le_lub_defs min_def max_def split: lub_splits if_splits)
 next
   case goal6 thus ?case
-    by(cases x, simp add: Top_ivl_def le_ivl_def le_option_def split: option.split)
+    by(cases x, simp add: Top_ivl_def le_ivl_def le_lub_defs split: lub_splits)
 qed
 
 end
@@ -115,108 +142,150 @@
 begin
 
 definition "i1 \<sqinter> i2 = (if is_empty i1 \<or> is_empty i2 then empty else
-  case (i1,i2) of (Ivl l1 h1, Ivl l2 h2) \<Rightarrow>
-    Ivl (max_option False l1 l2) (min_option True h1 h2))"
+  case (i1,i2) of (Ivl l1 h1, Ivl l2 h2) \<Rightarrow> Ivl (max l1 l2) (min h1 h2))"
 
 definition "\<bottom> = empty"
 
 instance
 proof
   case goal2 thus ?case
-    by (simp add:meet_ivl_def empty_def le_ivl_def le_option_def max_option_def min_option_def split: ivl.splits option.splits)
+    by (simp add:meet_ivl_def empty_def le_ivl_def le_lub_defs max_def min_def split: ivl.splits lub_splits)
 next
   case goal3 thus ?case
-    by (simp add: empty_def meet_ivl_def le_ivl_def le_option_def max_option_def min_option_def split: ivl.splits option.splits)
+    by (simp add: empty_def meet_ivl_def le_ivl_def le_lub_defs max_def min_def split: ivl.splits lub_splits)
 next
   case goal4 thus ?case
-    by (cases x, cases y, cases z, auto simp add: le_ivl_def meet_ivl_def empty_def le_option_def max_option_def min_option_def split: option.splits if_splits)
+    by (cases x, cases y, cases z, auto simp add: le_ivl_def meet_ivl_def empty_def le_lub_defs max_def min_def split: lub_splits if_splits)
 next
   case goal1 show ?case by(cases x, simp add: bot_ivl_def empty_def le_ivl_def)
 qed
 
 end
 
-instantiation option :: (minus)minus
+
+instantiation lb :: plus
 begin
 
-fun minus_option where
-"Some x - Some y = Some(x-y)" |
-"_ - _ = None"
+fun plus_lb where
+"Lb x + Lb y = Lb(x+y)" |
+"_ + _ = Minf"
+
+instance ..
+end
+
+instantiation ub :: plus
+begin
+
+fun plus_ub where
+"Ub x + Ub y = Ub(x+y)" |
+"_ + _ = Pinf"
+
+instance ..
+end
+
+instantiation ivl :: plus
+begin
+
+definition "i1+i2 = (if is_empty i1 | is_empty i2 then empty else
+  case (i1,i2) of (Ivl l1 h1, Ivl l2 h2) \<Rightarrow> Ivl (l1+l2) (h1+h2))"
 
 instance ..
+end
 
+fun uminus_ub :: "ub \<Rightarrow> lb" where
+"uminus_ub(Ub( x)) = Lb(-x)" |
+"uminus_ub Pinf = Minf"
+
+fun uminus_lb :: "lb \<Rightarrow> ub" where
+"uminus_lb(Lb( x)) = Ub(-x)" |
+"uminus_lb Minf = Pinf"
+
+instantiation ivl :: minus
+begin
+
+definition "i1 - i2 = (if is_empty i1 | is_empty i2 then empty else
+  case (i1,i2) of (Ivl l1 h1, Ivl l2 h2) \<Rightarrow> Ivl (l1 + uminus_ub h2) (h1 + uminus_lb l2))"
+
+instance ..
 end
 
-definition "minus_ivl i1 i2 = (if is_empty i1 | is_empty i2 then empty else
-  case (i1,i2) of (Ivl l1 h1, Ivl l2 h2) \<Rightarrow> Ivl (l1-h2) (h1-l2))"
+instantiation ivl :: uminus
+begin
+
+fun uminus_ivl where
+"-(Ivl l h) = Ivl (uminus_ub h) (uminus_lb l)"
+
+instance ..
+end
+
+lemma minus_ivl_nice_def: "(i1::ivl) - i2 = i1 + -i2"
+by(auto simp: plus_ivl_def minus_ivl_def split: ivl.split lub_splits)
 
 lemma gamma_minus_ivl:
-  "n1 : \<gamma>_ivl i1 \<Longrightarrow> n2 : \<gamma>_ivl i2 \<Longrightarrow> n1-n2 : \<gamma>_ivl(minus_ivl i1 i2)"
-by(auto simp add: minus_ivl_def \<gamma>_ivl_def split: ivl.splits option.splits)
+  "n1 : \<gamma>_ivl i1 \<Longrightarrow> n2 : \<gamma>_ivl i2 \<Longrightarrow> n1-n2 : \<gamma>_ivl(i1 - i2)"
+by(auto simp add: minus_ivl_def \<gamma>_ivl_def split: ivl.splits lub_splits)
 
 definition "filter_plus_ivl i i1 i2 = ((*if is_empty i then empty else*)
-  i1 \<sqinter> minus_ivl i i2, i2 \<sqinter> minus_ivl i i1)"
+  i1 \<sqinter> (i - i2), i2 \<sqinter> (i - i1))"
 
 fun filter_less_ivl :: "bool \<Rightarrow> ivl \<Rightarrow> ivl \<Rightarrow> ivl * ivl" where
 "filter_less_ivl res (Ivl l1 h1) (Ivl l2 h2) =
   (if is_empty(Ivl l1 h1) \<or> is_empty(Ivl l2 h2) then (empty, empty) else
    if res
-   then (Ivl l1 (min_option True h1 (h2 - Some 1)),
-         Ivl (max_option False (l1 + Some 1) l2) h2)
-   else (Ivl (max_option False l1 l2) h1, Ivl l2 (min_option True h1 h2)))"
+   then (Ivl l1 (min h1 (h2 + Ub -1)), Ivl (max (l1 + Lb 1) l2) h2)
+   else (Ivl (max l1 l2) h1, Ivl l2 (min h1 h2)))"
 
 interpretation Val_abs
-where \<gamma> = \<gamma>_ivl and num' = num_ivl and plus' = plus_ivl
+where \<gamma> = \<gamma>_ivl and num' = num_ivl and plus' = "op +"
 proof
   case goal1 thus ?case
-    by(auto simp: \<gamma>_ivl_def le_ivl_def le_option_def split: ivl.split option.split if_splits)
+    by(auto simp: \<gamma>_ivl_def le_ivl_def le_lub_defs split: ivl.split lub_splits if_splits)
 next
   case goal2 show ?case by(simp add: \<gamma>_ivl_def Top_ivl_def)
 next
   case goal3 thus ?case by(simp add: \<gamma>_ivl_def num_ivl_def)
 next
   case goal4 thus ?case
-    by(auto simp add: \<gamma>_ivl_def plus_ivl_def split: ivl.split option.splits)
+    by(auto simp add: \<gamma>_ivl_def plus_ivl_def split: ivl.split lub_splits)
 qed
 
 interpretation Val_abs1_gamma
-where \<gamma> = \<gamma>_ivl and num' = num_ivl and plus' = plus_ivl
+where \<gamma> = \<gamma>_ivl and num' = num_ivl and plus' = "op +"
 defines aval_ivl is aval'
 proof
   case goal1 thus ?case
-    by(auto simp add: \<gamma>_ivl_def meet_ivl_def empty_def min_option_def max_option_def split: ivl.split option.split)
+    by(auto simp add: \<gamma>_ivl_def meet_ivl_def empty_def min_def max_def split: ivl.split lub_splits)
 next
   case goal2 show ?case by(auto simp add: bot_ivl_def \<gamma>_ivl_def empty_def)
 qed
 
-lemma mono_minus_ivl:
-  "i1 \<sqsubseteq> i1' \<Longrightarrow> i2 \<sqsubseteq> i2' \<Longrightarrow> minus_ivl i1 i2 \<sqsubseteq> minus_ivl i1' i2'"
-apply(auto simp add: minus_ivl_def empty_def le_ivl_def le_option_def split: ivl.splits)
-  apply(simp split: option.splits)
- apply(simp split: option.splits)
-apply(simp split: option.splits)
+lemma mono_minus_ivl: fixes i1 :: ivl
+shows "i1 \<sqsubseteq> i1' \<Longrightarrow> i2 \<sqsubseteq> i2' \<Longrightarrow> i1 - i2 \<sqsubseteq> i1' - i2'"
+apply(auto simp add: minus_ivl_def empty_def le_ivl_def le_lub_defs split: ivl.splits)
+  apply(simp split: lub_splits)
+ apply(simp split: lub_splits)
+apply(simp split: lub_splits)
 done
 
 
 interpretation Val_abs1
-where \<gamma> = \<gamma>_ivl and num' = num_ivl and plus' = plus_ivl
+where \<gamma> = \<gamma>_ivl and num' = num_ivl and plus' = "op +"
 and test_num' = in_ivl
 and filter_plus' = filter_plus_ivl and filter_less' = filter_less_ivl
 proof
   case goal1 thus ?case
-    by (simp add: \<gamma>_ivl_def split: ivl.split option.split)
+    by (simp add: \<gamma>_ivl_def split: ivl.split lub_splits)
 next
   case goal2 thus ?case
     by(auto simp add: filter_plus_ivl_def)
       (metis gamma_minus_ivl add_diff_cancel add_commute)+
 next
   case goal3 thus ?case
-    by(cases a1, cases a2,
-      auto simp: \<gamma>_ivl_def min_option_def max_option_def le_option_def split: if_splits option.splits)
+    by(cases a1, cases a2, auto simp: \<gamma>_ivl_def min_def max_def split: if_splits lub_splits)
 qed
 
 interpretation Abs_Int1
-where \<gamma> = \<gamma>_ivl and num' = num_ivl and plus' = plus_ivl
+where \<gamma> = \<gamma>_ivl and num' = num_ivl and plus' = "op +"
 and test_num' = in_ivl
 and filter_plus' = filter_plus_ivl and filter_less' = filter_less_ivl
 defines afilter_ivl is afilter
@@ -230,19 +299,19 @@
 text{* Monotonicity: *}
 
 interpretation Abs_Int1_mono
-where \<gamma> = \<gamma>_ivl and num' = num_ivl and plus' = plus_ivl
+where \<gamma> = \<gamma>_ivl and num' = num_ivl and plus' = "op +"
 and test_num' = in_ivl
 and filter_plus' = filter_plus_ivl and filter_less' = filter_less_ivl
 proof
   case goal1 thus ?case
-    by(auto simp: plus_ivl_def le_ivl_def le_option_def empty_def split: if_splits ivl.splits option.splits)
+    by(auto simp: plus_ivl_def le_ivl_def le_lub_defs empty_def split: if_splits ivl.splits lub_splits)
 next
   case goal2 thus ?case
     by(auto simp: filter_plus_ivl_def le_prod_def mono_meet mono_minus_ivl)
 next
   case goal3 thus ?case
     apply(cases a1, cases b1, cases a2, cases b2, auto simp: le_prod_def)
-    by(auto simp add: empty_def le_ivl_def le_option_def min_option_def max_option_def split: option.splits)
+    by(auto simp add: empty_def le_ivl_def le_lub_defs min_def max_def split: lub_splits)
 qed
 
 
--- a/src/HOL/IMP/Abs_Int3.thy	Fri Feb 22 17:24:09 2013 +0100
+++ b/src/HOL/IMP/Abs_Int3.thy	Fri Feb 22 20:12:53 2013 +0100
@@ -87,18 +87,18 @@
   ((*if is_empty ivl1 then ivl2 else
    if is_empty ivl2 then ivl1 else*)
      case (ivl1,ivl2) of (Ivl l1 h1, Ivl l2 h2) \<Rightarrow>
-       Ivl (if le_option False l2 l1 \<and> l2 \<noteq> l1 then None else l1)
-           (if le_option True h1 h2 \<and> h1 \<noteq> h2 then None else h1))"
+       Ivl (if l2 \<le> l1 \<and> l2 \<noteq> l1 then Minf else l1)
+           (if h1 \<le> h2 \<and> h1 \<noteq> h2 then Pinf else h1))"
 
 definition "narrow_ivl ivl1 ivl2 =
   ((*if is_empty ivl1 \<or> is_empty ivl2 then empty else*)
      case (ivl1,ivl2) of (Ivl l1 h1, Ivl l2 h2) \<Rightarrow>
-       Ivl (if l1 = None then l2 else l1)
-           (if h1 = None then h2 else h1))"
+       Ivl (if l1 = Minf then l2 else l1)
+           (if h1 = Pinf then h2 else h1))"
 
 instance
 proof qed
-  (auto simp add: widen_ivl_def narrow_ivl_def le_option_def le_ivl_def empty_def split: ivl.split option.split if_splits)
+  (auto simp add: widen_ivl_def narrow_ivl_def le_lub_defs le_ivl_def empty_def split: ivl.split lub_splits if_splits)
 
 end
 
@@ -382,7 +382,7 @@
 end
 
 interpretation Abs_Int2
-where \<gamma> = \<gamma>_ivl and num' = num_ivl and plus' = plus_ivl
+where \<gamma> = \<gamma>_ivl and num' = num_ivl and plus' = "op +"
 and test_num' = in_ivl
 and filter_plus' = filter_plus_ivl and filter_less' = filter_less_ivl
 defines AI_ivl' is AI_wn
@@ -583,19 +583,19 @@
 
 definition m_ivl :: "ivl \<Rightarrow> nat" where
 "m_ivl ivl = (case ivl of Ivl l h \<Rightarrow>
-     (case l of None \<Rightarrow> 0 | Some _ \<Rightarrow> 1) + (case h of None \<Rightarrow> 0 | Some _ \<Rightarrow> 1))"
+     (case l of Minf \<Rightarrow> 0 | Lb _ \<Rightarrow> 1) + (case h of Pinf \<Rightarrow> 0 | Ub _ \<Rightarrow> 1))"
 
 lemma m_ivl_height: "m_ivl ivl \<le> 2"
-by(simp add: m_ivl_def split: ivl.split option.split)
+by(simp add: m_ivl_def split: ivl.split lub_splits)
 
 lemma m_ivl_anti_mono: "(y::ivl) \<sqsubseteq> x \<Longrightarrow> m_ivl x \<le> m_ivl y"
-by(auto simp: m_ivl_def le_option_def le_ivl_def
-        split: ivl.split option.split if_splits)
+by(auto simp: m_ivl_def le_lub_defs le_ivl_def
+        split: ivl.split lub_splits if_splits)
 
 lemma m_ivl_widen:
   "~ y \<sqsubseteq> x \<Longrightarrow> m_ivl(x \<nabla> y) < m_ivl x"
-by(auto simp: m_ivl_def widen_ivl_def le_option_def le_ivl_def
-        split: ivl.splits option.splits if_splits)
+by(auto simp: m_ivl_def widen_ivl_def le_lub_defs le_ivl_def
+        split: ivl.splits lub_splits if_splits)
 
 definition n_ivl :: "ivl \<Rightarrow> nat" where
 "n_ivl ivl = 2 - m_ivl ivl"
@@ -605,12 +605,12 @@
 
 lemma n_ivl_narrow:
   "~ x \<sqsubseteq> x \<triangle> y \<Longrightarrow> n_ivl(x \<triangle> y) < n_ivl x"
-by(auto simp: n_ivl_def m_ivl_def narrow_ivl_def le_option_def le_ivl_def
-        split: ivl.splits option.splits if_splits)
+by(auto simp: n_ivl_def m_ivl_def narrow_ivl_def le_lub_defs le_ivl_def
+        split: ivl.splits lub_splits if_splits)
 
 
 interpretation Abs_Int2_measure
-where \<gamma> = \<gamma>_ivl and num' = num_ivl and plus' = plus_ivl
+where \<gamma> = \<gamma>_ivl and num' = num_ivl and plus' = "op +"
 and test_num' = in_ivl
 and filter_plus' = filter_plus_ivl and filter_less' = filter_less_ivl
 and m = m_ivl and n = n_ivl and h = 2