Skip to content

v0.15.0

Choose a tag to compare

@rbeauchamp rbeauchamp released this 22 Nov 01:31
· 27 commits to main since this release
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