diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fa68ea..7b2de26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,15 @@ Changes on `develop` after v0.4.0; the next release version is undecided. proved correct for the actual Kan extensions in all three cases. A failure refutes the predicate at that radius; it is not a distance bound. See [rank erosion](docs/math/rank-erosion.md#a-certified-finite-test). +- Compute the incidence lists of graph-PL input by execution + (`HeightGraph.incidence?`): from a Boolean adjacency function and rational + vertex heights, the sorted distinct levels, one cell per level component and + per crossing edge, and the spanning edges of each gap with their endpoint + cells, parallel entries retained. Component labels are proved to decide + reachability in the actual induced level graphs; invalid adjacency is + rejected. The comparison with `graphPLReebData` and the Reeb quotient is not + included. See + [executable incidence extraction](docs/math/mapper.md#executable-incidence-extraction). ## v0.4.0 diff --git a/TDA/Mapper.lean b/TDA/Mapper.lean index 82d723a..f951e43 100644 --- a/TDA/Mapper.lean +++ b/TDA/Mapper.lean @@ -49,3 +49,4 @@ import TDA.Mapper.GraphPLReebMapPair import TDA.Mapper.GraphPLReebMergeFold import TDA.Mapper.RefinementHomologyMapPair import TDA.Mapper.MapperReebConstructible +import TDA.Mapper.GraphPLIncidence diff --git a/TDA/Mapper/Examples.lean b/TDA/Mapper/Examples.lean index a5e2516..9fcdd10 100644 --- a/TDA/Mapper/Examples.lean +++ b/TDA/Mapper/Examples.lean @@ -39,3 +39,4 @@ import TDA.Mapper.GraphPLReebMapPairExamples import TDA.Mapper.GraphPLReebMergeFoldExamples import TDA.Mapper.RefinementHomologyMapPairExamples import TDA.Mapper.MapperReebConstructibleExamples +import TDA.Mapper.GraphPLIncidenceExamples diff --git a/TDA/Mapper/GraphPLIncidence.lean b/TDA/Mapper/GraphPLIncidence.lean new file mode 100644 index 0000000..82e0765 --- /dev/null +++ b/TDA/Mapper/GraphPLIncidence.lean @@ -0,0 +1,564 @@ +import TDA.Mapper.GraphPLReebData +import Mathlib.Data.List.Sort +import Mathlib.Data.List.ProdSigma +import Mathlib.Data.List.FinRange +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Combinatorics.SimpleGraph.Paths +import Mathlib.Combinatorics.SimpleGraph.Connectivity.Connected + +/-! +# Executable incidence extraction for graph-PL input + +A `HeightGraph N` is a Boolean adjacency function on `Fin N` with rational vertex heights. This +module computes, without quotient representatives and without real-number comparison, the lists +from which the finite Reeb data of the graph-PL height are built: + +* `levels`: the sorted distinct heights, and the single dummy level `0` when `N = 0`; +* `label`: the least vertex index in the component of a vertex in the graph induced on the + vertices of its height, by `N` rounds of minimum-label propagation along horizontal edges; +* `cellList c`: the label fixed points of height `c`, one for each component of the level graph, + and one cell for each edge crossing `c`, written as the ordered pair (lower endpoint, upper + endpoint); +* `edgeList p q`: the edges whose height interval contains `[p, q]`, as ordered pairs, each with + its two endpoint cells. An endpoint cell is the label of the endpoint when the endpoint lies on + the level, and the edge itself as a crossing cell otherwise. Distinct edges are distinct + entries, also when their endpoint cells coincide. + +`incidence` collects the lists over all levels and gaps, and `incidence?` returns them for valid +input only: adjacency must be symmetric with an empty diagonal, and nothing is repaired. + +## Semantic statements + +For valid input, `graph` is the simple graph and `realHeight` the real-valued height. +`label_eq_label_iff_reachable` states that two vertices of height `c` have the same label exactly +when they are joined in the graph induced on `{v | realHeight v = c}`, the vertex set of +`LevelVertex` in `TDA.Mapper.GraphPLReebData`, and `componentEquiv` is the resulting bijection +between label fixed points and connected components. `criticalValues` is the list of levels as +a `CriticalValues`, and it covers the vertex heights (`coversVertexHeights`). The membership +statements `mem_cellList_inl`, `mem_cellList_inr` and `mem_edgeList` describe the lists, which +have no repetition (`nodup_cellList`, `nodup_edgeList`). Which vertex represents a component is a +property of this implementation; consumers should use the reachability statement. + +The identification of these lists with `graphPLReebData` and with the Reeb quotient is not in +this module. + +## Cost + +For `incidence` and `incidence?`, count one evaluation of `adj` or `height`, one rational +comparison and one index comparison as a unit. The label propagation makes `N` rounds, each +scanning `N` candidates for each of `N` vertices: `O(N³)` units. The levels take `O(N²)`. Each +level scans `N` vertices and `N²` ordered pairs, and each gap scans `N²` ordered pairs: +`O(L N²)` for `L` levels. The total is `O(N³)` units; the bit cost of rational comparison is +separate. `incidence` computes the label vector once. The forms `label`, `cellList`, `edgeList`, +`leftEnd` and `rightEnd` are for statements: each call recomputes the label vector. These counts +are not theorems. The executable definitions use lists, `Vector`, `Fin` and rational comparison; +the bound proofs of vector indexing are the only reason `#print axioms` lists `Classical.choice` +for them. + +These are elementary library results, not attributed to a source. See `docs/math/mapper.md`. +-/ + +set_option autoImplicit false + +namespace TDA.Mapper.GraphPL + +open SimpleGraph TDA.Reeb + +/-- Finite graph-PL input: Boolean adjacency on `Fin N` and rational vertex heights. -/ +structure HeightGraph (N : ℕ) where + /-- The adjacency function. -/ + adj : Fin N → Fin N → Bool + /-- The vertex heights. -/ + height : Fin N → ℚ + +namespace HeightGraph + +/-- A cell over a level: a component representative, or a crossing edge as the ordered pair +(lower endpoint, upper endpoint). -/ +abbrev Cell (N : ℕ) : Type := Fin N ⊕ Fin N × Fin N + +/-- Executed incidence lists: the levels, the cells at each level, and over each gap between +consecutive levels the spanning edges with their left and right endpoint cells. -/ +structure Incidence (N : ℕ) where + /-- The levels, increasing. -/ + levels : List ℚ + /-- The cells at each level. -/ + cells : List (List (Cell N)) + /-- The spanning edges over each gap, each with its left and right endpoint cells. -/ + edges : List (List ((Fin N × Fin N) × Cell N × Cell N)) + deriving DecidableEq, Repr + +variable {N : ℕ} (X : HeightGraph N) + +/-! ## Validation and semantic adapters -/ + +/-- The adjacency function is symmetric and has an empty diagonal. -/ +def Valid : Prop := (∀ u w, X.adj u w = X.adj w u) ∧ ∀ u, X.adj u u = false + +instance instDecidableValid : Decidable X.Valid := by unfold Valid; infer_instance + +/-- The simple graph of a valid input. -/ +def graph (hX : X.Valid) : SimpleGraph (Fin N) where + Adj u w := X.adj u w = true + symm := ⟨fun u w h => by rw [← hX.1 u w]; exact h⟩ + loopless := ⟨fun u h => by simp [hX.2 u] at h⟩ + +instance instDecidableRelGraphAdj (hX : X.Valid) : DecidableRel (X.graph hX).Adj := fun u w => + inferInstanceAs (Decidable (X.adj u w = true)) + +theorem graph_adj (hX : X.Valid) {u w : Fin N} : (X.graph hX).Adj u w ↔ X.adj u w = true := + Iff.rfl + +/-- The vertex heights as real numbers. -/ +noncomputable def realHeight : Fin N → ℝ := fun v => (X.height v : ℝ) + +theorem realHeight_eq_iff {v : Fin N} {c : ℚ} : X.realHeight v = (c : ℝ) ↔ X.height v = c := + Rat.cast_inj + +/-! ## Levels -/ + +/-- The sorted distinct heights; the dummy level `0` when there is no vertex. -/ +def levels : List ℚ := + if N = 0 then [0] else ((List.ofFn X.height).dedup).insertionSort (· ≤ ·) + +theorem levels_pairwise : X.levels.Pairwise (· < ·) := by + unfold levels + split + · simp + · have hs := List.pairwise_insertionSort (· ≤ ·) ((List.ofFn X.height).dedup) + have hn : (((List.ofFn X.height).dedup).insertionSort (· ≤ ·)).Nodup := + (List.perm_insertionSort _ _).nodup_iff.2 (List.nodup_dedup _) + exact (hs.and hn).imp fun h => lt_of_le_of_ne h.1 h.2 + +theorem mem_levels (hN : 0 < N) {c : ℚ} : c ∈ X.levels ↔ ∃ v, X.height v = c := by + unfold levels + simp only [hN.ne', ↓reduceIte, List.mem_insertionSort, List.mem_dedup, List.mem_ofFn] + +theorem levels_ne_nil : X.levels ≠ [] := by + rcases Nat.eq_zero_or_pos N with hN | hN + · unfold levels + simp only [hN, ↓reduceIte] + exact List.cons_ne_nil _ _ + · exact List.ne_nil_of_mem ((X.mem_levels hN).2 ⟨⟨0, hN⟩, rfl⟩) + +theorem levels_of_eq_zero (X : HeightGraph 0) : X.levels = [0] := rfl + +/-- The number of gaps between consecutive levels. -/ +def gapCount : ℕ := X.levels.length - 1 + +theorem length_levels : X.levels.length = X.gapCount + 1 := + (Nat.sub_add_cancel (List.length_pos_iff.2 X.levels_ne_nil)).symm + +/-- The levels, indexed. -/ +def level (i : Fin (X.gapCount + 1)) : ℚ := X.levels.get (i.cast X.length_levels.symm) + +theorem level_strictMono : StrictMono X.level := fun _ _ hij => + List.pairwise_iff_get.1 X.levels_pairwise _ _ hij + +theorem level_mem_levels (i : Fin (X.gapCount + 1)) : X.level i ∈ X.levels := + List.get_mem _ _ + +theorem exists_level_eq {c : ℚ} (hc : c ∈ X.levels) : ∃ i, X.level i = c := by + obtain ⟨j, hj⟩ := List.mem_iff_get.1 hc + exact ⟨j.cast X.length_levels, hj⟩ + +theorem range_level (hN : 0 < N) : Set.range X.level = Set.range X.height := by + ext c + constructor + · rintro ⟨i, rfl⟩ + exact (X.mem_levels hN).1 (X.level_mem_levels i) + · rintro ⟨v, rfl⟩ + exact X.exists_level_eq ((X.mem_levels hN).2 ⟨v, rfl⟩) + +/-- The computed covering list: the levels as real numbers. -/ +noncomputable def criticalValues : CriticalValues X.gapCount where + value i := (X.level i : ℝ) + strictMono := fun _ _ hij => Rat.cast_lt.2 (X.level_strictMono hij) + +@[simp] theorem criticalValues_value (i : Fin (X.gapCount + 1)) : + X.criticalValues.value i = (X.level i : ℝ) := rfl + +theorem coversVertexHeights : CoversVertexHeights X.criticalValues X.realHeight := fun v => by + obtain ⟨i, hi⟩ := X.exists_level_eq ((X.mem_levels v.pos).2 ⟨v, rfl⟩) + exact ⟨i, by rw [criticalValues_value, hi]; rfl⟩ + +/-! ## Component labels -/ + +/-- Adjacent vertices of equal height. -/ +def horizontal (u w : Fin N) : Bool := X.adj u w && decide (X.height u = X.height w) + +/-- One round of label propagation: every vertex takes the least label among its own and +those of its horizontal neighbours. -/ +def relax (L : Vector (Fin N) N) : Vector (Fin N) N := + Vector.ofFn fun v => + ((List.finRange N).filter fun w => X.horizontal v w).foldr (fun w m => min L[w] m) L[v] + +/-- The component labels: `N` rounds of propagation from the identity labelling. -/ +def labels : Vector (Fin N) N := X.relax^[N] (Vector.ofFn id) + +/-- The label of a vertex: the least index in its level component. -/ +def label (v : Fin N) : Fin N := X.labels[v] + +section fold + +variable {α β : Type*} [LinearOrder β] + +private theorem foldr_min_le_init (f : α → β) (b : β) (l : List α) : + l.foldr (fun w m => min (f w) m) b ≤ b := by + induction l with + | nil => exact le_rfl + | cons a l ih => exact (min_le_right _ _).trans ih + +private theorem foldr_min_le_of_mem (f : α → β) (b : β) {l : List α} {w : α} (hw : w ∈ l) : + l.foldr (fun w m => min (f w) m) b ≤ f w := by + induction l with + | nil => simp at hw + | cons a l ih => + rcases List.mem_cons.1 hw with rfl | h + · exact min_le_left _ _ + · exact (min_le_right _ _).trans (ih h) + +private theorem foldr_min_eq (f : α → β) (b : β) (l : List α) : + l.foldr (fun w m => min (f w) m) b = b ∨ + ∃ w ∈ l, l.foldr (fun w m => min (f w) m) b = f w := by + induction l with + | nil => exact .inl rfl + | cons a l ih => + rw [List.foldr_cons] + rcases min_choice (f a) (l.foldr (fun w m => min (f w) m) b) with h | h + · exact .inr ⟨a, List.mem_cons_self, h⟩ + · rw [h] + rcases ih with h' | ⟨w, hw, h'⟩ + · exact .inl h' + · exact .inr ⟨w, List.mem_cons_of_mem _ hw, h'⟩ + +end fold + +private theorem relax_getElem (L : Vector (Fin N) N) (v : Fin N) : + (X.relax L)[v] = + ((List.finRange N).filter fun w => X.horizontal v w).foldr (fun w m => min L[w] m) L[v] := by + simp [relax] + +/-- A chain of at most `k` horizontal steps. -/ +private inductive Within : ℕ → Fin N → Fin N → Prop + | refl (k : ℕ) (v : Fin N) : Within k v v + | step {k : ℕ} {u x w : Fin N} : X.horizontal u x = true → Within k x w → Within (k + 1) u w + +private theorem Within.succ {k : ℕ} {u w : Fin N} (h : Within X k u w) : + Within X (k + 1) u w := by + induction h with + | refl k v => exact .refl _ _ + | step hux _ ih => exact .step hux ih + +private theorem Within.height_eq {k : ℕ} {u w : Fin N} (h : Within X k u w) : + X.height w = X.height u := by + induction h with + | refl k v => rfl + | step hux _ ih => + rw [ih] + simp only [horizontal, Bool.and_eq_true, decide_eq_true_eq] at hux + exact hux.2.symm + +/-- After `k` rounds the label of `v` is the least vertex within `k` horizontal steps. -/ +private theorem iterate_relax (k : ℕ) (v : Fin N) : + Within X k v (X.relax^[k] (Vector.ofFn id))[v] ∧ + ∀ w, Within X k v w → (X.relax^[k] (Vector.ofFn id))[v] ≤ w := by + induction k generalizing v with + | zero => + have h0 : (X.relax^[0] (Vector.ofFn id))[v] = v := by simp + rw [h0] + refine ⟨.refl _ _, fun w hw => ?_⟩ + cases hw + exact le_rfl + | succ k ih => + rw [Function.iterate_succ_apply', relax_getElem] + set L := X.relax^[k] (Vector.ofFn id) with hL + constructor + · rcases foldr_min_eq (fun w => L[w]) L[v] + ((List.finRange N).filter fun w => X.horizontal v w) with h | ⟨w, hw, h⟩ + · rw [h] + exact (ih v).1.succ + · rw [h] + exact .step (List.mem_filter.1 hw).2 (ih w).1 + · intro w hw + cases hw with + | refl => + exact (foldr_min_le_init _ _ _).trans ((ih v).2 v (.refl _ _)) + | step hux hxw => + exact (foldr_min_le_of_mem (fun w => L[w]) L[v] + (List.mem_filter.2 ⟨List.mem_finRange _, hux⟩)).trans ((ih _).2 w hxw) + +theorem label_le (v : Fin N) : X.label v ≤ v := + (X.iterate_relax N v).2 v (.refl _ _) + +theorem height_label (v : Fin N) : X.height (X.label v) = X.height v := + (X.iterate_relax N v).1.height_eq + +/-- The graph of horizontal edges of a valid input. -/ +private def horizontalGraph (hX : X.Valid) : SimpleGraph (Fin N) where + Adj u w := X.horizontal u w = true + symm := ⟨fun u w h => by + simp only [horizontal, Bool.and_eq_true, decide_eq_true_eq] at h ⊢ + exact ⟨by rw [← hX.1 u w]; exact h.1, h.2.symm⟩⟩ + loopless := ⟨fun u h => by simp [horizontal, hX.2 u] at h⟩ + +private theorem within_of_walk (hX : X.Valid) {u w : Fin N} + (p : (X.horizontalGraph hX).Walk u w) : Within X p.length u w := by + induction p with + | nil => exact .refl _ _ + | cons h _ ih => exact .step h ih + +private theorem Within.mono {k m : ℕ} {u w : Fin N} (h : Within X k u w) (hkm : k ≤ m) : + Within X m u w := by + induction hkm with + | refl => exact h + | step _ ih => exact ih.succ + +private theorem Within.reachable (hX : X.Valid) {k : ℕ} {u w : Fin N} (h : Within X k u w) : + (X.horizontalGraph hX).Reachable u w := by + induction h with + | refl k v => exact .refl _ + | step hux _ ih => exact (Adj.reachable (G := X.horizontalGraph hX) hux).trans ih + +private theorem within_of_reachable (hX : X.Valid) {u w : Fin N} + (h : (X.horizontalGraph hX).Reachable u w) : Within X N u w := by + obtain ⟨p, hp⟩ := h.exists_isPath + have hlen : p.length < N := by simpa using hp.length_lt + exact (X.within_of_walk hX p).mono X hlen.le + +private theorem label_eq_label_iff (hX : X.Valid) {u w : Fin N} : + X.label u = X.label w ↔ (X.horizontalGraph hX).Reachable u w := by + have hreach : ∀ v, (X.horizontalGraph hX).Reachable v (X.label v) := fun v => + (X.iterate_relax N v).1.reachable X hX + have hle : ∀ {a b}, (X.horizontalGraph hX).Reachable a b → X.label a ≤ b := fun {a b} h => + (X.iterate_relax N a).2 b (X.within_of_reachable hX h) + constructor + · intro h + exact (hreach u).trans (h ▸ (hreach w).symm) + · intro h + exact le_antisymm (hle (h.trans (hreach w))) (hle (h.symm.trans (hreach u))) + +theorem label_label (hX : X.Valid) (v : Fin N) : X.label (X.label v) = X.label v := + (X.label_eq_label_iff hX).2 ((X.iterate_relax N v).1.reachable X hX).symm + +/-- Reachability in the induced level graph is horizontal reachability. -/ +private theorem reachable_induce_iff (hX : X.Valid) {c : ℚ} {u w : Fin N} + (hu : X.height u = c) (hw : X.height w = c) : + ((X.graph hX).induce {v | X.realHeight v = (c : ℝ)}).Reachable + ⟨u, X.realHeight_eq_iff.2 hu⟩ ⟨w, X.realHeight_eq_iff.2 hw⟩ ↔ + (X.horizontalGraph hX).Reachable u w := by + constructor + · intro h + let f : (X.graph hX).induce {v | X.realHeight v = (c : ℝ)} →g X.horizontalGraph hX := + { toFun := fun v => v.1 + map_rel' := fun {a b} hab => by + show X.horizontal a.1 b.1 = true + simp only [horizontal, Bool.and_eq_true, decide_eq_true_eq] + exact ⟨hab, (X.realHeight_eq_iff.1 a.2).trans (X.realHeight_eq_iff.1 b.2).symm⟩ } + exact h.map f + · rintro ⟨p⟩ + induction p with + | nil => exact .refl _ + | @cons a b d hab _ ih => + have hab' : X.adj a b = true ∧ X.height a = X.height b := by + have := hab + simp only [horizontalGraph, horizontal, Bool.and_eq_true, decide_eq_true_eq] at this + exact this + have hb : X.height b = c := hab'.2.symm.trans hu + have hadj : ((X.graph hX).induce {v | X.realHeight v = (c : ℝ)}).Adj + ⟨a, X.realHeight_eq_iff.2 hu⟩ ⟨b, X.realHeight_eq_iff.2 hb⟩ := hab'.1 + exact hadj.reachable.trans (ih hb hw) + +/-- Label equality is reachability in the actual induced level graph. -/ +theorem label_eq_label_iff_reachable (hX : X.Valid) {c : ℚ} {u w : Fin N} + (hu : X.height u = c) (hw : X.height w = c) : + X.label u = X.label w ↔ + ((X.graph hX).induce {v | X.realHeight v = (c : ℝ)}).Reachable + ⟨u, X.realHeight_eq_iff.2 hu⟩ ⟨w, X.realHeight_eq_iff.2 hw⟩ := + (X.label_eq_label_iff hX).trans (X.reachable_induce_iff hX hu hw).symm + +/-- The label fixed points of height `c` are the connected components of the level graph. -/ +noncomputable def componentEquiv (hX : X.Valid) (c : ℚ) : + {r : Fin N // X.label r = r ∧ X.height r = c} ≃ + ((X.graph hX).induce {v | X.realHeight v = (c : ℝ)}).ConnectedComponent where + toFun r := ((X.graph hX).induce {v | X.realHeight v = (c : ℝ)}).connectedComponentMk + ⟨r.1, X.realHeight_eq_iff.2 r.2.2⟩ + invFun := ConnectedComponent.lift + (fun v => ⟨X.label v.1, X.label_label hX v.1, + (X.height_label v.1).trans (X.realHeight_eq_iff.1 v.2)⟩) + (fun v w p _ => Subtype.ext + ((X.label_eq_label_iff_reachable hX (X.realHeight_eq_iff.1 v.2) + (X.realHeight_eq_iff.1 w.2)).2 ⟨p⟩)) + left_inv r := Subtype.ext r.2.1 + right_inv := by + refine ConnectedComponent.ind fun v => ?_ + refine ConnectedComponent.sound ?_ + exact ((X.label_eq_label_iff_reachable hX + ((X.height_label v.1).trans (X.realHeight_eq_iff.1 v.2)) + (X.realHeight_eq_iff.1 v.2)).1 (X.label_label hX v.1)) + +theorem componentEquiv_apply (hX : X.Valid) (c : ℚ) + (r : {r : Fin N // X.label r = r ∧ X.height r = c}) : + X.componentEquiv hX c r = + ((X.graph hX).induce {v | X.realHeight v = (c : ℝ)}).connectedComponentMk + ⟨r.1, X.realHeight_eq_iff.2 r.2.2⟩ := rfl + +theorem componentEquiv_symm_mk (hX : X.Valid) (c : ℚ) (v : Fin N) (hv : X.height v = c) : + ((X.componentEquiv hX c).symm + (((X.graph hX).induce {v | X.realHeight v = (c : ℝ)}).connectedComponentMk + ⟨v, X.realHeight_eq_iff.2 hv⟩) : Fin N) = X.label v := rfl + +/-! ## Cells and edges -/ + +/-- All ordered pairs of vertices. -/ +def vertexPairs (N : ℕ) : List (Fin N × Fin N) := List.finRange N ×ˢ List.finRange N + +/-- The cells at level `c` for a labelling `ℓ`: the label fixed points of height `c`, then the +edges crossing `c`. -/ +def cellsWith (ℓ : Fin N → Fin N) (c : ℚ) : List (Cell N) := + ((List.finRange N).filter fun r => ℓ r = r ∧ X.height r = c).map Sum.inl ++ + ((vertexPairs N).filter fun y => + X.adj y.1 y.2 = true ∧ X.height y.1 < c ∧ c < X.height y.2).map Sum.inr + +/-- The cell at level `p` of the lower end of an edge. -/ +def leftEndWith (ℓ : Fin N → Fin N) (p : ℚ) (y : Fin N × Fin N) : Cell N := + if X.height y.1 = p then .inl (ℓ y.1) else .inr y + +/-- The cell at level `q` of the upper end of an edge. -/ +def rightEndWith (ℓ : Fin N → Fin N) (q : ℚ) (y : Fin N × Fin N) : Cell N := + if X.height y.2 = q then .inl (ℓ y.2) else .inr y + +/-- The edges spanning `[p, q]` for a labelling `ℓ`, with their endpoint cells. -/ +def edgesWith (ℓ : Fin N → Fin N) (p q : ℚ) : List ((Fin N × Fin N) × Cell N × Cell N) := + ((vertexPairs N).filter fun y => + X.adj y.1 y.2 = true ∧ X.height y.1 ≤ p ∧ q ≤ X.height y.2).map + fun y => (y, X.leftEndWith ℓ p y, X.rightEndWith ℓ q y) + +/-- The cells at level `c`. -/ +def cellList (c : ℚ) : List (Cell N) := X.cellsWith X.label c + +/-- The left endpoint cell of an edge over a gap with lower level `p`. -/ +def leftEnd (p : ℚ) (y : Fin N × Fin N) : Cell N := X.leftEndWith X.label p y + +/-- The right endpoint cell of an edge over a gap with upper level `q`. -/ +def rightEnd (q : ℚ) (y : Fin N × Fin N) : Cell N := X.rightEndWith X.label q y + +/-- The edges spanning `[p, q]`, with their endpoint cells. -/ +def edgeList (p q : ℚ) : List ((Fin N × Fin N) × Cell N × Cell N) := X.edgesWith X.label p q + +/-- The executed incidence lists; the label vector is computed once. -/ +def incidence : Incidence N := + let L := X.labels + let ℓ : Fin N → Fin N := fun v => L[v] + let lv := X.levels + { levels := lv + cells := lv.map (X.cellsWith ℓ) + edges := (lv.zip lv.tail).map fun pq => X.edgesWith ℓ pq.1 pq.2 } + +/-- The executed incidence lists of a valid input; `none` for invalid input. -/ +def incidence? : Option (Incidence N) := if X.Valid then some X.incidence else none + +private theorem mem_vertexPairs (y : Fin N × Fin N) : y ∈ vertexPairs N := by + obtain ⟨a, b⟩ := y + simp [vertexPairs] + +theorem incidence_levels : X.incidence.levels = X.levels := rfl + +theorem incidence_cells : X.incidence.cells = X.levels.map X.cellList := rfl + +theorem incidence_edges : + X.incidence.edges = (X.levels.zip X.levels.tail).map fun pq => X.edgeList pq.1 pq.2 := rfl + +theorem incidence?_eq_some_iff {P : Incidence N} : + X.incidence? = some P ↔ X.Valid ∧ X.incidence = P := by + unfold incidence? + split <;> simp [*] + +theorem incidence?_eq_none_iff : X.incidence? = none ↔ ¬ X.Valid := by + unfold incidence? + split <;> simp [*] + +theorem levels_getElem? (i : Fin (X.gapCount + 1)) : X.levels[i.1]? = some (X.level i) := + List.getElem?_eq_getElem _ + +theorem incidence_cells_getElem? (i : Fin (X.gapCount + 1)) : + X.incidence.cells[i.1]? = some (X.cellList (X.level i)) := by + rw [incidence_cells, List.getElem?_map, levels_getElem?] + rfl + +theorem incidence_edges_getElem? (e : Fin X.gapCount) : + X.incidence.edges[e.1]? = some (X.edgeList (X.level e.castSucc) (X.level e.succ)) := by + have h₁ : X.levels[e.1]? = some (X.level e.castSucc) := X.levels_getElem? e.castSucc + have h₂ : X.levels.tail[e.1]? = some (X.level e.succ) := by + rw [List.getElem?_tail] + exact X.levels_getElem? e.succ + rw [incidence_edges, List.getElem?_map, + List.getElem?_zip_eq_some (z := (X.level e.castSucc, X.level e.succ)) |>.2 ⟨h₁, h₂⟩] + rfl + +theorem mem_cellList_inl {c : ℚ} {r : Fin N} : + Sum.inl r ∈ X.cellList c ↔ X.label r = r ∧ X.height r = c := by + simp [cellList, cellsWith] + +theorem mem_cellList_inr {c : ℚ} {y : Fin N × Fin N} : + Sum.inr y ∈ X.cellList c ↔ + X.adj y.1 y.2 = true ∧ X.height y.1 < c ∧ c < X.height y.2 := by + simp [cellList, cellsWith, mem_vertexPairs] + +private theorem nodup_vertexPairs : (vertexPairs N).Nodup := + (List.nodup_finRange N).product (List.nodup_finRange N) + +theorem nodup_cellList (c : ℚ) : (X.cellList c).Nodup := by + unfold cellList cellsWith + refine List.Nodup.append ?_ ?_ ?_ + · exact ((List.nodup_finRange N).filter _).map Sum.inl_injective + · exact (nodup_vertexPairs.filter _).map Sum.inr_injective + · intro x hx hx' + obtain ⟨r, -, rfl⟩ := List.mem_map.1 hx + obtain ⟨y, -, hy⟩ := List.mem_map.1 hx' + exact Sum.inr_ne_inl hy + +theorem mem_edgeList {p q : ℚ} {z : (Fin N × Fin N) × Cell N × Cell N} : + z ∈ X.edgeList p q ↔ + (X.adj z.1.1 z.1.2 = true ∧ X.height z.1.1 ≤ p ∧ q ≤ X.height z.1.2) ∧ + z.2.1 = X.leftEnd p z.1 ∧ z.2.2 = X.rightEnd q z.1 := by + obtain ⟨y, a, b⟩ := z + simp only [edgeList, edgesWith, leftEnd, rightEnd, List.mem_map, List.mem_filter, + mem_vertexPairs, true_and, decide_eq_true_eq, Prod.mk.injEq] + constructor + · rintro ⟨y', hy', rfl, rfl, rfl⟩ + exact ⟨hy', rfl, rfl⟩ + · rintro ⟨hy, rfl, rfl⟩ + exact ⟨y, hy, rfl, rfl, rfl⟩ + +/-- One entry per spanning edge. -/ +theorem nodup_edgeList (p q : ℚ) : ((X.edgeList p q).map Prod.fst).Nodup := by + unfold edgeList edgesWith + rw [List.map_map] + exact (nodup_vertexPairs.filter _).map fun _ _ h => h + +/-- The left endpoint cell of a listed edge is a listed cell of the lower level. -/ +theorem leftEnd_mem_cellList (hX : X.Valid) {p q : ℚ} (hpq : p < q) + {z : (Fin N × Fin N) × Cell N × Cell N} (hz : z ∈ X.edgeList p q) : + z.2.1 ∈ X.cellList p := by + obtain ⟨⟨hadj, hlo, hhi⟩, hl, -⟩ := X.mem_edgeList.1 hz + rw [hl] + unfold leftEnd leftEndWith + split_ifs with h + · exact X.mem_cellList_inl.2 ⟨X.label_label hX _, (X.height_label _).trans h⟩ + · exact X.mem_cellList_inr.2 ⟨hadj, lt_of_le_of_ne hlo h, hpq.trans_le hhi⟩ + +/-- The right endpoint cell of a listed edge is a listed cell of the upper level. -/ +theorem rightEnd_mem_cellList (hX : X.Valid) {p q : ℚ} (hpq : p < q) + {z : (Fin N × Fin N) × Cell N × Cell N} (hz : z ∈ X.edgeList p q) : + z.2.2 ∈ X.cellList q := by + obtain ⟨⟨hadj, hlo, hhi⟩, -, hr⟩ := X.mem_edgeList.1 hz + rw [hr] + unfold rightEnd rightEndWith + split_ifs with h + · exact X.mem_cellList_inl.2 ⟨X.label_label hX _, (X.height_label _).trans h⟩ + · exact X.mem_cellList_inr.2 ⟨hadj, hlo.trans_lt hpq, lt_of_le_of_ne hhi (Ne.symm h)⟩ + +end HeightGraph + +end TDA.Mapper.GraphPL diff --git a/TDA/Mapper/GraphPLIncidenceExamples.lean b/TDA/Mapper/GraphPLIncidenceExamples.lean new file mode 100644 index 0000000..57316bd --- /dev/null +++ b/TDA/Mapper/GraphPLIncidenceExamples.lean @@ -0,0 +1,134 @@ +import TDA.Mapper.GraphPLIncidence +import Mathlib.Data.Fin.VecNotation + +/-! +# Executed graph-PL incidence extraction + +Each fixture states the complete value of `HeightGraph.incidence?`. + +* `empty`: no vertex; the dummy level `0`, no cell and no edge. +* `single`, `apart`: one vertex; two isolated vertices at different heights. +* `flat`: a horizontal edge; one level, one component, no spanning edge. +* `vee`: two vertices of the same height that are not joined at their level, both joined to a + lower vertex. +* `crossing`: an edge crossing an intermediate level that carries an isolated vertex. +* `diamond`: a cycle. +* `triangle`: two distinct edges over one gap with the same two endpoint cells; both entries are + present. +* `bent`: a level component of three vertices whose least index is not adjacent to all of them, + so that one propagation round does not suffice; its label equality is transferred to + reachability in the actual induced level graph. +* `oneWay`, `loop`: invalid adjacency, reported as `none`. +-/ + +set_option autoImplicit false + +namespace TDA.Mapper.GraphPL.GraphPLIncidenceExamples + +open HeightGraph + +/-- Symmetric adjacency on vertex numbers from a list of edges. -/ +def edgeAdj {N : ℕ} (E : List (ℕ × ℕ)) (u w : Fin N) : Bool := + E.contains (u.1, w.1) || E.contains (w.1, u.1) + +/-- No vertex. -/ +def empty : HeightGraph 0 := ⟨fun _ _ => false, fun i => i.elim0⟩ + +theorem empty_incidence : empty.incidence? = some ⟨[0], [[]], []⟩ := by decide +kernel + +/-- One vertex. -/ +def single : HeightGraph 1 := ⟨fun _ _ => false, fun _ => 3⟩ + +theorem single_incidence : single.incidence? = some ⟨[3], [[.inl 0]], []⟩ := by decide +kernel + +/-- Two isolated vertices at different heights. -/ +def apart : HeightGraph 2 := ⟨fun _ _ => false, ![0, 1]⟩ + +theorem apart_incidence : apart.incidence? = some ⟨[0, 1], [[.inl 0], [.inl 1]], [[]]⟩ := by + decide +kernel + +/-- A horizontal edge. -/ +def flat : HeightGraph 2 := ⟨edgeAdj [(0, 1)], ![0, 0]⟩ + +theorem flat_incidence : flat.incidence? = some ⟨[0], [[.inl 0]], []⟩ := by decide +kernel + +/-- Vertices `0` and `1` at height `1`, not joined; both joined to vertex `2` at height `0`. -/ +def vee : HeightGraph 3 := ⟨edgeAdj [(0, 2), (1, 2)], ![1, 1, 0]⟩ + +theorem vee_incidence : + vee.incidence? = some ⟨[0, 1], [[.inl 2], [.inl 0, .inl 1]], + [[((2, 0), .inl 2, .inl 0), ((2, 1), .inl 2, .inl 1)]]⟩ := by + decide +kernel + +/-- An edge from height `0` to height `2`, and an isolated vertex at height `1`. -/ +def crossing : HeightGraph 3 := ⟨edgeAdj [(0, 1)], ![0, 2, 1]⟩ + +theorem crossing_incidence : + crossing.incidence? = some ⟨[0, 1, 2], [[.inl 0], [.inl 2, .inr (0, 1)], [.inl 1]], + [[((0, 1), .inl 0, .inr (0, 1))], [((0, 1), .inr (0, 1), .inl 1)]]⟩ := by + decide +kernel + +/-- A four-cycle with heights `0, 1, 1, 2`. -/ +def diamond : HeightGraph 4 := ⟨edgeAdj [(0, 1), (0, 2), (1, 3), (2, 3)], ![0, 1, 1, 2]⟩ + +theorem diamond_incidence : + diamond.incidence? = some ⟨[0, 1, 2], [[.inl 0], [.inl 1, .inl 2], [.inl 3]], + [[((0, 1), .inl 0, .inl 1), ((0, 2), .inl 0, .inl 2)], + [((1, 3), .inl 1, .inl 3), ((2, 3), .inl 2, .inl 3)]]⟩ := by + decide +kernel + +/-- A triangle with one vertex at height `0` and a horizontal edge at height `1`. -/ +def triangle : HeightGraph 3 := ⟨edgeAdj [(0, 1), (0, 2), (1, 2)], ![0, 1, 1]⟩ + +theorem triangle_incidence : + triangle.incidence? = some ⟨[0, 1], [[.inl 0], [.inl 1]], + [[((0, 1), .inl 0, .inl 1), ((0, 2), .inl 0, .inl 1)]]⟩ := by + decide +kernel + +/-- Both edges of the triangle over the gap are listed. -/ +theorem triangle_edgeList : + triangle.edgeList 0 1 = [((0, 1), .inl 0, .inl 1), ((0, 2), .inl 0, .inl 1)] := by + decide +kernel + +/-- The two listed edges have the same two endpoint cells. -/ +theorem triangle_parallel : + (triangle.edgeList 0 1).map Prod.snd = [(.inl 0, .inl 1), (.inl 0, .inl 1)] := by + decide +kernel + +/-- Vertices `0, 1, 2` at height `0` joined as the path `0 — 2 — 1`, and vertex `3` above. -/ +def bent : HeightGraph 4 := ⟨edgeAdj [(0, 2), (2, 1), (1, 3)], ![0, 0, 0, 5]⟩ + +theorem bent_valid : bent.Valid := by decide +kernel + +theorem bent_incidence : + bent.incidence? = some ⟨[0, 5], [[.inl 0], [.inl 3]], [[((1, 3), .inl 0, .inl 3)]]⟩ := by + decide +kernel + +/-- One propagation round leaves vertex `1` with its own label. -/ +theorem bent_one_round : (bent.relax (Vector.ofFn id)).toList = [0, 1, 0, 3] := by decide +kernel + +theorem bent_labels : bent.labels.toList = [0, 0, 0, 3] := by decide +kernel + +theorem bent_height_zero : bent.height 0 = 0 := by decide +kernel + +theorem bent_height_one : bent.height 1 = 0 := by decide +kernel + +/-- Vertices `0` and `1` are joined in the actual graph induced on the height-`0` vertices. -/ +theorem bent_reachable : + ((bent.graph bent_valid).induce {v | bent.realHeight v = ((0 : ℚ) : ℝ)}).Reachable + ⟨0, bent.realHeight_eq_iff.2 bent_height_zero⟩ + ⟨1, bent.realHeight_eq_iff.2 bent_height_one⟩ := + (bent.label_eq_label_iff_reachable bent_valid bent_height_zero bent_height_one).1 + (by decide +kernel) + +/-- An asymmetric adjacency. -/ +def oneWay : HeightGraph 2 := ⟨fun u w => decide (u.1 = 0 ∧ w.1 = 1), ![0, 1]⟩ + +theorem oneWay_incidence : oneWay.incidence? = none := by decide +kernel + +/-- A loop. -/ +def loop : HeightGraph 1 := ⟨fun _ _ => true, ![0]⟩ + +theorem loop_incidence : loop.incidence? = none := by decide +kernel + +end TDA.Mapper.GraphPL.GraphPLIncidenceExamples diff --git a/docs/api.md b/docs/api.md index 1588658..80dc335 100644 --- a/docs/api.md +++ b/docs/api.md @@ -43,7 +43,7 @@ Namespaces containing `Examples` are for demonstrations, not the main consumer A | `TDA.Topology` / `TDA.Topology` | `CoverFamily`, `Covers`, `Refinement`, `nerve`, `nerveMap`, `nerveMap_contiguous`, `MultiNerveCell`, its `projection` and `multiNerveMap`, path-cover and cosheaf interfaces; measure bifiltrations on the restricted two-copy index (`MeasureBifiltration`), finite-uniform Gromov–Prokhorov witnesses (`FiniteGromovProkhorov`, `FiniteGromovProkhorovWitness`) and the large-face multicover cover (`MulticoverCover`); [quotient maps after products](math/reeb-thickening-constructible.md#point-set-tools) with a locally compact or proper factor (`isQuotientMap_prodMap_id_left`, `isQuotientMap_prodMap_id_right`, `isQuotientMap_prodMap_id_Icc`, `isQuotientMap_prodMap_id_of_isProperMap`, `isQuotientMap_prodMap_id_of_compactSpace`) | An indexed set family need not cover anything; `Covers` states coverage separately. Labels may repeat and members may be empty. A nerve face is nonempty and has a common witness. Refinement selectors need not be injective. A multinerve cell is a path component of a nonempty finite intersection; the projection to the nerve is an order isomorphism only under `IntersectionsPathSubsingleton`. The quotient-map product lemmas place no separation hypothesis on the quotient map; product stability is stated only for a locally compact factor or a proper surjection, not for arbitrary quotient maps. | | `TDA.Probability` / `TDA.Probability` | Atomic `Coupling`, `iid`, `transportCost`, `wasserstein` and `wassersteinInfinity`; the `pairEnergy` and `pairMaximum` moment bounds; `gromovWasserstein` and `gromovWassersteinInfinity`; the measure forms `MeasureCoupling`, `iidMeasure`, `measureWasserstein`, `measureGromovWasserstein` and their infinity versions | Couplings have exact probability marginals and costs are extended nonnegative infima; no optimizer is assumed. Atomic inputs are `PMF`s, measure inputs `ProbabilityMeasure`s. Gromov–Wasserstein uses the one-half distortion convention. The area contains no diagrams; `TDA.Persistence.RipsSampling` and `RipsSamplingMeasureStability` consume it. | | `TDA.Reeb` / `TDA.Reeb` | Inverse-image path components, Reeb quotients and comparison maps; interval cosheaves, smoothing, interleavings and extended distance; finite data, graph realizations with the finite tree criteria `isTree_iff_simplyConnectedSpace_realization` and `isTree_iff_contractibleSpace_realization`, the incidence quiver and `incidenceGraph` of finite data with `card_incidenceGraph_edgeSet_le` and `RGraph.cosheafEquivalence`; `thickeningQuotient`, `thickeningQuotientAbsorptionIso`, `thickeningQuotientCompIso`, and `isRGraph_quotient_thickening_of_isConstructibleSpace`; `rgraphToConstructible`, `quotientRGraphAdjunction`, `RGraph.constructibleSmoothing`, `ConstructibleInterleaving`, `ConstructibleInterleaving.equivGeometric`, `constructibleInterleavingDistance`, `constructibleInterleavingDistance_eq_geometricInterleavingDistance` and `constructibleInterleavingDistance_eq_interleavingDistance`; `CylinderPresentation.levelHomeomorph`, `realizationSpace`, `levelPerturbation`, `CriticalValues.translate`, the [vertex-height perturbation API](math/reeb-graph-pl.md#vertex-height-perturbations-of-a-fixed-graph) of graph-PL heights (`abs_plHeight_sub_le`, `edist_ofFun_plHeight`, `edist_ofFun_plHeight_eq_edist`, `vertexHeightInterleaving`, `interleavingDistance_intervalComponents_plHeight_le`, `interleavingDistance_intervalComponents_plHeight_le_edist_ofFun`), and the [level-change stability, range and exact-distance API](math/reeb-geometric-interleaving-equivalence.md#level-perturbations-of-a-fixed-presentation), and translation of interval precosheaves (`OpenInterval.translate`, `translateFunctor`, `translatePre`, `translationInterleaving`, `Interleaving.isEmpty_of_nonempty_of_isEmpty`, `le_interleavingDistance_of_forall_exists_isEmpty`, `intervalComponents_add_const`, `interleavingDistance_intervalComponents_add_const`) with `GraphPL.plHeight_add_const` and `RGraph.geometricInterleavingDistance_eq_zero_of_isEmpty`, and [vertical translation of graph objects](math/reeb-rgraph-translation.md) (`RGraph.translateOver`, `toOverTranslateIso`, `translateRGraph`, `translateRGraphZeroIso`, `translateRGraphCompIso`, `cosheafFunctor_translateRGraph_obj`, `Interleaving.translatePre`, `interleavingDistance_translatePre`, `geometricInterleavingDistance_translateRGraph`, `geometricInterleavingDistance_translateRGraph_self`, `reebRel_add_const_iff`, `quotientTranslateIso`, `thickeningTranslateIso`, `geometricSmoothingTranslateIso`); reindexing of interleavings along interval functors (`Interleaving.reindex`, `reindexIso`), interval scaling (`OpenInterval.scale`, `scalePre`, `Interleaving.scalePre`, `interleavingDistance_scalePre`, `intervalComponents_smul`, `interleavingDistance_intervalComponents_smul`), and height-controlled map pairs (`HeightMapPair`, `HeightMapPair.natTrans`, `HeightMapPair.natTransSymm`, `HeightMapPair.natTrans_app_mk`, `HeightMapPair.natTransSymm_app_mk`, `HeightMapPair.interleaving`, `HeightMapPair.symm`, `HeightMapPair.ofUniformBound`, `HeightMapPair.interleavingDistance_le`, `HeightMapPair.interleaving_eq_perturbationInterleaving`), and [presentation morphisms on a common grid](math/reeb-thickening-constructible.md#presentation-morphisms) (`CylinderPresentation.Hom`, `Hom.realize`, `Hom.height_realize`, `Hom.realize_id`, `Hom.realize_comp`, `Hom.toOverHom`, `FiniteReebData.Hom.toPresentationHom`, `realize_toPresentationHom`, `isQuotientMap_prodMap_quotMk`, `prodMap_quotMk_eq_iff`, `isQuotientMap_rawBandMap`), and the [thickening of one cylinder](math/reeb-thickening-constructible.md#one-cylinder) (`Thickening.cylinderThick`, `Thickening.cylinderThickHomeomorph`, `Thickening.cylinderHeight_cylinderThickHomeomorph`, `Thickening.vertexStripHomeomorph`, `Thickening.botIncl`, `Thickening.topIncl`, `Thickening.mapSpace`, `Thickening.pairThickHomeomorph`), [windows and transfers of a presentation](math/reeb-thickening-constructible.md#windows-and-transfers) (`CylinderPresentation.Window`, `windowMk_eq_iff`, `windowToSpace`, `transfer`, `transferFamily`, `transferHomeomorph`), and [the thickening presentation of a presentation](math/reeb-thickening-constructible.md#the-general-presentation) (`CylinderPresentation.thick`, `edgeIncl`, `vertexIncl`, `toProd`, `ofProd`, `thickHomeomorph`, `height_thickHomeomorph`, `shiftedThickHomeomorph`), and [constructibility of thickenings](math/reeb-thickening-constructible.md#theorem-427) (`CylinderPresentation.thickOverIso`, `isConstructibleSpace_thickening_of_isConstructibleSpace`, `thickeningFunctor`, `isConstructibleSpace_thickening_of_isRGraph`, `CylinderPresentation.windowFiberHomeomorph`), and the [thickening–cosheaf comparison on constructible ℝ-spaces](math/reeb-thickening-cosheaf-comparison.md) (`constructibleThickeningComparisonIso`, `constructibleThickeningQuotientComparisonIso`, `thickeningFunctorZeroSection`, `thickeningFunctorZeroIso`, `constructibleThickeningValueEquiv`, `constructibleThickeningQuotientValueEquiv`) | Components are path components of the inverse-image subspace. The tree criteria assume a finite vertex type; realizations of infinite trees are not claimed. General quotient comparison is a natural transformation. The graph/constructible-cosheaf equivalence is scoped to the declared finite real-graph category and value universe `0`. Smoothing and geometric comparisons have separate contracts; geometric thickening composes laxly, by a height-preserving addition map that is not an isomorphism but becomes one after the Reeb quotient, and geometric smoothing of graph objects composes additively, `U_ε U_δ ≅ U_(ε+δ)`; geometric interleavings of graph objects correspond bijectively to interleavings of their component cosheaves, so the geometric and cosheaf interleaving distances coincide and the geometric one satisfies the triangle inequality. Geometric smoothing enlarges along `ε ≤ δ`, geometric interleavings are monotone in the parameter, and every graph object is within geometric distance `ε` of its `ε`-smoothing. Constructible interleavings correspond bijectively to geometric interleavings of the Reeb graphs; the constructible distance equals the cosheaf distance of the interval components of the spaces themselves; zero distance does not give an isomorphism of spaces. The incidence graph forgets parallel edges; edge counts use `Nat.card`. An interval-local component obstruction excludes geometric interleavings whose double-thickening restriction is injective from a nontrivial to a subsingleton value; the parallel loop and the single edge have geometric distance exactly `1/4`. Absorption `ℛ T_ε ≅ U_ε ℛ` holds on all constructible ℝ-spaces; constructibility of `T_ε X` itself is the separate `isConstructibleSpace_thickening_of_isConstructibleSpace`. Level-change stability fixes the presentation and number of levels; compact locally path-connected pieces supply constructibility. Exact translation distance requires a nonempty realization. Arbitrary continuous perturbations are outside that API. The vertex-height bound controls the piecewise-linear extension of the vertex heights on a fixed graph, not arbitrary continuous functions with the same vertex values. The exact translation distance of interval components assumes a nonempty space and a range bounded below; the identity height of `ℝ` shows the bound is needed. Translation of graph objects is an isometry of the geometric distance; the exact self-translation distance `|c|` assumes a nonempty total space and is `0` otherwise. Scaling on graph objects, translation of the display locale and of Mapper reconstructions as graph objects are not provided. Nonzero scaling multiplies interval-precosheaf distances by the absolute scalar; reflection is an isometry. A `HeightMapPair` supplies continuous maps with height error at most `ε` and composite paths with height deviation at most `2ε`; it is a sufficient interleaving criterion, with no converse, functional-distortion identity or optimality claim for the `2ε` path-deviation allowance. Presentation morphisms fix the grid and the cylinder parameter and need no Hausdorff, compact or locally path-connected pieces; `isQuotientMap_rawBandMap` presents the thickened realization by its thickened raw pieces, and no colimit theorem for arbitrary constructible spaces is claimed. The realization of `cylinderThick` is homeomorphic to `E × [a, d] × [-ε, ε]`, preserving height, for every topological `E`, `ε ≥ 0` and `a ≤ d` on every grid listing the four events; for a whole presentation, `thickHomeomorph` is the corresponding homeomorphism on every grid listing the shifted levels. Windows carry the quotient topology of their raw pieces and are not claimed to be height-window subspaces; transfers need not be injective at slab ends. The thickening of every constructible ℝ-space is constructible for every `ε ≥ 0`, with no Hausdorff hypothesis, presented on the shifted witness `S.shifted ε`; this is an admissible critical set, and its minimality is not claimed. The identification of the vertex pieces with height fibers (`windowFiberHomeomorph`) follows from the theorem and is not used in its proof. On constructible ℝ-spaces, in universe `0`, `C' T_ε ≅ S_ε C'` (Theorem 4.24 restricted) and the companion `C'' ℛ T_ε ≅ S_ε C'` are natural in all height-preserving maps, with `S_ε` the smoothing of constructible cosheaves; the companion identifies components, not points of the Reeb quotient with points of the space, and on graph objects both are the existing graph comparisons. | -| `TDA.Mapper` / `TDA.Mapper` | `ComponentIndex`, pullback component covers, `mapper`, its one-skeleton, `multiNerveMapper` and its projection onto `mapper`, refinement maps including `multiNerveMapperMap`, graph-PL comparison, uniform interval covers (`uniformCover`) with attained-range coverage, the label-set cell equivalence `cellsOverLabelsEquiv` with graph-PL edge cells, height-separating uniform covers (`HeightSeparating`, `exists_heightSeparating_uniformCover`, `range_plHeight_eq_Icc`) with the splitting `cellComponentsEquivSum`, vertex cells (`vertexCellsEquiv`) and the cell classification `uniformVertexCellsEquivLevel`, `uniformVertexCellsEquivSpans`, `uniformEdgeCellsEquivSpans` through `EdgeCrosses` and `EdgeSpans`, finite Reeb data of graph-PL input (`CoversVertexHeights`, `vertexHeightLevels`, `LevelVertex`, `SpanEdge`, `levelEnd`, `graphPLReebData`, `uncoveredEdgeEquivCrossesOfLevel`, `induceComponentsEquivOfEq`) with the star and gap bijections `graphPLStarEquiv`, `graphPLGapEquiv`, their incidence laws `graphPLStarEquiv_map_left`, `graphPLStarEquiv_map_right` and the finite-data isomorphism `graphPLExtractHom`, `graphPLExtractIso`, closed level sets of graph-PL height (`ClosedLevel`, `IsLevelWindow`, `closedLevelComponentsEquiv`, `componentMap_levelInclusion_bijective`, `graphPLReebDataVEquivClosedLevel`), constructibility and the cosheaf identification of graph-PL height (`isConstructibleAt_intervalComponents_plHeight`, `cellGraphIsoOfSameLevels`, `graphPLCosheafIsoOfIso`, `graphPLCosheafIso`, `isConstructibleCosheaf_intervalComponents_plHeight`, `cosheafFunctorGraphPLIso`, `geometricInterleavingDistance_graphPL`), the Reeb quotient of graph-PL height (`compactSpace_realization`, `exists_coversVertexHeights`, `graphPLReebMap`, `graphPLReebQuotientHomeomorph`, `graphPLReebQuotientIso`, `graphPLReebQuotientIsoOfIso`, `intervalComponentNatTrans_graphPLReebMap`, `isRGraph_graphPLReebQuotient`, `graphPLReebGraph`, `graphPLReebGraphIso`, `isIso_intervalComponentComparison_plHeight`, `geometricInterleavingDistance_graphPLReebGraph`), vertex-height stability of the graph-PL Reeb quotient (`heightRange_graphPLReebGraph`, `geometricInterleavingDistance_graphPLReebGraph_le`, `geometricInterleavingDistance_graphPLReebGraph_le_edist_ofFun`, `geometricInterleavingDistance_graphPLReebGraph_le_edist`, and `geometricInterleavingDistance_graphPLReebGraph_le_of_heightMapPair`) with extremal vertex-height lower bounds and exact vertical translation (`sSup_range_plHeight`, `sInf_range_plHeight`, `ofReal_abs_sup'_sub_le_geometricInterleavingDistance_graphPLReebGraph`, `ofReal_abs_inf'_sub_le_geometricInterleavingDistance_graphPLReebGraph`, `geometricInterleavingDistance_graphPLReebGraph_add_const`), the graph-PL realization as a constructible ℝ-space (`barycentric`, `t2Space_realization`, `edgePoint_eq_vertex_iff`, `edgePoint_eq_edgePoint_iff`, `locallyPathConnectedSpace_realization`, `realizationMap_injective`, `LevelPiece`, `levelPieceHomeomorph`, `compactSpace_closedLevel`, `locallyPathConnectedSpace_closedLevel`, `graphPLPresentation`, `graphPLPresentationMap`, `graphPLPresentationHomeomorph`, `graphPLComponentDataIso`, `graphPLReebMap_graphPLPresentationMap`, `graphPLPresentationIso`, `isConstructibleSpace_graphPLOver`, `graphPLReebQuotientIsoOfIso_graphPLComponentDataIso`, `graphPLSpace`, `quotientRGraphFunctor_obj_graphPLSpace`, `overBaseMap_graphPLSpace`, `isRGraph_quotient_thickening_graphPLOver`), and `CoherentCoverTower`, member-adapted MultiNerve Mapper comparison (`LevelsAdapted`, `exists_levelsAdapted`, `labelFace`, `uniformMapperData`, `uniformMapperCellsEquiv`, `uniformMapperIso`), refinement of graph-PL finite Reeb data (`graphPLRefineIso`, `graphPLRefineHom_trans_v`, `uniformMapperCanonicalIso`, `graphPLRefineToOverIso`), the ordinary one-skeleton comparison `incidenceGraphUniformMapperIso`, `mapperOneSkeletonGraphPLIso` and `mapperOneSkeleton_connected_iff`, refinement-induced homology maps `mapperHomologyMap` with `mapperHomologyMap_eq`, `mapperChainHomotopy`, and the persistence module `mapperHomologyPModule` of refinements along a preorder with `mapperHomologyPModule_eq` and `CoherentCoverTower.structureMap_mapperHomologyPModule`, interleavings from cover maps between real towers (`mapperHomologyShiftMap`, `mapperHomologyInterleaving`, `mapperHomologyInterleaving_app_eq`, `realInterleavingDistance_mapperHomologyPModule_le`, `realInterleavingDistance_mapperHomologyPModule_le_add`), the pullback identification `mapperHomologyPModule_pullback`, and perturbation stability along the centred tower (`centredCover`, `centredCoverRefinement`, `centredMapperHomologyInterleaving`, `realInterleavingDistance_centredMapperHomology_le`), height-map-pair bounds for centred Mapper modules (`centredMapperPairVertexMap`, `_natural`, `_comp`, `centredMapperPairHomologyMap`, `centredMapperPairHomologyMapSymm`, `centredMapperPairInterleaving`, `realInterleavingDistance_centredMapperPair_le`, `_ofUniformBound`, `_graphPL_le`); these require supplied component orders but no finiteness, coverage or nonemptiness, and provide no diagram or bottleneck bound for the centred tower itself (the capped centred map-pair bounds are below), no converse, multinerve Mapper, order independence or executable extraction; and finite Mapper barcodes `mapperBarcode` with `mapperHomologyPModule_finiteDimensional`, `mapperBarcode_eq`, `nonempty_mapperBarcodeIso`, `finrank_range_mapperHomologyMap`, `mapperBarcode_eq_iff`, `nonempty_iso_iff_mapperBarcode_eq`, `CoherentCoverTower.finrank_range_simplicialHomologyMap` and the graph-PL face-finiteness instance `GraphPL.finite_mapperFace`, and two-input stability of categorical Mapper reconstructions (`interleavingDistance_coverComponents_le_add`, `geometricInterleavingDistance_graphPLMapperReconstruction_eq`, `geometricInterleavingDistance_mapperReeb_le_add_edist`, `geometricInterleavingDistance_graphPLReebGraph_le_mapperReeb_add`, `geometricInterleavingDistance_mapperReeb_le_graphPLReebGraph_add`, `ofReal_abs_sup'_sub_le_geometricInterleavingDistance_mapperReeb_add`, `tendsto_geometricInterleavingDistance_mapperReeb_pair`, `exists_graphPLMapperReconstruction_pair_le`), and categorical Mapper reconstruction of constructible ℝ-spaces (`finite_intervalComponents_constructibleSpace`, `constructibleMapperReconstruction`, `geometricInterleavingDistance_constructibleMapperReeb_eq`, `_le`, `_le_retained`, `tendsto_geometricInterleavingDistance_constructibleMapperReeb`, `retainedCoverResolution_le_coverResolution`), and rank obstructions to real interleavings (`finrank_range_structureMapLinear_le_of_realInterleaving`, `structureMap_eq_zero_of_realInterleaving`, `isEmpty_realInterleaving_of_finrank_lt`, `le_realInterleavingDistance_of_finrank_lt`, `le_realInterleavingDistance_of_structureMap_ne_zero`) and the zero-map interleaving `nonempty_realInterleaving_of_structureMap_eq_zero`, with their Mapper and centred-tower forms (`isEmpty_face_mapper`, `isEmpty_realInterleaving_mapperHomologyPModule_of_finrank_lt`, `le_realInterleavingDistance_mapperHomologyPModule_of_finrank_lt`, `isEmpty_realInterleaving_mapperHomologyPModule_of_isEmpty_face`, `le_realInterleavingDistance_mapperHomologyPModule_of_isEmpty_face`, `le_realInterleavingDistance_centredMapperHomology_of_finrank_lt`), and diagrams of step towers (`mapper_eq_bot_of_isEmpty`, `mapper_eq_bot_of_isEmpty_componentIndex`, `isZero_simplicialHomology_mapper_of_isEmpty`, `stepTower`, `stepRefinement`, `mapperHomologyPModule_stepTower`, `isConstructible_stepTower`, `stepMapperDiagram`, `stepMapperDiagram_eq`, `stepMapperDiagram_isPositive`, `stepMapperDiagram_eq_ofIndexBars_succ`, `stepMapperDiagram_eq_ofIndexBars`, `bottleneck_stepMapperDiagram_le`, `bottleneck_stepMapperDiagram_le_add`, `bottleneck_stepMapperDiagram_eq`, `stepMapperDiagram_interleaving_iff_matching`, `realInterleavingDistance_stepTower_eq_top_iff`), and the tightness of the step bounds (`le_bottleneck_stepMapperDiagram_of_finrank_lt`, `le_bottleneck_stepMapperDiagram_of_isEmpty_face`, `le_bottleneck_stepMapperDiagram_of_structureMap_ne_zero`, `isEmpty_realInterleaving_stepTower_of_isEmpty_face`, `heq_stepTower_shiftGrid`, `stepTowerToShiftGrid`, `stepTowerOfShiftGrid`, `bottleneck_stepMapperDiagram_shiftGrid_le`, `SurvivesToLast`, `le_realInterleavingDistance_stepTower_shiftGrid`, `realInterleavingDistance_stepTower_shiftGrid_eq`, `bottleneck_stepMapperDiagram_shiftGrid_eq`, `mapperHomologyMap_zero_ne_zero`, `survivesToLast_zero`, `bottleneck_stepMapperDiagram_shiftGrid_eq_zero_degree`, `bottleneck_stepMapperDiagram_eq_top_iff`), and exact translation of categorical Mapper reconstructions (`coverResolution_add_const`, `coverComponentsTranslateIso`, `interleavingDistance_coverComponents_add_const`, `geometricInterleavingDistance_graphPLMapperReconstruction_add_const`, `_of_covers`, `isEmpty_graphPLMapperReconstruction_of_isEmpty_cover`, `geometricInterleavingDistance_graphPLMapperReconstruction_of_isEmpty`), and capped centred step towers (`centredInterval`, `cappedIndex`, `cappedCentredCover`, `stageRadius`, `mem_cappedCentredCover_succ_iff`, `cappedCentredRefinement`, `cappedCentredPullbackRefinement`, `cappedCentredDiagram`, `cappedCentredDiagram_eq_pullback`, `bottleneck_cappedCentredDiagram_le_of_stageRadius_le`, `bottleneck_cappedCentredDiagram_eq`, `bottleneck_cappedCentredDiagram_le`, `uniformGrid`, `bottleneck_cappedCentredDiagram_uniformGrid_le`, `bottleneck_cappedCentredDiagram_grid_le`, `bottleneck_cappedCentredDiagram_le_add`, `bottleneck_cappedCentredDiagram_plHeight_le`, `bottleneck_cappedCentredDiagram_plHeight_uniformGrid_le`), and direct different-domain capped centred map-pair results (`cappedCentredPairVertexMap`, `cappedCentredPairVertexMap_mk`, `cappedCentredPairVertexMapSymm`, `cappedCentredPairVertexMapSymm_mk`, `cappedCentredPairVertexMap_natural`, `cappedCentredPairVertexMap_comp`, `cappedCentredPairVertexMapSymm_comp`, `cappedCentredPairHomologyMap`, `cappedCentredPairHomologyMapSymm`, `cappedCentredPairInterleaving`, `bottleneck_cappedCentredDiagram_le_of_heightMapPair`, `bottleneck_cappedCentredDiagram_pair_le`, `bottleneck_cappedCentredDiagram_pair_uniformGrid_le`, `bottleneck_cappedCentredDiagram_pair_le_ofUniformBound`, `bottleneck_cappedCentredDiagram_pair_plHeight_le`, `bottleneck_cappedCentredDiagram_pair_plHeight_uniformGrid_le`), and essential counts (`card_essentialPart_stepMapperDiagram`, `bottleneck_stepMapperDiagram_lt_top_iff`, `fullComponentIndexEquiv`, `componentIndexFullEquiv`, `mapper_full_eq_top`, `fullMapperHomologyIso`, `finrank_simplicialHomology_mapper_full_zero`, `isZero_simplicialHomology_mapper_full_succ`, `isEmpty_mapper_face_one_of_unique`, `finrank_simplicialHomology_mapper_full_zero_of_unique`, `card_essentialPart_cappedCentredDiagram_zero`, `card_essentialPart_cappedCentredDiagram_succ`, `card_essentialPart_cappedCentredDiagram_zero_of_unique`, `bottleneck_cappedCentredDiagram_lt_top`, `card_essentialPart_cappedCentredDiagram_plHeight`, `card_essentialPart_cappedCentredDiagram_plHeight_zero_of_unique`); graph-PL height scaling (`plHeight_smul`, `geometricInterleavingDistance_graphPLReebGraph_smul`, `_neg`, `_affine`), split trees (`splitHeights`, `geometricInterleavingDistance_splitY`) and merge/split bounds (`ofReal_min_le_geometricInterleavingDistance_mergeY`, `_splitY`, `geometricInterleavingDistance_mergeY_bounds`, `_splitY_bounds`) | Input is a continuous map and an indexed target family. Coverage and multiplicity are explicit hypotheses where used. The MultiNerve Mapper is the multinerve of the component cover; its projection onto `mapper` is surjective and is an order isomorphism under `IntersectionsPathSubsingleton (componentCover f U)`. Every real number lies in at most two members of the uniform family exactly when `2g ≤ r` (for at least three members and `g < r`); its union is the window `(a, a + n(r − g) + g)` for `0 < g ≤ r`. The graph-PL finite Reeb data need no covering hypothesis; closed-level components are classified by `LevelVertex` for finite vertex sets, and inclusion into any level window is bijective on components. The star and gap comparison assumes every vertex height is a level of the critical list, while the Mapper comparison is at member-adapted levels. The refinement comparison assumes the coarser list covers the vertex heights. Constructibility at the specified critical list and the corresponding cosheaf identification assume a list covering the vertex heights and `V : Type`; constructibility at a noncovering list can fail (fixture D5). The Reeb quotient identification assumes a covering list, which cannot be dropped (fixture R6); the slice statements use `V : Type`, while the list-free corollaries need no list. The presentation map is injective for every list, while the homeomorphism assumes a covering list (fixture K5). Closed levels are compact and locally path-connected for finite vertex sets. The slice statements use `V : Type`. Finiteness is conditional; tower identity/composition are supplied coherence data. Refinement-induced homology maps use supplied linear orders on component-index types in one universe and any ring; two refinements between the same families induce the same map, and `mapperHomologyPModule` needs no selector identity or composition equations, agrees with the strict tower's maps and is independent of the selected refinements. A finite Mapper barcode is the canonical rank barcode of `mapperHomologyPModule` on `Fin N`; it needs finitely many faces of the given degree at every stage, a field, and the field, domain and index types in one universe. It is independent of the selected refinements and classifies these modules up to natural isomorphism; finite graphs with finitely many interval labels satisfy the finiteness hypothesis without coverage. Diagrams of real-indexed towers other than step towers, q-tame Mapper barcodes, independence of the component orders, multinerve barcodes and executable extraction are not provided. These constructions are noncomputable theory, not an executable Mapper implementation. The one-skeleton isomorphism assumes `2g ≤ r` and fails without it (fixture M5). Vertex-height stability fixes the graph and bounds the Reeb distance by `edist h g` without any order, level-count or constructibility hypothesis; it is not an equality in general, and extremal vertex heights bound it below and make it exact for vertical translations. Selected cover maps shifting by `η` in both directions between two real towers give an `η`-interleaving of their Mapper homology modules with no commutation assumed; maps at pointwise distance `δ` give a `δ`-interleaving along the centred tower. A step tower places finitely many cover families on the cells of a finite grid of radii, with an empty family before the first radius; its Mapper homology module is finite-constructible, and with finitely many faces in the given degree its real diagram `stepMapperDiagram` is the `ofIndexBars` image of the finite Mapper barcode. Cover maps shifting by `η` between two step towers bound the bottleneck distance of their diagrams by `η`, and that distance equals the real interleaving distance of the modules. No diagram or bottleneck statement is made for other towers, such as the centred tower, which is not finite-constructible on any grid; tightness is stated only for translations of the grid, below, and no order-independence statement is made. Capped centred step towers have an empty first stage, centred intervals of the grid radii and a full last stage. For maps at pointwise distance `δ`, their diagrams are at bottleneck distance at most `δ + μ` on a grid of mesh `μ`, and at most `δ` on a uniform grid of spacing `h` when `δ = p h`; for one map, two grids whose meshes, first radii and last radii are within `η` give diagrams within `η`. Fixtures show that neither the full last stage nor the mesh term can be dropped; coverage by a capped stage and sharpness of `δ + μ` are not claimed. Over a field, an `ε`-interleaving bounds the rank of each structure map `M(t → t + 2ε)` by the dimension of `N (t + ε)` when that one value is finite-dimensional; this gives lower bounds on the real interleaving distance, including the exact distance `1` of two shifted one-member towers and the bound `1/8` for the flat and steep maps. Bar-length lower bounds, tightness of the rank obstruction and the exact flat/steep distance are not claimed. Constructible-input reconstruction needs no Hausdorff, graph-PL or nonempty-input hypothesis and no supplied finiteness; its distance identity needs no coverage, while its error bounds and convergence need coverage of the attained heights. Two-input Mapper bounds require each cover to cover its own height's attained range, are inequalities rather than equalities, and compare reconstructions over one fixed graph only. The rank obstructions bound the bottleneck distance of two step diagrams below through the stage of the second tower at `t + ε`. The step tower on `shiftGrid ε c` has at `t` the family of the step tower on `c` at `t + ε`, and the selected stage refinements are cover maps shifting by `ε` in both directions, so the two diagrams are at bottleneck distance at most `ε`. If the homology map of the selected refinement from the first nonempty stage to the last stage is nonzero in degree `n` (`SurvivesToLast`), the bottleneck distance and the real interleaving distance are exactly `ε`; in degree `0` this holds whenever the first nonempty stage has a component index. The bottleneck distance of two step diagrams is infinite exactly when their numbers of essential bars differ. Essential multiplicity equals last-stage homology dimension; finite bottleneck distance is equivalent to equality of these dimensions even for maps on different spaces. A finite nonempty full family on path-connected input is a simplex, so capped centred diagrams on nonempty grids have one essential degree-zero bar and none in positive degree, and any two such diagrams have finite bottleneck distance. With one label, the degree-zero count is the number of path components, or graph components for graph-PL input. Births, several-label disconnected degree-zero counts and finite bars are not computed. The survival hypothesis cannot be dropped (degree-one loop fixture). Exact distances for pairs of grids that are not translates, bar-length lower bounds and tightness of the bound `η` beyond translations are not claimed. Translating the height and a finite bounded cover by `c` moves the reconstruction by exactly `|c|` when some member has nonempty inverse image; over empty covers the distance is `0`. A continuous map `φ` with `f' ∘ φ = f` induces the vertex map `mapperDomainMap φ hφ U : mapper f U → mapper f' U` (`pullbackRestrict`, `domainIndexMap`, `componentDomainRefinement`, `mapperDomainMap_id`, `mapperDomainMap_comp`, `mapperMap_comp_mapperDomainMap`) and, for domains in one universe, homology maps `mapperHomologyDomainMap` and the module morphism `mapperHomologyPModuleMap` with identity and composition laws, commuting with the refinement-induced maps; the component orders of the two domains are independent supplied data and `φ` is arbitrary. A homeomorphism over the codomain gives the isomorphism `mapperHomologyPModuleIso`, real interleaving distance `0` (`realInterleavingDistance_mapperHomologyPModule_homeomorph`) and bottleneck distance `0` of step diagrams with an empty initial family (`bottleneck_stepMapperDiagram_homeomorph`) and of capped centred diagrams (`bottleneck_cappedCentredDiagram_homeomorph`); for a graph isomorphism with corresponding vertex heights, `realizationHomeomorph` and `bottleneck_cappedCentredDiagram_plHeight_iso` give distance `0` of the capped centred diagrams of the piecewise-linear heights. Equality of the diagrams, compatibility with interleavings and multinerve maps, and homotopy invariance are not provided. Common nonzero affine changes scale distances across finite graphs by the absolute slope. A `HeightMapPair` between finite graph-PL spaces bounds the geometric distance of their Reeb quotients; it supplies no map between graph objects and no Mapper cover or reconstruction consequence; its Mapper homology consequences are the centred and capped centred map-pair bounds above. For the three-edge merge tree, `mergeSection` and `exists_mergeSection_path` give height-preserving sections and bounded realization paths, including the horizontal top edge when `c = M`; `mergeFoldHeightMapPair` gives a `b/2` height-map pair. For `0 < a < b ≤ M`, `geometricInterleavingDistance_mergeY_eq_min` proves distance `min (b-a) (b/2)`, recovering `b-a` when `b ≤ 2a` and giving `b/2 < b-a` when `2a < b`. Reflection gives the same exact split-tree value (`geometricInterleavingDistance_splitY_eq_min`). These formulas are specific to this tree and do not give a converse to the height-map-pair bound. | +| `TDA.Mapper` / `TDA.Mapper` | `ComponentIndex`, pullback component covers, `mapper`, its one-skeleton, `multiNerveMapper` and its projection onto `mapper`, refinement maps including `multiNerveMapperMap`, graph-PL comparison, uniform interval covers (`uniformCover`) with attained-range coverage, the label-set cell equivalence `cellsOverLabelsEquiv` with graph-PL edge cells, height-separating uniform covers (`HeightSeparating`, `exists_heightSeparating_uniformCover`, `range_plHeight_eq_Icc`) with the splitting `cellComponentsEquivSum`, vertex cells (`vertexCellsEquiv`) and the cell classification `uniformVertexCellsEquivLevel`, `uniformVertexCellsEquivSpans`, `uniformEdgeCellsEquivSpans` through `EdgeCrosses` and `EdgeSpans`, finite Reeb data of graph-PL input (`CoversVertexHeights`, `vertexHeightLevels`, `LevelVertex`, `SpanEdge`, `levelEnd`, `graphPLReebData`, `uncoveredEdgeEquivCrossesOfLevel`, `induceComponentsEquivOfEq`) with the star and gap bijections `graphPLStarEquiv`, `graphPLGapEquiv`, their incidence laws `graphPLStarEquiv_map_left`, `graphPLStarEquiv_map_right` and the finite-data isomorphism `graphPLExtractHom`, `graphPLExtractIso`, closed level sets of graph-PL height (`ClosedLevel`, `IsLevelWindow`, `closedLevelComponentsEquiv`, `componentMap_levelInclusion_bijective`, `graphPLReebDataVEquivClosedLevel`), constructibility and the cosheaf identification of graph-PL height (`isConstructibleAt_intervalComponents_plHeight`, `cellGraphIsoOfSameLevels`, `graphPLCosheafIsoOfIso`, `graphPLCosheafIso`, `isConstructibleCosheaf_intervalComponents_plHeight`, `cosheafFunctorGraphPLIso`, `geometricInterleavingDistance_graphPL`), the Reeb quotient of graph-PL height (`compactSpace_realization`, `exists_coversVertexHeights`, `graphPLReebMap`, `graphPLReebQuotientHomeomorph`, `graphPLReebQuotientIso`, `graphPLReebQuotientIsoOfIso`, `intervalComponentNatTrans_graphPLReebMap`, `isRGraph_graphPLReebQuotient`, `graphPLReebGraph`, `graphPLReebGraphIso`, `isIso_intervalComponentComparison_plHeight`, `geometricInterleavingDistance_graphPLReebGraph`), [executable incidence extraction](math/mapper.md#executable-incidence-extraction) from a Boolean adjacency function and rational heights (`HeightGraph`, `HeightGraph.Valid`, `HeightGraph.levels`, `HeightGraph.criticalValues`, `HeightGraph.coversVertexHeights`, `HeightGraph.label`, `HeightGraph.label_eq_label_iff_reachable`, `HeightGraph.componentEquiv`, `HeightGraph.cellList`, `HeightGraph.edgeList`, `HeightGraph.incidence`, `HeightGraph.incidence?`; the identification of the executed lists with `graphPLReebData` is not included), vertex-height stability of the graph-PL Reeb quotient (`heightRange_graphPLReebGraph`, `geometricInterleavingDistance_graphPLReebGraph_le`, `geometricInterleavingDistance_graphPLReebGraph_le_edist_ofFun`, `geometricInterleavingDistance_graphPLReebGraph_le_edist`, and `geometricInterleavingDistance_graphPLReebGraph_le_of_heightMapPair`) with extremal vertex-height lower bounds and exact vertical translation (`sSup_range_plHeight`, `sInf_range_plHeight`, `ofReal_abs_sup'_sub_le_geometricInterleavingDistance_graphPLReebGraph`, `ofReal_abs_inf'_sub_le_geometricInterleavingDistance_graphPLReebGraph`, `geometricInterleavingDistance_graphPLReebGraph_add_const`), the graph-PL realization as a constructible ℝ-space (`barycentric`, `t2Space_realization`, `edgePoint_eq_vertex_iff`, `edgePoint_eq_edgePoint_iff`, `locallyPathConnectedSpace_realization`, `realizationMap_injective`, `LevelPiece`, `levelPieceHomeomorph`, `compactSpace_closedLevel`, `locallyPathConnectedSpace_closedLevel`, `graphPLPresentation`, `graphPLPresentationMap`, `graphPLPresentationHomeomorph`, `graphPLComponentDataIso`, `graphPLReebMap_graphPLPresentationMap`, `graphPLPresentationIso`, `isConstructibleSpace_graphPLOver`, `graphPLReebQuotientIsoOfIso_graphPLComponentDataIso`, `graphPLSpace`, `quotientRGraphFunctor_obj_graphPLSpace`, `overBaseMap_graphPLSpace`, `isRGraph_quotient_thickening_graphPLOver`), and `CoherentCoverTower`, member-adapted MultiNerve Mapper comparison (`LevelsAdapted`, `exists_levelsAdapted`, `labelFace`, `uniformMapperData`, `uniformMapperCellsEquiv`, `uniformMapperIso`), refinement of graph-PL finite Reeb data (`graphPLRefineIso`, `graphPLRefineHom_trans_v`, `uniformMapperCanonicalIso`, `graphPLRefineToOverIso`), the ordinary one-skeleton comparison `incidenceGraphUniformMapperIso`, `mapperOneSkeletonGraphPLIso` and `mapperOneSkeleton_connected_iff`, refinement-induced homology maps `mapperHomologyMap` with `mapperHomologyMap_eq`, `mapperChainHomotopy`, and the persistence module `mapperHomologyPModule` of refinements along a preorder with `mapperHomologyPModule_eq` and `CoherentCoverTower.structureMap_mapperHomologyPModule`, interleavings from cover maps between real towers (`mapperHomologyShiftMap`, `mapperHomologyInterleaving`, `mapperHomologyInterleaving_app_eq`, `realInterleavingDistance_mapperHomologyPModule_le`, `realInterleavingDistance_mapperHomologyPModule_le_add`), the pullback identification `mapperHomologyPModule_pullback`, and perturbation stability along the centred tower (`centredCover`, `centredCoverRefinement`, `centredMapperHomologyInterleaving`, `realInterleavingDistance_centredMapperHomology_le`), height-map-pair bounds for centred Mapper modules (`centredMapperPairVertexMap`, `_natural`, `_comp`, `centredMapperPairHomologyMap`, `centredMapperPairHomologyMapSymm`, `centredMapperPairInterleaving`, `realInterleavingDistance_centredMapperPair_le`, `_ofUniformBound`, `_graphPL_le`); these require supplied component orders but no finiteness, coverage or nonemptiness, and provide no diagram or bottleneck bound for the centred tower itself (the capped centred map-pair bounds are below), no converse, multinerve Mapper, order independence or executable extraction; and finite Mapper barcodes `mapperBarcode` with `mapperHomologyPModule_finiteDimensional`, `mapperBarcode_eq`, `nonempty_mapperBarcodeIso`, `finrank_range_mapperHomologyMap`, `mapperBarcode_eq_iff`, `nonempty_iso_iff_mapperBarcode_eq`, `CoherentCoverTower.finrank_range_simplicialHomologyMap` and the graph-PL face-finiteness instance `GraphPL.finite_mapperFace`, and two-input stability of categorical Mapper reconstructions (`interleavingDistance_coverComponents_le_add`, `geometricInterleavingDistance_graphPLMapperReconstruction_eq`, `geometricInterleavingDistance_mapperReeb_le_add_edist`, `geometricInterleavingDistance_graphPLReebGraph_le_mapperReeb_add`, `geometricInterleavingDistance_mapperReeb_le_graphPLReebGraph_add`, `ofReal_abs_sup'_sub_le_geometricInterleavingDistance_mapperReeb_add`, `tendsto_geometricInterleavingDistance_mapperReeb_pair`, `exists_graphPLMapperReconstruction_pair_le`), and categorical Mapper reconstruction of constructible ℝ-spaces (`finite_intervalComponents_constructibleSpace`, `constructibleMapperReconstruction`, `geometricInterleavingDistance_constructibleMapperReeb_eq`, `_le`, `_le_retained`, `tendsto_geometricInterleavingDistance_constructibleMapperReeb`, `retainedCoverResolution_le_coverResolution`), and rank obstructions to real interleavings (`finrank_range_structureMapLinear_le_of_realInterleaving`, `structureMap_eq_zero_of_realInterleaving`, `isEmpty_realInterleaving_of_finrank_lt`, `le_realInterleavingDistance_of_finrank_lt`, `le_realInterleavingDistance_of_structureMap_ne_zero`) and the zero-map interleaving `nonempty_realInterleaving_of_structureMap_eq_zero`, with their Mapper and centred-tower forms (`isEmpty_face_mapper`, `isEmpty_realInterleaving_mapperHomologyPModule_of_finrank_lt`, `le_realInterleavingDistance_mapperHomologyPModule_of_finrank_lt`, `isEmpty_realInterleaving_mapperHomologyPModule_of_isEmpty_face`, `le_realInterleavingDistance_mapperHomologyPModule_of_isEmpty_face`, `le_realInterleavingDistance_centredMapperHomology_of_finrank_lt`), and diagrams of step towers (`mapper_eq_bot_of_isEmpty`, `mapper_eq_bot_of_isEmpty_componentIndex`, `isZero_simplicialHomology_mapper_of_isEmpty`, `stepTower`, `stepRefinement`, `mapperHomologyPModule_stepTower`, `isConstructible_stepTower`, `stepMapperDiagram`, `stepMapperDiagram_eq`, `stepMapperDiagram_isPositive`, `stepMapperDiagram_eq_ofIndexBars_succ`, `stepMapperDiagram_eq_ofIndexBars`, `bottleneck_stepMapperDiagram_le`, `bottleneck_stepMapperDiagram_le_add`, `bottleneck_stepMapperDiagram_eq`, `stepMapperDiagram_interleaving_iff_matching`, `realInterleavingDistance_stepTower_eq_top_iff`), and the tightness of the step bounds (`le_bottleneck_stepMapperDiagram_of_finrank_lt`, `le_bottleneck_stepMapperDiagram_of_isEmpty_face`, `le_bottleneck_stepMapperDiagram_of_structureMap_ne_zero`, `isEmpty_realInterleaving_stepTower_of_isEmpty_face`, `heq_stepTower_shiftGrid`, `stepTowerToShiftGrid`, `stepTowerOfShiftGrid`, `bottleneck_stepMapperDiagram_shiftGrid_le`, `SurvivesToLast`, `le_realInterleavingDistance_stepTower_shiftGrid`, `realInterleavingDistance_stepTower_shiftGrid_eq`, `bottleneck_stepMapperDiagram_shiftGrid_eq`, `mapperHomologyMap_zero_ne_zero`, `survivesToLast_zero`, `bottleneck_stepMapperDiagram_shiftGrid_eq_zero_degree`, `bottleneck_stepMapperDiagram_eq_top_iff`), and exact translation of categorical Mapper reconstructions (`coverResolution_add_const`, `coverComponentsTranslateIso`, `interleavingDistance_coverComponents_add_const`, `geometricInterleavingDistance_graphPLMapperReconstruction_add_const`, `_of_covers`, `isEmpty_graphPLMapperReconstruction_of_isEmpty_cover`, `geometricInterleavingDistance_graphPLMapperReconstruction_of_isEmpty`), and capped centred step towers (`centredInterval`, `cappedIndex`, `cappedCentredCover`, `stageRadius`, `mem_cappedCentredCover_succ_iff`, `cappedCentredRefinement`, `cappedCentredPullbackRefinement`, `cappedCentredDiagram`, `cappedCentredDiagram_eq_pullback`, `bottleneck_cappedCentredDiagram_le_of_stageRadius_le`, `bottleneck_cappedCentredDiagram_eq`, `bottleneck_cappedCentredDiagram_le`, `uniformGrid`, `bottleneck_cappedCentredDiagram_uniformGrid_le`, `bottleneck_cappedCentredDiagram_grid_le`, `bottleneck_cappedCentredDiagram_le_add`, `bottleneck_cappedCentredDiagram_plHeight_le`, `bottleneck_cappedCentredDiagram_plHeight_uniformGrid_le`), and direct different-domain capped centred map-pair results (`cappedCentredPairVertexMap`, `cappedCentredPairVertexMap_mk`, `cappedCentredPairVertexMapSymm`, `cappedCentredPairVertexMapSymm_mk`, `cappedCentredPairVertexMap_natural`, `cappedCentredPairVertexMap_comp`, `cappedCentredPairVertexMapSymm_comp`, `cappedCentredPairHomologyMap`, `cappedCentredPairHomologyMapSymm`, `cappedCentredPairInterleaving`, `bottleneck_cappedCentredDiagram_le_of_heightMapPair`, `bottleneck_cappedCentredDiagram_pair_le`, `bottleneck_cappedCentredDiagram_pair_uniformGrid_le`, `bottleneck_cappedCentredDiagram_pair_le_ofUniformBound`, `bottleneck_cappedCentredDiagram_pair_plHeight_le`, `bottleneck_cappedCentredDiagram_pair_plHeight_uniformGrid_le`), and essential counts (`card_essentialPart_stepMapperDiagram`, `bottleneck_stepMapperDiagram_lt_top_iff`, `fullComponentIndexEquiv`, `componentIndexFullEquiv`, `mapper_full_eq_top`, `fullMapperHomologyIso`, `finrank_simplicialHomology_mapper_full_zero`, `isZero_simplicialHomology_mapper_full_succ`, `isEmpty_mapper_face_one_of_unique`, `finrank_simplicialHomology_mapper_full_zero_of_unique`, `card_essentialPart_cappedCentredDiagram_zero`, `card_essentialPart_cappedCentredDiagram_succ`, `card_essentialPart_cappedCentredDiagram_zero_of_unique`, `bottleneck_cappedCentredDiagram_lt_top`, `card_essentialPart_cappedCentredDiagram_plHeight`, `card_essentialPart_cappedCentredDiagram_plHeight_zero_of_unique`); graph-PL height scaling (`plHeight_smul`, `geometricInterleavingDistance_graphPLReebGraph_smul`, `_neg`, `_affine`), split trees (`splitHeights`, `geometricInterleavingDistance_splitY`) and merge/split bounds (`ofReal_min_le_geometricInterleavingDistance_mergeY`, `_splitY`, `geometricInterleavingDistance_mergeY_bounds`, `_splitY_bounds`) | Input is a continuous map and an indexed target family. Coverage and multiplicity are explicit hypotheses where used. The MultiNerve Mapper is the multinerve of the component cover; its projection onto `mapper` is surjective and is an order isomorphism under `IntersectionsPathSubsingleton (componentCover f U)`. Every real number lies in at most two members of the uniform family exactly when `2g ≤ r` (for at least three members and `g < r`); its union is the window `(a, a + n(r − g) + g)` for `0 < g ≤ r`. The graph-PL finite Reeb data need no covering hypothesis; closed-level components are classified by `LevelVertex` for finite vertex sets, and inclusion into any level window is bijective on components. The star and gap comparison assumes every vertex height is a level of the critical list, while the Mapper comparison is at member-adapted levels. The refinement comparison assumes the coarser list covers the vertex heights. Constructibility at the specified critical list and the corresponding cosheaf identification assume a list covering the vertex heights and `V : Type`; constructibility at a noncovering list can fail (fixture D5). The Reeb quotient identification assumes a covering list, which cannot be dropped (fixture R6); the slice statements use `V : Type`, while the list-free corollaries need no list. The presentation map is injective for every list, while the homeomorphism assumes a covering list (fixture K5). Closed levels are compact and locally path-connected for finite vertex sets. The slice statements use `V : Type`. Finiteness is conditional; tower identity/composition are supplied coherence data. Refinement-induced homology maps use supplied linear orders on component-index types in one universe and any ring; two refinements between the same families induce the same map, and `mapperHomologyPModule` needs no selector identity or composition equations, agrees with the strict tower's maps and is independent of the selected refinements. A finite Mapper barcode is the canonical rank barcode of `mapperHomologyPModule` on `Fin N`; it needs finitely many faces of the given degree at every stage, a field, and the field, domain and index types in one universe. It is independent of the selected refinements and classifies these modules up to natural isomorphism; finite graphs with finitely many interval labels satisfy the finiteness hypothesis without coverage. Diagrams of real-indexed towers other than step towers, q-tame Mapper barcodes, independence of the component orders, multinerve barcodes and executable extraction are not provided. These constructions are noncomputable theory, not an executable Mapper implementation. The one-skeleton isomorphism assumes `2g ≤ r` and fails without it (fixture M5). Vertex-height stability fixes the graph and bounds the Reeb distance by `edist h g` without any order, level-count or constructibility hypothesis; it is not an equality in general, and extremal vertex heights bound it below and make it exact for vertical translations. Selected cover maps shifting by `η` in both directions between two real towers give an `η`-interleaving of their Mapper homology modules with no commutation assumed; maps at pointwise distance `δ` give a `δ`-interleaving along the centred tower. A step tower places finitely many cover families on the cells of a finite grid of radii, with an empty family before the first radius; its Mapper homology module is finite-constructible, and with finitely many faces in the given degree its real diagram `stepMapperDiagram` is the `ofIndexBars` image of the finite Mapper barcode. Cover maps shifting by `η` between two step towers bound the bottleneck distance of their diagrams by `η`, and that distance equals the real interleaving distance of the modules. No diagram or bottleneck statement is made for other towers, such as the centred tower, which is not finite-constructible on any grid; tightness is stated only for translations of the grid, below, and no order-independence statement is made. Capped centred step towers have an empty first stage, centred intervals of the grid radii and a full last stage. For maps at pointwise distance `δ`, their diagrams are at bottleneck distance at most `δ + μ` on a grid of mesh `μ`, and at most `δ` on a uniform grid of spacing `h` when `δ = p h`; for one map, two grids whose meshes, first radii and last radii are within `η` give diagrams within `η`. Fixtures show that neither the full last stage nor the mesh term can be dropped; coverage by a capped stage and sharpness of `δ + μ` are not claimed. Over a field, an `ε`-interleaving bounds the rank of each structure map `M(t → t + 2ε)` by the dimension of `N (t + ε)` when that one value is finite-dimensional; this gives lower bounds on the real interleaving distance, including the exact distance `1` of two shifted one-member towers and the bound `1/8` for the flat and steep maps. Bar-length lower bounds, tightness of the rank obstruction and the exact flat/steep distance are not claimed. Constructible-input reconstruction needs no Hausdorff, graph-PL or nonempty-input hypothesis and no supplied finiteness; its distance identity needs no coverage, while its error bounds and convergence need coverage of the attained heights. Two-input Mapper bounds require each cover to cover its own height's attained range, are inequalities rather than equalities, and compare reconstructions over one fixed graph only. The rank obstructions bound the bottleneck distance of two step diagrams below through the stage of the second tower at `t + ε`. The step tower on `shiftGrid ε c` has at `t` the family of the step tower on `c` at `t + ε`, and the selected stage refinements are cover maps shifting by `ε` in both directions, so the two diagrams are at bottleneck distance at most `ε`. If the homology map of the selected refinement from the first nonempty stage to the last stage is nonzero in degree `n` (`SurvivesToLast`), the bottleneck distance and the real interleaving distance are exactly `ε`; in degree `0` this holds whenever the first nonempty stage has a component index. The bottleneck distance of two step diagrams is infinite exactly when their numbers of essential bars differ. Essential multiplicity equals last-stage homology dimension; finite bottleneck distance is equivalent to equality of these dimensions even for maps on different spaces. A finite nonempty full family on path-connected input is a simplex, so capped centred diagrams on nonempty grids have one essential degree-zero bar and none in positive degree, and any two such diagrams have finite bottleneck distance. With one label, the degree-zero count is the number of path components, or graph components for graph-PL input. Births, several-label disconnected degree-zero counts and finite bars are not computed. The survival hypothesis cannot be dropped (degree-one loop fixture). Exact distances for pairs of grids that are not translates, bar-length lower bounds and tightness of the bound `η` beyond translations are not claimed. Translating the height and a finite bounded cover by `c` moves the reconstruction by exactly `|c|` when some member has nonempty inverse image; over empty covers the distance is `0`. A continuous map `φ` with `f' ∘ φ = f` induces the vertex map `mapperDomainMap φ hφ U : mapper f U → mapper f' U` (`pullbackRestrict`, `domainIndexMap`, `componentDomainRefinement`, `mapperDomainMap_id`, `mapperDomainMap_comp`, `mapperMap_comp_mapperDomainMap`) and, for domains in one universe, homology maps `mapperHomologyDomainMap` and the module morphism `mapperHomologyPModuleMap` with identity and composition laws, commuting with the refinement-induced maps; the component orders of the two domains are independent supplied data and `φ` is arbitrary. A homeomorphism over the codomain gives the isomorphism `mapperHomologyPModuleIso`, real interleaving distance `0` (`realInterleavingDistance_mapperHomologyPModule_homeomorph`) and bottleneck distance `0` of step diagrams with an empty initial family (`bottleneck_stepMapperDiagram_homeomorph`) and of capped centred diagrams (`bottleneck_cappedCentredDiagram_homeomorph`); for a graph isomorphism with corresponding vertex heights, `realizationHomeomorph` and `bottleneck_cappedCentredDiagram_plHeight_iso` give distance `0` of the capped centred diagrams of the piecewise-linear heights. Equality of the diagrams, compatibility with interleavings and multinerve maps, and homotopy invariance are not provided. Common nonzero affine changes scale distances across finite graphs by the absolute slope. A `HeightMapPair` between finite graph-PL spaces bounds the geometric distance of their Reeb quotients; it supplies no map between graph objects and no Mapper cover or reconstruction consequence; its Mapper homology consequences are the centred and capped centred map-pair bounds above. For the three-edge merge tree, `mergeSection` and `exists_mergeSection_path` give height-preserving sections and bounded realization paths, including the horizontal top edge when `c = M`; `mergeFoldHeightMapPair` gives a `b/2` height-map pair. For `0 < a < b ≤ M`, `geometricInterleavingDistance_mergeY_eq_min` proves distance `min (b-a) (b/2)`, recovering `b-a` when `b ≤ 2a` and giving `b/2 < b-a` when `2a < b`. Reflection gives the same exact split-tree value (`geometricInterleavingDistance_splitY_eq_min`). These formulas are specific to this tree and do not give a converse to the height-map-pair bound. | ### Capped centred height-map pairs diff --git a/docs/math/mapper.md b/docs/math/mapper.md index 9cf8f44..0901f85 100644 --- a/docs/math/mapper.md +++ b/docs/math/mapper.md @@ -1482,6 +1482,67 @@ quotient although its realization endpoints differ. R5 is `c4_isIso_intervalComponentComparison`. R6 is the negative control `path3_reebQuotient_not_iso_S02`: the covering hypothesis cannot be dropped. +### Executable incidence extraction + +`TDA.Mapper.GraphPLIncidence` computes the lists underlying the finite Reeb data +from finite input. A `HeightGraph N` is a Boolean adjacency function on `Fin N` +with rational vertex heights. `HeightGraph.Valid` asks for symmetry and an empty +diagonal; it is decidable, and invalid input is rejected, not repaired +(`incidence?` returns `none`). For valid input `graph` is the simple graph and +`realHeight` the real-valued height. + +* `levels` lists the distinct heights in increasing order (`levels_pairwise`, + `mem_levels`); with no vertex it is the single dummy level `0`. + `criticalValues` is this list as a `CriticalValues`, and it covers the vertex + heights (`coversVertexHeights`). +* `label v` is the least vertex index in the component of `v` in the graph + induced on the vertices of the height of `v`. It is computed by `N` rounds of + minimum-label propagation along horizontal edges, which suffice because a + path in a graph on `N` vertices has fewer than `N` edges. + `label_eq_label_iff_reachable` states that two vertices of height `c` have + equal labels exactly when they are joined in the graph induced on + `{v | realHeight v = c}`, the vertex set of the level components above, and + `componentEquiv` is the bijection between the label fixed points of height + `c` and those components. +* `cellList c` lists the label fixed points of height `c` and, as ordered pairs + (lower endpoint, upper endpoint), the edges crossing `c` (`mem_cellList_inl`, + `mem_cellList_inr`, `nodup_cellList`). +* `edgeList p q` lists, as ordered pairs, the edges whose height interval + contains `[p, q]`, each once and each with its two endpoint cells: the label + of the endpoint when the endpoint lies on the level, and the edge itself as a + crossing cell otherwise (`mem_edgeList`, `nodup_edgeList`). Two edges with + the same endpoint cells are two entries. For `p < q` both endpoint cells are + listed cells of the two levels (`leftEnd_mem_cellList`, + `rightEnd_mem_cellList`). + +`incidence` collects the cell lists over all levels and the edge lists over all +gaps between consecutive levels (`incidence_cells_getElem?`, +`incidence_edges_getElem?`). The representative of a component is the least +index by construction of this implementation; statements about components +should go through reachability. + +The executable definitions use lists, vectors, finite indices and rational +comparison, with no quotient representative and no real-number comparison. +Counting an evaluation of the adjacency or the height, a rational comparison +and an index comparison as one unit, `incidence` costs `O(N³)` units for the +label propagation and `O(L N²)` for the cells and edges of `L` levels; the bit +cost of rational arithmetic is separate, and these counts are documented, not +proved. The statement forms `label`, `cellList` and `edgeList` recompute the +label vector at each call. + +This module does not build `FiniteReebData` from the lists and does not compare +them with `graphPLReebData` or with the Reeb quotient; no Mapper extraction is +provided. These are elementary library results, not attributed to a source. + +The fixtures state the complete value of `incidence?` for no vertex, one +vertex, two isolated vertices, a horizontal edge, two unjoined vertices of one +height, an edge crossing a level that carries an isolated vertex, and a +four-cycle. `triangle_edgeList` and `triangle_parallel` show two edges over one +gap with the same endpoint cells, both listed. In `bent` one propagation round +leaves a wrong label (`bent_one_round`, `bent_labels`), and `bent_reachable` +transfers the label equality to the actual induced level graph. An asymmetric +adjacency and a loop return `none`. + ### The graph-PL realization as a constructible ℝ-space Let `V : Type u`, let `G : SimpleGraph V`, and let `h : V → ℝ`. For (A), diff --git a/scripts/print_axioms/Mapper.lean b/scripts/print_axioms/Mapper.lean index 1671d4b..3851693 100644 --- a/scripts/print_axioms/Mapper.lean +++ b/scripts/print_axioms/Mapper.lean @@ -1429,3 +1429,96 @@ import TDA #print axioms TDA.Mapper.MapperReebConstructibleExamples.empty_input_wide_member_error_zero #print axioms TDA.Mapper.MapperReebConstructibleExamples.empty_labels_not_cover #print axioms TDA.Mapper.MapperReebConstructibleExamples.empty_labels_error_top +#print axioms TDA.Mapper.GraphPL.HeightGraph +#print axioms TDA.Mapper.GraphPL.HeightGraph.Cell +#print axioms TDA.Mapper.GraphPL.HeightGraph.Incidence +#print axioms TDA.Mapper.GraphPL.HeightGraph.Valid +#print axioms TDA.Mapper.GraphPL.HeightGraph.instDecidableValid +#print axioms TDA.Mapper.GraphPL.HeightGraph.graph +#print axioms TDA.Mapper.GraphPL.HeightGraph.instDecidableRelGraphAdj +#print axioms TDA.Mapper.GraphPL.HeightGraph.graph_adj +#print axioms TDA.Mapper.GraphPL.HeightGraph.realHeight +#print axioms TDA.Mapper.GraphPL.HeightGraph.realHeight_eq_iff +#print axioms TDA.Mapper.GraphPL.HeightGraph.levels +#print axioms TDA.Mapper.GraphPL.HeightGraph.levels_pairwise +#print axioms TDA.Mapper.GraphPL.HeightGraph.mem_levels +#print axioms TDA.Mapper.GraphPL.HeightGraph.levels_ne_nil +#print axioms TDA.Mapper.GraphPL.HeightGraph.levels_of_eq_zero +#print axioms TDA.Mapper.GraphPL.HeightGraph.gapCount +#print axioms TDA.Mapper.GraphPL.HeightGraph.length_levels +#print axioms TDA.Mapper.GraphPL.HeightGraph.level +#print axioms TDA.Mapper.GraphPL.HeightGraph.level_strictMono +#print axioms TDA.Mapper.GraphPL.HeightGraph.level_mem_levels +#print axioms TDA.Mapper.GraphPL.HeightGraph.exists_level_eq +#print axioms TDA.Mapper.GraphPL.HeightGraph.range_level +#print axioms TDA.Mapper.GraphPL.HeightGraph.criticalValues +#print axioms TDA.Mapper.GraphPL.HeightGraph.criticalValues_value +#print axioms TDA.Mapper.GraphPL.HeightGraph.coversVertexHeights +#print axioms TDA.Mapper.GraphPL.HeightGraph.horizontal +#print axioms TDA.Mapper.GraphPL.HeightGraph.relax +#print axioms TDA.Mapper.GraphPL.HeightGraph.labels +#print axioms TDA.Mapper.GraphPL.HeightGraph.label +#print axioms TDA.Mapper.GraphPL.HeightGraph.label_le +#print axioms TDA.Mapper.GraphPL.HeightGraph.height_label +#print axioms TDA.Mapper.GraphPL.HeightGraph.label_label +#print axioms TDA.Mapper.GraphPL.HeightGraph.label_eq_label_iff_reachable +#print axioms TDA.Mapper.GraphPL.HeightGraph.componentEquiv +#print axioms TDA.Mapper.GraphPL.HeightGraph.componentEquiv_apply +#print axioms TDA.Mapper.GraphPL.HeightGraph.componentEquiv_symm_mk +#print axioms TDA.Mapper.GraphPL.HeightGraph.vertexPairs +#print axioms TDA.Mapper.GraphPL.HeightGraph.cellsWith +#print axioms TDA.Mapper.GraphPL.HeightGraph.leftEndWith +#print axioms TDA.Mapper.GraphPL.HeightGraph.rightEndWith +#print axioms TDA.Mapper.GraphPL.HeightGraph.edgesWith +#print axioms TDA.Mapper.GraphPL.HeightGraph.cellList +#print axioms TDA.Mapper.GraphPL.HeightGraph.leftEnd +#print axioms TDA.Mapper.GraphPL.HeightGraph.rightEnd +#print axioms TDA.Mapper.GraphPL.HeightGraph.edgeList +#print axioms TDA.Mapper.GraphPL.HeightGraph.incidence +#print axioms TDA.Mapper.GraphPL.HeightGraph.incidence? +#print axioms TDA.Mapper.GraphPL.HeightGraph.incidence_levels +#print axioms TDA.Mapper.GraphPL.HeightGraph.incidence_cells +#print axioms TDA.Mapper.GraphPL.HeightGraph.incidence_edges +#print axioms TDA.Mapper.GraphPL.HeightGraph.incidence?_eq_some_iff +#print axioms TDA.Mapper.GraphPL.HeightGraph.incidence?_eq_none_iff +#print axioms TDA.Mapper.GraphPL.HeightGraph.levels_getElem? +#print axioms TDA.Mapper.GraphPL.HeightGraph.incidence_cells_getElem? +#print axioms TDA.Mapper.GraphPL.HeightGraph.incidence_edges_getElem? +#print axioms TDA.Mapper.GraphPL.HeightGraph.mem_cellList_inl +#print axioms TDA.Mapper.GraphPL.HeightGraph.mem_cellList_inr +#print axioms TDA.Mapper.GraphPL.HeightGraph.nodup_cellList +#print axioms TDA.Mapper.GraphPL.HeightGraph.mem_edgeList +#print axioms TDA.Mapper.GraphPL.HeightGraph.nodup_edgeList +#print axioms TDA.Mapper.GraphPL.HeightGraph.leftEnd_mem_cellList +#print axioms TDA.Mapper.GraphPL.HeightGraph.rightEnd_mem_cellList +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.edgeAdj +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.empty +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.empty_incidence +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.single +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.single_incidence +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.apart +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.apart_incidence +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.flat +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.flat_incidence +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.vee +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.vee_incidence +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.crossing +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.crossing_incidence +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.diamond +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.diamond_incidence +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.triangle +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.triangle_incidence +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.triangle_edgeList +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.triangle_parallel +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.bent +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.bent_valid +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.bent_incidence +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.bent_one_round +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.bent_labels +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.bent_height_zero +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.bent_height_one +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.bent_reachable +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.oneWay +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.oneWay_incidence +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.loop +#print axioms TDA.Mapper.GraphPL.GraphPLIncidenceExamples.loop_incidence