Skip to content

Discuss LeanTrace construction and extraction issues found in the 171-input audit #2

Open

Description

@Reed-qiuu

During a local audit of all 171 native inputs on feat/econcslib-lean434, we found construction/extraction issues that should be resolved together before treating the published workflow as a reproducible Lean-to-graph pipeline.

Environment: Lean 4.34.1, Mathlib d13f23b723b8a846827a245b89c10fc7d3f11612, and the configured compatible LeanTrace bundle (Export.lean SHA-256: da1bb6c081de2fddfefb3618ad199cfdffc41866d0bfb777298993fe12188cf1). Benchmark Lean sources were unchanged during these checks.

1. Local IR artifacts are not propagated

scripts/construction/compiler.py links .olean and its private/server companions into each project workspace, but omits .ir and .ir.sig. Imported local metaprograms therefore cannot execute even though the dependencies compiled successfully.

Reproduced on the Sphere Packing inputs, including SP-B-ZERO, SP-B-EIG, SP-I6-BOUND, and their fixed variants. Compilation of dep.SpherePacking.ModularForms.JacobiTheta.JacobiIdentity aborts with:

(interpreter) IR of declaration 'tendstoContExt' not available

The IR files exist in the content-addressed compiler cache. A temporary audit-only workaround linking the IR companions allowed all nine Sphere Packing inputs to compile and extract. We should agree on the required artifact inventory and add a regression check involving an imported local metaprogram.

2. Input notation can break an embedded exporter

For equational-theories:etp-sheffer, Lean compilation succeeds, but importing Main before embedding the exporter causes the input's global | notation to interfere with the exporter's pattern matches. Errors include failed to synthesize Stroke Name and an Option/Name mismatch.

A temporary driver that compiles the exporter as a separate module before importing the input successfully extracts both roots without editing the benchmark source. We should settle on a notation-isolated exporter/driver interface.

3. Large modules need configurable time limits

Several GN21 inputs exceed the current 180-second per-module compiler limit. Retrying with a 900-second limit succeeded, including GN21-AFFINE-P31, GN21-CROSS, and GN21-SMALL-interval_final_sign. Timeouts should be reported separately from Lean errors and the compiler limit should be configurable by the extraction workflow.

These workarounds remain local diagnostic experiments; no formal extraction-tool fix is included in this audit. The benchmark source proof compatibility failures are recorded separately. This issue is for discussing and implementing the extraction pipeline fixes together.

Audit result and scope

The complete audit finished: 163/171 inputs compile and extract with the temporary construction-tool workarounds above. The remaining 8 inputs fail in benchmark source proofs, before graph extraction:

  • GHW-theorem9_1_bid_independent_lower_bound and GHW-theorem9_3_deterministic_truthful_lower_bound: EconCSLib.MechanismDesign.Auctions.DigitalGoods, finite-sum proof at line 2072.
  • LMMS04FairDivision-before / LMMS04FairDivision-after: LMMS04FairDivision.Theorem33RoundedConstruction, fiber-cardinality proof at line 1034.
  • GJ19OptimalBinaryRatingSystems-before / GJ19OptimalBinaryRatingSystems-after-spec: EconCSLib.Foundations.Probability.BinaryRatingLDP, Bernoulli rewrite/type compatibility at lines 34 and 41.
  • PRPKG-P4-before / PRPKG-P4-after: AppliedModelingLib.Applications.RatingSystems.BinaryLargeDeviations, the same Bernoulli compatibility issue at lines 34 and 41.

These source failures are separate follow-up work and are not attributed to LeanTrace. CDG-L94 successfully compiles and extracts despite its legacy blocked flags. etp-endtoend also succeeds, using its packaged JSON certificate resources in addition to Lean source. Successful extraction does not by itself imply absence of historical sorry or semantic alignment.

The native-to-graph path does not need the retained graph directory as an input. This observation does not decide whether released graph snapshots should be removed; that remains a protocol/artifact policy question (see #1).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions