Helper lemmas for Franklin's involution #
Helper lemmas about consecutiveTopRun, partition membership,
and properties of αOp/βOp.
Main results #
ctr_zero,ctr_succ: defining equations forconsecutiveTopRunctr_eq_of: the characterisation ofconsecutiveTopRun S mas the uniquerwithm - j ∈ Sfor allj < randm - r ∉ Smem_DP: membership indistinctPartitionssum_Icc_id_mul_two,Icc_sum_id: Gauss' summation formula overFinset.IccinℕconsecutiveTopRun_Icc,partBase_Icc,partMax_Icc,partSlope_Icc: the structural invariants of an interval, which is the shape both pentagonal familiessmkSet/spkSettake
Recurrence: consecutiveTopRun S (m+1) is 1 + consecutiveTopRun S m if m+1 ∈ S,
else 0.
If m ∉ S then consecutiveTopRun S m = 0.
If m ∈ S then consecutiveTopRun S m > 0.
If 0 ∉ S then consecutiveTopRun S m ≤ m.
If j < consecutiveTopRun S m then m - j ∈ S.
Lower bound for consecutiveTopRun: a run of length r below m forces
r ≤ consecutiveTopRun S m.
If 0 ∉ S and m ∈ S then m - consecutiveTopRun S m ∉ S.
S ∈ distinctPartitions n iff S ⊆ Icc 1 n and S.sum id = n.
Every element of a distinct partition of n is positive.
0 is not in any distinct partition.
Every α-partition is a distinct partition.
Every β-partition is a distinct partition.
Every α-partition is nonempty.
Every β-partition is nonempty.
Intervals #
Both pentagonal families are intervals — smkSet k = Icc k (2 * k - 1) and
spkSet k = Icc (k + 1) (2 * k) — and a special partition is an interval too
(DPspecial_* in Lemmas.lean). The lemmas below compute the sum and the three structural
invariants of an arbitrary Finset.Icc a b once and for all.
Gauss' summation formula over Finset.Icc in ℕ, in * 2 form: no division and no
truncated subtraction on the left. Unconditional — both sides are 0 when b < a.
Gauss' summation formula over Finset.Icc in ℕ.
sum_Icc_id_mul_two in Finset.sum _ id phrasing, which is what distinctPartitions uses.
rw cannot see through id, so this restatement is what call sites need.
sum_Icc_id in Finset.sum _ id phrasing.
The consecutive-run function on an interval: every element of Icc a b continues the run
back down to a, and everything outside has run length 0.
The base of a nonempty interval is its left endpoint.
The max of a nonempty interval is its right endpoint.
A nonempty interval is one single run, so its slope is its whole length.
For S ∈ β(n), partSlope S ∉ S.