Repository navigation
v0.15.0
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 lintFull 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-logicalBREAKING CHANGE — upgrading from v0.14.0.
- Change
lean-toolchaintoleanprover/lean4:v4.36.0, setrev = "v0.15.0", and runlake update regula. For the full verdict, build a clone of tagv0.15.0. - Lean
v4.36.0pin and structuralctorIdxexemption (Option A1): Leanv4.36.0(mkCtorIdx) generates anunsafedefinitionT.ctorIdx._implcallinggetObjTagNatand attaches@[implemented_by T.ctorIdx._impl]to the safeT.casesOn-basedT.ctorIdxon safe, non-Prop, non-single-constructor, non-runtime-builtin inductives whoseT.casesOneliminates into an extra universe parameter.v0.15.0exempts only structurally verifiedT.ctorIdx(from RG1011's@[implemented_by]clause only) andT.ctorIdx._impl(from RG1006's safety and helper-name clauses only), preserving every otherunsafe,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.0upgrade (#585): Moveslean-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.zipSHA-25692a996be487b48e1c2f2985be6b150490475c94d02f5a5e26665a9dab780902a), and published pins tov0.15.0and Leanv4.36.0, updatingspecification/'slean-intentdependency pin (631ed3a2196040bf491289de67da760c9eeb59f5). - Structural
T.ctorIdx/T.ctorIdx._implverification across RG1006 and RG1011 (#585): ExtendsDeclandTableswithCtorIdxForm/ctorIdxPair, verifiesT.casesOndirectly againstLean.mkCasesOnImp env.toKernelEnv T, reduces inductive types purely viaLean.Kernel.whnf(with a documented fail-closed boundary for non-canonical universe-polymorphic type aliases) and checks head-beta binder domains viaLean.Expr.headBeta, checks runtime builtins viaLean.Compiler.LCNF.isRuntimeBuiltinType(proved equal toRuntimeBuiltinTypes), checksisExtern = falseandinitFn = noneon both halves, proves full bidirectional equivalence (rg1006_exact,rg1011_exact,isCtorIdxDef_eq,isCtorIdxImpl_eq,ctorIdxFormOf_eq_iff,pass_iff,pass_held), provesctorIdxImpl_unreachedunder H6 (SafeMentionsSafe), and provides non-vacuity and forgery witnesses (Witnesses.withCtorIdx,withForgedCtorIdx,withForgedCtorIdx11). - Trusted base (
RegulaSpecification.Assumptions.Assumption, 19 entries): AddsAssumption.ctorIdxTag(trustinglean_obj_tag_natbehindgetObjTagNatto matchT.casesOnfor verified pairs) alongside the corresponding compiler-generatedT.ctorIdxcarve-out inAssumption.h2andLeanBehaviour.NoProjectCode, and re-reads all 19 Lean, Lake, and OS source citations against Leanv4.36.0.
Full Changelog: v0.14.0...v0.15.0