[Imprint][Data Privacy Statement][E-Mail]



View long theorem info. View the proof. Back to main index. View the specification. View theorem base summary, View theorem base listing, the used properties by spec, the dependency list, the symbol table,

Proof step 6 from proof encode-contract (previous step)

buf0 = buf, n + ENCODED_ELEM_SIZE ≤ # buf ⊦ ⟪encode#(a, n; buf, m; err); if err = ESUCCESS ∧ isempty(buf, n, m) then {debug#("encoding_nonempty: encoding is empty"); err := EINVAL}⟫ ( (err = ESUCCESS ∨ ⌊err⌋ ) ∧ # buf = # buf0 ∧ subarray(buf, 0, n) = subarray(buf0, 0, n) ∧ subarray(buf, n + ENCODED_ELEM_SIZE, # buf - n + ENCODED_ELEM_SIZE) = subarray(buf0, n + ENCODED_ELEM_SIZE, # buf - n + ENCODED_ELEM_SIZE) ∧ (err = ESUCCESS → is-encoded-nonempty(a, subarray(buf, n, ENCODED_ELEM_SIZE))))

User applied rule insert program lemma

And obtained the following new goals

Rule argument

spec: encoding name: encode-contract seq: n + encoding-size(a) ≤ # buf, buf0 = buf ⊦ ⟪encode#(a, n; buf, n0; err)⟫ ( (err = ESUCCESS ∨ ⌊err⌋ ) ∧ # buf = # buf0 ∧ subarray(buf, 0, n) = subarray(buf0, 0, n) ∧ subarray (buf, n + encoding-size(a), # buf - n + encoding-size(a)) = subarray (buf0, n + encoding-size(a), # buf - n + encoding-size(a)) ∧ ( err = ESUCCESS → is-encoded(a, subarray(buf, n, encoding-size(a))) ∧ n0 = encoding-size(a))) subst: [n, a, n0, buf, err, buf0] → [n, a, m, buf, err, buf] flags: <all paths>

Additional information

Used simplifier rules: ⊦ encoding-size(a) = ENCODED_ELEM_SIZE; (s)