Skip to content

P104 CERTKIT: PRICEKIT's exact kappa of a word as a Lean kernel certificate (tooling, no kappa claim) - #7829

Open
DreamingOfClouds wants to merge 1 commit into
CrocSwap:mainfrom
DreamingOfClouds:research/certkit-pricekit-to-lean
Open

DreamingOfClouds wants to merge 1 commit into
CrocSwap:mainfrom
DreamingOfClouds:research/certkit-pricekit-to-lean

Conversation

@DreamingOfClouds

Copy link
Copy Markdown
Contributor

Package: research/p104-certkit-pricekit-to-lean (Lean 4 + Mathlib, kernel only; tooling, no κ claim)

tools/certkit.py turns PRICEKIT's exact κ of a P104 word under the #7113 caller into a Lean certificate about the word file itself:

Cert<N>.certified : Legal (pub caller7113) tr ∧ Rows ∧ Word caller7113 (exec tr) ∧ lo ≤ kword ∧ kword ≤ hi

No hypotheses. tr is the kernel-replayed trace of the word file, Rows = its final rows are the #7113 targets (packed reverse-mode row certificate, all 1501 public registers), and kword = sSup {κ ∈ [0,1) | ValidAt κ} with ValidAt the word's Valid inequality on that trace (caller + 17 × (MOVE prices vs helper climbs)).

word PRICEKIT κ Lean bracket
t7669 (#7669's word replayed, #7113 caller) .00372142604386357… [.00372142604386, .00372142604387] (+ Crossing .w7113 lo)
w_s4 (own test word, 128-bit trace) .00366673434589504… [.00366673434589, .00366673434590]
  • Generic core CertKit.kroot_bracket: for any invoice cs, F cs t = Σ c·r^(1−t); kernel-checked piece chains (certified log/exp enclosures, 2^−128 dyadic rounding) give lo ≤ kroot ≤ hi, F(kroot) = 0, every root on [0,∞) in (lo,hi). Works for any PRICEKIT invoice.
  • Cert<N>.FW_eq: the trace's own invoice (fold histograms) equals F cs.
  • Caller block derived in the kernel from the Conditional κ = .00363797977 via a 17-stage signed caller #7113 caller file (CertCaller7113*, tools/callerfacts.py).
  • All 34 names in Check.lean: axioms within [propext, Classical.choice, Quot.sound]. No sorry / native_decide / axiom / extern.

Checks. verify.py (CI, stdlib, no Lean): pins, token bans, import order and closure, the two hypothesis-free headline statements, CHECK-axioms.txt; reprices both words with PRICEKIT and regenerates the bracket and link modules byte-identical, and the caller modules from the caller file. verify.sh: also rebuilds the 340 large data modules from data/ byte-identical to REGEN.json (tools/regen.py) and runs the guarded Lean build + axiom audit (lean/check.sh).

Usage for another word: tools/gen_chain.py WORD TAG, then tools/certkit.py WORD --name N --chain TAG --rows gen --build.

Caveats.

Credits: #7669 (SYLforge) word, building on K372-2 and #7660 (Clear1nsight); #7113 caller (rohanarun); #7761 graph facts (Clear1nsight) inside the shipped library. See NOTICE.md.

DreamingOfClouds with Claude Opus 5.5 (Anthropic), via Claude Code

🤖 Generated with Claude Code

…ficate (tooling, no kappa claim)

Package research/p104-certkit-pricekit-to-lean: Cert<N>.certified : Legal AND Rows AND Word AND
lo <= kword <= hi, hypothesis-free, for t7669 (CrocSwap#7669's word under the CrocSwap#7113 caller,
[.00372142604386, .00372142604387]) and w_s4 ([.00366673434589, .00366673434590]); generic invoice
bracket CertKit.kroot_bracket for any PRICEKIT invoice; caller block derived from the caller file.
Axioms propext/Classical.choice/Quot.sound only. 340 large data modules regenerated byte-identical
by tools/regen.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant