Structured proof · Unit 143
lemma exists_isHCParam_of_le
What it saysLet \Phi and n be finite types, s \colon n \to \{\pm 1\}, \kappa \colon \Phi \to \mathbb{N} \to \mathbb{N}, e \colon \Phi \to \mathbb{Z}, c \in \mathbb{R} and l \colon \Phi \to n \to \mathbb{Z} such that every l_w, read as a parameter for the signs s, has gap c (
hc: toHCParam s (l w) has HasGap c: the entries l_w(i)/2 are distinct, in (|n| - 1)/2 + \mathbb{Z}, and differ by at least c where the signs differ), and e(w) \le l(w, i)/2 + |n|/2 for all w and i (hg; integer division). Then there is f \colon \Phi \to \mathbb{N} \to \mathbb{N} such that IsHCParam f (w \mapsto e(w) + f(w, |n|)) l and f(w, k) = \kappa(w, k) for every w and every k > |n|.The argument in briefFor each w build the column counts by induction over the values of l_w in increasing order, then check the HC parameter condition.
For each w choose f_w and positions p by an induction on the minimum value (
induction_on_min_value) of the auxiliary statement: for every set S of indices and all g, f' with g \le l(w, i)/2 on S there is \kappa' agreeing with f' above \#S such that every i \in S has a position p < \#S with l(w, i)/2 + p + 1 = g + \#S + \sum_{p<h\le \#S} \kappa'(h); the step adds the index of the smallest value and sets the count at \#S + 1 to (l(w, a)/2 - g)_+ (Function.). Apply it to S = all indices, g = e(w) - |n|/2 and f' = \kappa_w (update hg).Uses
Finset.induction_on_min_value Take f; injectivity of each l_w follows from the gap (
hc), and the positions p give the HC parameter formula; f agrees with \kappa above |n| (grind).