Theory Alethe_Arith_Real_Rewrites
theory Alethe_Arith_Real_Rewrites
imports "HOL.Real"
begin
named_theorems rewrite_arith_geq_norm1_real ‹›
lemma [rewrite_arith_geq_norm1_real]:
fixes t::"real" and s::"real"
shows "NO_MATCH cvc_a (undefined t s)
⟹ ((t ≥ s) = ((t - s) ≥ 0/1))"
by simp
named_theorems rewrite_arith_eq_elim_real ‹›
lemma [rewrite_arith_eq_elim_real]:
fixes t::"'a::linordered_idom" and s::"'a::linordered_idom"
shows "NO_MATCH cvc_a (undefined t s)
⟹ ((t = s) = (t ≥ s ∧ t ≤ s))"
by auto
named_theorems rewrite_arith_to_int_to_real ‹›
lemma [rewrite_arith_to_int_to_real]:
fixes x::"int"
shows "NO_MATCH cvc_a (undefined x) ⟹ floor (of_int x ::real) = x"
by simp
named_theorems rewrite_arith_int_eq_conflict ‹›
lemma [rewrite_arith_int_eq_conflict]:
fixes t::int and c::real
shows "NO_MATCH cvc_a (undefined t c)
⟹ ¬((of_int (floor c)::real) = c) ⟹ (((of_int t ::real) = c) = False)"
by auto
named_theorems rewrite_arith_int_geq_tighten ‹›
lemma [rewrite_arith_int_geq_tighten]:
fixes t::int and c::real and cc::int
shows "NO_MATCH cvc_a (undefined t c cc)
⟹ (¬((of_int (floor c)) = c) ∧ (cc = (floor c) + 1)) ⟹ (((of_int t ::real) ≥ c) = (t ≥ cc))"
by linarith
end