Plectis
This page

Paper module

Formal Math Readiness Gate

The public formal-math readiness gate validates declared corpus, tactic, premise, routing, provider-budget, source-module manifest, copied PROVER probe body, and negative-case boundaries without claiming Lean/Lake or proof authority.

Contains 46 sections · 1 diagram · 5 references

The write-up

Teleology

From deferred slogan to executable boundary

This is the public runtime cell that turns the formal-math slice into an executable boundary, validating synthetic readiness metadata for corpus, tactics, premises, routing, and provider recipes before any Lean witness claims authority. formal_math_readiness_gate is the public runtime cell that turns the formal math slice from a deferred slogan into an executable boundary. It validates synthetic readiness metadata for corpus availability, tactic probes, premise indexes, target-shape routing, and provider context recipes before any future Lean witness can claim authority.

One question for a cold reader

The page should let a cold reader answer one question without rereading the component: what evidence has Microcosm validated, and where does that evidence stop? The page should let a cold reader answer one question without rereading the component: what evidence has Microcosm actually validated, and where does that evidence stop?

Purpose

Making the ready-versus-proven boundary explicit

Formal-math tooling fails quietly when a library or corpus is assumed rather than checked, so this component makes the ready-versus-proven boundary explicit by asking which declared inputs a later proof witness could safely consume. Formal-math tooling fails quietly when a library, tactic, or corpus is assumed present rather than checked. A pipeline that routes a proof to aesop when aesop is not actually available, or that treats a premise index as proof evidence because it happens to carry a proof body, has already lost the boundary between "ready to attempt" and "proven". This component exists to make that boundary explicit before any downstream proof work begins. It answers one question: which declared formal-math inputs are well-formed and honest enough that a later proof witness could safely consume them, and where exactly does that warrant stop?

A reducer that refuses specific lies

The mechanism is a deterministic reducer over five public JSON inputs that runs no Lean and instead refuses the specific ways they can lie, emitting a readiness board rather than theorem evidence. The mechanism is a deterministic reducer over five public JSON inputs: corpus readiness, tactic-portfolio availability, a premise index, target-shape routing, and provider context recipes. It does not run Lean or Lake. Instead it reads what those inputs declare and refuses the specific ways they can lie. A corpus that claims Mathlib is available without a passing probe is rejected. A tactic marked available without a probe result record is rejected. A premise row carrying a proof_body or oracle_needed_premise_ids field is rejected. A route that admits a tactic the portfolio probe already marked unavailable is rejected. The output is a readiness board, not theorem evidence.

Proving discipline through negative cases

The gate proves its own discipline through five overclaim inputs that each run must catch, while a digest manifest keeps copied probe bodies source-open without leaking proof bodies, model-output data, or private state. The design choice worth noticing is that the gate proves its own discipline through negative cases. Alongside the positive inputs, the fixture carries five inputs that each commit a known overclaim, and the run passes only when every one of those overclaims is caught and no unexpected finding appears. The gate is therefore not merely asserting "we check Mathlib availability"; it is demonstrating, on each run, that a falsified Mathlib claim is actually refused. A second guard keeps the floor source-open without leaking: copied prover probe bodies are verified by digest through a manifest, while proof bodies, model-output data, and private state stay out of the result records entirely.

Shape

Diagram of the mechanism (11 steps).
unavailable tactic idsFive public JSON inputscorpus, tactics, premises, routes,provider recipesFive public JSON inputs corpus, tactics, premises, routes, provider recipesSecret-exclusion scanzero blocking hits requiredSecret-exclusion scan zero blocking hits requiredreject Mathlib-availabilityoverclaimreject Mathlib-availability overclaimeach available tactic needs aprobe result recordeach available tactic needs a probe result recordvalidate_premise_indexreject proof_body / oracle premiseidsvalidate_premise_index reject proof_body / oracle premise idsreject route admitting anunavailable tacticreject route admitting an unavailable tacticreject over-budget or proof-bodyrecipereject over-budget or proof-body recipecopied probe bodies,digest-checkedcopied probe bodies, digest-checkedReconcile findings vsEXPECTED_NEGATIVE_CASESevery known overclaim must becaughtReconcile findings vs EXPECTED_NEGATIVE_CASES every known overclaim must be caughtReadiness board + extension boardavailable / blocked capabilities,countsReadiness board + extension board available / blocked capabilities, countsScope limitno Lean/Lake, proof, provider,launch, or private-systemauthorityScope limit no Lean/Lake, proof, provider, launch, or private-system authority
Diagram source & refs

