Contracts for numerical operations #
Relations between executable functions and their denotations, starting with indexed inputs and
specializing to unary, binary, and ternary functions. The contracts distinguish total, finite,
checked, cast, and quantizer semantics. They live in Prop and add no runtime data.
See Operation.Status for result flags, Operation.Context for rounding policies, and
Operation.Entropy for explicit randomness. Operation.Proof contains application and
composition lemmas.
Indexed input contracts #
Runtime inputs indexed by their numerical systems.
Instances For
Complete denotations of indexed numerical inputs.
Instances For
Ordinary finite scalar values indexed by their numerical systems.
Instances For
Every indexed runtime input represents its corresponding finite scalar.
Instances For
An executable operation satisfies a relational contract over the complete denotations of all inputs.
Result is deliberately unconstrained: it may be a code, an Option, a status-bearing result,
an entropy-producing computation, or a block value.
Instances For
An executable operation satisfies a relational contract on represented finite inputs.
Instances For
Unary, binary, and ternary relations #
A unary executable operation satisfies a relation on complete input denotations.
Instances For
A two-input executable operation satisfies a relation on complete input denotations.
Instances For
A three-input executable operation satisfies a relation on complete input denotations.
Instances For
A unary executable operation satisfies a relation on represented finite inputs.
Instances For
A two-input executable operation satisfies a relation on represented finite inputs.
Instances For
A three-input executable operation satisfies a relation on represented finite inputs.
Instances For
Total, finite, checked, and quantizer semantics #
Correctness of a unary total operation, including exceptional values.
Instances For
Correctness of a two-input total operation, including exceptional values.
Instances For
Correctness of a three-input total operation, including exceptional values.
Instances For
Correctness of a unary operation on represented finite inputs.
Instances For
Correctness of a two-input operation on represented finite inputs.
Instances For
Correctness of a three-input operation on represented finite inputs.
Instances For
Correctness of a unary operation when a predicate on the concrete input and result holds.
The predicate captures executable side conditions such as a floating-point result remaining finite. It is proof-only and does not change the direct runtime function.
Instances For
Correctness of a two-input operation when a predicate on its concrete inputs and result holds.
Instances For
Correctness of a three-input operation when a predicate on its concrete inputs and result holds.
Instances For
Correctness of a checked unary operation on represented finite inputs.
Instances For
Correctness of a checked two-input operation on represented finite inputs.
Instances For
Correctness of a checked three-input operation on represented finite inputs.
Instances For
A checked unary operation is correct whenever its scalar precondition holds.
Instances For
A checked two-input operation is correct whenever its scalar precondition holds.
Instances For
A checked three-input operation is correct whenever its scalar precondition holds.
Instances For
A conversion implements embed on every represented value accepted by pre.
Instances For
A quantizer implements a named rounding map on values satisfying pre.