Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/lexlean-revision
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b0e40add3b573a7040d27a6dd67858db89838199
15c667bd36604c94c28e39502edec3fcad38e0ce
38 changes: 32 additions & 6 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ converter (`rule30-api/src/Convert.lex.tex`), the engine's learning rule and sch
(`Engine.lex.tex`), the relation and recurrence engines (`Discovery.lex.tex`), all with
certified rust-std roots.

The tool supervisor reads the monotonic host clock before spawning. Spawn replies
carry a process ID, which is never used as time; spawn latency counts against
the job budget. Normal completion releases direct-child ownership, while failed
cleanup retains it.

The research execution modules are authored directly in LexLean:
`ResearchExecution` supervises one local tool through `LexLeanStd.Host`, and
`ResearchRunner` connects its lifecycle to `Research`. A process exit is not a
Expand All @@ -134,8 +139,9 @@ answers; submit constructed candidates through `Event.candidate`.
`ResearchCandidate` owns the local `lexlean snapshot` process and output read,
reconstructs the full compiler IR with `CompilerSnapshot`, derives verification
pins and preflights the exact goal before entering `ResearchProof`. Snapshot
metadata is not a proof. Its caller still owns candidate term selection, the
isolated project and imported library snapshot. `Event.proof` remains the
metadata is not a proof. Its caller selects candidate terms. `ResearchSession` and `ResearchProject`
own its isolated project; `ResearchWorkspace` checks out and builds the exact
requested library tree at a pinned Git revision. `Event.proof` remains the
internal typed entry for already-owned candidate data. The binding schema distinguishes inspected premises from named closed propositions.
For premises it encodes the source type and closed target as core arenas; source
inspection must establish their origin and snapshot before dispatch. Closed goals
Expand All @@ -144,12 +150,32 @@ have no telescope and designate the exact registered source constant.
LexLean 1.2 notation. Its output remains a candidate until owned verification
succeeds. Its fixed
module prefix is `Rule30Candidate`, module `Candidate`, theorem `proof`.
The caller owns the isolated project and imported library; exact name matching
does not establish the identity of an arbitrary imported environment.
`ResearchSession` owns preparation, verification, evidence retention and release.
Its only events are host replies and cancellation. `ResearchRecord` captures the
exact inputs and report reads; `ResearchEvidence` retains both the library commit
and canonical proof record under verified Git references before workspace removal.
Only then can the session return a checked answer. A stored record itself confers
no proof authority. Failed archival or cleanup retains the workspace. Stopped or
signalled tools also retain it: direct-child cleanup does not establish that all
descendants have terminated. Exact name matching alone does not establish the
identity of an arbitrary imported environment.
Maintenance reports have a separate result kind. Cancellation consumes the
outstanding host reply before issuing stop; failed cleanup retains ownership
and halts dispatch. Native application wiring, source inspection, strategy planner and
publication path still need completion; these modules do not replace the
and halts dispatch. `ResearchCommand.step` now provides the native Host executable for one structured
attempt. `ResearchInput` admits the complete `r30/research-attempt/1` request;
`r30/research-result/1` output carries the session outcome and evidence identity.
The command accepts no receipt, selects no strategy, and publishes no claim.
`ResearchCohortCommand.step` runs at most 64 supplied candidates sequentially
against one owned library. `ResearchCohortInput` checks shared configuration and
distinct serials before effects. Borrowed projects retain individual request and
evidence identities; only the cohort releases the shared library. Tracked sources
are rechecked between attempts. Ordinary candidate failure permits continuation;
uncertain execution retains the library and stops the cohort. Its
`r30/research-cohort-result/1` report preserves individual outcomes, and exit 0
requires all checked results and no cancellation. Cohort execution is bounded
reuse, not durable recovery or automatic strategy selection.
Source inspection, strategy scheduling, durable failure diagnostics, recovery,
and claim publication still need completion; these modules do not replace the
legacy engine yet. Add every new application or library module and its modeled
features to `ResearchCatalog`, and add behavioral evidence for the capability;
a module-count theorem alone does not establish feature completeness.
Expand Down
79 changes: 70 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,25 +332,86 @@ UTF-8 chunk, parser-state and SHA-256 block facts keep the complete report
acceptance proof compositional; lifecycle traces reuse that checked receipt and verify rejection,
cancellation, ownership and terminal behavior.