Source refs

reject Mathlib-availability overclaim
validate_corpus_readiness
each available tactic needs a probe result record
validate_tactic_portfolio
reject route admitting an unavailable tactic
validate_target_shape_routing
reject over-budget or proof-body recipe
validate_provider_context_recipes
copied probe bodies, digest-checked
validate_source_module_imports
flowchart TD Inputs["Five public JSON inputs corpus, tactics, premises, routes, provider recipes"] Scan["Secret-exclusion scan zero blocking hits required"] Corpus["validate_corpus_readiness reject Mathlib-availability overclaim"] Tactics["validate_tactic_portfolio each available tactic needs a probe result record"] Premises["validate_premise_index reject proof_body / oracle premise ids"] Routing["validate_target_shape_routing reject route admitting an unavailable tactic"] Provider["validate_provider_context_recipes reject over-budget or proof-body recipe"] SourceFloor["validate_source_module_imports copied probe bodies, digest-checked"] Reconcile["Reconcile findings vs EXPECTED_NEGATIVE_CASES every known overclaim must be caught"] Board["Readiness board + extension board available / blocked capabilities, counts"] Ceiling["Scope limit no Lean/Lake, proof, provider, launch, or private-system authority"] Inputs --> Scan Scan --> Corpus Scan --> Tactics Scan --> Premises Scan --> Provider Tactics -->|unavailable tactic ids| Routing Corpus --> Reconcile Tactics --> Reconcile Premises --> Reconcile Routing --> Reconcile Provider --> Reconcile SourceFloor --> Reconcile Reconcile --> Board Board --> Ceiling

The hand-authored diagram is not the machine graph

The machine graph remains the generated paper_module.formal_math_readiness_gate.mermaid projection derived from the source record, not from this hand-authored Mermaid block.

Reader Evidence Routing

Read this module in evidence order:

  1. Start at core/paper_module_capsules.json::paper_modules[21:paper_module.formal_math_readiness_gate]. That row names the source authority, subjects, mechanism refs, code locus, Microcosm concept/principle/axiom refs, generated projection statuses, and the bundle scope limit.
  2. Check the generated structured source record paper_modules/formal_math_readiness_gate.json. Its relationships.edges cite the bundle source refs and show the generated Mermaid status, Atlas status, source_authority: json_capsule, and unresolved selective-relation count.
  3. Inspect the runtime locus src/microcosm_core/organs/formal_math_readiness_gate.py, especially run, run_readiness_bundle, validate_source_module_imports, write_receipts, EXPECTED_NEGATIVE_CASES, AUTHORITY_CEILING, and SOURCE_MODULE_MANIFEST_NAME.
  4. Use fixture evidence for the gate behavior: fixtures/first_wave/formal_math_readiness_gate/input, receipts/first_wave/formal_math_readiness_gate/readiness_gate_result.json, formal_math_readiness_board.json, formal_math_readiness_extension_board.json, formal_math_readiness_validation_receipt.json, and result records/sign-off/first_wave/formal_math_readiness_gate_fixture_acceptance.json.
  5. Use exported-bundle evidence for source-open body-floor claims: examples/formal_math_readiness_gate/exported_formal_math_readiness_bundle/source_module_manifest.json, bundle_manifest.json, source_artifacts/, source_body_floor/source_modules/, and receipts/runtime_shell/demo_project/organs/formal_math_readiness_gate/exported_formal_math_readiness_bundle_validation_result.json.
  6. Use tests/test_formal_math_readiness_gate.py for the behavioral result record boundary. The tests cover negative cases, exported bundle sign-off, source-module digest and target-ref mismatch rejection, bounded command-card output, source-body omission from result records, secret-exclusion/public-relative result record paths, and non-writing plan preview.

