fix(lean): close three audit findings (BUG-001/002/003) #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/2/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adversarial audit of the Lean 4 formalisation against the LangSec '26
camera-ready flagged three issues: one vacuous theorem and two with
vestigial premises that misrepresented what the proofs actually establish.
This PR files the reports and lands fixes so the Lean artefact is honest
in isolation. The paper is already submitted — paper-prose mismatches are
noted for the next arXiv revision.
Parser.lean, S3):WellFormedSExpradmitted everySExpr,making
allSExpr_wellFormedvacuous. Renamed toIsSExpr(structuralclassifier, documented), and added
not_roundTrippable_empty_symbolinSerializer.leanas a concrete non-vacuity witness against the strongerRoundTrippable'predicate.R3CorePreservation.lean/Agent.lean, S3):install_preserves_corecarried
_hr3 : verifyR3 d = trueas an unused premise over a trivialwellFormedinvariant. StrengthenedAgent.wellFormedto a positionalinvariant (base dialect is first + every installed non-base dialect
satisfies
noCoreRedefinition), madehr3load-bearing, and addedinstall_no_core_redefinitionas the composition witness.Follow-up commit closes a base-name spoofing gap surfaced by
cross-model review:
spoofedBaseDialect(name"cbcl-base", redefinestell) passedverifyR3's name short-circuit but now failsnoCoreRedefinition;hnamepremise ensures the short-circuit cannotbe used to bypass the obligation.
DeterministicUnion.lean, S2):dcfl_preservedand theparallel
decidable_preservedeach carried vestigial_hwf/_hR3premises. DCFL is a grammar-union closure property; R3's semantic core
constraint is at the wrong layer to compose through. Dropped the
vestigial premises; the retained
namesUnique+hFreshsignature isstrictly stronger than what the paper claimed. Comments at each site
explain why R3/wellFormed are not premises.
Implementation tracked in
plans/FIX-LEAN-AUDIT.spl(hence plan).Audit writeup lives in the sibling repo at
cbcl-paper/plans/lean-audit-findings.md.Test plan
lake buildinlean-cbcl/: 35/35 jobs greencargo test --workspace: 508 passedspoofedBaseDialectis rejected by the newwellFormedinvariant (BUG-002 follow-up)dcfl_preservedanddecidable_preservedsignatures contain nounderscore-prefixed parameters
not_roundTrippable_empty_symbolwitnesses non-vacuity forRoundTrippable'done, revealed the spoof; another pass recommended before merge)