Skip to content
Draft
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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
# LexLean working cache (verified-latest/ IS tracked)
.lexlean/
**/.lexlean/
.lexlean-publication/
**/.lexlean-publication/

# Release staging directory
dist/
Expand Down
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": "4096cc4d659f31be9cd86bdb962639e8ae7f67b2fb1d10b3456a84ff41f36c06",
"pdf_sha256": "2fab4958e9efccb7de713775812dc099cd2841f18b6e1ec387768f8b968d40d7",
"tex_sha256": "a7cd1807077baa1d1ca34015faf500a24477991859427f4db646e5f230fe54e2"
},
"Observations": {
"pdf_sha256": "98c0f20646a1c0c2153355c5fda10dcaf4c26fe98fec37d86d9416f7e14d17e2",
"pdf_sha256": "e3f5bf710700f09cdc48aa86db58d5a5edb50860b49899abbaa829e0179c0e13",
"tex_sha256": "056820f37ac40133e341f46ad6c81125e35981150a1cc86f2063faad3f26fbd4"
},
"Paper": {
"pdf_sha256": "a60f48e7c14ec6ab0e5aa17ae9cc4e848f5c5c61a612339acf1091666f355247",
"pdf_sha256": "fc59bb7b6601e5b066a5d9c05260c0fe3ba9f73fa44771adc5887aeb2adde601",
"tex_sha256": "000f988561d9621f9ba2f9a99aba971670864367ebd336e6fbad0e1f71da01cb"
}
},
"generated_at_utc": "2026-11-12T20:06:19.560839+00:00",
"source_digest": "a0895002261a43f4ad4af9368d22ad039c69ae02739db0d827297b94a3348578"
"generated_at_utc": "2026-11-16T17:23:16.684435+00:00",
"source_digest": "7a6390e17c6fbbc602234981c33da7fd345255c25e42833ef0d265f8bf595209"
}
2 changes: 1 addition & 1 deletion rule30-api/lexlean.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
spec = "lexlean/lock/2"
language = "1.2"
compiler_semantics = "2e4c0ddd6084eba8fa99f04ab0235bfc5775dbc0455216b6ec51abe8ce8d9750"
compiler_semantics = "91d8c0b208d5226c5cd8db1761372e17ccad485a604168a54a83455e4ad30ff7"
project_config_sha256 = "3aab69e83aaa43aee298ada2603049770fd5ba35d441dde63a941209cecdd225"
lean_toolchain = "leanprover/lean4:v4.32.1"

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 = "2e4c0ddd6084eba8fa99f04ab0235bfc5775dbc0455216b6ec51abe8ce8d9750"
revision = "91d8c0b208d5226c5cd8db1761372e17ccad485a604168a54a83455e4ad30ff7"
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 2e4c0ddd6084"
version = "0.4.0, language 1.2, compiler semantics 91d8c0b208d5"
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
26 changes: 13 additions & 13 deletions rule30-api/production/research-request.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"roots": [
{
"package": {"name": "rule30_candidate_source", "version": "0.1.0"},
"root": "Rule30Api.CandidateSource.construct",
"targets": [{"digest": "0f5802ea18121b6a7a0d03e999589ce4e5ae812dc2a358432c1bf024a8e53f9f", "id": "rust-std"}]
},
{
"package": {"name": "rule30_research_route_dead", "version": "0.1.0"},
"root": "Rule30Api.Research.routeDead",
Expand All @@ -16,28 +21,23 @@
"targets": [{"digest": "0f5802ea18121b6a7a0d03e999589ce4e5ae812dc2a358432c1bf024a8e53f9f", "id": "rust-std"}]
},
{
"package": {"name": "rule30_research_runner_begin", "version": "0.1.0"},
"root": "Rule30Api.ResearchRunner.begin",
"targets": [{"digest": "0f5802ea18121b6a7a0d03e999589ce4e5ae812dc2a358432c1bf024a8e53f9f", "id": "rust-std"}]
},
{
"package": {"name": "rule30_research_runner_step", "version": "0.1.0"},
"root": "Rule30Api.ResearchRunner.step",
"package": {"name": "rule30_research_cohort", "version": "0.1.0"},
"root": "Rule30Api.ResearchCohortCommand.step",
"targets": [{"digest": "0f5802ea18121b6a7a0d03e999589ce4e5ae812dc2a358432c1bf024a8e53f9f", "id": "rust-std"}]
},
{
"package": {"name": "rule30_candidate_source", "version": "0.1.0"},
"root": "Rule30Api.CandidateSource.construct",
"package": {"name": "rule30_research_command", "version": "0.1.0"},
"root": "Rule30Api.ResearchCommand.step",
"targets": [{"digest": "0f5802ea18121b6a7a0d03e999589ce4e5ae812dc2a358432c1bf024a8e53f9f", "id": "rust-std"}]
},
{
"package": {"name": "rule30_research_command", "version": "0.1.0"},
"root": "Rule30Api.ResearchCommand.step",
"package": {"name": "rule30_research_runner_begin", "version": "0.1.0"},
"root": "Rule30Api.ResearchRunner.begin",
"targets": [{"digest": "0f5802ea18121b6a7a0d03e999589ce4e5ae812dc2a358432c1bf024a8e53f9f", "id": "rust-std"}]
},
{
"package": {"name": "rule30_research_cohort", "version": "0.1.0"},
"root": "Rule30Api.ResearchCohortCommand.step",
"package": {"name": "rule30_research_runner_step", "version": "0.1.0"},
"root": "Rule30Api.ResearchRunner.step",
"targets": [{"digest": "0f5802ea18121b6a7a0d03e999589ce4e5ae812dc2a358432c1bf024a8e53f9f", "id": "rust-std"}]
}
],
Expand Down
12 changes: 10 additions & 2 deletions rule30-api/src/PublicationFrontier.lex.tex
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,19 @@
axioms: [],
executable: true
}
definition{
name: claimIdentity,
parameters: [task : Research::Task],
result: Bytes,
body: (if (Toml::sameBytes (project task id) (prim append 0x636c61696d3a (project task schema) : Bytes)) then (project task schema) else (project task id)),
axioms: [],
executable: true
}
definition{
name: current,
parameters: [source : Bytes, task : Research::Task],
result: Bool,
body: (if ((prim length source : Nat) <=? 8388608) then (match (Toml::parse source) | Result.error problem => false | Result.ok tables => (match (selected tables (project task id)) | List.nil => false | List.cons head tail => (match tail | List.nil => (eligible head task) | List.cons duplicate rest => false))) else false),
body: (if ((prim length source : Nat) <=? 8388608) then (match (Toml::parse source) | Result.error problem => false | Result.ok tables => (match (selected tables (claimIdentity task)) | List.nil => false | List.cons head tail => (match tail | List.nil => (eligible head task) | List.cons duplicate rest => false))) else false),
axioms: [propext],
executable: true
}
Expand All @@ -59,7 +67,7 @@
name: contract,
parameters: [],
result: String,
body: "Read the frontier from the owned exact-revision workspace before publication. Require one matching open claim and a prove or refute intent. A closed claim must still designate the inspected source proposition. A contextual premise contributes a supporting lemma without changing the enclosing claim status. Duplicate identifiers, non-open claims, malformed TOML and origin changes refuse publication.",
body: "Read the frontier from the owned exact-revision workspace before publication. Resolve a catalog claim:<schema> identity through its exact schema binding, preserving raw supplied claim identifiers. Use the same resolved identity for admission and frontier mutation. Require one matching open claim and a prove or refute intent. A closed claim must still designate the inspected source proposition. A contextual premise contributes a supporting lemma without changing the enclosing claim status. Duplicate identifiers, non-open claims, malformed TOML and origin changes refuse publication.",
axioms: [],
executable: true
}
Expand Down
26 changes: 21 additions & 5 deletions rule30-api/src/PublicationPlan.lex.tex
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,22 @@
axioms: [Quot.sound, propext],
executable: true
}
definition{
name: projectPath,
parameters: [config : Config],
result: String,
body: (ResearchVerification::concat (root config) (ResearchVerification::concat "/rule30-paper/publication-" (ResearchVerification::concat (Host::textOf (project config identity)) ".toml"))),
axioms: [Quot.sound, propext],
executable: true
}
definition{
name: publicationManifest,
parameters: [config : Config],
result: Bytes,
body: (PublicationSource::append 0x73706563203d20226c65786c65616e2f70726f6a6563742f31220a6e616d65203d202272756c6533302d7075626c69636174696f6e220a6c616e6775616765203d2022312e32220a6d6f64756c655f707265666978203d202252756c653330554f52220a736f757263655f726f6f7473203d205b22737263225d0a656e747279706f696e7473203d205b227372632f (PublicationSource::append (PublicationSource::moduleName (project config identity)) (PublicationSource::append 0x2e6c65782e746578225d0a6275696c645f726f6f74203d20222e6c65786c65616e2d7075626c69636174696f6e220a6c6f636b66696c65203d20227075626c69636174696f6e2d (PublicationSource::append (project config identity) 0x2e6c6f636b220a6c65616e5f776f726b7370616365203d20222e220a6c65616e5f746f6f6c636861696e203d20226c65616e70726f7665722f6c65616e343a76342e33322e31220a0a5b5b6c657869636f6e5f736f757263655d5d0a7061636b616765203d20226c65786c65616e2e7374642e626f6f6c220a6b696e64203d20226275696c74696e220a0a5b6c696d6974735d0a6d61785f66696c655f6279746573203d20383338383630380a6d61785f746f74616c5f736f757263655f6279746573203d2031363737373231360a6d61785f7072696d69746976655f61746f6d73203d20323030303030300a6d61785f746f6b656e5f6c6174746963655f6564676573203d20343030303030300a6d61785f70617273655f737461746573203d20343030303030300a6d61785f69725f6e6f646573203d20323030303030300a6d61785f73636f70655f6465707468203d20313032340a6d61785f696d706f72745f6465707468203d203132380a6d61785f646961676e6f7374696373203d203235360a6d61785f6368696c645f6f75747075745f6279746573203d2031363737373231360a6368696c645f74696d656f75745f6d73203d203630303030300a)))),
axioms: [],
executable: true
}
definition{
name: theoremName,
parameters: [config : Config],
Expand Down Expand Up @@ -97,7 +113,7 @@
name: arguments,
parameters: [config : Config, operation : Operation, commit : Bytes],
result: (List String),
body: (match operation | Operation.archive => (cons "cat-file" (cons "blob" (cons (ResearchVerification::concat "refs/r30/evidence/" (Host::textOf (project config identity))) (nil String)))) | Operation.update => (cons "update" (nil String)) | Operation.lock => (cons "--project=rule30-paper/lexlean.toml" (cons "lock" (nil String))) | Operation.register => (cons "module" (cons "add" (cons (ResearchVerification::concat "Rule30UOR." (moduleName config)) (cons "--build" (nil String))))) | Operation.theorem => (cons "theorem" (cons "add" (cons (theoremName config) (cons "--slug" (cons (slug config) (nil String)))))) | Operation.frontier => (cons "frontier" (cons "set" (cons "--status" (cons (status config) (cons "--lean" (cons (theoremName config) (cons "--lexeme" (cons (ResearchVerification::concat "r30.observation::" (slug config)) (cons "--note" (cons (ResearchVerification::concat "Autonomous kernel-checked evidence " (Host::textOf (project config identity))) (cons "--" (cons (Host::textOf (project (project (project (project config base) request) task) id)) (nil String))))))))))))) | Operation.sync => (cons "api" (cons "sync" (nil String))) | Operation.stage => (cons "add" (cons "-A" (cons "--" (nil String)))) | Operation.commit => (cons "-c" (cons "core.hooksPath=.githooks" (cons "commit" (cons "-m" (cons "Publish verified autonomous proof batch" (nil String)))))) | Operation.head => (cons "rev-parse" (cons "--verify" (cons "HEAD^{commit}" (nil String)))) | Operation.retain => (cons "update-ref" (cons (reference config commit) (cons (Host::textOf commit) (nil String)))) | Operation.push => (cons "-c" (cons "core.hooksPath=.githooks" (cons "push" (cons (ResearchVerification::concat "--force-with-lease=refs/heads/main:" (Host::textOf (project (workspace config) revision))) (cons "origin" (cons (ResearchVerification::concat (Host::textOf commit) ":refs/heads/main") (nil String)))))))),
body: (match operation | Operation.archive => (cons "cat-file" (cons "blob" (cons (ResearchVerification::concat "refs/r30/evidence/" (Host::textOf (project config identity))) (nil String)))) | Operation.update => (cons "update" (nil String)) | Operation.lock => (cons (ResearchVerification::concat "--project=" (projectPath config)) (cons "lock" (nil String))) | Operation.register => (cons "module" (cons "add" (cons (ResearchVerification::concat "Rule30UOR." (moduleName config)) (cons "--build" (nil String))))) | Operation.theorem => (cons "theorem" (cons "add" (cons (theoremName config) (cons "--slug" (cons (slug config) (nil String)))))) | Operation.frontier => (cons "frontier" (cons "set" (cons "--status" (cons (status config) (cons "--lean" (cons (theoremName config) (cons "--lexeme" (cons (ResearchVerification::concat "r30.observation::" (slug config)) (cons "--note" (cons (ResearchVerification::concat "Autonomous kernel-checked evidence " (Host::textOf (project config identity))) (cons "--" (cons (Host::textOf (PublicationFrontier::claimIdentity (project (project (project config base) request) task))) (nil String))))))))))))) | Operation.sync => (cons "api" (cons "sync" (nil String))) | Operation.stage => (cons "add" (cons "-A" (cons "--" (nil String)))) | Operation.commit => (cons "-c" (cons "core.hooksPath=.githooks" (cons "commit" (cons "-m" (cons "Publish verified autonomous proof batch" (nil String)))))) | Operation.head => (cons "rev-parse" (cons "--verify" (cons "HEAD^{commit}" (nil String)))) | Operation.retain => (cons "update-ref" (cons (reference config commit) (cons (Host::textOf commit) (nil String)))) | Operation.push => (cons "-c" (cons "core.hooksPath=.githooks" (cons "push" (cons (ResearchVerification::concat "--force-with-lease=refs/heads/main:" (Host::textOf (project (workspace config) revision))) (cons "origin" (cons (ResearchVerification::concat (Host::textOf commit) ":refs/heads/main") (nil String)))))))),
axioms: [Quot.sound, propext],
executable: true
}
Expand Down Expand Up @@ -129,23 +145,23 @@
name: verificationConfig,
parameters: [config : Config],
result: ResearchVerification::Config,
body: (let owner : ResearchWorkspace::Config := (workspace config); (record ResearchVerification::Config {project := (ResearchVerification::concat (root config) "/rule30-paper/lexlean.toml"), moduleSource := (sourcePath config), directory := (root config), environment := (project owner environment), output := (project owner output), errors := (project owner errors), verifiedRoot := (ResearchVerification::concat (root config) "/rule30-paper/.lexlean/verified"), maxBytes := (project (project config base) maxBytes), allowance := (project owner allowance), quantum := (project owner quantum), polls := (project owner polls)})),
body: (let owner : ResearchWorkspace::Config := (workspace config); (record ResearchVerification::Config {project := (projectPath config), moduleSource := (sourcePath config), directory := (root config), environment := (project owner environment), output := (project owner output), errors := (project owner errors), verifiedRoot := (ResearchVerification::concat (root config) "/rule30-paper/.lexlean-publication/verified"), maxBytes := (project (project config base) maxBytes), allowance := (project owner allowance), quantum := (project owner quantum), polls := (project owner polls)})),
axioms: [Quot.sound, propext],
executable: true
}
definition{
name: context,
parameters: [config : Config],
result: ResearchCandidate::Context,
body: (record ResearchCandidate::Context {request := (project (project config base) request), config := (verificationConfig config), tools := (project (project config base) tools), module := (PublicationSource::append 0x52756c65333050617065722e (PublicationSource::moduleName (project config identity))), theorem := (PublicationSource::theoremName (project config identity)), maxDepth := (project (project config base) maxDepth), maxSteps := (project (project config base) maxSteps)}),
body: (record ResearchCandidate::Context {request := (project (project config base) request), config := (verificationConfig config), tools := (project (project config base) tools), module := (PublicationSource::moduleIdentity (project config identity)), theorem := (PublicationSource::theoremName (project config identity)), maxDepth := (project (project config base) maxDepth), maxSteps := (project (project config base) maxSteps)}),
axioms: [Quot.sound, propext],
executable: true
}
definition{
name: generatedPath,
parameters: [config : Config, receipt : VerificationReport::Receipt],
result: String,
body: (ResearchVerification::concat (project (verificationConfig config) verifiedRoot) (ResearchVerification::concat "/" (ResearchVerification::concat (Host::textOf (project receipt attestation)) (ResearchVerification::concat "/modules/Rule30Paper/" (ResearchVerification::concat (moduleName config) ".lean"))))),
body: (ResearchVerification::concat (project (verificationConfig config) verifiedRoot) (ResearchVerification::concat "/" (ResearchVerification::concat (Host::textOf (project receipt attestation)) (ResearchVerification::concat "/modules/Rule30UOR/" (ResearchVerification::concat (moduleName config) ".lean"))))),
axioms: [Quot.sound, propext],
executable: true
}
Expand Down Expand Up @@ -186,7 +202,7 @@
name: contract,
parameters: [],
result: String,
body: "A fixed publication plan for an owned isolated repository. Reverify renamed LexLean source before using its attested generated Lean artifact. Register generated host modules and theorem lexemes through the existing r30 API; change frontier status only for a checked closed claim. Retain each commit at its own evidence-and-commit-addressed reference, making repeated retention idempotent without replacing a different publication commit. Commit through the unchanged hook and push only against the exact predecessor with a source-branch lease. No shell command strings, remote models or receipt-based shortcuts. This plan supplies jobs; only the enclosing publication lifecycle establishes their ordering, ownership and successful completion.",
body: "A fixed publication plan for an owned isolated repository. Reverify renamed LexLean source in an identity-addressed publication manifest with the same Rule30UOR module and theorem namespace before using its attested generated Lean artifact. Publish the paper statement through theorem registration without adding a second copy of the host declaration to the paper entrypoints. Register generated host modules and theorem lexemes through the existing r30 API; change frontier status only for a checked closed claim. Retain each commit at its own evidence-and-commit-addressed reference, making repeated retention idempotent without replacing a different publication commit. Commit through the unchanged hook and push only against the exact predecessor with a source-branch lease. No shell command strings, remote models or receipt-based shortcuts. This plan supplies jobs; only the enclosing publication lifecycle establishes their ordering, ownership and successful completion.",
axioms: [],
executable: true
}
Expand Down
9 changes: 8 additions & 1 deletion rule30-api/src/PublicationSource.lex.tex
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,18 @@
body: (append 0x47656e65726174656450 identity),
executable: true
}
definition{
name: moduleIdentity,
parameters: [identity : Bytes],
result: Bytes,
body: (append 0x52756c653330554f522e (moduleName identity)),
executable: true
}
definition{
name: theoremName,
parameters: [identity : Bytes],
result: Bytes,
body: (append 0x52756c653330554f522e (append (moduleName identity) 0x2e70726f6f66)),
body: (append (moduleIdentity identity) 0x2e70726f6f66),
executable: true
}
definition{
Expand Down
Loading