NLA-lib Explorer

Declarative execution and accounting of source statements

Library · Source module

Declarative execution and accounting of source statements

The inference rules below run the source tree directly, with explicit structural charges. They do not invoke an evaluator, instrumentation or static resource bounds. The auxiliary judgments describe counted rounds and early exit; no rule admits a successful abort.

The format predicate and memory/index operations remain shared semantic definitions. The final query reservation is conservative: it adds the largest executed query workspace to the allocation/primitive peak. These choices are part of the reference statement.

These rules are the definition of a run: NLAlib.Ops.Specification.Accepts and NLAlib.Ops.Runs (NLAlib/Ops/Specification.lean) state acceptance and certification with NLAlib.Ops.Reference.Execution. NLAlib/Ops/Reference/Equivalence.lean proves that the evaluator NLAlib.Ops.exec, which the proofs compute with, gives exactly the same outcome.

Main definitions

* NLAlib.Ops.Reference.Derives: successful execution with full source-level accounting. * NLAlib.Ops.Reference.Repeats: the rounds of a counted loop. * NLAlib.Ops.Reference.While: actual queries and rounds of an early-exit loop. * NLAlib.Ops.Reference.Execution: checked execution and the query reservation.

Main results

* NLAlib.Ops.Reference.not_derives_abort: abort has no successful derivation. * NLAlib.Ops.Reference.derives_note_iff: annotations do not change execution.

Declarations