Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
39c9503
research: propose obligation-ledger recurrence with falsifiable Lean …
patrickdugan Nov 23, 2026
500a348
research(olr): add exact AND-OR structural ledger oracle
patrickdugan Nov 23, 2026
c199488
test(olr): cover AND/OR joins, cycles, aliases and budget limits
patrickdugan Nov 23, 2026
c0dc0df
test(olr): cross-check 400 seeded AND-OR DAGs against independent oracle
patrickdugan Nov 23, 2026
d4146c1
research(olr): audit novelty, quantify stopping gain and narrow first…
patrickdugan Nov 23, 2026
f12020d
feat(olr): parameterize fact-application cost for Lean tactic accounting
patrickdugan Nov 23, 2026
bd9fa66
feat(olr): native paired Horn proof preflight with public-only ledger…
patrickdugan Nov 23, 2026
acd0bc9
fix(olr): parse focused goals with pending context and terminate repl…
patrickdugan Nov 23, 2026
5e143d1
test(olr): probe native public-JSON adapter, paired edge sham and cos…
patrickdugan Nov 23, 2026
01b87f8
ci(olr): certify four fresh paired native Lean witnesses and replay c…
patrickdugan Nov 23, 2026
1cf526b
research(olr): document native Lean pair replay and independent certi…
patrickdugan Nov 23, 2026
0e74b97
docs(olr): index architecture and native Lean preflight in gym readme
patrickdugan Nov 23, 2026
69e7699
feat(olr): collect paired arithmetic guard outcomes from native Lean …
patrickdugan Nov 23, 2026
d17709a
test(olr): guard pair swaps and native-public numeral feature custody
patrickdugan Nov 23, 2026
ef26485
ci(olr): require native arithmetic-guard candidate outcomes and axiom…
patrickdugan Nov 23, 2026
99e5a25
feat(olr): add tied recurrent guard scorer with isolated and direct c…
patrickdugan Nov 23, 2026
60e13c1
fix(olr): exclude source arithmetic lineages from dev sampling
patrickdugan Nov 23, 2026
268b410
feat(olr): train tied/isolated/direct guard scorers on native source …
patrickdugan Nov 23, 2026
1053ed3
test(olr): exercise recurrent gradients, shared-seed controls and nat…
patrickdugan Nov 23, 2026
1a532f4
ci(olr): fit 3-seed recurrent guard pilot on fresh native Lean receip…
patrickdugan Nov 23, 2026
b2adfd4
research(olr): prerecord trainable arithmetic-guard pilot and matched…
patrickdugan Nov 23, 2026
525ff0d
research(olr): archive three-seed native guard transfer and seed-sens…
patrickdugan Nov 23, 2026
3b04f10
research(olr): add frozen cross-message removal and matched-margin sh…
patrickdugan Nov 23, 2026
41d732e
ci(olr): assert matched-message interventions in frozen model replay
patrickdugan Nov 23, 2026
2863185
docs(olr): index three-seed arithmetic-guard model results in researc…
patrickdugan Nov 23, 2026
54b0b73
audit(olr): require same-worker bit-exact model replay and record det…
patrickdugan Nov 23, 2026
102e549
ci(olr): enforce deterministic in-worker source fit for tied and dire…
patrickdugan Nov 23, 2026
fe68bfc
research(olr): add equal-information one-pass cross-reader control
patrickdugan Nov 23, 2026
06b74a8
ci(olr): require one-pass equal-information comparator on native proo…
patrickdugan Nov 23, 2026
fc9b100
research(olr): report one-pass matched-information controls and cross…
patrickdugan Nov 23, 2026
b9940ff
docs(olr): link first-run findings to reproducibility and compute-dep…
patrickdugan Nov 23, 2026
f78f11b
docs(olr): index compute-depth and reproducibility findings
patrickdugan Nov 23, 2026
be4c6b5
research(olr): pre-register delayed-feedback multi-goal Lean budget e…
patrickdugan Nov 23, 2026
1efe6bd
feat(olr): native multi-goal probe/rollback with event replay and sta…
patrickdugan Nov 23, 2026
c7e5490
feat(olr): register fresh multi-goal worlds and evaluate frozen root …
patrickdugan Nov 23, 2026
c3135c6
test(olr): paired pending-goal focus, early rollback, replay tamper a…
patrickdugan Nov 23, 2026
0054339
ci(olr): exercise budgeted pending-goal probe/rollback with frozen mo…
patrickdugan Nov 23, 2026
031a24d
fix(olr): replay host focus exactly and independently compile canonic…
patrickdugan Nov 23, 2026
a38d823
test(olr): distinguish native host focus from Lean goal rotation
patrickdugan Nov 23, 2026
80286eb
research(olr): archive fresh native delayed-feedback proof and budget…
patrickdugan Nov 23, 2026
5783f34
docs(olr): index fresh multi-goal verifier feedback results
patrickdugan Nov 23, 2026
34e70da
feat(olr): bridge pinned native MeTTa curation and typed STOP repairs…
patrickdugan Nov 23, 2026
49ceabe
feat(olr): add verified optimal action-set loss with canonical and SH…
patrickdugan Nov 23, 2026
6595397
feat(olr): run native MeTTa curation and atomic Lean STOP repair with…
patrickdugan Nov 23, 2026
d86fa0d
test(olr): verify MeTTa source lineage, STOP atomicity, and full opti…
patrickdugan Nov 23, 2026
6c93b54
ci(olr): execute pinned Hyperon 0.2.10 curation and atomic Lean STOP …
patrickdugan Nov 23, 2026
aa02c39
feat(olr): train matched action-set/canonical/hashed heads on native …
patrickdugan Nov 23, 2026
30e9941
test(olr): cover native tied-action generator, shared scorer gradient…
patrickdugan Nov 23, 2026
bdca595
ci(olr): compare canonical, hashed and full optimal sets on native Le…
patrickdugan Nov 23, 2026
bd5bafd
research(olr): record native MeTTa curation, STOP exchange and multi-…
patrickdugan Nov 23, 2026
31f1693
docs(olr): index native MeTTa and action-set learning experiments
patrickdugan Nov 23, 2026
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
160 changes: 160 additions & 0 deletions .github/workflows/ppt-g03-live-lean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,166 @@ jobs:
assert replay_search(lean, case, ep)["replay_passed"]
print("PPT-G03B native backtracking and full kernel replay verified")
PY
- name: OLR-01B paired native Lean preflight
working-directory: research/lean_cgrt_hrm400
run: |
python -m ppt_gym.olr_native --seed 20261123 --pairs 4 --out runs/olr-01b-native
python - <<'PY'
import json
m = json.load(open("runs/olr-01b-native/manifest.json", encoding="utf-8"))
assert m["pairs"] == 4 and m["worlds"] == 8, m
assert m["independent_compiled_scripts"] == 8, m
assert m["all_episodes_replayed"] == 40, m
assert m["scorecard"]["ledger"]["kernel_closures"] == 8, m
assert m["scorecard"]["mean_only"]["kernel_closures"] == 4, m
assert m["scorecard"]["edge_swap"]["kernel_closures"] == 0, m
assert m["architecture_promotion_eligible"] is False
print("OLR-01B real Lean paired proof and replay preflight", m["scorecard"])
PY
- name: OLR-01C arithmetic-guard native bank
working-directory: research/lean_cgrt_hrm400
run: |
python -m ppt_gym.olr_guards --seed 20261123 --train 3 --dev 2 --out runs/olr-01c-native
python - <<'PY'
import json
m=json.load(open("runs/olr-01c-native/manifest.json",encoding="utf-8"))
assert m["independent_certificates"]["compiled"]==10, m
assert m["independent_certificates"]["clean_axioms"]==10, m
assert m["splits"]["train"]["worlds"]==6 and m["splits"]["dev"]["worlds"]==4, m
print("OLR native arithmetic-guard source bank certified",m["independent_certificates"])
PY
- name: OLR-01C trainable guard comparison
working-directory: research/lean_cgrt_hrm400
env:
OMP_NUM_THREADS: "1"
MKL_NUM_THREADS: "1"
run: |
python -m ppt_gym.olr_guards --seed 20261124 --train 32 --dev 12 --ood 8 --out runs/olr-01c-bank
python -m ppt_gym.olr_guard_fit --bank runs/olr-01c-bank --out runs/olr-01c-fit --steps 80 --depth 3 --width 32 --seeds 17 29 43 --max-seconds 600
python - <<'PY'
import json
r=json.load(open("runs/olr-01c-fit/manifest.json",encoding="utf-8"))
s=r["evaluation"]
assert r["schema"]=="ppt.olr-guard-fit.v1" and len(r["seed_roster"])==3, r
assert len(r["training"])==15 and len(s)==(3*7+2)*2, (len(s),s)
assert all(x["worlds"]==24 if key.startswith("dev:") else x["worlds"]==16
for key,x in s.items()), s
assert s["dev:0:exact_arithmetic"]["proofs"]==24, s
assert s["ood:0:exact_arithmetic"]["proofs"]==16, s
assert r["independent_query_certificates"]["clean_axioms"]==40, r
assert r["architecture_promotion_eligible"] is False
assert r["training"]["17:cross"]["same_worker_bit_exact_replay"]
assert r["training"]["17:direct"]["same_worker_bit_exact_replay"]
assert r["cpu_environment"]["deterministic_algorithms"] is True
assert all(f"dev:{seed}:cross_zero_message" in s and
f"ood:{seed}:cross_margin_sham" in s and
f"ood:{seed}:cross_onepass" in s
for seed in (17,29,43))
print("OLR-01C trainable paired guard pilot scorecard",json.dumps(s,sort_keys=True))
PY
- name: Upload OLR-01C verified experiment receipts
if: always()
uses: actions/upload-artifact@v4
with:
name: olr-01c-native-guard-pilot
path: |
research/lean_cgrt_hrm400/runs/olr-01c-bank
research/lean_cgrt_hrm400/runs/olr-01c-fit
if-no-files-found: ignore
- name: OLR-01D multi-goal native search
working-directory: research/lean_cgrt_hrm400
env:
OMP_NUM_THREADS: "1"
MKL_NUM_THREADS: "1"
run: |
python -m ppt_gym.olr_delayed_campaign freeze --source-bank runs/olr-01c-bank --seed 20261127 --pairs 8 --out runs/olr-01d-bank
python -m ppt_gym.olr_delayed_campaign score --registry runs/olr-01d-bank --source-bank runs/olr-01c-bank --source-fit runs/olr-01c-fit --out runs/olr-01d-score --max-seconds 500
python - <<'PY'
import json
with open("runs/olr-01d-score/manifest.json",encoding="utf-8") as f:
m=json.load(f)
assert m["schema"]=="ppt.olr-delayed-score.v1", m
assert m["root_worlds"]==16 and m["root_pairs"]==8, m
assert m["native_unique_trajectories"]==128 and m["native_event_replays"]==128, m
assert m["standalone"]["axiom_clean"]==32, m
score=m["scorecard"]
assert score["4:probe_early:0:exact_arithmetic"]["certified_proofs"]==16
assert score["6:probe_early:0:exact_arithmetic"]["tactic_calls"]==64
assert score["6:probe_early:0:fixed_r0"]["certified_proofs"]==16
assert score["6:probe_late:0:fixed_r0"]["certified_proofs"]==8
assert score["6:probe_early:0:fixed_r0"]["rollbacks"]==8
assert score["6:probe_late:0:fixed_r0"]["rollbacks"]==8
assert not m["learned_feedback_update"] and not m["architecture_promotion_eligible"]
print("OLR-01D verified native search scorecard", json.dumps(score,sort_keys=True))
PY
- name: Upload OLR-01D native search and frozen decisions
if: always()
uses: actions/upload-artifact@v4
with:
name: olr-01d-native-delayed-guards
path: |
research/lean_cgrt_hrm400/runs/olr-01d-bank
research/lean_cgrt_hrm400/runs/olr-01d-score
if-no-files-found: ignore
- name: Native MeTTa source curation and Lean STOP exchange
working-directory: research/lean_cgrt_hrm400
env:
OMP_NUM_THREADS: "1"
MKL_NUM_THREADS: "1"
run: |
python -m pip install "hyperon==0.2.10"
python -m ppt_gym.metta_olr_cli --out runs/olr-metta-native-01
python - <<'PY'
import json
with open("runs/olr-metta-native-01/manifest.json",encoding="utf-8") as f:
r=json.load(f)
assert r["scientific_eligible"] is False, r
assert r["metta_runtime"]=="hyperon==0.2.10", r
assert r["source_train_curator"]["offer_ids"]==["goodproof"], r
assert r["repairs"]["native_macro_committed"] is True, r
assert r["repairs"]["native_macro_checks"]==2, r
assert r["repairs"]["short_budget_checks"]==0, r
assert r["standalone"]["axiom_clean"]==1, r
assert r["action_set"]["source_optimal_actions"]==["apply r0"], r
print("Verified native Hyperon-to-Lean STOP repair and source curation",
r["repairs"]["native_macro_metta_sha256"])
PY
- name: Upload OLR native MeTTa/Lean bridge receipts
if: always()
uses: actions/upload-artifact@v4
with:
name: olr-metta-01-native-hyperon-lean
path: research/lean_cgrt_hrm400/runs/olr-metta-native-01
if-no-files-found: ignore
- name: OLR MeTTa native multi-witness action-set pilot
working-directory: research/lean_cgrt_hrm400
env:
OMP_NUM_THREADS: "1"
MKL_NUM_THREADS: "1"
run: |
python -m ppt_gym.metta_actionset_native --out runs/olr-metta-02-ties --seed 20261128 --train 12 --development 8 --steps 40
python - <<'PY'
import json
with open("runs/olr-metta-02-ties/manifest.json",encoding="utf-8") as f:
r=json.load(f)
assert r["schema"]=="ppt.olr-metta-multi-witness.v1", r
assert r["train_roots"]==12 and r["development_roots"]==8, r
assert r["tied_train_roots"]==3 and r["tied_development_roots"]==2, r
assert r["native_source_certificates"]["axiom_free"]==25, r
assert r["native_metta_curation"]["native_offer_count"]==12, r
assert r["native_query_trials"]==72, r
assert r["checkpoint_promotion_eligible"] is False, r
assert set(r["evaluation"])=={"canonical","hashed","set"}
assert all(x["trials"]==24 for x in r["evaluation"].values()), r
print("OLR native MeTTa optimal-action-set pilot",r["evaluation"])
PY
- name: Upload OLR native MeTTa action-set pilot
if: always()
uses: actions/upload-artifact@v4
with:
name: olr-metta-02-native-action-sets
path: research/lean_cgrt_hrm400/runs/olr-metta-02-ties
if-no-files-found: ignore
- name: Fresh generated Lean suite and model smoke
working-directory: research/lean_cgrt_hrm400
env:
Expand Down
58 changes: 58 additions & 0 deletions research/lean_cgrt_hrm400/OLR_01B_NATIVE_PREFLIGHT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# OLR-01B: Native paired Horn proof preflight

