equal
deleted
inserted
replaced
122 lemma ex_distrib: "(\<exists>x. P x \<or> Q x) \<longleftrightarrow> ((\<exists>x. P x) \<or> (\<exists>x. Q x))" by blast |
122 lemma ex_distrib: "(\<exists>x. P x \<or> Q x) \<longleftrightarrow> ((\<exists>x. P x) \<or> (\<exists>x. Q x))" by blast |
123 |
123 |
124 lemmas dnf_simps = weak_dnf_simps nnf_simps ex_distrib |
124 lemmas dnf_simps = weak_dnf_simps nnf_simps ex_distrib |
125 |
125 |
126 use "Tools/Qelim/langford.ML" |
126 use "Tools/Qelim/langford.ML" |
127 |
|
128 method_setup dlo = {* |
127 method_setup dlo = {* |
129 Method.ctxt_args (Method.SIMPLE_METHOD' o LangfordQE.dlo_tac) |
128 Method.ctxt_args (Method.SIMPLE_METHOD' o LangfordQE.dlo_tac) |
130 *} "Langford's algorithm for quantifier elimination in dense linear orders" |
129 *} "Langford's algorithm for quantifier elimination in dense linear orders" |
131 |
130 |
132 interpretation dlo_ordring_class: dense_linear_order["op \<le> :: 'a::{ordered_field} \<Rightarrow> _" "op <"] |
131 interpretation dlo_ordring_class: dense_linear_order["op \<le> :: 'a::{ordered_field} \<Rightarrow> _" "op <"] |
137 apply (rule_tac x = "(x + y) / (1 + 1)" in exI) |
136 apply (rule_tac x = "(x + y) / (1 + 1)" in exI) |
138 apply (rule conjI) |
137 apply (rule conjI) |
139 apply (rule less_half_sum, simp) |
138 apply (rule less_half_sum, simp) |
140 apply (rule gt_half_sum, simp) |
139 apply (rule gt_half_sum, simp) |
141 done |
140 done |
142 |
|
143 lemma (in dense_linear_order) "\<forall>a b. (\<exists>x. a \<sqsubset> x \<and> x\<sqsubset> b) \<longleftrightarrow> (a \<sqsubset> b)" |
|
144 by dlo |
|
145 |
|
146 lemma "\<forall>(a::'a::ordered_field) b. (\<exists>x. a < x \<and> x< b) \<longleftrightarrow> (a < b)" |
|
147 by dlo |
|
148 |
141 |
149 section {* Contructive dense linear orders yield QE for linear arithmetic over ordered Fields -- see @{text "Arith_Tools.thy"} *} |
142 section {* Contructive dense linear orders yield QE for linear arithmetic over ordered Fields -- see @{text "Arith_Tools.thy"} *} |
150 |
143 |
151 context Linorder |
144 context Linorder |
152 begin |
145 begin |
559 |
552 |
560 method_setup ferrack = {* |
553 method_setup ferrack = {* |
561 Method.ctxt_args (Method.SIMPLE_METHOD' o FerranteRackoff.dlo_tac) |
554 Method.ctxt_args (Method.SIMPLE_METHOD' o FerranteRackoff.dlo_tac) |
562 *} "Ferrante and Rackoff's algorithm for quantifier elimination in dense linear orders" |
555 *} "Ferrante and Rackoff's algorithm for quantifier elimination in dense linear orders" |
563 |
556 |
564 end |
557 end |