This page routes readiness evidence, bounded evidence claims

A proof claim must go elsewhere because this page routes only readiness evidence, result record integrity, and source-body-floor accounting. Do not route a proof claim through this page. It routes readiness evidence, result record integrity, and source-body-floor accounting only.

Technical Mechanism

One reducer, two entrypoints

run() evaluates the fixture with negative cases and run_readiness_bundle() evaluates the exported bundle, both calling _build_result() so they share one scope limit, secret scan, digest checker, and board schema. The runtime is a deterministic readiness reducer over declared public inputs. run() evaluates the first-wave fixture directory with positive and negative JSON cases enabled; run_readiness_bundle() evaluates the exported public bundle without fixture-negative cases and requires the bundle source-module manifest. Both entrypoints call _build_result(), so the fixture and exported bundle result records share one scope limit, one secret scan, one source-module digest checker, and one readiness-board schema.

Loading inputs and the non-advisory scan

_build_result() loads the five public input families and scans them for forbidden material, and the result passes only with zero blocking hits, passing source-module imports, all negatives observed, and no stray positive findings. _build_result() first loads the five public input families: corpus_readiness.json, tactic_portfolio_availability.json, premise_index.json, target_shape_tactic_routing.json, and provider_context_recipes.json. It then scans those inputs plus any declared source artifacts through secret_exclusion_scan.scan_paths, using the public Microcosm forbidden-class policy. The scan is not advisory: the result can pass only when the scan has zero blocking hits, source-module imports pass, all expected fixture-negative cases are observed, and no unexpected positive-case findings remain.

The mechanism is split into six validators:

Reconciling findings and projecting the board

_merge_observed() and _merge_findings() compare observed failures against EXPECTED_NEGATIVE_CASES, then _build_extension_board() projects accepted metadata into pattern ids, counts, blocked routes, budgets, and the scope limit. After the validators run, _merge_observed() and _merge_findings() compare observed fixture failures against EXPECTED_NEGATIVE_CASES. This is the local scope limit: the fixture run must prove that the known overclaims are caught, while the exported-bundle run must prove that the positive public bundle has no unexpected findings. _build_extension_board() then projects the accepted metadata into the extension board: selected pattern ids, namespace and split counts, tactic availability counts, Mathlib-dependent unavailable tactics, blocked route cases, provider budgets, source-body import counts, the scope limit, and the scope boundary.

Result records and the asserting test suite

write_receipts() emits the gate result and boards while preserving the boundary, and the focused test asserts the mechanism itself, from negative-case ids to digest-mismatch rejection and result record omission of copied bodies. Result record writing preserves the same boundary. write_receipts() emits the gate result, readiness board, extension board, validation result record, and sign-off result record for fixture mode. run_readiness_bundle() emits the exported-bundle result record. The focused test suite asserts the mechanism rather than just file existence: it checks the five expected negative case ids, local Lean/Lake probe metadata with Mathlib unavailable, six available tactics with aesop blocked, eleven premises, five route cases, three provider recipes, thirteen verified source artifacts, source/target digest mismatch rejection, target-ref mismatch rejection, secret-exclusion/public-relative result record paths, and result record omission of copied body text.

Public Contract

What the component consumes and rejects

The component runs no Lean or Lake; it records available and blocked capabilities and rejects Mathlib overclaims, unprobed tactics, proof-body premise rows, unavailable-tactic routes, and over-budget or proof-body recipes. The component does not run Lean or Lake. It consumes public JSON fixtures and exported bundles, records which capabilities are available or blocked, rejects Mathlib availability overclaims, rejects unprobed tactics, rejects premise rows that contain proof bodies, rejects routes that admit unavailable tactics, and rejects provider recipes that exceed the public budget or allow proof bodies.

