Skip to content

Audit selected BIT compiler retention with a Lean-checked model - #3391

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
PellaML:research/selected-compiler-visitation-audit-20261018
Oct 18, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
PellaML:research/selected-compiler-visitation-audit-20261018

Conversation

@PellaML

@PellaML PellaML commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

This PR adds one focused 28-file package, research/selected-compiler-visitation-audit: a source-bound census of the public selected BIT compiler's default SelectedBinding, with a Lean-checked trace/allocation model. It introduces no compiler replacement or new multiplication bound.

Result

For one successful complete mode-0 compilation, let N = |GL64(F_q)|:

Quantity Exact value
Distinct (request, common/native, LOW) source keys 28,278 N
Residual-factory calls and separately retained wrappers 904,896 N
Visits per key 32
Direct operation references to wrappers 1,809,792 N + B

B counts emitted block operations; their plan-dependent cost is not priced. The added value is separating what is already shared from what is not: Specifications caches source records and plans, but every visit still allocates a fresh Residual wrapper. Safe wrapper sharing is not established: Machine.geometry observes identity, and observer/callback contracts remain open. Runtime hooks still perform source validation and coefficient work.

The source argument is conditional on: an admissible prime q >= 3; the inherited LOW-bijection and source-admissibility premises (assumed, not proved); unpatched sources; fresh specifications; stable topology/source records during emission; and successful completion. The executed selected census constructs q=7 metadata only; it never expands the GL64 word or runs the selected compiler/factory path. Original-emitter tests use the 48-element GL2(F3) fixture with a test-only tracing binding; they are not a selected numerical-endpoint proof.

Evidence and reproduction

Fresh local Windows/Python 3.12 checks passed for commit eb89e7a7884ccacb82b5d5120d7f83be269748c0:

  • Committed-byte and declared-source-history preflight: 149 package/input files, before and after replay; all 121 live inputs match their pins.
  • Both registered Python commands, normal and optimized, passed with the same scientific receipt: 4,068 bounded schedules, 121 identity histories, original tiny-emitter traces, order and source-corruption controls.
  • Lean 4.34.1 with pinned mathlib: 60 declarations, exact main-theorem type assertion, axiom audit and serial leaf-module leanchecker replays passed. Three false propositions and two certificate/order mutants were rejected.

Run the repository preflight and registered replay from the root:

python3.12 -B scripts/check_research_commit.py --package research/selected-compiler-visitation-audit --check-source-history
python3.12 -B scripts/research_package.py --package research/selected-compiler-visitation-audit

The explicit Lean setup/replay is documented in the package's lean/README.md. The ordinary CI hook is Python-only; no hosted-CI result is claimed here. Existing pinned library builds were reused, not cold-rebuilt, and the imported library environment is trusted. leanchecker uses the same Lean kernel; it is not an independent implementation. Axioms are limited to propext, Classical.choice and Quot.sound; no custom axioms, incomplete proofs or native_decide are used.

Scope

CompilerAudit.Result.selected_compiler_model proves the result for the defined abstract trace/allocation model, for every N and every key-indexed block budget (repeated keys share a budget). The generic Retention layer separately handles arbitrary per-visit budget lists. The Python extraction/byte-equality bridge between source and model is not a formal semantic refinement proof.

No native bytes/cells/traffic, heap size or performance bound, compiler verification, GL64 realization, safe interning, selected stock coefficient, precision result or full multiplication theorem is established. The predecessor's q-dependent fixed overhead is not contradicted. The selected conditional kappa/frontier is unchanged.

Attribution

Credit remains with Jose Manuel (jmbarrancoml; PR2234/PR2697 and the physical caller), David Arias (PR2753), PR2769, ywz65 (PR2635), Nick Petalas (PR2989/PR3041), Matthieu Pascal (PR1806's different paid-child counting unit), Ross Richardson (retained-object accounting in Discussion #2319), Douglas Colkitt and the retained selected-source lineage. No first-discovery claim is made; notices and licenses are preserved.

Substantial OpenAI Codex, Claude Opus 5.5 and GPT 6 Astra assistance is disclosed. AI review is not independent human certification; historical AI reviews predate some final integration bytes.

Scientific sources remain pinned to 463113d675af7410ac91d53a4fed51ec6494eb9a; the publication parent is 6f100d4bb5083f8c35d96fd95a539811c62f245c. Overlap checks were non-exhaustive and do not establish novelty.

The LOCAL_ONLY status in TASK.json is retained as prepublication provenance; this PR is the public handoff.

Add one source-bound visitation and retained-wrapper census with bounded Python checks and an explicit Lean trace/allocation model. Preserve predecessor attribution, scientific pins, and the unchanged selected frontier.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants