Skip to content

Export exact Poisson differential certificates and Lean replay - #118

Open
PerAlexandersson wants to merge 4 commits into
feat/lean-replay-a261318from
feat/poisson-replay-2140
Open

PerAlexandersson wants to merge 4 commits into
feat/lean-replay-a261318from
feat/poisson-replay-2140

Conversation

@PerAlexandersson

@PerAlexandersson PerAlexandersson commented Dec 1, 2026 •

Copy link
Copy Markdown
Owner

Why

Issue #24 and RealRooted #2140 need a checked path from differential recurrence coefficients to a Poisson recurrence certificate. Matching a finite row prefix is insufficient, and recognizing the differential operator does not prove that its factors or seeds are PF.

Changes

  • Add export_poisson_replay(&recurrence, &parameter) for homogeneous unit-leader single-lag recurrences with exact nonnegative rational parameter.
  • Aggregate repeated terms and compare every identity j! A_j(n,X) = c^j X^j D^j A_0(n,X) in exact bivariate arithmetic. Check through the larger of the supplied order and factor degree; pad every missing derivative with zero.
  • Export schema polytool.poisson-replay.v1, full coefficient witnesses, all prefix seeds, pinned Lean API provenance, and explicit factor-PF/seed-PF/external-family obligations. Reconstruction verification rejects altered data, provenance, obligations or replay status.
  • Generate an independently recursive Lean sequence and a conditional RealRooted.Poisson.RecurrenceCertificate. Source export retains lean_replay: "not_attempted"; it does not invoke Lean.
  • Bound the aggregate dense output before constructing factorial witnesses, including repeated polynomial arrays, seeds and witness sides.
  • Add a runnable grouped-cubic example, exact JSON/Lean fixtures and ten focused integration tests. Cover index dependence, multiple prefix seeds, zero/constant factors, zero parameter, omitted/extra derivatives, factorial errors, sample-invisible perturbations and metadata tampering.

The example has factor (X + 1/2)(X + 3/2)^2, including a repeated-root boundary. RealRooted PR #2699 contains the matching generated module, an unconditional factor/seed proof, the certificate-aware row tactic, and a general row-dependent grouped-cubic application.

This is stacked on #117. It adds a library export; automatic discovery and unknown-parameter inference remain further work. It does not close #24.

Validation

Verified head 64a247c17e4d7b9ec62c871a8110e2c00cf91874, tree 015a92ebcefc9fe63364f18fed4cad2d6af0f552.

  • Full Rust CI and documentation passed.
  • The full Python workflow passed, including all eight executable jobs. The macOS wheel passed after a targeted retry of its initial cancellation before runner allocation. All current-head workflows are green.
  • All ten focused Poisson integration tests, formatting and whitespace checks pass on the current source.
  • The main fixture and four raw edge-case exports were regenerated from the actual Rust exporter and match the strict-check inputs byte for byte. All five have passed Lean with -DwarningAsError=true: grouped cubic, index-dependent three-seed prefix, zero parameter, zero factor and linear factor. No Lean warnings or errors.
  • RealRooted #2699 at 393f818d passed full Lean CI and comparator CI, a separate focused build and three affected-module linters, and six transitive axiom audits. Each audit reports exactly [propext, Classical.choice, Quot.sound], including the generated operator identity and unconditional PF consumer.
  • The pinned Lean API at 12c92de88e88aa2b8aa497dc8fc456d92f145d4c compiled. The independent source inventory at fb5ee4b2 passes its ordinary and independent-input checks and three negative controls. Exactly three Poisson references were added.
  • The required four-package Rust 1.82 check, package-list checks and standalone metadata passed during implementation. All-target Polytool Clippy, 111 Polytool doctests and four-package rustdoc passed.

Fixture SHA256 in both repositories: a2a78b44b54c704839b1d0aef02184dbb1fb7e751e1f1b0f65ff19131f01ea65.

The final renderer runs norm_num, inspects Lean's goal state, and invokes ring only if a goal remains. It uses no coefficient-specific heuristic, suppression, new declaration or import. JSON, coefficient data and the API pin are unchanged.

The prescribed aggregate cross-package Clippy/doctest selectors have the existing standalone dependency-package dev-dependency limitation; focused Polytool checks and the repository CI package checks pass. No workspace or manifest workaround is introduced.

This branch has not been deployed

No deployments
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