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} delsimps (
@{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} )
addsimps (
@{thms globals_surj}
)
addsimps (
@{thms triv_ex_apply}
)
addsimps (@{thms ptr_NULL_conv})
delsimprocs
[@{simproc case_prod_beta},@{simproc case_prod_eta}]
|> simpset_of
›
end