Documentation

CslibFrontier.Foundations.Combinatorics.Sperner.Kuhn

Sperner's lemma on the Kuhn-triangulated hypergrid #

This file proves the n-dimensional Sperner lemma in its parity form on the hypergrid ∏ i, [0, N i] of Chen, Deng and Teng [CDT09] (Section 4.1, their A^d_r with d = n and r i = N i + 1), triangulated by the Kuhn (Freudenthal) triangulation. This is the n-dimensional counterpart of the triangulated square grid of Cslib.Sperner.triangles.

A Kuhn simplex (KuhnSimplex) lies in a unit cube with lower corner base; its n + 1 vertices (KuhnSimplex.vertex) form a maximal chain from the upper corner base + 1 down to base, lowering one coordinate at a time in the order prescribed by a permutation rank. For n = 2 these are the two triangles into which the diagonal cuts each grid cell.

Colours are Fin (n + 1); colour 0 is the colour d + 1 of Chen, Deng and Teng, as in Cslib.Sperner.boundaryColor. A colouring satisfies the Sperner boundary condition (IsHypergridSperner) when a point with p i = 0 has a colour in {i + 1, …, n} and a point with p i = N i does not have colour i + 1. Every valid colouring of Chen, Deng and Teng (IsValidColoring, agreeing on the boundary with hypergridBoundaryColor: colour i + 1 for the largest i with p i = 0, colour 0 if there is none) satisfies it. The converse fails: the condition restricts the boundary colours without fixing them, as the classical Sperner condition on a simplex does. Note the naming: the two-dimensional Cslib.Sperner.IsSpernerColoring fixes the boundary colours and so corresponds to IsValidColoring, not to the weaker IsHypergridSperner.

The proof is by induction on n and counts doors: facets carrying every colour except 0 (KuhnSimplex.IsDoor). A simplex has an odd number of doors exactly when it is panchromatic (KuhnSimplex.odd_card_isDoor_iff, from odd_card_doors_iff_surjective). Crossing an interior facet (KuhnSimplex.across, KuhnSimplex.mate) is a fixed-point-free involution on the interior doors, so their number is even. Under the Sperner boundary condition, the doors on the boundary of the hypergrid lie on the face x 0 = 0 and are the panchromatic simplices of the induced colouring of that face, one dimension lower, whose number is odd by induction. No orientation is needed.

Main definitions #

Main results #

Chen, Deng and Teng, Theorem 4.1 (a unit cube carrying all colours) follows at once from IsValidColoring.exists_panchromatic, since a panchromatic simplex lies in a unit cube.

References #

theorem Cslib.Sperner.odd_card_doors_iff_surjective {α : Type u_1} {β : Type u_2} [Fintype α] [Fintype β] [DecidableEq α] [DecidableEq β] (f : α → β) (b₀ : β) (hcard : Fintype.card α = Fintype.card β) :
Odd {k : α | ∀ (b : β), b ≠ b₀ → ∃ (j : α), j ≠ k ∧ f j = b}.card ↔ Function.Surjective f

Door parity. Let f : α → β be a map between finite types of the same cardinality and b₀ : β. Call k : α a door if every value other than b₀ is taken by f away from k. Then the number of doors is odd exactly when f is surjective.

A simplex of the Kuhn triangulation of the integer lattice ℕ ^ n. It lies in the unit cube with lower corner base; its vertices are the points of a maximal chain from the upper corner base + 1 down to base, which lowers the coordinates in the order given by rank: coordinate i is lowered in step rank i.

  • base : Fin n → ℕ

    The lower corner of the unit cube containing the simplex.

  • rank : Equiv.Perm (Fin n)

    Coordinate i is lowered from base i + 1 to base i between vertices rank i and rank i + 1.

theorem Cslib.Sperner.KuhnSimplex.ext {n : ℕ} {x y : KuhnSimplex n} (base : x.base = y.base) (rank : x.rank = y.rank) :
x = y
def Cslib.Sperner.KuhnSimplex.vertex {n : ℕ} (s : KuhnSimplex n) (k : Fin (n + 1)) (i : Fin n) :

Vertex k of a Kuhn simplex: coordinate i is base i + 1 when k ≤ rank i and base i otherwise. Vertex 0 is the upper corner base + 1 and vertex n is the lower corner base.

theorem Cslib.Sperner.KuhnSimplex.base_le_vertex {n : ℕ} (s : KuhnSimplex n) (k : Fin (n + 1)) (i : Fin n) :
s.base i ≤ s.vertex k i

The vertices of a Kuhn simplex lie above its lower corner.

theorem Cslib.Sperner.KuhnSimplex.vertex_le_base_add_one {n : ℕ} (s : KuhnSimplex n) (k : Fin (n + 1)) (i : Fin n) :
s.vertex k i ≤ s.base i + 1

The vertices of a Kuhn simplex lie below its upper corner.

Kuhn simplices are pairs of a lower corner and a permutation.

The simplices of the Kuhn triangulation of the hypergrid ∏ i, [0, N i]: those whose cube lies in the hypergrid.

@[simp]
theorem Cslib.Sperner.mem_kuhnSimplices {n : ℕ} {N : Fin n → ℕ} {s : KuhnSimplex n} :
s ∈ kuhnSimplices n N ↔ ∀ (i : Fin n), s.base i < N i
def Cslib.Sperner.IsPanchromatic {n : ℕ} (c : (Fin n → ℕ) → Fin (n + 1)) (s : KuhnSimplex n) :

A Kuhn simplex is panchromatic for a colouring c with n + 1 colours when its n + 1 vertices carry all the colours.

