Skip to content

Releases

v0.17.3

Choose a tag to compare

@github-actions github-actions released this 02 Dec 19:30
Immutable release. Only release title and notes can be modified.
v0.17.3
8512099

What's Changed

  • docs(readme): link lean-intent from verdict limits by @rbeauchamp in #608
  • feat: admit closed IEEE-754 moreLeancArgs allowlist in RG1010 by @rbeauchamp in #609
  • fix: admit "expose" atom in RG1010 for sectionHeader and derivingClass by @rbeauchamp in #610

Full Changelog: v0.17.2...v0.17.3

v0.17.2

Choose a tag to compare

@github-actions github-actions released this 01 Dec 22:05
Immutable release. Only release title and notes can be modified.
v0.17.2
a0bac72

What's Changed

  • perf(Regula): accelerate Facts.prepare and sharded proof front-end, and prepare v0.17.2 by @rbeauchamp in #607

Full Changelog: v0.17.1...v0.17.2

v0.17.1

Choose a tag to compare

@github-actions github-actions released this 01 Dec 17:48
Immutable release. Only release title and notes can be modified.
v0.17.1
0d25579

What's Changed

  • chore(gate): enable lint.covered_by_test in .no-mistakes.yaml by @rbeauchamp in #605
  • perf(Regula): accelerate Sha256, parallelize envTableDigest, and prepare v0.17.1 by @rbeauchamp in #606

Full Changelog: v0.17.0...v0.17.1

v0.17.0

Choose a tag to compare

@github-actions github-actions released this 01 Dec 13:43
Immutable release. Only release title and notes can be modified.
v0.17.0
af8d6e1

What's Changed

  • feat(Regula): add sharded proof replay, verify_shards, and prepare v0.17.0 by @rbeauchamp in #604

Full Changelog: v0.16.2...v0.17.0

v0.16.2

Choose a tag to compare

@github-actions github-actions released this 30 Nov 16:10
Immutable release. Only release title and notes can be modified.
v0.16.2
3312ca5

What's Changed

  • chore: upgrade lean-intent to v0.3.0 and backfill governance rules by @rbeauchamp in #600
  • ci: add immutable GHCR CI package publishing workflow by @rbeauchamp in #601
  • perf(Regula): parallelize RG2001 kernel cone replay with persistent spine by @rbeauchamp in #602
  • chore(release): bump package version to 0.16.2 by @rbeauchamp in #603

Full Changelog: v0.16.1...v0.16.2

v0.16.1

Choose a tag to compare

@github-actions github-actions released this 26 Nov 04:53
Immutable release. Only release title and notes can be modified.
v0.16.1
2b77ffb

What's Changed

  • ci: add source-only release workflow and exact-ref gate checks by @rbeauchamp in #592
  • build(specification): pin lean-intent at release v0.1.0 by @rbeauchamp in #593
  • ci(gate): adopt lean-intent required-theorems and implementation checks by @rbeauchamp in #594
  • ci(gate): pin no-comments v0.3.1, run RequiredGate via --run, and record gate footprint by @rbeauchamp in #595
  • refactor: drain all Lean comments to zero and complete Option R1 documentation migration by @rbeauchamp in #596
  • ci: add collaborator-aware issue auto-assignment workflow by @rbeauchamp in #597
  • fix(docs,release): enforce release version parity, remove hardcoded doc tags, and reorganize README by @rbeauchamp in #599

Full Changelog: v0.16.0...v0.16.1

v0.16.0

Choose a tag to compare

@rbeauchamp rbeauchamp released this 22 Nov 17:08
Immutable release. Only release title and notes can be modified.
v0.16.0
e025e3e