The result is a readiness board

The accepted result is a readiness board that can tell a later component what is safe to attempt, but it is bounded evidence evidence, benchmark evidence, or permission to run a prover. The accepted result is a readiness board. That board can tell a later component what is safe to attempt, but it is bounded evidence evidence, benchmark evidence, or permission to execute a theorem prover.

Prior Art Grounding

Formal-math readiness and environment work

The component is grounded in formal-math benchmark and environment-readiness work where a library or corpus being present is not enough, drawing on miniF2F, LeanDojo, and mathlib. This component is grounded in formal-math benchmark and environment-readiness work where the presence of a library, tactic, or corpus is not enough by itself. miniF2F motivates explicit benchmark split discipline for formal mathematics, LeanDojo motivates reproducible theorem-proving environments, and mathlib makes the availability of library imports a concrete precondition rather than a vague capability claim.

Borrowing the readiness-gate pattern

Microcosm borrows the readiness-gate pattern, requiring corpus availability, Mathlib and tactic probes, premise indexes, routing, and context budgets to be checked before downstream proof language, without authorizing Lean execution. Microcosm borrows the readiness-gate pattern: corpus availability, Mathlib probes, tactic probes, premise indexes, target-shape routing, and context budgets must be checked before downstream proof or retrieval language is allowed. It excludes Lean execution or proof authority.

Runtime Surfaces

  • python -m microcosm_core.organs.formal_math_readiness_gate run --input fixtures/first_wave/formal_math_readiness_gate/input --out receipts/first_wave/formal_math_readiness_gate
  • python -m microcosm_core.organs.formal_math_readiness_gate run-readiness-bundle --input examples/formal_math_readiness_gate/exported_formal_math_readiness_bundle --out receipts/runtime_shell/demo_project/organs/formal_math_readiness_gate
  • python -m microcosm_core.organs.formal_math_readiness_gate plan --input fixtures/first_wave/formal_math_readiness_gate/input
  • microcosm formal-math-readiness-gate run --input fixtures/first_wave/formal_math_readiness_gate/input --out receipts/first_wave/formal_math_readiness_gate
  • microcosm formal-math-readiness-gate plan --input fixtures/first_wave/formal_math_readiness_gate/input

Relationship To Lean Witness

The deferral is typed and testable

formal_math_lean_proof_witness remains deferred, and this gate makes the deferral typed and testable: absent Mathlib, unroutable unavailable tactics, no proof or oracle bodies in premises, and no proof-body provider recipes. formal_math_lean_proof_witness remains deferred. This gate makes the deferral typed and testable: Mathlib is absent until a passing probe says otherwise, unavailable tactics cannot be routed, premise indexes cannot carry proof or oracle bodies, and provider recipes cannot smuggle proof-body deliverables.

Validation Result record Path

Three read-only checks validate body and projection

./repo-pytest tests/test_formal_math_readiness_gate.py -q --basetemp=/tmp/microcosm_formal_math_readiness_gate_pytest
./repo-python scripts/build_doctrine_projection.py --check-paper-module-corpus
jq '{edge_count:(.relationships.edges|length), mermaid_status:.paper_module_payload.generated_projections.mermaid.status, atlas_status:.paper_module_payload.generated_projections.atlas_card.status, source_authority:.relationships.source_authority, unresolved_selective_relation_count:(.relationships.unpopulated_selective_relations|length)}' paper_modules/formal_math_readiness_gate.json

The generated row should expose fifteen resolved edges

A correct row reports fifteen edges, available Mermaid, owner-blocked Atlas, JSON-bundle authority, and no unresolved selective relation. Expected generated-row proof: edge_count: 15, mermaid_status: available_from_capsule_edges, atlas_status: blocked_until_organ_atlas_owner_lane_binds_edges, source_authority: json_capsule, and unresolved_selective_relation_count: 0.

Scope boundary

Scope limit

The bounded valid claim

