Theory word_abs_cases
theory word_abs_cases imports
"AutoCorres2_Main.AutoCorres_Main"
begin
thm ac_corres_chain
L2Tcorres_trivial_from_local_var_extract
corresTA_trivial_from_heap_lift
lemma INT_MIN_MAX_smod: "⋀a b :: int. ⟦ INT_MIN ≤ b; b ≤ INT_MAX; b ≠ 0 ⟧ ⟹ INT_MIN ≤ a smod b ∧ a smod b ≤ INT_MAX"
apply (case_tac "b > 0")
apply (rule conjI)
apply (case_tac "a ≥ 0")
apply (frule_tac a = a and b = b in smod_int_compares(2))
apply assumption
apply (simp add: INT_MIN_def)
apply (subgoal_tac "0 ≥ a")
apply (frule_tac a = a and b = b in smod_int_compares(3))
apply assumption
apply (simp add: INT_MIN_def INT_MAX_def)
apply arith
apply (case_tac "a ≥ 0")
apply (frule_tac a = a and b = b in smod_int_compares(1))
apply assumption
apply arith
apply (subgoal_tac "0 ≥ a")
apply (frule_tac a = a and b = b in smod_int_compares(4))
apply assumption
apply arith
apply arith
apply (subgoal_tac "0 > b")
apply (rule conjI)
apply (case_tac "a ≥ 0")
apply (frule_tac a = a and b = b in smod_int_compares(6))
apply assumption
apply simp
apply (subgoal_tac "0 ≥ a")
apply (frule_tac a = a and b = b in smod_int_compares(8))
apply assumption
apply (simp add: INT_MIN_def)
apply arith
apply (case_tac "a ≥ 0")
apply (frule_tac a = a and b = b in smod_int_compares(5))
apply assumption
apply (simp add: INT_MIN_def INT_MAX_def)
apply (subgoal_tac "0 ≥ a")
apply (frule_tac a = a and b = b in smod_int_compares(7))
apply assumption
apply (simp add: INT_MAX_def)
apply arith
apply arith
done