Repository navigation
feat(persistence): executable F₂ grid representations and their Kan-extension ranks (#999) - #1000
Conversation
…xtension ranks (#999) Add RatGrid (rational grid values, their real coordinate grid, rational grades of grid points and an executable floor) and F2GridRep (fiber dimensions and F₂ matrices with a decidable validity condition). A valid representation defines the actual grid module, and the executable rankAt at rational grades is proved equal to the rank of the actual Kan extension. 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) Reviewed head: Verdict: pass. No substantive findings. Four non-substantive findings. Findings
Risks
Checks not performedI did not rerun Generated by Claude Code |
…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
…ations (#1001) (#1002) * feat(persistence): executable rank-erosion test for F₂ grid representations (#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 * feat(persistence): record breakpoint membership in the erosion certificate (#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 --------- Co-authored-by: Claude <noreply@anthropic.com>
Closes #999
Summary
Second unit of #925 (finite-grid rank-erosion tests): executable F₂ data for a grid module, its validation, the actual module it defines, and an executable rank proved equal to the rank of the actual Kan extension.
TDA/Persistence/F2GridRep.lean(namespaceTDA.Persistence):RatGrid n := Fin n → List ℚ: rational grid values used as finite sets;points, the realgrid,ratPoint/pointOfRatbetween grid points and rational grid grades, and the executablehasLower,floorCoord,floorwithratPoint_floor(the executable floor is the rational grade of the real floor).F2GridRep n:values,dim,map; the decidableValid(identities on the diagonal, composition along comparable triples of grid grades);toModulefor a valid representation withstructureMapLinear_toModule, a finite-dimensionality instance andrankOfStructureMap_toModule.rankAt x y, executable, withrankAt_eqandrankAt_eq_of_eq: it is the rank ofR.grid.lan.obj (R.toModule h)between the real grades ofx ≤ y.TDA/Persistence/F2GridRepExamples.lean, routed throughTDA/Persistence/Examples.lean.docs/api.md,docs/math/rank-erosion.md,CHANGELOG.md, pins.The erosion test and its certificate (third unit of #925) are not part of this PR.
Branch lifecycle
Ordinary develop topic: based on develop
122de80cd8ed5f9d5548a5330d48aa3cb0560038, targetdevelop, squash merge. Target scope: computation lane under #227 / #865 Package C (#925, part 2); release version undecided. Propagation: N/A.Public declarations added / changed
Added in
TDA.Persistence.RatGrid:realGrade,realGrade_apply,realGrade_le_iff,realGrade_injective,points,mem_points,grid,mem_grid,ratPoint,ratPoint_mem,ratPoint_cast,realGrade_ratPoint,ratPoint_mem_points,ratPoint_le_iff,pointOfRat,embedding_pointOfRat,ratPoint_pointOfRat,pointOfRat_ratPoint,hasLower,floorCoord,floor,floorCoord_spec,hasLower_iff,hasLowerPoint_realGrade_iff,floor_mem_points,ratPoint_floor; and the abbreviationTDA.Persistence.RatGrid.Added in
TDA.Persistence.F2GridRep: the structure,Validwith itsDecidableinstance,grid,toModule,toModule_obj,structureMapLinear_toModule,finiteDimensional_toModule_obj,rankOfStructureMap_toModule,rankAt,rankAt_eq,rankAt_eq_of_eq.Added in
TDA.Persistence.F2GridRepExamples:interval,messy,planeDim,plane,badComposition,badIdentity,noCoordinates,emptyGridand 27 theorems about them.No existing declaration changes.
Source ↔ Lean correspondence
Library-derived contract (#999); no paper statement is formalised. The signatures are those of the contract in #999. Deviation: the finite-dimensionality instance is named
finiteDimensional_toModule_obj(the contract lists it as an anonymous instance), so that it can be pinned.rankAt_eqis a statement about the actual Kan extensionR.grid.lan.obj (R.toModule h)and the existingrankOfStructureMap. Nothing is claimed for an invalid representation or whenx ≤ yfails.Validation
Evaluated head
d69b1c2d84385855ed051d0b1c94ef66c7ec5472, base122de80cd8ed5f9d5548a5330d48aa3cb0560038.check: success — run 44653220611 / job 136013000882 on this head:AXIOM AUDIT OK — 13548 declaration(s),PRIVATE AUDIT — 10503 private theorem root(s),COVERAGE OK — 10909 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 (1m47s, warm build).rank_map_congr.git pushpre-push gate: passed.decide +kernel, builds in about 7 s.scripts/test-guards.sh, doc generation. No TauCeti search was made (not a dependency).Remaining sorry / custom-axiom footprint
none
Independent review evidence
Reviewed-by:comment on headd69b1c2: read-only reviewer in a session and model distinct from the implementer, digest-based; verdict pass, no substantive finding. Four non-substantive notes, not acted on in this PR and to be folded into the next change to these files: the digest says the data define a module "exactly when"Validholds, while only the direction fromValidis formalised; dot notation on aRatGridneeds the type written asRatGrid n; the docstring ofplane_rank_betweendescribes the target grade only; the examples docstring does not name the zero-dimensional fiber case, whichintervalat grade1covers.d69b1c2(triggered by "PR opened"): completed with no findings, per its review summary comment.🤖 Generated with Claude Code
https://claude.ai/code/session_01RfoZqCRSgoUin4otWc6fXL