Typed views of source value fields #
Word, array-reference and unit values are represented by one, two and zero words respectively. Encoding and decoding identify those same fields; they neither allocate arrays nor load mathematical data into source memory. The source syntax and callable-function proof interfaces share this representation.
Equations
Equations
- Ram.DSL.instBEqValueKind.beq x✝ y✝ = (x✝.ctorIdx == y✝.ctorIdx)
Instances For
Instances For
Equations
Number of physical words in a source value.
Equations
Instances For
Ordinary Lean value represented by the declared result fields.
Equations
Instances For
The actual fields of a typed value, without allocation or memory access.
Equations
- Ram.DSL.ValueKind.word.encode = fun (value : Ram.DSL.ValueKind.word.Value w) => [value]
- Ram.DSL.ValueKind.array.encode = Ram.ArrayRef.args
- Ram.DSL.ValueKind.unit.encode = fun (x : Ram.DSL.ValueKind.unit.Value w) => []
Instances For
theorem
Ram.DSL.ValueKind.encode_injective
{w : Nat}
(kind : ValueKind)
:
Function.Injective kind.encode
Distinct typed values cannot have the same actual fields.