Repository navigation
feat(mapper): executable graph-PL incidence extraction with certified component labels (#1005) - #1007
Conversation
… component labels (#1005) Add HeightGraph (Boolean adjacency on Fin N with rational heights), its decidable validity, the sorted distinct levels as a covering critical-value list, component labels by minimum-label propagation with the theorem that label equality is reachability in the actual induced level graph, and the executed cell and edge lists with their membership and no-repetition statements. Fixtures state the complete executed value for nine graphs and two invalid inputs. 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. Findings
Checked / not checked
Generated by Claude Code |
Closes #1005
Summary
First of two units of #923: the executable half of graph-PL incidence extraction.
TDA/Mapper/GraphPLIncidence.lean:HeightGraph N(Boolean adjacency onFin N, rational vertex heights) with decidableValid; the sorted distinctlevelsand the covering listcriticalValues; component labels byNrounds of minimum-label propagation along horizontal edges, withlabel_eq_label_iff_reachable(label equality is reachability in the actual graph induced on{v | realHeight v = c}) and the bijectioncomponentEquivwithSimpleGraph.ConnectedComponent; the executed listscellList,edgeList,incidence, andincidence?, which rejects invalid adjacency.TDA/Mapper/GraphPLIncidenceExamples.lean: the complete executed value for no vertex, one vertex, two isolated vertices, a horizontal edge, two unjoined vertices of one height, a crossing edge, a four-cycle, a triangle with two parallel entries, a level component needing more than one propagation round (with its label equality transferred to the actual induced graph), and two invalid inputs.docs/math/mapper.md, the Mapper row ofdocs/api.md, aCHANGELOG.mdline.Not included (the second unit, #1006):
FiniteReebDataof the lists, the isomorphism withgraphPLReebData, the Reeb quotient comparison.Branch lifecycle
Ordinary develop topic: based on develop
0a49f5b12ed09191b70054120ee9b4355c6503cb, targetdevelop, squash merge. Target scope: Reeb computation under #923/#227; release version undecided. Propagation: N/A.Public declarations added / changed
Added, all in
TDA.Mapper.GraphPL:HeightGraphwithHeightGraph.Cell,Incidence,Valid,instDecidableValid,graph,instDecidableRelGraphAdj,graph_adj,realHeight,realHeight_eq_iff,levels,levels_pairwise,mem_levels,levels_ne_nil,levels_of_eq_zero,gapCount,length_levels,level,level_strictMono,level_mem_levels,exists_level_eq,range_level,criticalValues,criticalValues_value,coversVertexHeights,horizontal,relax,labels,label,label_le,height_label,label_label,label_eq_label_iff_reachable,componentEquiv,componentEquiv_apply,componentEquiv_symm_mk,vertexPairs,cellsWith,leftEndWith,rightEndWith,edgesWith,cellList,leftEnd,rightEnd,edgeList,incidence,incidence?,incidence_levels,incidence_cells,incidence_edges,incidence?_eq_some_iff,incidence?_eq_none_iff,levels_getElem?,incidence_cells_getElem?,incidence_edges_getElem?,mem_cellList_inl,mem_cellList_inr,nodup_cellList,mem_edgeList,nodup_edgeList,leftEnd_mem_cellList,rightEnd_mem_cellList; and the fixtures ofGraphPLIncidenceExamples. No existing declaration changes.Relative to the contract in #1005, two supporting lemmas are added:
level_mem_levelsandexists_level_eq. No listed statement is changed.Source ↔ Lean correspondence
Library-derived unit; no external source statement. The governing specification is #923 and the contract #1005, whose statements were checked before admission by an independent reviewer that proved them in its own scratch files. The three index lemmas
levels_getElem?,incidence_cells_getElem?andincidence_edges_getElem?were added to the contract after that review; the final-head review below checked them and the two supporting lemmas.Validation
Evaluated head
fba3bc694420f867c24a86d8a685b01490160752, base0a49f5b12ed09191b70054120ee9b4355c6503cb.scripts/check.sh(full gate) on this head: exit 0,CHECK OK;AXIOM AUDIT OK — 13686 declaration(s),PRIVATE AUDIT — 10521 private theorem root(s),COVERAGE OK — 11007 public theorems, all pinned, Comparator accepted (1m47s). Base: 13593 / 10503 / 10954.git pushpre-push gate: passed.checkfor this head: success — https://github.com/uda-lab/tda-lib/actions/runs/44664602300/job/136050739470 ; the log reportsAXIOM AUDIT OK — 13686 declaration(s),PRIVATE AUDIT — 10521 private theorem root(s),COVERAGE OK — 11007 public theorems, all pinned,Lean default kernel accepts the solution,CHECK OK, the same counts as the local run.scripts/test-guards.sh, doc generation, a timing of compiledincidenceon large inputs (the cost paragraph is a documented count, not a measurement of this head).Remaining sorry / custom-axiom footprint
none
Independent review evidence
fba3bc694420f867c24a86d8a685b01490160752: pass with non-substantive notes — feat(mapper): executable graph-PL incidence extraction with certified component labels (#1005) #1007 (comment) . The notes (the docstring oflabelis exact only for valid input; nameLevelVertexin one sentence of the math notes; listleftEnd/rightEndand the validation cost in the cost paragraph of the math notes) were not acted on, so the reviewed head is the head evaluated above; they are carried into the next unit ([Reeb computation] Identify the executed graph-PL incidence lists with graphPLReebData and the Reeb quotient (#923, part 2) #1006).🤖 Generated with Claude Code
https://claude.ai/code/session_01RfoZqCRSgoUin4otWc6fXL