Skip to main content

Module expr

Module expr 

Source
Expand description

Lowers policy::Expression into Lean 4 propositions.

Every policy is classified as either groundable — fully evaluable over the declared model, emitted with a by decide proof — or deferred, emitted as a documented proof obligation stub. The Rust evaluator here evaluates exactly the semantics that get emitted to Lean (same scaled integers, same operators), so a decide proof emitted as “holds” is guaranteed to check.

Structs§

GroundCtx
Ground context shared by all policies of one model.

Enums§

Lowered
Result of lowering one policy expression.

Functions§

collect_decimals
Collect every decimal literal in an expression (for shared-scale computation).
lean_ident
Sanitize a .sea name into a valid Lean identifier (deterministic).
lower_policy
scaled
Scale a decimal to the shared integer scale k.
unique_idents
Deterministically deduplicate sanitized identifiers (_2, _3, … suffixes).