The tool supervisor reads the monotonic host clock before spawning. Spawn replies
carry a process ID, which is never used as time; spawn latency counts against
the job budget. Normal completion releases direct-child ownership, while failed
cleanup retains it.

`rule30-api/production/research-request.json` exports the research controller,
catalog initializer, and runner `begin`/`step` component libraries.
catalog initializer, candidate source constructor and runner component libraries,
plus the native `ResearchCommand.step` and `ResearchCohortCommand.step` executables.
Session operations remain executable internal components; their behavior is
certified through these command roots without duplicate standalone exports.

`CandidateSource.construct` emits one unverified `.lex.tex` native-core theorem
for the selected goal, with explicit imports, universe parameters and an exact
axiom policy. It uses native LexLean 1.2 notation and a fixed candidate theorem
name; the local compiler checks the proposed term. The output budget includes
the complete document. The caller still owns the isolated project and file writes.
the complete document. `ResearchProject` supplies an isolated project and owns
its source writes, fixed manifests, pinned toolchain and locally generated lock.

Closed goals and conditional premises have separate request identities.
For the six open claims with defined propositions, the catalog constructs the
canonical named goal, including the prize kit's `Problem1`; mismatched register
metadata blocks the task without changing its target. A closed proof has no
extra assumptions, and a closed refutation must prove that exact proposition
implies `False`. Dependency changes reopen the same goal for verification.
This binding relies on the caller's ownership of the pinned imported library;
a matching constant name alone does not establish that library's identity.

Native application wiring, source inspection into the binding schema,
strategy search, owned candidate workspaces and durable publication are still required for
the new runner to replace the legacy engine. CI and runtime
use deterministic local tools and no remote models.
`ResearchWorkspace` checks out a fresh detached worktree at a full revision,
compares its tree with the requested library snapshot, builds the retained
library, and checks tracked sources again before making the workspace ready.

`ResearchSession` owns one candidate attempt through preparation, snapshot,
verification, evidence retention and release. It captures the exact report
reads consumed by verification. `ResearchRecord` retains the request, source,
project inputs, linked IR, lexicon closure, tool identities and reports.
`ResearchEvidence` stores canonical evidence in Git, retains the library commit
under `refs/r30/libraries/<revision>`, and checks both the library reference and
`refs/r30/evidence/<record-sha256>` before completion. Existing identical references
are idempotent. A record is replay input; reading it grants no proof authority.
A standalone checked answer is delivered only after retention and workspace removal.
Failed archival, failed cleanup, or interrupted tools retain the workspace for
recovery. Direct-child cleanup does not establish that tool descendants have
stopped. Cancellation drains outstanding replies and suppresses checked results.

`ResearchCommand.step` is the native Host entry for one owned attempt. The generated
`rule30_research_command` executable accepts one request file (or `--help`).
`ResearchInput` admits the exact `r30/research-attempt/1` JSON schema: the complete
controller request, repository and full revision, output/error paths, four tool
digests, core arena and proof node, imports, universe levels, axioms, and bounds.
The task must be ready and its prove/refute intent must agree with its purpose.
The snapshot carries the library tree and compiler/model digests. Admission
checks JSON shape and budgets; it grants no premise provenance or proof authority.
The process environment is supplied by the native Host. Paths and environment
values must use printable ASCII for lossless conversion by the current adapter;
log parent directories must already exist. The input parser admits at most 8 MiB;
the underlying Host file read itself is not size-limited.

The command drives the session through actual Host replies and emits
`r30/research-result/1` JSON. Exit 0 means a checked answer with retained evidence
and completed workspace removal; nonzero attempt outcomes carry their status,
and blocked operations include the retained workspace location. Optional evidence
and recovery paths use an empty string when absent, so output remains compatible
with the project's canonical JSON profile. Input errors
exit 2 and host protocol errors exit 70. Receipt injection and restarting a
terminal command are rejected. The command does not select a proof strategy or
publish a claim. Source inspection into the binding schema, strategy scheduling,
durable failure diagnostics, recovery, and publication into the claim register
remain required for the new components to replace the legacy engine.

`ResearchCohortCommand.step` provides the `rule30_research_cohort` executable for
up to 64 sequential attempts sharing one prepared library. Its input is
`{"spec":"r30/research-cohort/1","first":<attempt>,"rest":[<attempt>,...]}`;
each attempt uses the complete schema above. All attempts must share the library,
tool identities, environment, logs and workspace execution bounds, and must have
distinct serials. Each keeps its own candidate request, project directory and
proof evidence. The first request owns the library; subsequent requests borrow
it. Tracked library sources are checked again between attempts without rebuilding.

