Array lookup with a default #
The source functions check the actual buffer length before reading a cell.
Their mathematical observation is Lean's Array.getD, including the out-of-bounds
case. A valid contents observation suffices; the caller supplies no index bound.
Both branches preserve the entire heap and all previously observed arrays.
Fold an actual source invocation back to its named ordinary-argument observation.
Apply a predicate, postcondition or bound with ordinary source parameters to the actual argument environment. No new contract or execution is introduced.
Equations
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
The source program's declared first-order signatures.
Equations
- One or more equations did not get rendered due to their size.
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.
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 named function's actual independently interpreted source body.
Equations
- One or more equations did not get rendered due to their size.
Instances For
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
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.
Apply a predicate, postcondition or bound with ordinary source parameters to the actual argument environment. No new contract or execution is introduced.
Equations
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
One source-body equation in ordinary monadic notation; named callees remain opaque.
The finite table of actual named source bodies.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The source contract is equivalent to ordinary curried preconditions and successful result/heap postconditions, including termination and absence of faults.
The actual declared argument environment, constructed from ordinary source parameters. This is proof-side parameter transport, not an additional runtime operation.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Fold an actual source invocation back to its named ordinary-argument observation.
The actual declared argument environment, constructed from ordinary source parameters. This is proof-side parameter transport, not an additional runtime operation.
Equations
- One or more equations did not get rendered due to their size.
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.
This named source function's index in its declared signature table.
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.
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 source contract is equivalent to ordinary curried preconditions and successful result/heap postconditions, including termination and absence of faults.
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
Natural lookup returns the ordinary array element or the supplied default, without allocation or modification of any observed storage.
Boolean lookup uses the same bounds check and actual read as natural lookup.
Natural array, index and default observed at the same invocation heap.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Boolean array, index and default observed at the same invocation heap.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Boolean lookup refines Lean's total defaulted array access.
The natural read preserves all old array observations, including aliases.
The Boolean read preserves all old array observations, including aliases.
Natural lookup supplies the standard represented-call shape frame.
Boolean lookup supplies the standard represented-call shape frame.