Geometric foundation: the critical-portrait model on ZMod (d*m). #
A faithful, proof-friendly port of the bare-Lean verified model
(LamKit.CriticalCensusGeneral; native_decide-verified d = 3..6). Mathlib has cyclic
betweenness (Order.Circular) but no chords/linking/laminar API, so this is built from scratch.
IsCriticalSet— subset of oneσ_d-fiber,≥ 2points (weight|S| - 1).Linked/Unlinked— convex hulls cross / don't cross on the.val-circle.Unlinkedis the negation of an alternating crossing quadruple; it agrees with the bare-LeanhullsUnlinkedtest (cyclicRuns ≤ 1) on every instance (verified#evals match the census5/14/12/55/22/42).Portrait— pairwise vertex-disjoint, pairwise-unlinked critical sets, weightd-1.T— delete the lowest-level (= least.val) point of each set, union all.
API proved here (sorry-free, native_decide-free, real kernel proofs):
T_card— the weight identity#T(P) = d - 1.Decidableinstances throughout; an unconditionalFintypefor the portrait subtype.- Downstream hooks:
sep_master(the master separation inequality (M)),linked_of_lt,mem_T, theminValspec lemmas.
Positions/level/fiber/LevelCanonical are reused from CriticalPortraits.Core. The forward goal
LevelCanonical (T P) is a LATER brick (3b) and is deliberately NOT stated here.
1. Critical sets. #
S ⊆ Z_{d*m} is a critical set: it lies in one σ_d-fiber (all points share a
column r < m) and has at least 2 points. Its weight is S.card - 1.
Instances For
Equations
2. Unlinked: convex hulls don't cross. #
Linked A B says there are two chords — (a1, a2) with endpoints in A, (b1, b2) with
endpoints in B — that cross on the circle Z_N read by .val. Geometrically the two
crossing patterns (up to relabelling) are a1 < b1 < a2 < b2 and b1 < a1 < b2 < a2
(strict on .val). This is the val-linear form of "the four points alternate cyclically
a, b, a, b", which is exactly the negation of "A is a single cyclic run" — i.e. the
bare-Lean hullsUnlinked test cyclicRuns ≤ 1. Unlinked A B := ¬ Linked A B.
Equations
Equations
The crossing witness Lemma A / Seam / Bridge will call: a strictly-alternating quadruple
a1 < b1 < a2 < b2 (linear .val order) with a1,a2 ∈ A, b1,b2 ∈ B contradicts
Unlinked A B.
3. Critical portraits. #
A critical portrait: a family of critical sets that is pairwise vertex-disjoint,
pairwise unlinked, of total weight ∑ (|S| - 1) = d - 1.
Equations
- One or more equations did not get rendered due to their size.
Instances For
4. The portrait subtype is a Fintype (unconditional, mirroring instFiniteCanonical). #
When d * m = 0, no portrait exists. (m = 0 ⇒ no fiber witness; d = 0 ⇒ weight
target 0, but every critical set has positive weight, so the family is empty.)
Equations
- CriticalPortraits.instFintypePortrait d m = Fintype.ofFinite { P : Finset (Finset (ZMod (d * m))) // CriticalPortraits.Portrait d m P }
5. The delete-min map T. #
ZMod N has no LinearOrder, so we pick the dropped point by minimising .val via
Finset.exists_min_image. Within a single fiber val = level*m + col is strictly monotone
in level, so least-.val = lowest-level = exactly bare-Lean's S.drop 1.
The least-.val element of a nonempty set (the lowest-level point of a critical set).
Equations
- CriticalPortraits.minVal S h = ⋯.choose
Instances For
Drop the lowest-level (least-.val) point of S (identity on the empty set).
Equations
- CriticalPortraits.eraseMin S = if h : S.Nonempty then S.erase (CriticalPortraits.minVal S h) else S
Instances For
T(P): delete the lowest-level point of every set, then take the union.
Equations
Instances For
The erased sets remain pairwise disjoint (erase only shrinks).
6b. The min-rule is the min-LEVEL rule (load-bearing for forward/surjectivity). #
The bare-Lean S.drop 1 drops the lowest-LEVEL point. minVal drops the least-.val point.
These coincide on a critical set because within one fiber the .val order is the level order,
and the level is injective on the set. This underwrites "survivors = edge tops" and "each
block/component has a unique non-survivor = its lowest-level vertex" (scout risk R2).
The dropped point (the minimum) is strictly below — in LEVEL — every survivor of that set. This is what makes "survivors = edge tops" hold; each critical set keeps exactly its tops.
7. Helper facts the downstream bricks will want. #
These pin the model to the verified one and expose the (M)-style arithmetic.
A crossing quadruple in strict val-order makes A, B linked (the (M)-witness hook).
8. T P lands in the (d-1)-subsets (the start of the Tsub packaging). #
T_card gives the cardinality; we package T P into the same {S // S.card = d-1} subtype
the denominator counts (Denominator.Asub). The remaining LevelCanonical (T P) clause —
landing in the FULL {S // S.card = d-1 ∧ LevelCanonical d m S} subtype (Denominator.Csub) —
is the FORWARD direction (brick 3b) and is deliberately NOT proved here.