The module may claim a public readiness gate for formal-math preparation, bounded to corpus availability, probe metadata, premise coverage, routing, budgets, pattern ids, source artifacts, an component-source floor, and result records. This module may claim that Microcosm has a public readiness gate for formal math system preparation. The valid claim is bounded to corpus availability, Mathlib and tactic probe metadata, premise-index coverage, target-shape tactic routing, provider context budget checks, extension-board pattern ids, public PROVER smoke-run source artifacts, an exact public component-source body floor, and fixture or exported-bundle result records.

What the module must not claim

It must not claim Lean/Lake execution, theorem proving, proof authority, benchmark performance, external model access, private proof-body import, source-file changes, or launch, and its strongest statement is readiness-boundary enforcement. The module must not claim Lean/Lake execution, theorem proving, formal proof authority, formal-result correctness, Mathlib-dependent proof success, benchmark performance, provider-call execution, private proof-body import, oracle-needed premise disclosure, source-file changes, publishing-scope decision, hosted deployment, recipient work, secret export, or whole-system correctness. Its strongest launch-facing statement is readiness-boundary enforcement over public metadata and copied source artifacts.

Limitations

Finite fixtures, no execution

The runtime validates finite public fixtures without executing Lean or Lake, importing Mathlib, or calling a provider, so a blocked capability is a downstream boundary, not an invitation to route around the gate. The runtime validates finite public fixtures and exported-bundle manifests. It does not execute Lean or Lake, import Mathlib in the current environment, call a provider, or check theorem statements. When the result reports blocked capabilities such as lean_std_synthetic_core:mathlib, that is a readiness boundary for downstream components, not an invitation to route around the gate.

Source artifacts are body-floor evidence only

The copied source artifacts are source-open body-floor evidence only: digest and target-ref checks show they match their manifests but authorize no source-file changes, proof-body disclosure, deployment, or public sharing. The copied source artifacts are source-open body-floor evidence only. Digest and target-ref checks show that selected PROVER readiness/probe bodies and the public component source copy match their manifests; they do not authorize source-file changes, private source-root export, proof-body disclosure, recipient work, hosted deployment, or public sharing. Result records intentionally carry counts, digests, paths, negative-case coverage, and authority flags instead of copied body text.

The negative cases are finite, covering the known overclaims in EXPECTED_NEGATIVE_CASES, so a new formal-math claim needs a new source-backed negative case or a different proof consumer, not this page. The negative cases are also finite. They cover the known overclaims encoded in EXPECTED_NEGATIVE_CASES: Mathlib availability without a passing probe, unprobed tactic availability, premise rows with proof bodies, target routes that admit unavailable tactics, and provider recipes that exceed public budgets or permit proof bodies. A new formal-math claim needs either a new source-backed negative case here or a different proof consumer; this page should not be used as a generic formal-proof claim surface.

Scope boundary

What this module excludes

This module documents a public readiness gate only, authorizing no Lean/Lake execution, proof authority, external model access, launch, or deployment, and adding no private source-root, account, or proof-body material to the public floor. This module documents a public readiness gate only. It excludes Lean/Lake execution, formal proof authority, Mathlib-dependent proof attempts, external model access, benchmark claims, public launch, hosted deployment, public sharing, recipient work, secret export, or whole-system correctness. It also does not make private source-root material, browser UI state, account or browser material, browser state, account secrets, source notes, model-output data bodies, recipient-send state, or private proof bodies part of the public Microcosm body floor.

Source and projection details

Source-Open Body Floor

Thirteen probe bodies preserve the readiness floor

The exported bundle carries thirteen probe bodies plus two digest-bound path rewrites covering corpus, tactic, Mathlib, trace, and Lean portfolio readiness. The exported readiness bundle carries thirteen PROVER smoke-run readiness/probe bodies under source_artifacts. They cover corpus readiness, tactic-affordance probe metadata, Mathlib and trace probes, and the copied portfolio-core Lean probes used to decide which tactics are blocked or available. Two JSON rows are private-path rewrites; those rows retain source and target digests plus the rewrite mode.