An ordinary failed candidate permits the next attempt. Interrupted or uncertain
operations stop the cohort and retain its library for recovery. Borrowed sessions
return retained evidence without removing the shared library; the cohort removes
it once all attempts finish. `r30/research-cohort-result/1` reports every completed
attempt separately. A completed cohort can contain failed candidates: exit 0
requires every result to be checked, with no cancellation. This bounded executor
does not add automatic candidate generation or durable restart recovery.
CI and runtime use deterministic local tools and no remote models.
Binary file modified Rule30-Core.pdf
Binary file not shown.
Binary file modified Rule30-Observations.pdf
Binary file not shown.
Binary file modified Rule30-Paper.pdf
Binary file not shown.
10 changes: 5 additions & 5 deletions pdf-manifest.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"documents": {
"Core": {
"pdf_sha256": "f18f351d340e4dc248ab46461e4497ae0807d913210120d6ed7bc182f3be74d4",
"pdf_sha256": "7edc0ca14d99f2a38fdd2aca0cbb3fc49e722d0ade2438054262dcf6b791814b",
"tex_sha256": "a7cd1807077baa1d1ca34015faf500a24477991859427f4db646e5f230fe54e2"
},
"Observations": {
"pdf_sha256": "d03f8f3471ba0bc5e5bd39679375e59cadc5922f809a02b6e3db92cd1d907a51",
"pdf_sha256": "546ece7c7940dff740a3c363fa0b4a97f5039f004778419782592dbd49990ecc",
"tex_sha256": "056820f37ac40133e341f46ad6c81125e35981150a1cc86f2063faad3f26fbd4"
},
"Paper": {
"pdf_sha256": "dbe005b9305b8d6d1a10bc12710a11212dc6ca06d62bf321bb9aeda69613a6b5",
"pdf_sha256": "7b26ea7d21633bcd1558fb9f1aebb05fefe7b69fdd5e9751c54c01027c8aec36",
"tex_sha256": "000f988561d9621f9ba2f9a99aba971670864367ebd336e6fbad0e1f71da01cb"
}
},
"generated_at_utc": "2026-11-05T03:37:21.903592+00:00",
"source_digest": "ca394c3b6671e1ffbbdc80adc372e8899b19c0762086391e6bf07dc9d356ec86"
"generated_at_utc": "2026-11-10T08:55:13.323604+00:00",
"source_digest": "f6d01f309566246abfbb67955c780d59384720b6cf13e064cf74654dc0eb4121"
}
4 changes: 2 additions & 2 deletions rule30-api/lexlean.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
spec = "lexlean/lock/2"
language = "1.2"
compiler_semantics = "b9816b388a3eb1800179f96aa9bc789620a46d7a7132f1b52ee9fa404c2092f7"
project_config_sha256 = "14a4245f2aaeec6585ffd57636e5858abf4e2a3e9ecd172c1b35abdff858513c"
compiler_semantics = "601e9f4a1824bb6aacf7c3c2243d4b33aaa315abdebd5ceaf920d178e196019e"
project_config_sha256 = "eff28cd4fd2d3f9d355c0b525998776e84859ebac586ac3704e2598b8ec8a495"
lean_toolchain = "leanprover/lean4:v4.32.1"

