src/HOL/IMP/AbsInt1_ivl.thy
changeset 45019 4e3b999c62fa
parent 44944 f136409c2cef
child 45020 21334181f820
equal deleted inserted replaced
45018:020e460b6644 45019:4e3b999c62fa
   148 definition "inv_plus_ivl i1 i2 i = ((*if is_empty i then empty else*)
   148 definition "inv_plus_ivl i1 i2 i = ((*if is_empty i then empty else*)
   149   i1 \<sqinter> minus_ivl i i2, i2 \<sqinter> minus_ivl i i1)"
   149   i1 \<sqinter> minus_ivl i i2, i2 \<sqinter> minus_ivl i i1)"
   150 
   150 
   151 fun inv_less_ivl :: "ivl \<Rightarrow> ivl \<Rightarrow> bool \<Rightarrow> ivl * ivl" where
   151 fun inv_less_ivl :: "ivl \<Rightarrow> ivl \<Rightarrow> bool \<Rightarrow> ivl * ivl" where
   152 "inv_less_ivl (I l1 h1) (I l2 h2) res =
   152 "inv_less_ivl (I l1 h1) (I l2 h2) res =
   153   (if res
   153   ((*if is_empty(I l1 h1) \<or> is_empty(I l2 h2) then (empty, empty) else*)
       
   154    if res
   154    then (I l1 (min_option True h1 (h2 - Some 1)),
   155    then (I l1 (min_option True h1 (h2 - Some 1)),
   155          I (max_option False (l1 + Some 1) l2) h2)
   156          I (max_option False (l1 + Some 1) l2) h2)
   156    else (I (max_option False l1 l2) h1, I l2 (min_option True h1 h2)))"
   157    else (I (max_option False l1 l2) h1, I l2 (min_option True h1 h2)))"
   157 
   158 
   158 interpretation Rep rep_ivl
   159 interpretation Rep rep_ivl