Repository navigation
feat(persistence): identify the executed Rips simplex list with the Rips diagram and homology (#1011) - #1012
Conversation
…ips diagram and homology (#1011) For a valid DistanceTable, prove that FiniteInput.outputDiagram of the executed list, with integer grades read as real numbers, is the F₂ diagram of Rips.filter for the table metric in every degree, and that the inclusion of the labels induces an isomorphism from the homology of the Rips complexes to the sublevel homology of the list, natural in the threshold. Add ripsRunInDegree, which returns the records of one degree and none for an invalid table in every degree, and the equality of diagrams for relabelled tables. The new module SublevelDiagramVertexMap proves dgm_eq_of_vertexMaps, the invariance of real sublevel diagrams under mutually inverse vertex maps between complexes on two vertex types. The four-cycle is a kernel-checked fixture read against the actual Rips diagram and homology. Also fix two sentences of the Rips input notes. 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 with non-substantive notes. No substantive finding. Evidence
Non-substantive notes
Not checkedI did not run Generated by Claude Code |
Closes #1011
Summary
Second and final unit of #922. For a valid
DistanceTable, the list executed byripsInput(#1009) is identified with the actual Rips filtration of the table metric, in the diagrams and in homology.TDA/Persistence/SublevelDiagramVertexMap.lean(new):dgm_eq_of_vertexMaps, the invariance of real sublevel diagrams under mutually inverse vertex maps between filtered complexes on two vertex types, with the two homology lemmas it rests on.TDA/Persistence/Reduction/RipsInputDiagram.lean(new):outputDiagram_ripsInput(FiniteInput.outputDiagramof the list, with integer grades read as real numbers, isdgm (ZMod 2) (Rips.filter (D.metric hD))in every degree); the vertex mapripsLabelMapand its isomorphism in homology, natural in the threshold; the degree-indexed consumerripsRunInDegree,nonefor an invalid table in every degree; equal diagrams for relabelled tables.TDA/Persistence/Reduction/RipsInputDiagramExamples.lean(new): fixtures for no label, one label and two labels; the four-cycle with the existing reduction checked by the kernel on its fifteen faces, the Rips diagram in degrees 0, 1 and 2, and the dimension of the first homology of the actual Rips complex at thresholds 1 and 2; rejection of the five invalid tables in every degree; the relabelled line.docs/api.md,docs/math/finite-ph-computation.md,CHANGELOG.md: what is and is not provided, and the two wording fixes carried over from [Metric computation] Executable Rips simplex list from an integer distance table (#922, part 1) #1009 (the module name indocs/api.md;FiniteInput.Validin the notes).Not provided: a bound on the cost of the existing reduction (left unbounded by decision; documented as at least quadratic in the number of faces), representatives for the Rips complex, a statement for invalid tables beyond rejection, a transport of diagrams for grades outside the real numbers.
Branch lifecycle
Ordinary develop topic based on
8bc02626c97e826bcf92e63df0d3135ad8eccf0b, targetdevelop, squash merge. Target scope: metric computation under #922 / #227. Release version: undecided. Propagation: N/A.Public declarations added / changed
Added, none changed.
TDA/Persistence/SublevelDiagramVertexMap.lean:TDA.Simplicial.simplicialHomologyMap_congrTDA.Simplicial.simplicialHomologyMap_comp_eq_idTDA.Persistence.dgm_eq_of_vertexMapsTDA/Persistence/Reduction/RipsInputDiagram.lean:TDA.Persistence.intCastOrderEmbedding,intCastOrderEmbedding_applyTDA.Persistence.Reduction.DistanceTable.mem_sublevel_rips_filter,mem_sublevel_gradeFilter_ripsInputDistanceTable.outputDiagram_ripsInputDistanceTable.ripsLabelMap,ripsLabelMap_apply,simplicialHomologyMap_ripsLabelMap_isIso,simplicialHomologyMap_ripsLabelMap_naturalityDistanceTable.ripsRunInDegree,ripsRunInDegree_eq_some_iff,ripsRunInDegree_eq_none_iff,ripsRunInDegree_correctDistanceTable.valid_of_relabel,outputDiagram_ripsInput_of_relabelTDA/Persistence/Reduction/RipsInputDiagramExamples.lean: 36 fixture declarations inTDA.Persistence.Reduction.RipsInputDiagramExamples;faceIncidenceandboundary_eq_faceIncidenceare private.All 54 public declarations are pinned at the end of
scripts/print_axioms/Persistence.lean.Differences from the contract as reviewed before admission (recorded in the Admission section of #1011); no statement content changed:
dgm_eq_of_vertexMapsis in its own moduleTDA/Persistence/SublevelDiagramVertexMap.leaninstead of the Reduction module. Its statement is unchanged.simplicialHomologyMap_congrandsimplicialHomologyMap_comp_eq_id, are public supporting lemmas (private helpers in the reviewed draft), as the contract permits.DistanceTable.gradeEmbeddingisTDA.Persistence.intCastOrderEmbedding, outside theDistanceTablenamespace, with the same definition; every statement that mentions it has the same content.mem_sublevel_rips_metricismem_sublevel_rips_filter.Source ↔ Lean correspondence
Library-derived; no external source is translated. Governing specification #922, statement contract #1011. The statements were checked before admission by an independent read-only reviewer against
8bc0262(record in #1011): the comparison is withdgm (ZMod 2)ofRips.filterfor the metric built from the table onRips.fullComplex (Fin N); the caller supplies no metric, isomorphism or certificate;Validis required exactly where the metric is used;ripsRunInDegree p = noneholds if and only if the table is invalid, whateverp.Changed after that review, and to be covered by the final-head review: the module placement of the transport theorem, the two supporting lemmas made public by it, and the two renames listed above.
Validation
8d52a4b932d887b96f4c73bddc3453c5bd70f872, base8bc02626c97e826bcf92e63df0d3135ad8eccf0b.scripts/check.shon the evaluated head: exit 0,CHECK OK.AXIOM AUDIT OK — 13849(base 13795),PRIVATE AUDIT — 10572(base 10559),COVERAGE OK — 11126(base 11079).scripts/check.sh --incrementalgreen; gate passed.TDA.Persistence.Reduction.RipsInputDiagramExamplesbuilds in 23 seconds, about 20 of them the kernel check of the reduction on the fifteen faces of the four-cycle; the other two new modules build in about 3 seconds each.checkfor this head: success — https://github.com/uda-lab/tda-lib/actions/runs/44734461417/job/136282229365 (conclusion read from the check run of head8d52a4b932d887b96f4c73bddc3453c5bd70f872; its log was not re-read for the counts, which are those of the local run above).scripts/check.sh --stable, API documentation generation, the Comparator test suites beyond the gate's own Comparator step.Remaining sorry / custom-axiom footprint
none
Independent review evidence
8d52a4b932d887b96f4c73bddc3453c5bd70f872: pass with non-substantive notes — feat(persistence): identify the executed Rips simplex list with the Rips diagram and homology (#1011) #1012 (comment) . Its notes (N1:simplicialHomologyMap_congris a special case of the existingContiguous.simplicialHomologyMap_eqand could cross-reference it; N2:Diagram.map_injectivecould be public; N3: two lemmas without docstrings; N4: one long line indocs/api.md) were not acted on, so the reviewed head is the head evaluated above.