Documentation

LeanPool.RareSubtreePatterns.Cyclic.Indicators

Cyclic indicators (Definition def:indicators) #

Source lines 679–696 (DFS sequence, ζ, eq:fringe) and 735–764 (Section 2.3).

For a mark G (a {0,1}-valued function on finite plane trees, here a predicate G : PlaneTree → Prop), a cutoff M ∈ ℕ ∪ {∞} (here M : ℕ∞) and a finite sequence 𝐱 = (x_1, …, x_n) of integers (a List ℤ):

We prove the two cases of the definition (firstIndicator_of_zeta_eq_none, firstIndicator_of_lt_zeta, firstIndicator_of_zeta_le), the Boolean range, locality in the first M entries (firstIndicator_take, firstIndicator_congr_take), monotonicity in the cutoff, the infinite cutoff (firstIndicator_top), invariance of the cyclic sum under cyclic shifts (cyclicSum_rotate, part of B04), and the counting identity of source lines 758–760: ∑_i I_i^{(M)}(𝐱(T)) is the number of vertices v with |T_v| ≤ M and G(T_v) = 1 (cyclicSum_dfsSeq); for M ≥ |T| it is markCount G T (cyclicSum_dfsSeq_of_le).

We also prove U05 (source lines 914–920, 960–969): a proper fringe subtree has strictly fewer vertices (PlaneTree.vertexCount_fringeTrees_lt), so two marks forcing the same size cannot hold at a vertex and at a proper descendant (PlaneTree.not_forced_size_nested).

ζ(x_1, …, x_M) = m iff ζ(𝐱) = m ≤ M: the first passage time is local.

If T(𝐱) = T, then ζ(𝐱) = |T|.

T(x_1, …, x_M) = T(𝐱) as soon as ζ(𝐱) ≤ M.

The fringe subtree at the i-th vertex (DFS order, 0-indexed) has at most |T| - i vertices.

U05: a proper fringe subtree (at a vertex u_{i+1} with i ≥ 1, i.e. not the root) has strictly fewer vertices than the tree.

The fringe subtree at the root is the tree itself.

theorem PoissonDeclumping.PlaneTree.not_forced_size_nested {G₁ G₂ : PlaneTree → Prop} {k : ℕ} (h₁ : ∀ (T : PlaneTree), G₁ T → T.vertexCount = k) (h₂ : ∀ (T : PlaneTree), G₂ T → T.vertexCount = k) (T : PlaneTree) {i : ℕ} (hi : i < T.fringeTrees.length) (h1 : 1 ≤ i) :
¬(G₁ T ∧ G₂ T.fringeTrees[i])

U05: two nested marks forcing the same size cannot both hold at the root and at a proper fringe subtree.

Definition def:indicators: I_1^{(M)}(𝐱) = 1 iff ζ(𝐱) ≤ M (in particular ζ(𝐱) < ∞) and G(T(x_1, …, x_{ζ(𝐱)})) = 1.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    noncomputable def PoissonDeclumping.Cyclic.firstIndicator (G : PlaneTree → Prop) (M : ℕ∞) (x : List ℤ) :

    Definition def:indicators: the truncated indicator I_1^{(M)}(𝐱) ∈ {0, 1}.

    Equations
    Instances For
      noncomputable def PoissonDeclumping.Cyclic.shiftIndicator (G : PlaneTree → Prop) (M : ℕ∞) (x : List ℤ) (i : ℕ) :

      Definition def:indicators: the cyclically shifted indicator. With 0-based shifts, shiftIndicator G M 𝐱 i = I_{i+1}^{(M)}(𝐱) = I_1^{(M)}(x_{i+1}, …, x_n, x_1, …, x_i).

      Equations
      Instances For
        noncomputable def PoissonDeclumping.Cyclic.cyclicSum (G : PlaneTree → Prop) (M : ℕ∞) (x : List ℤ) :

        ∑_{i=1}^{n} I_i^{(M)}(𝐱) for a sequence 𝐱 of length n.

        Equations
        Instances For

          Boolean range of I_1^{(M)}.

          Boolean range of I_i^{(M)}.

          First case of Definition def:indicators: ζ(𝐱) = ∞.

          theorem PoissonDeclumping.Cyclic.firstIndicator_of_lt_zeta {G : PlaneTree → Prop} {M : ℕ∞} {x : List ℤ} {m : ℕ} (h : Lukasiewicz.zeta x = some m) (hM : M < ↑m) :

          First case of Definition def:indicators: ζ(𝐱) > M.

          theorem PoissonDeclumping.Cyclic.firstIndicator_of_zeta_le {G : PlaneTree → Prop} {M : ℕ∞} {x : List ℤ} {m : ℕ} {T : PlaneTree} [Decidable (G T)] (h : Lukasiewicz.zeta x = some m) (hM : ↑m ≤ M) (hT : T.dfsSeq = List.take m x) :
          firstIndicator G M x = if G T then 1 else 0

          Second case of Definition def:indicators: if ζ(𝐱) = m ≤ M and T is the tree whose DFS sequence is (x_1, …, x_m), then I_1^{(M)}(𝐱) = G(T).

          I_1^{(M)}(𝐱) = 1 iff the tree T(𝐱) is defined, has at most M vertices and is marked.

          theorem PoissonDeclumping.Cyclic.FirstMarked.mono {G : PlaneTree → Prop} {M M' : ℕ∞} {x : List ℤ} (h : FirstMarked G M x) (hMM' : M ≤ M') :

          Monotonicity of I_1^{(M)} in the cutoff.

          theorem PoissonDeclumping.Cyclic.shiftIndicator_mono {G : PlaneTree → Prop} {M M' : ℕ∞} {x : List ℤ} (hMM' : M ≤ M') (i : ℕ) :
          theorem PoissonDeclumping.Cyclic.cyclicSum_mono {G : PlaneTree → Prop} {M M' : ℕ∞} {x : List ℤ} (hMM' : M ≤ M') :
          cyclicSum G M x ≤ cyclicSum G M' x

          Locality: I_1^{(M)}(𝐱) only depends on x_1, …, x_M.

          Locality: two sequences with the same first M entries have the same I_1^{(M)}.

          With the infinite cutoff, I_1^{(∞)}(𝐱) = G(T(𝐱)) (and 0 if ζ(𝐱) = ∞).

          A cutoff at least the length of the sequence is no cutoff.

          Cyclic shifts of a DFS sequence #

          The i-th cyclic indicator of 𝐱(T) tests the fringe subtree at the i-th vertex (eq:fringe).

          theorem PoissonDeclumping.Cyclic.countP_eq_sum_range {α : Type u_1} (p : α → Bool) (l : List α) :
          List.countP p l = ∑ i ∈ Finset.range l.length, if h : i < l.length then if p l[i] = true then 1 else 0 else 0

          The counting identity of Section 2.3: ∑_{i=1}^{n} I_i^{(M)}(𝐱(T)) is the number of vertices v of T whose fringe subtree T_v has at most M vertices and is marked.

          With a cutoff M ≥ |T|, the cyclic sum counts all marked vertices (markCount G T).

          The cyclic sum is invariant under one rotation.

          B04: the sum of the cyclic indicators is invariant under cyclic shifts.

          theorem PoissonDeclumping.Cyclic.cyclicSum_ofFn {n : ℕ} (G : PlaneTree → Prop) (M : ℕ∞) (ω : Fin n → ℤ) :
          cyclicSum G M (List.ofFn ω) = ∑ i : Fin n, shiftIndicator G M (List.ofFn ω) ↑i

          The cyclic sum of a vector (x_1, …, x_n), as a sum over Fin n.