Theory AutoCorresSimpset
theory AutoCorresSimpset
imports SimplBucket
begin
lemma globals_surj: "surj globals"
apply (rule surjI [where f="λx. undefined⦇ globals := x⦈"])
apply simp
done
lemma triv_ex_apply: "∃s1 s0. f s0 = s1"
by (iprover)
lemmas ptr_val_ptr_add_simps =
ptr_add_word32
ptr_add_word32_signed
ptr_add_word64
ptr_add_word64_signed
ML ‹
val AUTOCORRES_SIMPSET =
@{context}
|> Simplifier.del_simps (
@{thms fun_upd_apply}
@ @{thms word_neq_0_conv neq0_conv}
@ @{thms ptr_coerce.simps ptr_add_0_id}
@ @{thms CollectPairFalse}
@ @{thms unsigned_of_nat unsigned_of_int}
@ @{thms map_of_default.simps}
@ @{thms field_lvalue_append}
@ @{thms ptr_val_ptr_add_simps}
@ @{thms distinct_sets.simps} )
|> Simplifier.add_simps (
@{thms globals_surj}
)
|> Simplifier.add_simps (
@{thms triv_ex_apply}
)
|> Simplifier.add_simps @{thms ptr_NULL_conv}
|> fold Simplifier.del_proc [@{simproc case_prod_beta}, @{simproc case_prod_eta}]
|> simpset_of
›
end