IntervalForestBasic
Abstract
Priority-forest interval structure and counting.
Definition 1.1 (IntervalForest).
Formalization. D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.IntervalForest (✓ std3).
Citation. Adrián Lillo and Mercedes Rosas (2026). The Priority Lattice. DOI: 10.48550/arXiv.2603.28905. URL: https://arxiv.org/abs/2603.28905v1.
Commentary.
Section 2.1, pp. 3–4: a priority forest (labeled with [n]₀ and with m edges) is a rooted forest (T₀, T₁, …, Tₙ₋ₘ) with all component trees increasing and ordered according to the root’s labels, and where for all j<k, every label in Tⱼ is smaller than every label in Tₖ. Thus, the vertex set of each tree is an interval of integers. The parent-function fields use Fin (n + 1), a smaller parent for each non-root, and Relation.EqvGen for connected components.
Theorem 1.2 (IntervalForest / ext).
Proof. Machine-checked in Lean as D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.ext (✓ std3). ∎
Source. Repository-derived.
Acknowledgement. Adrián Lillo and Mercedes Rosas (2026). The Priority Lattice. DOI: 10.48550/arXiv.2603.28905. URL: https://arxiv.org/abs/2603.28905v1.
Commentary.
The quantified statement holds for every parameter satisfying its displayed hypotheses.
Definition 1.3 (IntervalForest / edges).
Formalization. D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.edges (✓ std3).
Source. Repository-derived.
Acknowledgement. Adrián Lillo and Mercedes Rosas (2026). The Priority Lattice. DOI: 10.48550/arXiv.2603.28905. URL: https://arxiv.org/abs/2603.28905v1.
Commentary.
The defining expression is {e | P.parent e.2 = some e.1}.
Theorem 1.4 (IntervalForest / edges_injective).
Proof. Machine-checked in Lean as D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.edges_injective (✓ std3). ∎
Source. Repository-derived.
Acknowledgement. Adrián Lillo and Mercedes Rosas (2026). The Priority Lattice. DOI: 10.48550/arXiv.2603.28905. URL: https://arxiv.org/abs/2603.28905v1.
Commentary.
The quantified statement holds for every parameter satisfying its displayed hypotheses.
Definition 1.5 (IntervalForest / forestPartialOrder).
Formalization. D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.forestPartialOrder (✓ std3).
Source. Repository-derived.
Acknowledgement. Adrián Lillo and Mercedes Rosas (2026). The Priority Lattice. DOI: 10.48550/arXiv.2603.28905. URL: https://arxiv.org/abs/2603.28905v1.
Commentary.
The defining expression is PartialOrder.lift edges edges_injective.
Definition 1.6 (filterCount).
Formalization. D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.filterCount (✓ std3).
Source. Repository-derived.
Acknowledgement. Adrián Lillo and Mercedes Rosas (2026). The Priority Lattice. DOI: 10.48550/arXiv.2603.28905. URL: https://arxiv.org/abs/2603.28905v1.
Commentary.
The defining expression is Nat.card {x : (WithTop (IntervalForest n)) // ∃ m ≤ n, Nonempty (Set.Ici x ≃o (WithTop (IntervalForest m)))}.
Definition 1.7 (idealCount).
Formalization. D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.idealCount (✓ std3).
Source. Repository-derived.
Acknowledgement. Adrián Lillo and Mercedes Rosas (2026). The Priority Lattice. DOI: 10.48550/arXiv.2603.28905. URL: https://arxiv.org/abs/2603.28905v1.
Commentary.
The defining expression is Nat.card {x : (WithTop (IntervalForest n)) // ∃ m ≤ n, Nonempty (Set.Iic x ≃o (WithTop (IntervalForest m)))}.
Definition 1.8 (positiveIdealCount).
Formalization. D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.positiveIdealCount (✓ std3).
Source. Repository-derived.
Acknowledgement. Adrián Lillo and Mercedes Rosas (2026). The Priority Lattice. DOI: 10.48550/arXiv.2603.28905. URL: https://arxiv.org/abs/2603.28905v1.
Commentary.
The defining expression is Nat.card {x : (WithTop (IntervalForest n)) // exists m, 1 <= m ∧ m <= n ∧ Nonempty (Set.Iic x ≃o (WithTop (IntervalForest m)))}.
Definition 1.9 (IntervalForest / empty).
Formalization. D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.empty (✓ std3).
Source. Repository-derived.
Acknowledgement. Adrián Lillo and Mercedes Rosas (2026). The Priority Lattice. DOI: 10.48550/arXiv.2603.28905. URL: https://arxiv.org/abs/2603.28905v1.
Commentary.
The defining expression is parent := fun _ => none increasing := by simp intervals := by intro u v w huv hvw h have hempty : forall a b : Fin (n+1), Relation.EqvGen (fun a _ => (none : Option (Fin (n+1))) = some a) a b -> a = b := by intro a b hab induction hab with | rel x y h => cases h | refl x => rfl | symm x y _ ih => exact ih.symm | trans x y z _ _ ih1 ih2 => exact ih1.trans ih2 have huw : u = w := hempty u w h have huv’ : u = v := le_antisymm huv (huw ▸ hvw) subst v exact Relation.EqvGen.refl _.
Theorem 1.10 (IntervalForest / parent_zero).
Proof. Machine-checked in Lean as D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.parent_zero (✓ std3). ∎
Source. Repository-derived.
Acknowledgement. Adrián Lillo and Mercedes Rosas (2026). The Priority Lattice. DOI: 10.48550/arXiv.2603.28905. URL: https://arxiv.org/abs/2603.28905v1.
Commentary.
The quantified statement holds for every parameter satisfying its displayed hypotheses.
Theorem 1.11 (IntervalForest / card_zero).
Proof. Machine-checked in Lean as D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.card_zero (✓ std3). ∎
Source. Repository-derived.
Acknowledgement. Adrián Lillo and Mercedes Rosas (2026). The Priority Lattice. DOI: 10.48550/arXiv.2603.28905. URL: https://arxiv.org/abs/2603.28905v1.
Commentary.
The quantified statement holds for every parameter satisfying its displayed hypotheses.
Theorem 1.12 (IntervalForest / no_skipped_root).
Proof. Machine-checked in Lean as D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.no_skipped_root (✓ std3). ∎
Source. Repository-derived.
Acknowledgement. Adrián Lillo and Mercedes Rosas (2026). The Priority Lattice. DOI: 10.48550/arXiv.2603.28905. URL: https://arxiv.org/abs/2603.28905v1.
Commentary.
The quantified statement holds for every parameter satisfying its displayed hypotheses.
Definition 1.13 (forestOfLocal).
Formalization. D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.forestOfLocal (✓ std3).
Source. Repository-derived.
Acknowledgement. Adrián Lillo and Mercedes Rosas (2026). The Priority Lattice. DOI: 10.48550/arXiv.2603.28905. URL: https://arxiv.org/abs/2603.28905v1.
Commentary.
The literal parent function and increasing-parent proof, together with the no-skipped-root condition, construct the forest whose parent field is displayed.
Definition 1.14 (IsTree).
Formalization. D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.IsTree (✓ std3).
Source. Repository-derived.
Acknowledgement. Adrián Lillo and Mercedes Rosas (2026). The Priority Lattice. DOI: 10.48550/arXiv.2603.28905. URL: https://arxiv.org/abs/2603.28905v1.
Commentary.
The defining expression is forall v, P.parent v = none -> v = 0.
Definition 1.15 (treeEquivCode).
Formalization. D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.treeEquivCode (✓ std3).
Source. Repository-derived.
Acknowledgement. Adrián Lillo and Mercedes Rosas (2026). The Priority Lattice. DOI: 10.48550/arXiv.2603.28905. URL: https://arxiv.org/abs/2603.28905v1.
Commentary.
The equivalence sends each vertex i + 1 to its parent label, which is at most i. The inverse attaches each non-root vertex to its prescribed parent.
Theorem 1.16 (increasing_tree_card).
Proof. Machine-checked in Lean as D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.increasing_tree_card (✓ std3). ∎
Source. Repository-derived.
Acknowledgement. Adrián Lillo and Mercedes Rosas (2026). The Priority Lattice. DOI: 10.48550/arXiv.2603.28905. URL: https://arxiv.org/abs/2603.28905v1.
Commentary.
The quantified statement holds for every parameter satisfying its displayed hypotheses.
References
- Truth anchor:
D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.IntervalForest - Truth anchor:
D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.IsTree - Truth anchor:
D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.card_zero - Truth anchor:
D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.edges - Truth anchor:
D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.edges_injective - Truth anchor:
D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.empty - Truth anchor:
D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.ext - Truth anchor:
D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.filterCount - Truth anchor:
D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.forestOfLocal - Truth anchor:
D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.forestPartialOrder - Truth anchor:
D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.idealCount - Truth anchor:
D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.increasing_tree_card - Truth anchor:
D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.no_skipped_root - Truth anchor:
D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.parent_zero - Truth anchor:
D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.positiveIdealCount - Truth anchor:
D5/S3/Combinatorics/PriorityLattice/IntervalForestBasic.treeEquivCode