Lemma 9 (explicit form proved on p. 345) — ply three ≤ 4n/lg n, ply two ≤ 4n/lg⁽²⁾ n, ply-one components ≤ lg⁽²⁾ n
ProvedHarelTarjan.Compressed.lemma9_pliesLet be a rooted tree on vertices, its compressed tree, and divide into plies one, two and three by rank, with thresholds and . Then:
- Ply three contains at most vertices:
- Ply two contains at most vertices:
- Each connected component of ply one is a subtree of containing at most vertices. Precisely: for every vertex in ply one, all descendants of in lie in ply one, and
The paper states Lemma 9 with and ; its proof on p. 345 establishes the explicit constants and given here. The lemma is what makes the depth problem on solvable with linear preprocessing: the tables for plies two and three have total size , and ply one splits into tiny subtrees.
Formalization Note is Real.logb 2, is Fintype.card V, and the plies use the iterated Nat.log thresholds of the definition Plies (equal to the real floors for ). The hypothesis is added: it is not on the page, where the hides it, and it makes and , so that the divisions are honest (Lean's ) and . Part 3 is the vertex-wise reading of "each connected component of ply one is a subtree of with at most vertices": since ply one is closed under taking -descendants, the component of a ply-one vertex is the -subtree of its shallowest ply-one ancestor, and that subtree's size is bounded because its root lies in ply one.
import Mathlib import Definitions.Def_HarelTarjan_Compressed_RootedTree import Definitions.Def_HarelTarjan_Compressed_HeavyPath import Definitions.Def_HarelTarjan_Compressed_CompressedTree import Definitions.Def_HarelTarjan_Compressed_Plies
namespace HarelTarjan.Compressed
theorem lemma9_plies {V : Type*} [Fintype V] [DecidableEq V] (T : RootedTree V)
(hn : 4 ≤ Fintype.card V) :
((ply3 T).card : ℝ) ≤ 4 * (Fintype.card V : ℝ) / Real.logb 2 (Fintype.card V) ∧
((ply2 T).card : ℝ) ≤
4 * (Fintype.card V : ℝ) / Real.logb 2 (Real.logb 2 (Fintype.card V)) ∧
∀ v ∈ ply1 T,
(∀ u : V, IsAncestorC T v u → u ∈ ply1 T) ∧
(sizeC T v : ℝ) ≤ Real.logb 2 (Real.logb 2 (Fintype.card V)) := by sorry
end HarelTarjan.Compressed
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Fix a finite type with decidable equality, and write for its number of elements. Let be any value of type RootedTree V, a structure from the imported bundle HarelTarjan.Compressed. Its definition is not included in the code under audit. The only hypothesis is
The statement uses four more objects from the imported bundle, and their definitions are not given here either. They are used only as follows:
- , and are finite collections, since each one has a cardinality and supports membership. The statement treats as a collection of elements of .
- is a relation between two elements of . The code does not say which direction counts as "ancestor".
- is a quantity attached to each , converted to a real number for the comparison.
Nothing in the statement says what these objects are. In particular it does not say that the three plies are disjoint or that together they cover . Every property below is a property of whatever these definitions compute.
The theorem claims that all three of the following hold together, with the real base-2 logarithm:
- The third ply is small:
- The second ply is small:
- The first ply has two properties. For every :
- (a) every with is also in , so the first ply is closed under that relation, in the argument order written; and
- (b) the size is bounded:
The three parts are joined by "and". Each bound uses the constant 4, and the inequalities are non-strict ().
Degenerate cases. The hypothesis rules out an empty or one-element . It also means and . So both denominators are strictly positive, no division by zero happens, and no logarithm is taken of a non-positive number. Every bound is therefore a real, positive number, not a default value. At the smallest allowed size, :
- the bound on is ;
- the bound on is ;
- the bound on for is .
If is empty, part 3 holds trivially. Whether any of the conclusions is trivial for other reasons, for example because a ply is always empty or is always , depends on the imported definitions, which the code under audit does not show.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.