Regula v0.16.0 adds out-of-tree strict proof verdict mode (REGULA_PROOF=DIR lake exe lint PROFILE) on pinned Lean v4.36.0 (611c117bfaf7b7ae1cfcf246ce6fba31e8f509e9) for already-built zero-dependency lakefile.toml Lean 4 packages (#583 / PR #589), while keeping every existing in-tree lake lint and full-gate REGULA_FULL guarantee unchanged.

Use out-of-tree proof verdict mode (no [[require]] in target lakefile.toml):

# In target zero-dependency lakefile.toml package
lake build --wfail

# From this built Regula v0.16.0 checkout
REGULA_PROOF=/path/to/project lake exe lint standard-logical

Changes since v0.15.0

  • Out-of-tree strict proof verdict mode (REGULA_PROOF=DIR, #583 / PR #589): Loads already-built zero-dependency lakefile.toml packages without modifying DIR/lakefile.toml or DIR/lake-manifest.json, refuses DIR/lakefile.lean pre-load shadowing, empty REGULA_PROOF, dual REGULA_FULL+REGULA_PROOF, and empty or non-library defaultTargets, replays the claim's cone into Lean's kernel, checks RG1001–RG1006 and RG1011–RG1013, and emits coverage plus regula: proof verdict: pass, which says nothing about what ran during the build, on <realDir>.
  • Specifications, proofs, and gate isolation: Proves end-to-end equivalence, refusal separation, owedness, witness existence, and zero trusted-base expansion (Route.outOfTreeProof adds zero new Op or Assumption constructors) across RegulaSpecification, and clears REGULA_PROOF alongside REGULA_FULL in Regula.DiagnosticsGate child invocations.

Full Changelog: v0.15.0...v0.16.0

v0.15.0

Choose a tag to compare

@rbeauchamp rbeauchamp released this 22 Nov 01:31
Immutable release. Only release title and notes can be modified.
v0.15.0
21b0ffe

Regula v0.15.0 reads one Lean release, leanprover/lean4:v4.36.0 (611c117bfaf7b7ae1cfcf246ce6fba31e8f509e9), and refuses any other via Regula.Shell.supportsLean (exit 2) and RG1010 (exit 1). It is a breaking pre-1.0 minor release over v0.14.0: projects staying on Lean v4.35.0 must remain on v0.14.0 (or v0.13.0 for the earlier rule set; projects on Lean v4.36.0 needing the v0.13.0 rule set use v0.13.1). All eleven checks (RG1001 to RG1006, RG1010 to RG1013, and RG2001), proved-safe 2-space-indented fix: guidance beneath every finding, and STANDARD.md ship at Lean v4.36.0 with the structural T.ctorIdx / T.ctorIdx._impl exemption across RG1006 and RG1011.

Use it. Put leanprover/lean4:v4.36.0 in lean-toolchain, and add this to lakefile.toml, with one profile in lintDriverArgs:

lintDriver = "regula/lint"
lintDriverArgs = ["standard-logical"]

[[require]]
name = "regula"
git = "https://github.com/rbeauchamp/regula"
rev = "v0.15.0"

Run lake update regula, and then run these two commands in order on one build, from the project's own directory with no option of Lake's and REGULA_FULL unset:

lake build --wfail
lake lint

Full gate (standalone no-require libraries):

git clone --branch v0.15.0 https://github.com/rbeauchamp/regula
cd regula
lake build lint
REGULA_FULL=/path/to/project lake exe lint standard-logical

BREAKING CHANGE — upgrading from v0.14.0.

  • Change lean-toolchain to leanprover/lean4:v4.36.0, set rev = "v0.15.0", and run lake update regula. For the full verdict, build a clone of tag v0.15.0.
  • Lean v4.36.0 pin and structural ctorIdx exemption (Option A1): Lean v4.36.0 (mkCtorIdx) generates an unsafe definition T.ctorIdx._impl calling getObjTagNat and attaches @[implemented_by T.ctorIdx._impl] to the safe T.casesOn-based T.ctorIdx on safe, non-Prop, non-single-constructor, non-runtime-builtin inductives whose T.casesOn eliminates into an extra universe parameter. v0.15.0 exempts only structurally verified T.ctorIdx (from RG1011's @[implemented_by] clause only) and T.ctorIdx._impl (from RG1006's safety and helper-name clauses only), preserving every other unsafe, partial, recursion-helper, loop, Lean.Order.fix, @[implemented_by], @[extern], @[init]/@[builtin_init], and foreign @[csimp] refusal.

Changes since v0.14.0

  • Lean v4.36.0 upgrade (#585): Moves lean-toolchain, specification/lean-toolchain, Regula.Closed.pinnedLean, Regula.Language.leanToolchain, Regula.Language.Report.label, Regula.Shell.profileOfRun, .github/workflows/gate.yml (lean-4.36.0-linux.zip SHA-256 92a996be487b48e1c2f2985be6b150490475c94d02f5a5e26665a9dab780902a), and published pins to v0.15.0 and Lean v4.36.0, updating specification/'s lean-intent dependency pin (631ed3a2196040bf491289de67da760c9eeb59f5).
  • Structural T.ctorIdx / T.ctorIdx._impl verification across RG1006 and RG1011 (#585): Extends Decl and Tables with CtorIdxForm / ctorIdxPair, verifies T.casesOn directly against Lean.mkCasesOnImp env.toKernelEnv T, reduces inductive types purely via Lean.Kernel.whnf (with a documented fail-closed boundary for non-canonical universe-polymorphic type aliases) and checks head-beta binder domains via Lean.Expr.headBeta, checks runtime builtins via Lean.Compiler.LCNF.isRuntimeBuiltinType (proved equal to RuntimeBuiltinTypes), checks isExtern = false and initFn = none on both halves, proves full bidirectional equivalence (rg1006_exact, rg1011_exact, isCtorIdxDef_eq, isCtorIdxImpl_eq, ctorIdxFormOf_eq_iff, pass_iff, pass_held), proves ctorIdxImpl_unreached under H6 (SafeMentionsSafe), and provides non-vacuity and forgery witnesses (Witnesses.withCtorIdx, withForgedCtorIdx, withForgedCtorIdx11).
  • Trusted base (RegulaSpecification.Assumptions.Assumption, 19 entries): Adds Assumption.ctorIdxTag (trusting lean_obj_tag_nat behind getObjTagNat to match T.casesOn for verified pairs) alongside the corresponding compiler-generated T.ctorIdx carve-out in Assumption.h2 and LeanBehaviour.NoProjectCode, and re-reads all 19 Lean, Lake, and OS source citations against Lean v4.36.0.

Full Changelog: v0.14.0...v0.15.0

v0.14.0

Choose a tag to compare

@rbeauchamp rbeauchamp released this 21 Nov 20:41
Immutable release. Only release title and notes can be modified.
v0.14.0
f9cfcdb

Regula v0.14.0 reads one Lean release, leanprover/lean4:v4.35.0, and refuses any other. It is a breaking release (bumping 0.13.0 to 0.14.0 under pre-1.0 Semantic Versioning): RG1013 now refuses claimed modules whose files are not module files under both verdicts (including the files lake new generates at Lean v4.35.0), RG1011 refuses replaced compiled code and foreign claimed-module @[csimp] entries, RG1012 refuses direct panic forms in claimed definitions and opaque constants, RG1006 also refuses direct Lean.Order.fix (partial_fixpoint) mentions in claimed definitions and opaque constants, and every registered rule now emits a proved-safe, 2-space-indented fix: ... guidance line beneath each finding. All eleven checks (RG1001 to RG1006, RG1010 to RG1013, and RG2001) ship in v0.14.0, together with the standalone Lean 4 engineering standard in STANDARD.md and the noncomputable boundary documentation. The README and specification/README.md at the tag state each check and what is proved of it.

Use it. Put leanprover/lean4:v4.35.0 in lean-toolchain, and add this to lakefile.toml, with one profile in lintDriverArgs:

lintDriver = "regula/lint"
lintDriverArgs = ["standard-logical"]

[[require]]
name = "regula"
git = "https://github.com/rbeauchamp/regula"
rev = "v0.14.0"

Run lake update regula, and then run these two commands in order on one build, from the project's own directory with no option of Lake's and REGULA_FULL unset:

lake build --wfail
lake lint

BREAKING CHANGE — upgrading from v0.13.0.

  • Change rev to "v0.14.0" and run lake update regula. For the full verdict, build a clone of the tag v0.14.0.
  • RG1013 (module files): Every claimed Lean file must be a module file (start with module, using public section, @[expose], or import all where other files unfold bodies). The files that lake new generates at Lean v4.35.0 have no module header and fail RG1013 until migrated. Lean refuses a module file that imports a non-module file, so dependencies imported by claimed modules must also be module files (Mathlib.lean and each file below Mathlib/ at Mathlib's tag v4.35.0 were measured as module files).
  • Additional new refusals: Projects that v0.13.0 passed can now get findings or incomplete from RG1011 (@[implemented_by], @[extern], @[init]/@[builtin_init] naming an initialization function on claimed definitions, exported claimed-module @[csimp] entries targeting theorems not declared in any claimed module, and loader RG2001 checks for hidden module-local entries or missing claimed module indices), RG1012 (direct panic forms in claimed def/opaque values), and RG1006's Lean.Order.fix (partial_fixpoint) clause on claimed def/opaque values.
  • Diagnostic output format: Each finding of a registered rule keeps its primary line (RGxxxx <subject>: <reason>) unchanged and adds one 2-space-indented fix: ... guidance line directly beneath it, escaping LF and CR. The finding count line and final verdict line are unchanged.

The two verdicts

  • The proof verdict, from lake build --wfail and lake lint on one build, means that the proofs of the claimed modules are sound and use only axioms that the profile allows, that Lean read each claimed module as a module file (RG1013), that no claimed constant has @[implemented_by] or @[extern], no claimed definition has an initialization function by @[init] or @[builtin_init], and every exported (global or scoped) @[csimp] entry registered in a claimed module names a theorem declared in some claimed module (RG1011, with loader checks under RG2001), that no claimed definition or opaque constant directly mentions a panic form (RG1012) or Lean.Order.fix (RG1006), and that no claimed constant violates RG1001 to RG1006—for a project that places no file or code aimed at the checker or the toolchain. Beyond those checks, the proof verdict says nothing about compiled execution or whether a claimed data-valued definition has executable code (attribute [local csimp], dependency-registered @[csimp], dependency and toolchain constants, noncomputable definitions, and RG1006-exempted constants added by build-time code stay outside it). lake build --wfail is Lake's own command and the replay is Lean's own Kernel.Environment.replay: Regula makes no claim of its own about what they decide, and proves which constants it gives the replay.
  • A project that may be aimed at the checker needs the full verdict. The two commands run in the project's own Lake, so a project written to attack the checker can make them print a pass whatever its build holds, an unsound proof included, by four routes: a library loaded from the project's own library directory into the checker, a doctored copy of Regula from its configuration or package directory, a lakefile.lean, or code that runs while it builds. The full verdict closes each of them. A project with a dependency or with Mathlib in its imports gets only the proof verdict, so Regula gives no verdict that holds of such a project if it is aimed at the checker.
  • The full verdict, from REGULA_FULL=DIR lake exe lint PROFILE in a checkout of Regula built apart from the project (git clone --branch v0.14.0 https://github.com/rbeauchamp/regula, then lake build lint in it), also means that no code written in the project ran while Lake built the files that the check read, and that no file installed anything that replaces what the compiler runs for a definition. That rests on hypotheses H1 to H5 and the rest of the list of assumptions below. No proof here can examine Lean's own program, so a route that H2 misses would be a false pass. Only a project with no require in lakefile.toml and no Mathlib in its imports can have this verdict; for any other project the full gate builds nothing, says that only a proof verdict is possible, and exits with 3.

The last line of a run names its verdict, such as regula: proof verdict: fail, and a pass ends that line with the directory it audited.

Where the claim holds

The claim holds only for these named configurations:

  • Lean v4.35.0, at commit eb6cafb7290e8bd5f2937522d8d804f58f02bafc, with lake and lean that toolchain's programs.
  • For the proof verdict, lake lint from the project's own directory, with no option of Lake's and REGULA_FULL unset. For the full verdict, REGULA_FULL=DIR lake exe lint PROFILE from the directory of a checkout of Regula built apart from the project, with no option of Lake's.
  • Two platforms, on which the operating-system assumptions were observed: macOS 27.2 on Apple silicon (arm64) and Ubuntu 24.04.5 LTS on x86-64. The 8-step local gate ran on macOS 27.2 (arm64) and on GitHub's ubuntu-24.04 (x86-64) runner at this release.

Outside the contract, and not defects: Windows, another release of macOS, another distribution, release or architecture of Linux, another Lean, starting the full gate from a project's Lake, lake -d, lake -f and every other option of Lake's, starting through lake test or lake env, and lake lint with REGULA_FULL set. Also outside: for a proof verdict, a project that places a file or code aimed at the checker or the toolchain, and what the code of a claimed module or of a dependency does while it is built; another process that changes the project, the checker's tree or a build during a run; a call that does not return, and a TMPDIR that names nothing; what a theorem means to a reader; and anything about a dependency's code.

The list of assumptions remains 18 entries (Assumption in specification/RegulaSpecification/Assumptions.lean), each with its pinned source at Lean v4.35.0: Lean holds kernel, h6, replay, compiler, h1, h2, usedConstants, leanImport, leanVersion and platform; Lake holds lakeLoad, h3, h5, lakeCommands and lakeStart; the operating system holds h4, files and processes. leanImport now also cites Lean's getInitFnNameFor?, getModuleIdx?, getModuleEntries (including Lean.Compiler.CSimp.ext.ext.getModuleEntries), and ModuleData.isModule.

What is proved

Lean checks these theorems of the specification package about the definitions that the checker runs, under the hypotheses each states:

  • Each registered rule, RG1001 to RG1006 and RG1011 to RG1013, reports a subject exactly when it violates the rule over Regula's closed input (rg1001_exact to rg1006_exact, rg1011_exact to rg1013_exact, rg1011_attributed), with the specification and checker registries proved equal (registry_rules), and linked to Lean's loaded environment (pass_iff, pass_floor, pass_held).
  • Every finding of a registered rule carries non-blank guidance by type (finding_guidance_nonblank), and diagnostic serialization keeps the primary finding line unchanged while emitting one 2-space-indented fix: ... line with LF and CR escaped (detailText_guidanceLine, say_guidanceLine_spec).
  • The replay receives exactly the claim's cone (mem_cone_env, replayConstants_env), each claimed constant is in it (claimed_inCone), each claimed theorem is kept or replayed under a fresh name (claimed_theorem_replayed, copy_name_fresh), single-pass table preparation agrees with decision (decisionPrepared_eq), and exit 0 requires replay success (plain_exit_zero, full_exit_zero).
  • The language check admits a project exactly when everything it reads is in the closed set (decision_admitted_iff), every non-pass rests on the published closed list of refusals (run_meets), a run with no refusal on which the rules hold passes (plain_owed, full_owed, run_plain_owed, run_full_owed), and the specification build fails for any unlisted operation, route, premise, or toolchain version (Assumption.ofOp, run_route, meaning, readAt_pinned).

A pass does not mean that the code is correct. No checker ca...

Read more

Regula v0.13.1

Choose a tag to compare

@rbeauchamp rbeauchamp released this 21 Nov 03:20
Immutable release. Only release title and notes can be modified.
v0.13.1
71e1cf1

Regula v0.13.1 is a compatibility release on the v0.13.x series for leanprover/lean4:v4.36.0 (611c117bfaf7b7ae1cfcf246ce6fba31e8f509e9). It keeps the exact rule set of v0.13.0 (RG1001 to RG1006, RG1010, and RG2001) and refuses any Lean release other than v4.36.0.

Use it. Put leanprover/lean4:v4.36.0 in lean-toolchain, and set rev = "v0.13.1" in lakefile.toml, then run lake update regula, lake build --wfail, and lake lint. For the full verdict, build a clone of the tag v0.13.1.

Changes since v0.13.0

  • Lean v4.36.0 toolchain support: Updates lean-toolchain, Verdict.pinnedLean, language-check labels, and all Lean and Lake source citations to Lean v4.36.0 (611c117bfaf7b7ae1cfcf246ce6fba31e8f509e9).
  • RG1006 exact structural exemption for Lean v4.36.0 ctorIdx: Lean v4.36.0 generates an unsafe helper T.ctorIdx._impl (calling @[extern "lean_obj_tag_nat"] unsafe opaque getObjTagNat) and attaches @[implemented_by] to T.ctorIdx for every non-Prop, non-builtin inductive type T with numCtors != 1. RG1006 now exempts T.ctorIdx._impl only when both T.ctorIdx and T.ctorIdx._impl live in the same module as a safe inductive T and structurally match Lean's mkCtorIdx and mkCtorIdxImpl expressions (including u.isNeverZero, constructor indices, and toolchain getObjTagNat), closing plain-source proof-verdict forgeries.
  • Specification and trusted base: Adds Assumption.ctorIdxTag (19 assumptions total) and records the 2026-11-20 owner confirmation in specification/confirmation.md, re-verifies H1 (474 commands across 15 default-target files, 0 differences) and H2 (60 eval-site files) against Lean v4.36.0 source, and updates specification/ to lean-intent bd7af6c0fc90d7adddcfd03fed93cf63eef1e3b3 on Lean v4.36.0.

Full Changelog: v0.13.0...v0.13.1