Usage & credit ledger service in Lean 4: exact integer money, a proven balance fold, a typed hold lifecycle, and Postgres-enforced reserves and idempotent grants.
dependent-types postgresql concurrency theorem-proving ledger lean billing formal-verification credits metering idempotency append-only correct-by-construction lean4 linen usage-based-billing double-spend-prevention usage-ledger typednotes
-
Updated
Oct 2, 2026 - Lean