[[workspace_file]]
Expand Down
6 changes: 3 additions & 3 deletions rule30-api/lexlean.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "rule30-api"
language = "1.2"
module_prefix = "Rule30Api"
source_roots = ["src", "stdlib"]
entrypoints = ["src/Api.lex.tex", "src/Application.lex.tex", "src/Architecture.lex.tex", "src/ArtifactIdentity.lex.tex", "src/ArtifactIdentityTraces.lex.tex", "src/Audit.lex.tex", "src/BindingFixture.lex.tex", "src/CandidateBinding.lex.tex", "src/CandidateBindingTraces.lex.tex", "src/CandidateSource.lex.tex", "src/CandidateSourceTraces.lex.tex", "src/ClosedBindingFixture.lex.tex", "src/ClosedGoalTraces.lex.tex", "src/CompilerSnapshot.lex.tex", "src/CompilerSnapshotTraces.lex.tex", "src/Convert.lex.tex", "src/CoreBinding.lex.tex", "src/CoreBindingTraces.lex.tex", "src/CoreNotation.lex.tex", "src/CoreNotationTraces.lex.tex", "src/Discovery.lex.tex", "src/Engine.lex.tex", "src/Host.lex.tex", "src/Hypotheses.lex.tex", "src/Json.lex.tex", "src/JsonCanonical.lex.tex", "src/JsonCanonicalTraces.lex.tex", "src/JsonTraces.lex.tex", "src/Observer.lex.tex", "src/Presentation.lex.tex", "src/R30.lex.tex", "src/R30Traces.lex.tex", "src/R30TracesClaims.lex.tex", "src/R30TracesForms.lex.tex", "src/R30TracesRegister.lex.tex", "src/Register.lex.tex", "src/Research.lex.tex", "src/ResearchCandidate.lex.tex", "src/ResearchCandidateTraces.lex.tex", "src/ResearchCatalog.lex.tex", "src/ResearchExecution.lex.tex", "src/ResearchExecutionTraces.lex.tex", "src/ResearchProof.lex.tex", "src/ResearchProofTraces.lex.tex", "src/ResearchRunner.lex.tex", "src/ResearchRunnerTraces.lex.tex", "src/ResearchTraces.lex.tex", "src/ResearchVerification.lex.tex", "src/ResearchVerificationTraces.lex.tex", "src/Rule30Core.lex.tex", "src/Sequences.lex.tex", "src/Standards.lex.tex", "src/Toml.lex.tex", "src/VerificationCommandFixtures.lex.tex", "src/VerificationHashFixtures.lex.tex", "src/VerificationJsonData.lex.tex", "src/VerificationJsonFixtures.lex.tex", "src/VerificationJsonSteps0.lex.tex", "src/VerificationJsonSteps1.lex.tex", "src/VerificationJsonSteps2.lex.tex", "src/VerificationJsonSteps3.lex.tex", "src/VerificationReport.lex.tex", "src/VerificationReportTraces.lex.tex", "src/VerificationUtf8Fixtures.lex.tex"]
entrypoints = ["src/Api.lex.tex", "src/Application.lex.tex", "src/Architecture.lex.tex", "src/ArtifactIdentity.lex.tex", "src/ArtifactIdentityTraces.lex.tex", "src/Audit.lex.tex", "src/BindingFixture.lex.tex", "src/CandidateBinding.lex.tex", "src/CandidateBindingTraces.lex.tex", "src/CandidateSource.lex.tex", "src/CandidateSourceTraces.lex.tex", "src/ClosedBindingFixture.lex.tex", "src/ClosedGoalTraces.lex.tex", "src/CompilerSnapshot.lex.tex", "src/CompilerSnapshotTraces.lex.tex", "src/Convert.lex.tex", "src/CoreBinding.lex.tex", "src/CoreBindingTraces.lex.tex", "src/CoreNotation.lex.tex", "src/CoreNotationTraces.lex.tex", "src/Discovery.lex.tex", "src/Engine.lex.tex", "src/Host.lex.tex", "src/Hypotheses.lex.tex", "src/Json.lex.tex", "src/JsonCanonical.lex.tex", "src/JsonCanonicalTraces.lex.tex", "src/JsonTraces.lex.tex", "src/Observer.lex.tex", "src/Presentation.lex.tex", "src/R30.lex.tex", "src/R30Traces.lex.tex", "src/R30TracesClaims.lex.tex", "src/R30TracesForms.lex.tex", "src/R30TracesRegister.lex.tex", "src/Register.lex.tex", "src/Research.lex.tex", "src/ResearchCandidate.lex.tex", "src/ResearchCandidateTraces.lex.tex", "src/ResearchCatalog.lex.tex", "src/ResearchCohort.lex.tex", "src/ResearchCohortCommand.lex.tex", "src/ResearchCohortInput.lex.tex", "src/ResearchCohortTraces.lex.tex", "src/ResearchCommand.lex.tex", "src/ResearchCommandTraces.lex.tex", "src/ResearchEvidence.lex.tex", "src/ResearchEvidenceTraces.lex.tex", "src/ResearchExecution.lex.tex", "src/ResearchExecutionTraces.lex.tex", "src/ResearchInput.lex.tex", "src/ResearchInputTraces.lex.tex", "src/ResearchProject.lex.tex", "src/ResearchProjectTraces.lex.tex", "src/ResearchProof.lex.tex", "src/ResearchProofTraces.lex.tex", "src/ResearchRecord.lex.tex", "src/ResearchRunner.lex.tex", "src/ResearchRunnerTraces.lex.tex", "src/ResearchSession.lex.tex", "src/ResearchSessionTraces.lex.tex", "src/ResearchTraces.lex.tex", "src/ResearchVerification.lex.tex", "src/ResearchVerificationTraces.lex.tex", "src/ResearchWorkspace.lex.tex", "src/ResearchWorkspaceTraces.lex.tex", "src/Rule30Core.lex.tex", "src/Sequences.lex.tex", "src/Standards.lex.tex", "src/Toml.lex.tex", "src/VerificationCommandFixtures.lex.tex", "src/VerificationHashFixtures.lex.tex", "src/VerificationJsonData.lex.tex", "src/VerificationJsonFixtures.lex.tex", "src/VerificationJsonSteps0.lex.tex", "src/VerificationJsonSteps1.lex.tex", "src/VerificationJsonSteps2.lex.tex", "src/VerificationJsonSteps3.lex.tex", "src/VerificationReport.lex.tex", "src/VerificationReportTraces.lex.tex", "src/VerificationUtf8Fixtures.lex.tex"]
build_root = ".lexlean"
lockfile = "lexlean.lock"
lean_workspace = "."
Expand Down Expand Up @@ -34,8 +34,8 @@ kind = "path"
path = "lexlean-stdlib"