Instances For
    @[instance_reducible]
    instance Cslib.Sperner.instDecidableIsPanchromatic {n : ℕ} (c : (Fin n → ℕ) → Fin (n + 1)) (s : KuhnSimplex n) :
    def Cslib.Sperner.IsHypergridSperner {n : ℕ} (N : Fin n → ℕ) (c : (Fin n → ℕ) → Fin (n + 1)) :

    The Sperner boundary condition on the hypergrid ∏ i, [0, N i], with colours Fin (n + 1): a point with p i = 0 has a colour above i (one of i + 1, …, n), and a point with p i = N i does not have colour i + 1. Interior points are unconstrained.

    theorem Cslib.Sperner.KuhnSimplex.vertex_le {n : ℕ} {N : Fin n → ℕ} {s : KuhnSimplex n} (hs : s ∈ kuhnSimplices n N) (k : Fin (n + 1)) (i : Fin n) :
    s.vertex k i ≤ N i

    The vertices of a simplex of the hypergrid lie in the hypergrid.

    Facets and doors #

    def Cslib.Sperner.KuhnSimplex.IsDoor {n : ℕ} (c : (Fin n → ℕ) → Fin (n + 1)) (s : KuhnSimplex n) (k : Fin (n + 1)) :

    The facet of s opposite vertex k is a door for c when it carries every colour except 0.

    Instances For
      @[instance_reducible]
      instance Cslib.Sperner.KuhnSimplex.instDecidableIsDoor {n : ℕ} (c : (Fin n → ℕ) → Fin (n + 1)) (s : KuhnSimplex n) (k : Fin (n + 1)) :
      theorem Cslib.Sperner.KuhnSimplex.odd_card_isDoor_iff {n : ℕ} (c : (Fin n → ℕ) → Fin (n + 1)) (s : KuhnSimplex n) :
      Odd {k : Fin (n + 1) | IsDoor c s k}.card ↔ IsPanchromatic c s

      A simplex has an odd number of doors exactly when it is panchromatic.

      def Cslib.Sperner.KuhnSimplex.across {n : ℕ} (s : KuhnSimplex (n + 1)) (k : Fin (n + 2)) :

      The Kuhn simplex across the facet of s opposite vertex k. Removing the upper corner (k = 0) lowers the cube along the coordinate lowered first; removing the lower corner (k = n + 1) raises it along the coordinate lowered last; removing an intermediate vertex swaps two consecutive steps of the chain.

      def Cslib.Sperner.KuhnSimplex.mate {n : ℕ} (k : Fin (n + 2)) :
      Fin (n + 2)

      The index of the vertex of across s k that is opposite the shared facet.

      def Cslib.Sperner.KuhnSimplex.IsInteriorFacet {n : ℕ} (N : Fin (n + 1) → ℕ) (s : KuhnSimplex (n + 1)) (k : Fin (n + 2)) :

      The facet of s opposite vertex k is interior: it is not contained in a facet x i = 0 or x i = N i of the hypergrid ∏ i, [0, N i]. The facet opposite the upper corner lies in the hyperplane x i = base i for the coordinate i lowered first, and the facet opposite the lower corner in the hyperplane x i = base i + 1 for the coordinate i lowered last; the other facets cross the interior of the cube of s. Crossing an interior facet of a simplex of the hypergrid lands in the hypergrid (across_mem), and crossing back returns (across_across); that no other simplex of the hypergrid contains the facet is not needed and not proved.

      Instances For
        @[instance_reducible]
        instance Cslib.Sperner.KuhnSimplex.instDecidableIsInteriorFacet {n : ℕ} (N : Fin (n + 1) → ℕ) (s : KuhnSimplex (n + 1)) (k : Fin (n + 2)) :
        theorem Cslib.Sperner.KuhnSimplex.mate_mate {n : ℕ} (k : Fin (n + 2)) :
        mate (mate k) = k

        mate is an involution.

        theorem Cslib.Sperner.KuhnSimplex.base_across_zero {n : ℕ} (s : KuhnSimplex (n + 1)) (i : Fin (n + 1)) :
        (s.across 0).base i = if s.rank i = 0 then s.base i - 1 else s.base i

        Crossing the facet opposite the upper corner lowers the coordinate lowered first.

        Crossing the facet opposite the upper corner rotates the order of the steps.

        theorem Cslib.Sperner.KuhnSimplex.base_across_last {n : ℕ} (s : KuhnSimplex (n + 1)) (i : Fin (n + 1)) :
        (s.across (Fin.last (n + 1))).base i = if s.rank i = Fin.last n then s.base i + 1 else s.base i

        Crossing the facet opposite the lower corner raises the coordinate lowered last.

        Crossing the facet opposite the lower corner rotates the order of the steps.

        theorem Cslib.Sperner.KuhnSimplex.base_across_of_ne {n : ℕ} (s : KuhnSimplex (n + 1)) {k : Fin (n + 2)} (hk0 : k ≠ 0) (hkl : k ≠ Fin.last (n + 1)) :
        (s.across k).base = s.base

        Crossing a facet opposite an intermediate vertex keeps the cube.

        theorem Cslib.Sperner.KuhnSimplex.rank_across_of_ne {n : ℕ} (s : KuhnSimplex (n + 1)) {k : Fin (n + 2)} (hk0 : k ≠ 0) (hkl : k ≠ Fin.last (n + 1)) :
        (s.across k).rank = Equiv.trans s.rank (Equiv.swap (k.pred hk0) (k.castPred hkl))

        Crossing the facet opposite an intermediate vertex k swaps steps k - 1 and k.

        theorem Cslib.Sperner.KuhnSimplex.vertex_across_zero {n : ℕ} {s : KuhnSimplex (n + 1)} (h : ∀ (i : Fin (n + 1)), s.rank i = 0 → 0 < s.base i) (j : Fin (n + 1)) :

        Across the facet opposite the upper corner, the shared vertices are shifted down by one.

        theorem Cslib.Sperner.KuhnSimplex.vertex_across_last {n : ℕ} (s : KuhnSimplex (n + 1)) (j : Fin (n + 1)) :

        Across the facet opposite the lower corner, the shared vertices are shifted up by one.

        theorem Cslib.Sperner.KuhnSimplex.vertex_across_of_ne {n : ℕ} {s : KuhnSimplex (n + 1)} {k : Fin (n + 2)} (hk0 : k ≠ 0) (hkl : k ≠ Fin.last (n + 1)) {j : Fin (n + 2)} (hj : j ≠ k) :
        (s.across k).vertex j = s.vertex j

        Across the facet opposite an intermediate vertex, the shared vertices are unchanged.

        The facet opposite the upper corner is opposite the lower corner of the neighbour.

        The facet opposite the lower corner is opposite the upper corner of the neighbour.

        theorem Cslib.Sperner.KuhnSimplex.mate_of_ne {n : ℕ} {k : Fin (n + 2)} (hk0 : k ≠ 0) (hkl : k ≠ Fin.last (n + 1)) :
        mate k = k

        A facet opposite an intermediate vertex is opposite the same vertex of the neighbour.

        theorem Cslib.Sperner.KuhnSimplex.across_across {n : ℕ} {N : Fin (n + 1) → ℕ} {s : KuhnSimplex (n + 1)} {k : Fin (n + 2)} (h : IsInteriorFacet N s k) :
        (s.across k).across (mate k) = s

        Crossing an interior facet twice returns to the starting simplex.

        theorem Cslib.Sperner.KuhnSimplex.across_mem {n : ℕ} {N : Fin (n + 1) → ℕ} {s : KuhnSimplex (n + 1)} {k : Fin (n + 2)} (hs : s ∈ kuhnSimplices (n + 1) N) (h : IsInteriorFacet N s k) :

        Crossing an interior facet stays in the hypergrid.

        theorem Cslib.Sperner.KuhnSimplex.isInteriorFacet_across {n : ℕ} {N : Fin (n + 1) → ℕ} {s : KuhnSimplex (n + 1)} {k : Fin (n + 2)} (hs : s ∈ kuhnSimplices (n + 1) N) (h : IsInteriorFacet N s k) :

        The shared facet is interior from the other side as well.

        theorem Cslib.Sperner.KuhnSimplex.across_ne {n : ℕ} (s : KuhnSimplex (n + 1)) (k : Fin (n + 2)) :

        Crossing a facet changes the simplex or the facet.

        theorem Cslib.Sperner.KuhnSimplex.isDoor_across {n : ℕ} {c : (Fin (n + 1) → ℕ) → Fin (n + 2)} {N : Fin (n + 1) → ℕ} {s : KuhnSimplex (n + 1)} {k : Fin (n + 2)} (hd : IsDoor c s k) (h : IsInteriorFacet N s k) :
        IsDoor c (s.across k) (mate k)

        A door seen from the other side is a door.

        Boundary doors #

        theorem Cslib.Sperner.KuhnSimplex.eq_zero_of_isDoor_of_not_isInteriorFacet {n : ℕ} {N : Fin (n + 1) → ℕ} {c : (Fin (n + 1) → ℕ) → Fin (n + 2)} (hc : IsHypergridSperner N c) {s : KuhnSimplex (n + 1)} (hs : s ∈ kuhnSimplices (n + 1) N) {k : Fin (n + 2)} (hd : IsDoor c s k) (hi : ¬IsInteriorFacet N s k) :
        k = 0 ∧ s.rank 0 = 0 ∧ s.base 0 = 0

        A door of a Sperner colouring that is not interior is the facet opposite the upper corner of a simplex touching the face x 0 = 0 along it.

        theorem Cslib.Sperner.KuhnSimplex.not_isInteriorFacet_zero {n : ℕ} {N : Fin (n + 1) → ℕ} {s : KuhnSimplex (n + 1)} (hr : s.rank 0 = 0) (hb : s.base 0 = 0) :

        The facet opposite the upper corner of a simplex touching the face x 0 = 0 along it is not interior.

        The face x 0 = 0 #

        theorem Cslib.Sperner.IsHypergridSperner.pos {n : ℕ} {N : Fin n → ℕ} {c : (Fin n → ℕ) → Fin (n + 1)} (hc : IsHypergridSperner N c) (i : Fin n) :
        0 < N i

        The side lengths of a hypergrid carrying a Sperner colouring are positive.

        theorem Cslib.Sperner.even_card_of_involution {α : Type u_1} {T : Finset α} (g : α → α) (hmem : ∀ x ∈ T, g x ∈ T) (hinv : ∀ x ∈ T, g (g x) = x) (hne : ∀ x ∈ T, g x ≠ x) :

        A finite set with a fixed-point-free involution has even cardinality.

        theorem Cslib.Sperner.IsHypergridSperner.odd_card_isPanchromatic {n : ℕ} {N : Fin n → ℕ} {c : (Fin n → ℕ) → Fin (n + 1)} (hc : IsHypergridSperner N c) :

        Sperner's lemma on the Kuhn-triangulated hypergrid, parity form: a colouring of the hypergrid ∏ i, [0, N i] with n + 1 colours that satisfies the Sperner boundary condition has an odd number of panchromatic Kuhn simplices.

        theorem Cslib.Sperner.IsHypergridSperner.exists_isPanchromatic {n : ℕ} {N : Fin n → ℕ} {c : (Fin n → ℕ) → Fin (n + 1)} (hc : IsHypergridSperner N c) :
        ∃ s ∈ kuhnSimplices n N, IsPanchromatic c s

        Sperner's lemma on the Kuhn-triangulated hypergrid: a colouring satisfying the Sperner boundary condition has a panchromatic Kuhn simplex.

        Valid colourings of Chen, Deng and Teng #

        def Cslib.Sperner.hypergridBoundaryColor {n : ℕ} :
        (Fin n → ℕ) → Fin (n + 1)

        The boundary colouring of Chen, Deng and Teng: p has colour i + 1 for the largest i with p i = 0, and colour 0 (their colour d + 1) when no coordinate of p is 0.

        At a point with p i = 0, the boundary colour is above i.

        theorem Cslib.Sperner.hypergridBoundaryColor_ne_succ {n : ℕ} {p : Fin n → ℕ} {i : Fin n} (h : p i ≠ 0) :

        At a point with p i ≠ 0, the boundary colour is not i + 1.

        def Cslib.Sperner.IsValidColoring {n : ℕ} (N : Fin n → ℕ) (c : (Fin n → ℕ) → Fin (n + 1)) :

        A valid colouring of the hypergrid ∏ i, [0, N i] in the sense of Chen, Deng and Teng: it agrees with hypergridBoundaryColor at the boundary points, those with some p i ∈ {0, N i}.

        theorem Cslib.Sperner.IsValidColoring.isHypergridSperner {n : ℕ} {N : Fin n → ℕ} {c : (Fin n → ℕ) → Fin (n + 1)} (hc : IsValidColoring N c) (hN : ∀ (i : Fin n), 0 < N i) :

        A valid colouring of a hypergrid with positive side lengths satisfies the Sperner boundary condition.

        theorem Cslib.Sperner.IsValidColoring.exists_panchromatic {n : ℕ} {N : Fin n → ℕ} {c : (Fin n → ℕ) → Fin (n + 1)} (hc : IsValidColoring N c) (hN : ∀ (i : Fin n), 0 < N i) :
        ∃ (p : Fin n → ℕ), (∀ (i : Fin n), p i < N i) ∧ ∃ (P : Finset (Fin n → ℕ)), (∀ q ∈ P, ∀ (i : Fin n), q i = p i ∨ q i = p i + 1) ∧ P.card = n + 1 ∧ Set.InjOn c ↑P

        Existence of a panchromatic simplex (Chen, Deng and Teng, Corollary 4.3): a valid colouring of a hypergrid with positive side lengths has a panchromatic simplex, a set of n + 1 points with n + 1 distinct colours inside a unit cube K_p of the hypergrid. Positive side lengths (r i ≥ 2 for Chen, Deng and Teng) are needed: for n = 1 and N = ![0] the hypergrid is a single point.