**Date:** 2026-11-23
**Status:** Completed verifier-integration preflight; this is **not a learned neural architecture result**.
**Parent:** [OLR architecture](OLR_01_OBLIGATION_LEDGER_RECURRENCE.md) and [investigation](OLR_01_INVESTIGATION.md).

**Verified CI:** [native Lean workflow #45154630966](https://github.com/MoralityLabAI/LoopedTransformers/actions/runs/45154630966), [CPU regression #45154631034](https://github.com/MoralityLabAI/LoopedTransformers/actions/runs/45154631034). Both completed successfully.

## Native experiment

[ppt_gym/olr_native.py](ppt_gym/olr_native.py) generates four fresh pairs of propositional Horn worlds under seed 20261123. Each pair has identical primitive facts, target, two binary candidates, and mean incoming evidence cue (0.5). The grouping of premises within r0/r1 swaps across worlds, so the uniquely certifiable first action also swaps. Nuisance-chain length changes across pairs.

A native Lean 4.19 REPL supplies every public goal, hypothesis, menu and tactic outcome. The scorer parses only the public Lean JSON with [ppt_gym/live_lean.py](ppt_gym/live_lean.py). The reference winner is reserved for outcome auditing. The correct branch needs one rule application and two fact discharges, with a three-tactic budget. Both branches initially make native progress. The wrong branch leaves unprovable prerequisites.

The exact AND-OR ledger, a pooled-evidence fixed-tie policy, an edge-swapped structural sham, and forced-r0/forced-r1 references receive the same root menu and 3-tactic limit. Every attempt is replayed from a fresh native session and the successful ledger scripts are independently compiled and axiom-audited.

## Verified scorecard

| Arm | Kernel closures / 8 | Native tactic calls |
| --- | ---: | ---: |
| Hard AND-OR ledger | **8** | **24** |
| Pooled premise mean | 4 | 16 |
| Swapped premise-to-rule grouping | 0 | 8 |
| Forced r0 | 4 | 16 |
| Forced r1 | 4 | 16 |

**Independent standalone Lean certificates:** 8/8.
**Native episode replays:** 40/40.
**Original root menu:** apply r0, apply r1 in every world.
**Pooled incoming premise cue:** 0.5 in both worlds.

The GitHub Action job log prints the full scorecard and asserts all of these counts. The generated episode manifest and individual source receipts were retained in the CI workspace during the job; their SHA-256 values are reproducible with the checked-in runner. The job is an engineering preflight, not an independently held-out scientific confirmation.

## What this proves and what remains uncertain

Explicit hyperedge incidence contains information lost by an unstructured mean over incoming premise bits. The deterministic ledger recovers it and Lean verifies the selected proof scripts. This experiment has **zero learned parameters** and offers no evidence of neural-model gains over exact Horn planning. The proof-tree cost counts repeated dependencies individually; it can exceed the cost of DAG-style premise reuse.

The public parser supports atomic propositional Horn expressions and chains of implications. It preserves pending Lean goals at the runner level but scores the focused one. Arithmetic or dependent hypotheses marked raw remain unknown. A structural fixed point is never promoted to a Lean kernel fact.

## Next gate: OLR-01C computational applicability

Freeze a new lineage-disjoint cohort of computationally conditional and dependent-type proof forks with paired opposite winners and independent certificates. Its public symbolic skeleton should admit both actions while their delayed proof guards differ. Any raw type must be scored as unknown until a real Lean response resolves its status.

Train a small, weight-tied evidence/obligation cell with semantic applicability and successor-goal heads; compare with the current two-slot reward actor, a newly trained identical actor, a direct guard reader, head-only OLR, edge-shuffled OLR, a FLOP-matched ordinary tied loop, and exact symbolic controls. Separate forced-route proof completion from learned STOP/probe spending. Price every Lean and inference call, retain three or more independent seeds, and request an EvalMath FSI-01 sample/sham-floor preflight before a sealed confirmation.

A prospective gain requires **additional Lean-certified completions at matched budgets** and a direction-specific causal response stronger than matched shams. Efficiency-only gains should be reported as such.

## Run locally

From research/lean_cgrt_hrm400 with the pinned Lean 4.19.0 REPL built:

~~~sh
python -m unittest discover -s ppt_gym/tests -p "test_obligation_ledger*.py" -v
python -m unittest discover -s ppt_gym/tests -p "test_olr_native.py" -v
python -m ppt_gym.olr_native --seed 20261123 --pairs 4 --out runs/olr-01b-native
~~~

The output directory is create-only and contains the episode ledger, compiled standalone source, certificate receipt, and an artifact hash manifest. The native CI assertion is in [.github/workflows/ppt-g03-live-lean.yml](../../.github/workflows/ppt-g03-live-lean.yml).
Loading
Loading