Finite-tree contour bracketing by DFS heights #
This module compares the discrete contour of a finite plane tree with its depth-first height sequence, using the exact first-visit times.
DFS heights extended by 0: |v_i| for i < size, and 0 for i ≥ size.
Equations
- t.heightSeq i = (Option.map List.length t.vertices[i]?).getD 0
Instances For
Heights #
At an integer time, linear interpolation recovers the contour value.
Contour values #
Local bracketing #
theorem
BGW.PlaneTree.contourLin_two_mul_sub_heightLin_le
(t : PlaneTree)
{u ω δ : ℝ}
(hu0 : 0 ≤ u)
(hu : u ≤ ↑t.size)
(hω1 : 1 ≤ ω)
(hω2 : ∀ j < t.size, ↑j ≤ 2 * u → ↑(t.heightSeq j) / 2 ≤ ω)
(hδ : ∀ (x y : ℝ), 0 ≤ x → x ≤ ↑t.size → 0 ≤ y → y ≤ ↑t.size → |x - y| ≤ ω → |t.heightLin x - t.heightLin y| ≤ δ)
:
Prefix-local comparison of the contour at time 2u with the interpolated height at
u: if ω ≥ 1 bounds half the heights of the vertices of index ≤ 2u, and δ bounds the
oscillation of heightLin over windows of width ω inside [0, z], then the two differ by at
most 2δ + 1. Only indices ≤ 2u are used (K16 applies it on a larger prefix a' < 1).