An exact component copy remains separate from result records

The public component-source copy is inspectable as body-floor evidence, while result records exclude copied text, private proof material, provider bodies, live session state, account secrets, and send state. The bundle also carries an exact public component-source copy for src/microcosm_core/organs/formal_math_readiness_gate.py under source_body_floor/source_modules. Generated state/runs Lean artifacts are runnable readiness evidence, not source-body authority. Neither floor places body text in result records or workingness cards, and neither imports model-output data bodies, account or browser state, browser UI live access, recipient-send state, account secrets, private proof bodies, or oracle-needed premise ids.

Manifests carry bodies while result records carry references

Body-floor inspection belongs in the source and bundle manifests; validation result records deliberately retain only status, digests, counts, and public-relative references. The source-module manifest and bundle manifest are the right surfaces for body-floor inspection. The validation result records intentionally carry status, digests, counts, and public-relative refs rather than copied source bodies.

The extension board projects typed readiness metadata

Wave 011's extension board records selected patterns, intake and validation refs, premise coverage, tactic and Mathlib status, route admissibility, and provider budgets without becoming proof evidence. Wave 011 adds the explicit extension board for the source intake cell formal_math_readiness_extensions. The board is still metadata-only, but it is more useful than the older flat counts: it records the selected pattern ids (lean_std_toolchain_premise_index, tactic_portfolio_availability_probe, target_shape_tactic_routing_gate), the source projection intake ref, public target refs, validation refs, namespace and split coverage for the premise index, tactic availability status counts, Mathlib-dependent unavailable tactics, target-shape routing admissibility, and provider context budgets.

Governing Lattice Relation

Two mechanisms separate positive readiness from refusal

The bundle's concept and two mechanisms bind the positive bundle-validation path separately from the validators that reject readiness-to-proof overclaims. The bundle binds this module to concept.formal_math_and_proof_witness_bundle because the component is not a theorem prover; it is the membrane that decides which public formal-math inputs are safe enough for a later proof witness to consume. The governing mechanisms split that membrane in two. The validates_public_formal_math_readiness_bundle mechanism names the positive bundle path: run, run_readiness_bundle, validate_source_module_imports, and write_receipts validate the declared corpus, tactic, premise, routing, provider-budget, source-module-manifest, and source-body-floor evidence before writing readiness boards. The validates_public_readiness_boundary mechanism names the negative path: validate_corpus_readiness, validate_tactic_portfolio, validate_premise_index, validate_target_shape_routing, and validate_provider_context_recipes reject the cases that would turn readiness metadata into proof authority.

Principles and axioms enforce authority separation

The cited principles separate bundle, structured source record, runtime, result record, and body classes, while the axioms keep private material excluded and the downstream proof witness deferred. The principle and axiom refs are therefore operational, not decorative. P-1, P-2, and P-3 are expressed by keeping the JSON bundle, generated structured source record, runtime code locus, and result records as separate authority classes. P-6 and P-8 are expressed by the body-floor and secret-exclusion contracts: copied PROVER probe bodies and the public component source copy can be inspected through digests and manifests, while private proof bodies, model-output data bodies, and browser or account state stay outside the public floor. AX-1, AX-2, AX-5, and AX-7 are the local reason the downstream paper_module.formal_math_lean_proof_witness remains a dependency rather than an already-proven conclusion.

Fifteen generated edges prove connection, not capability

The deliberately small edge set establishes bundle, source, and dependency bindings without proving witness execution, Mathlib availability, or a fully bound Atlas card. The generated lattice edge count is small on purpose: it proves that this page is bundle-backed, source-bound, and connected to one deferred proof-witness module.

Context & evidence

Source

Source Source module: src/microcosm_core/organs/formal_math_readiness_gate.py · Design note · Source registry · Source manifest: examples/formal_math_readiness_gate/exported_formal_math_readiness_bundle/source_module_manifest.json