[limits]
max_file_bytes = 8388608
max_total_source_bytes = 67108864
max_file_bytes = 16777216
max_total_source_bytes = 100663296
max_primitive_atoms = 2000000
max_token_lattice_edges = 4000000
max_parse_states = 4000000
Expand Down
2 changes: 1 addition & 1 deletion rule30-api/model/dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ spec = "prismpm/dependencies/1"
id = "lexlean"
version = "0.4.0"
language = "1.2"
revision = "b9816b388a3eb1800179f96aa9bc789620a46d7a7132f1b52ee9fa404c2092f7"
revision = "601e9f4a1824bb6aacf7c3c2243d4b33aaa315abdebd5ceaf920d178e196019e"
source = "pinned-binary"
role = "compiler"
path = ".local/bin/lexlean"
Expand Down
2 changes: 1 addition & 1 deletion rule30-api/model/standards.toml
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ release_scope = true
id = "lexlean"
name = "UOR-Foundation/LexLean (closed-lexicon LaTeX to Lean 4)"
authority = "https://github.com/UOR-Foundation/LexLean"
version = "0.4.0, language 1.2, compiler semantics b9816b388a3e"
version = "0.4.0, language 1.2, compiler semantics 601e9f4a1824"
scope = "The authoring surface: the paper, the register and these API modules are LexLean modules verified by lexlean; the production roots export to certified Rust."
realized_by = ["Api", "Register", "Architecture", "Presentation", "Application", "Observer", "Convert", "Standards", "Rule30Core", "Sequences", "Discovery", "verify", "check", "api_sync", "api_check", "api_production"]
conformance = "bin/r30 verify api; bin/r30 check api; bin/r30 api check"
Expand Down
10 changes: 10 additions & 0 deletions rule30-api/production/research-request.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@
"package": {"name": "rule30_candidate_source", "version": "0.1.0"},
"root": "Rule30Api.CandidateSource.construct",
"targets": [{"digest": "0f5802ea18121b6a7a0d03e999589ce4e5ae812dc2a358432c1bf024a8e53f9f", "id": "rust-std"}]
},
{
"package": {"name": "rule30_research_command", "version": "0.1.0"},
"root": "Rule30Api.ResearchCommand.step",
"targets": [{"digest": "0f5802ea18121b6a7a0d03e999589ce4e5ae812dc2a358432c1bf024a8e53f9f", "id": "rust-std"}]
},
{
"package": {"name": "rule30_research_cohort", "version": "0.1.0"},
"root": "Rule30Api.ResearchCohortCommand.step",
"targets": [{"digest": "0f5802ea18121b6a7a0d03e999589ce4e5ae812dc2a358432c1bf024a8e53f9f", "id": "rust-std"}]
}
],
"spec": "lexlean/production-request/1"
Expand Down
Loading
Loading