90 |
90 |
91 lemma in_intervalI: |
91 lemma in_intervalI: |
92 "x \<in>\<^sub>i X" if "lower X \<le> x" "x \<le> upper X" |
92 "x \<in>\<^sub>i X" if "lower X \<le> x" "x \<le> upper X" |
93 using that by (auto simp: set_of_eq) |
93 using that by (auto simp: set_of_eq) |
94 |
94 |
95 abbreviation in_real_interval ("(_/ \<in>\<^sub>r _)" [51, 51] 50) where |
95 abbreviation in_real_interval (\<open>(_/ \<in>\<^sub>r _)\<close> [51, 51] 50) where |
96 "x \<in>\<^sub>r X \<equiv> x \<in>\<^sub>i real_interval X" |
96 "x \<in>\<^sub>r X \<equiv> x \<in>\<^sub>i real_interval X" |
97 |
97 |
98 lemma in_real_intervalI: |
98 lemma in_real_intervalI: |
99 "x \<in>\<^sub>r X" if "lower X \<le> x" "x \<le> upper X" for x::real and X::"float interval" |
99 "x \<in>\<^sub>r X" if "lower X \<le> x" "x \<le> upper X" for x::real and X::"float interval" |
100 using that |
100 using that |
147 if "fst x \<le> snd x" |
147 if "fst x \<le> snd x" |
148 using that |
148 using that |
149 by (auto simp: lower_def upper_def Interval_inverse split_beta') |
149 by (auto simp: lower_def upper_def Interval_inverse split_beta') |
150 |
150 |
151 definition all_in_i :: "'a::preorder list \<Rightarrow> 'a interval list \<Rightarrow> bool" |
151 definition all_in_i :: "'a::preorder list \<Rightarrow> 'a interval list \<Rightarrow> bool" |
152 (infix "(all'_in\<^sub>i)" 50) |
152 (infix \<open>(all'_in\<^sub>i)\<close> 50) |
153 where "x all_in\<^sub>i I = (length x = length I \<and> (\<forall>i < length I. x ! i \<in>\<^sub>i I ! i))" |
153 where "x all_in\<^sub>i I = (length x = length I \<and> (\<forall>i < length I. x ! i \<in>\<^sub>i I ! i))" |
154 |
154 |
155 definition all_in :: "real list \<Rightarrow> float interval list \<Rightarrow> bool" |
155 definition all_in :: "real list \<Rightarrow> float interval list \<Rightarrow> bool" |
156 (infix "(all'_in)" 50) |
156 (infix \<open>(all'_in)\<close> 50) |
157 where "x all_in I = (length x = length I \<and> (\<forall>i < length I. x ! i \<in>\<^sub>r I ! i))" |
157 where "x all_in I = (length x = length I \<and> (\<forall>i < length I. x ! i \<in>\<^sub>r I ! i))" |
158 |
158 |
159 definition all_subset :: "'a::order interval list \<Rightarrow> 'a interval list \<Rightarrow> bool" |
159 definition all_subset :: "'a::order interval list \<Rightarrow> 'a interval list \<Rightarrow> bool" |
160 (infix "(all'_subset)" 50) |
160 (infix \<open>(all'_subset)\<close> 50) |
161 where "I all_subset J = (length I = length J \<and> (\<forall>i < length I. set_of (I!i) \<subseteq> set_of (J!i)))" |
161 where "I all_subset J = (length I = length J \<and> (\<forall>i < length I. set_of (I!i) \<subseteq> set_of (J!i)))" |
162 |
162 |
163 lemmas [simp] = all_in_def all_subset_def |
163 lemmas [simp] = all_in_def all_subset_def |
164 |
164 |
165 lemma all_subsetD: |
165 lemma all_subsetD: |