Repository navigation
feat(persistence): executable rank-erosion test for F₂ grid representations (#1001) - #1002
Conversation
…ations (#1001) Add the rational breakpoint grid and F2GridRep.runErosion, which validates two representations and a rational radius and returns invalid, pass, or a failed inequality with its direction, grades and ranks. The three outcomes are proved correct for RankErosion of the actual Kan extensions through the finite criterion. Fold in the documentation notes from the review of #1000. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RfoZqCRSgoUin4otWc6fXL
…icate (#1001) Deduplicate the rational breakpoint lists, state in runErosion_eq_fail that the reported grades are breakpoint grades, and add fixtures for a failing two-parameter comparison, a passing one between different modules and an empty value list. State the breakpoint count in the documentation. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RfoZqCRSgoUin4otWc6fXL
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Reviewed-by: claude-opus read-only reviewer (session distinct from the implementer) Head reviewed: Findings
Observation (not a finding): Risks 1–6
#925 discharge judgementTaken together, #997, #999 and this PR fully discharge #925's mathematical and implementation requirements:
What remains is process only: a successful hosted Checks not performed
Generated by Claude Code |
…1003) (#1004) Fold the non-substantive notes from the final-head reviews of #996 and #1002 into the rank-erosion documentation, the changelog, the executed-example docstrings and the cloud setup guide; ErosionFailure and ErosionResult also derive Repr. No statement, proof or pin changes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RfoZqCRSgoUin4otWc6fXL
Closes #1001
Summary
Third and last unit of #925 (finite-grid rank-erosion tests): the executable test with its certificate, proved correct for the actual Kan extensions.
TDA/Persistence/F2GridErosion.lean(namespaceTDA.Persistence):RatGrid.pointList(explicit enumeration of grid grades),RatGrid.erosionBreakpoints(rational breakpoints, deduplicated),RatGrid.radius,RatGrid.lower/upper, withgrid_erosionBreakpoints(the real image of the rational breakpoint grid is the breakpoint grid of the real grids) andrealGrade_lower/realGrade_upper.F2GridRep.ErosionFailure,erosionFailureAt,erosionFailure?,ErosionResult,runErosion.erosionFailure?_eq_none_iff(no failure ↔RankErosionof the actual Kan extensions, for valid input and0 ≤ e),runErosion_eq_invalid_iff,runErosion_eq_pass_iff,runErosion_eq_fail.TDA/Persistence/F2GridErosionExamples.lean, routed throughTDA/Persistence/Examples.lean.docs/api.md,docs/math/rank-erosion.md,CHANGELOG.md, pins; four documentation notes from the review of feat(persistence): executable F₂ grid representations and their Kan-extension ranks (#999) #1000.Branch lifecycle
Ordinary develop topic: based on develop
fa2a89275280ee905b2bdb30b734c14d2d53c21c, targetdevelop, squash merge. Target scope: computation lane under #227 / #865 Package C (#925, part 3); release version undecided. Propagation: N/A.Public declarations added / changed
Added in
TDA.Persistence.RatGrid:pointList,mem_pointList,erosionBreakpoints,radius,coe_radius,grid_erosionBreakpoints,lower,upper,realGrade_lower,realGrade_upper.Added in
TDA.Persistence.F2GridRep:ErosionFailure,erosionFailureAt,erosionFailure?,ErosionResult,runErosion,erosionFailureAt_eq_none_iff,erosionFailureAt_eq_some,erosionFailure?_eq_none_iff_forall,erosionFailure?_eq_some,rankAt_lower_upper,erosionFailure?_eq_none_iff,runErosion_eq_invalid_iff,runErosion_eq_pass_iff,runErosion_eq_fail.Added in
TDA.Persistence.F2GridErosionExamples:zero,ray,shifted,noCoordinatesTwo,flatand 31 theorems about executed tests and their transfers.Changed: docstrings only, in
F2GridRep.lean(RatGrid) andF2GridRepExamples.lean(module docstring,plane_rank_between). No existing statement or definition changes.Source ↔ Lean correspondence
Library-derived contract (#1001); no paper statement is formalised. The signatures are those of the contract in #1001. Every rank in the correctness theorems is a rank of the actual Kan extension
R.grid.lan.obj (R.toModule hR)and the predicate is the existing weak-pairRankErosion; no caller-supplied rank or certificate enters a statement.Against #925: invalid input is distinguished (
invalid); a failure reports the direction, a comparable pair of breakpoint grades and the two exact ranks; success is equivalent to the full predicate for valid input. Not provided, as #925 itself excludes: the strict boundε < dE ≤ dI, distance minimisation, other fields, Gaussian elimination, an input generator.Validation
Evaluated head
db48853ad0605a5c297f88d9d7e7fec8af8873b6, basefa2a89275280ee905b2bdb30b734c14d2d53c21c.check: success — run 44657463710 / job 136027131793 on this head:AXIOM AUDIT OK — 13593 declaration(s),PRIVATE AUDIT — 10503 private theorem root(s),COVERAGE OK — 10954 public theorems, all pinned, Comparator "Lean default kernel accepts the solution",CHECK OK. Thedocsjob was skipped (manual dispatch only).scripts/check.sh(full gate) on this head: exit 0,CHECK OK, the same three counts, Comparator accepted (1m41s, warm build).git pushpre-push gate: passed.decide +kernel, builds in about 10 s.scripts/test-guards.sh, doc generation. No TauCeti search was made (not a dependency).Remaining sorry / custom-axiom footprint
none
Independent review evidence
aadb449) was pushed to the session branch beforeagent:readywas applied; no pull request existed then. The second commit (db48853) applies the reviewed contract.Reviewed-by:comment on headdb48853: read-only reviewer in a session and model distinct from the implementer, digest-based; verdict pass, no substantive finding; its judgement is that [Multi PH computation] Finite test-grid criterion for rank erosion of grid Kan extensions (#925, part 1) #997, [Multi PH computation] Executable F₂ matrix representations on rational grids and their Kan-extension ranks (#925, part 2) #999 and this PR discharge [Multi PH computation] Certify finite-grid rank-erosion tests #925's mathematical and implementation requirements. Four non-substantive notes, not acted on in this PR and collected for a follow-up documentation change: sentences elsewhere that still describe an executable erosion test as only proposed (docs/math/rank-erosion.mdfuture-extensions paragraph,docs/README.md, the previous Unreleased CHANGELOG entry's "no erosion test is included"); noReprinstance onErosionResult/ErosionFailure; the docstring ofemptyGrid_zero; and two wording points.db48853(triggered by "PR opened"): completed with no findings, per its review summary comment.🤖 Generated with Claude Code
https://claude.ai/code/session_01RfoZqCRSgoUin4otWc6fXL