Remainder from mathematical division, multiplication and subtraction #
The nested source expression is compiled into actual primitive bindings. Its result follows from the ordinary Nat division identity, including divisor zero. All intermediate values fit whenever the two inputs fit; subtraction retains its saturating Nat meaning. The separate count concerns this division-based implementation, not the backend's single remainder instruction. Generated correspondence transfers the native function's result to source execution and preserves every initial heap.
Apply a predicate, postcondition or bound with ordinary source parameters to the actual argument environment. No new contract or execution is introduced.
Equations
- Complexity.Language.Examples.Remainder.Implementation.remainder_onArgs function✝ env✝ = function✝ env✝.head env✝.tail.head
Instances For
The source contract is equivalent to ordinary curried preconditions and successful result/heap postconditions, including termination and absence of faults.
The source program's declared first-order signatures.
Equations
Instances For
Executable total value function generated from the same buffer-free source block.
Equations
Instances For
Apply a supplied source contract with ordinary named arguments and its actual returned value and final heap. No callee body or new contract is inferred.
The finite table of actual named source bodies.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The named function's actual independently interpreted source body.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Budget-free total correctness with ordinary source parameters and relational initial/final heap postconditions. This is the existing source function contract.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The actual declared argument environment, constructed from ordinary source parameters. This is proof-side parameter transport, not an additional runtime operation.
Equations
Instances For
Prove the ordinary-parameter source contract with a total-correctness triple for the same action. The ghost initial heap equals the actual entry heap; successful results use the actual final heap, and faults are excluded.
Exact total source contract inherited from the generated native function.
The actual source action terminates with the generated native result and preserves every initial heap. Lean's native recursion principle proves this once.
This named source function's index in its declared signature table.
Equations
Instances For
One source-body equation in ordinary monadic notation; named callees remain opaque.
The named function's actual partial source action, with ordinary typed arguments and an explicitly supplied shared heap.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The source implementation has Lean's remainder semantics, also at zero.
An ordinary mathematical specification of the same source function.
Neither a positive divisor nor a nonnegative machine subtraction premise is needed. The emitted code implements all mathematical inputs that fit.
The straight-line body bound includes division, multiplication, saturating subtraction, the return and the function-body wrapper.
Generic lowering supplies the actual callable result without a register proof.