Theory MemoryParameters
section ‹RPC-Memory example: Memory parameters›
theory MemoryParameters
imports RPCMemoryParams
begin
datatype memOp = read Locs | "write" Locs Vals
consts
MemLoc :: "Locs set"
MemVal :: "Vals set"
OK :: "Vals"
BadArg :: "Vals"
MemFailure :: "Vals"
NotAResult :: "Vals"
InitVal :: "Vals"
axiomatization where
BadArgNoMemVal: "BadArg ∉ MemVal" and
MemFailNoMemVal: "MemFailure ∉ MemVal" and
InitValMemVal: "InitVal ∈ MemVal" and
NotAResultNotVal: "NotAResult ∉ MemVal" and
NotAResultNotOK: "NotAResult ≠ OK" and
NotAResultNotBA: "NotAResult ≠ BadArg" and
NotAResultNotMF: "NotAResult ≠ MemFailure"
lemmas [simp] =
BadArgNoMemVal MemFailNoMemVal InitValMemVal NotAResultNotVal
NotAResultNotOK NotAResultNotBA NotAResultNotMF
NotAResultNotOK [symmetric] NotAResultNotBA [symmetric] NotAResultNotMF [symmetric]
lemma MemValNotAResultE: "⟦ x ∈ MemVal; (x ≠ NotAResult ⟹ P) ⟧ ⟹ P"
using NotAResultNotVal by blast
end