Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The 38 base and 71 symmetrized discharging patterns

Definition
FourColor_DischargeRules

by Minghui · Sep 27, 2026 · Mathlib c5ea003 (Lean v4.30.0)

four-color-theoremgraph-theory

Concrete interval sectors describe all source rules with multiplicity. Executable matching is proved equivalent to semantic arity constraints. The transfer counts matches at inverse-face squared; its rational score is the existing face charge. The bundle proves score at most 60 minus five times arity under a separate transfer cap of five, and hence the positive-hub degree bound. Formalization note: source-derived literal rules with proved matching and arithmetic bridges; no unavoidability is assumed.

Notation: D={0,…,n−1}D=\{0,\ldots,n-1\}D={0,…,n−1} is the dart set, n=∣D∣n = |D|n=∣D∣ its size, and p=νHp = \nu_Hp=νH​ is the node permutation. Write e,fe,fe,f for the edge and face permutations, with p(f(e(d)))=dp(f(e(d)))=dp(f(e(d)))=d. Edge, node and face counts E,N,FE,N,FE,N,F are numbers of permutation orbits, including singleton orbits. The component count CCC uses the equivalence generated by all three permutations. Planarity means the exact Euler equality E+N+F=n+2CE+N+F=n+2CE+N+F=n+2C, and connectedness means C=1C=1C=1.

A plain hypermap has a fixed-point-free involution eee. Cubic means every node orbit has size three; precubic means every node orbit has size at most three. Bridgeless means ddd and e(d)e(d)e(d) never lie in the same face orbit. A kkk-coloring is a map D→{0,…,k−1}D\to\{0,\ldots,k-1\}D→{0,…,k−1} constant on face orbits and different across each edge step. No requirement uses all available colors. The empty dart set has zero components, is planar, and is colorable, but is not connected.

An admissible hypermap is planar, bridgeless, plain and precubic. A minimal counterexample is a non-four-colorable admissible hypermap such that every admissible hypermap with fewer darts is four-colorable. Minimality includes all finite carriers through their enumeration by Fin⁡(m)\operatorname{Fin}(m)Fin(m); cubicity, connectedness and lower face-degree bounds are not assumed.

The fixed catalogue C\mathcal CC is the ordered list of all 633 literal configuration maps, boundary rings, and selected contracts, decoded from the pinned source. It is shared by reducibility and coverage; it is not an arbitrary or existentially chosen family. The table checker establishes array sizes, index bounds, and inverse/triangle identities only.

For a configuration AAA, let RAR_ARA​ be its ordered boundary ring, KAK_AKA​ the darts whose faces avoid that ring, and SAS_ASA​ the list containing both darts of every selected contract edge. Geometric admissibility means that the map is planar, bridgeless, plain and connected; RAR_ARA​ is a nonempty node cycle meeting each face at most once; off-ring nodes have arity three; ring faces have arity 3–6; and there is a kernel face having a common adjacent kernel face with every kernel face. Contract validity means that SAS_ASA​ avoids RAR_ARA​, its darts lie in pairwise distinct node orbits, the contract has 1–4 edges, and a four-edge contract has the source's kernel triad (more than two incident selected-face darts and not every selected face adjacent).

Colors are the Klein-four group {0,1,2,3}\{0,1,2,3\}{0,1,2,3}, with bitwise XOR as addition. A boundary trace records sums of consecutive face colors around the reversed ring, including the closing pair. Ordinary traces arise from proper face colorings. Contract traces arise from face-constant colorings with equal colors across exactly the edges selected by SAS_ASA​. A trace set is Kempe-closed if it is closed under all permutations fixing zero and, for each member, contains every trace matching some compatible four-symbol noncrossing-chord word. The stack matcher rejects zero colors and requires an empty final stack. Coclosure of a set consists of traces whose every containing Kempe-closed set meets that set. C-reducibility means contract validity and inclusion of all contract traces in the coclosure of the ordinary traces.

An occurrence of AAA in HHH requires geometric admissibility of AAA and a map of its darts into HHH preserving face steps and exact face arities on KAK_AKA​. Every kernel face must contain an edge-preserving dart; such darts obey the explicit ring-link path condition in the definition. A total injective map of all permutations is not required. Occurrence up to reflection means occurrence in HHH or in its mirror, whose edge, node and face maps are respectively f∘pf\circ pf∘p, p−1p^{-1}p−1 and f−1f^{-1}f−1.

The concrete transfer tH(y)t_H(y)tH​(y) counts, with multiplicity, matches of the 71 symmetrized source patterns at f−2(y)f^{-2}(y)f−2(y). Their 38 base entries include repeated entries implementing larger transfers. With FH(x)F_H(x)FH​(x) the face orbit of xxx and aH(x)=∣FH(x)∣a_H(x)=|F_H(x)|aH​(x)=∣FH​(x)∣, the score is

qH(x)=60−10aH(x)+∑y∈FH(x)(tH(e(y))−tH(y)).q_H(x)=60-10a_H(x)+\sum_{y\in F_H(x)}(t_H(e(y))-t_H(y)).qH​(x)=60−10aH​(x)+y∈FH​(x)∑​(tH​(e(y))−tH​(y)).

All intervals are inclusive; a missing upper endpoint means no upper bound. Only the positive hub is eventually restricted to degrees 5–11. Neighboring faces are not silently restricted to those degrees.

Source: Georges Gonthier, A Computer-Checked Proof of the Four Colour Theorem (2005), https://www.microsoft.com/en-us/research/wp-content/uploads/2012/10/4colproof.pdf; Section 5.5, PDF p. 45, paragraph on PDF p. 45 giving the unnumbered discharge formula; PDF pp. 44–48, including the 71-pattern paragraph on p. 45. Relevant displays are unnumbered. Pinned executable reference: https://github.com/rocq-community/fourcolor/blob/c1d6b1cd5288bea4b067aac13cdde3c18dffe018/theories/proof/part.v#L159-L175; https://github.com/rocq-community/fourcolor/blob/c1d6b1cd5288bea4b067aac13cdde3c18dffe018/theories/proof/part.v#L603-L626; https://github.com/rocq-community/fourcolor/blob/c1d6b1cd5288bea4b067aac13cdde3c18dffe018/theories/proof/part.v#L801-L852; https://github.com/rocq-community/fourcolor/blob/c1d6b1cd5288bea4b067aac13cdde3c18dffe018/theories/proof/part.v#L892-L927; https://github.com/rocq-community/fourcolor/blob/c1d6b1cd5288bea4b067aac13cdde3c18dffe018/theories/proof/discharge.v#L66-L172; https://github.com/rocq-community/fourcolor/blob/c1d6b1cd5288bea4b067aac13cdde3c18dffe018/theories/proof/discharge.v#L378-L398.

Definition code
import Definitions.Def_FourColor_Discharging
import Mathlib.GroupTheory.Perm.Cycle.Factors
import Mathlib.Tactic.Linarith
import Mathlib.Tactic.NormNum

/-!
The literal rule data are derived from work copyright 2006–2018 Microsoft Corporation
and Inria, distributed under CeCILL-B. See
`missions/four-color-theorem/data/LICENSE.fourcolor`.

Concrete discharging patterns and all 38 base-rule entries at
rocq-community/fourcolor `c1d6b1cd5288bea4b067aac13cdde3c18dffe018`.
The data represent the 32 numbered RSST rules, with the source's specializations
and multiplicities. The source is `discharge.v`, lines 66–157; local matching and
reflection are specified by `part.v`, lines 159–175, 603–626, and 892–927.
See Gonthier (2005), Section 5.5, PDF pp. 44–48.

Intervals and lists replace the source's packed recursive syntax. The algorithms
below are total Lean functions; no rule or matching oracle is assumed correct.
-/

namespace FourColor.Discharge

/-- A closed arity interval; `none` is an unbounded upper endpoint. -/
structure ArityRange where
  lower : ℕ
  upper : Option ℕ
  deriving DecidableEq, Repr

namespace ArityRange

def Contains (r : ArityRange) (n : ℕ) : Prop :=
  r.lower ≤ n ∧ ∀ u ∈ r.upper, n ≤ u

instance (r : ArityRange) (n : ℕ) : Decidable (r.Contains n) :=
  inferInstanceAs (Decidable (r.lower ≤ n ∧ ∀ u ∈ r.upper, n ≤ u))

def contains (r : ArityRange) (n : ℕ) : Bool := decide (r.Contains n)

/-- The unconstrained range used for pentagonal hypermaps. -/
def free : ArityRange := ⟨5, none⟩

def exactly (n : ℕ) : ArityRange := ⟨n, some n⟩
def atLeast (n : ℕ) : ArityRange := ⟨n, none⟩
def atMost (n : ℕ) : ArityRange := ⟨5, some n⟩

/-- Sufficient interval containment, with the same result as `cmp_range = Psubset`
on the fifteen nonempty source ranges. -/
def subset (r s : ArityRange) : Bool :=
  decide (s.lower ≤ r.lower) && match s.upper, r.upper with
  | none, _ => true
  | some _, none => false
  | some v, some u => decide (u ≤ v)

theorem contains_iff (r : ArityRange) (n : ℕ) :
    r.contains n = true ↔ r.Contains n := by simp [contains]

theorem subset_sound {r s : ArityRange} (h : r.subset s = true) :
    ∀ n, r.Contains n → s.Contains n := by
  intro n hn
  have hh : decide (s.lower ≤ r.lower) = true ∧ (match s.upper, r.upper with
    | none, _ => true
    | some _, none => false
    | some v, some u => decide (u ≤ v)) = true := by simpa [subset] using h
  obtain ⟨lo, hu⟩ := hh
  refine ⟨le_trans (of_decide_eq_true lo) hn.1, ?_⟩
  cases hs : s.upper with
  | none => simp
  | some u =>
    cases hr : r.upper with
    | none => simp [hs, hr] at hu
    | some v =>
      have hvu : v ≤ u := by simpa [hs, hr] using hu
      intro z hz
      have hz' : z = u := by simpa [hs, eq_comm] using hz
      subst z
      exact le_trans (hn.2 v (by simp [hr])) hvu

end ArityRange

/-- One sector, with an optional fixed number of constrained fan faces.
Nontrivial fans fix the spoke arity, so reflection preserves their indexing. -/
inductive Sector where
  | basic (spoke hat : ArityRange)
  | six (hat fan : ArityRange)
  | seven (hat fan₁ fan₂ : ArityRange)
  | eight (hat fan₁ fan₂ fan₃ : ArityRange)
  deriving DecidableEq, Repr

namespace Sector

def spoke : Sector → ArityRange
  | .basic s _ => s
  | .six .. => .exactly 6
  | .seven .. => .exactly 7
  | .eight .. => .exactly 8

def hat : Sector → ArityRange
  | .basic _ h | .six h _ | .seven h _ _ | .eight h _ _ _ => h

def fans : Sector → List ArityRange
  | .basic .. => []
  | .six _ f => [f]
  | .seven _ f₁ f₂ => [f₁, f₂]
  | .eight _ f₁ f₂ f₃ => [f₁, f₂, f₃]

/-- Reflection reverses fans and takes the hat from the next sector. -/
def reflect (h : ArityRange) : Sector → Sector
  | .basic s _ => .basic s h
  | .six _ f => .six h f
  | .seven _ f₁ f₂ => .seven h f₂ f₁
  | .eight _ f₁ f₂ f₃ => .eight h f₃ f₂ f₁

/-- The source's sufficient subset test, including its conservative treatment
of a basic sector compared with one carrying fan constraints. -/
def subset (p q : Sector) : Bool :=
  p.spoke.subset q.spoke && p.hat.subset q.hat &&
    match p, q with
    | _, .basic .. => true
    | .six _ f, .six _ g => f.subset g
    | .seven _ f₁ f₂, .seven _ g₁ g₂ => f₁.subset g₁ && f₂.subset g₂
    | .eight _ f₁ f₂ f₃, .eight _ g₁ g₂ g₃ =>
      f₁.subset g₁ && f₂.subset g₂ && f₃.subset g₃
    | _, _ => false

end Sector

/-- An ordered, counterclockwise sequence of sectors around the hub face. -/
abbrev Part := List Sector

/-- Executable orbit arity, using Mathlib's bounded finite-cycle decision procedure. -/
def faceArity {n : ℕ} (H : Hypermap n) (x : Fin n) : ℕ :=
  (Finset.univ.filter (H.face.SameCycle x)).card

theorem faceArity_eq {n : ℕ} (H : Hypermap n) (x : Fin n) :
    faceArity H x = H.faceArity x := by
  unfold faceArity Hypermap.faceArity
  congr 1
  ext y
  simp [Hypermap.faceDarts, Hypermap.SameFace]

/-- Local face addressed by a subpart location: 0 is the spoke; 1 is the hat;
2, 3, and 4 are the three possible fans. -/
def localDart {n : ℕ} (H : Hypermap n) (x : Fin n) : ℕ → Fin n
  | 0 => H.edge x
  | i + 1 => H.edge ((H.face : Fin n → Fin n)^[i + 2] (H.edge x))

namespace Sector

/-- Exact local arity constraints, stated using the original hypermap semantics. -/
def Matches {n : ℕ} (s : Sector) (H : Hypermap n) (x : Fin n) : Prop :=
  s.spoke.Contains (H.faceArity (localDart H x 0)) ∧
  s.hat.Contains (H.faceArity (localDart H x 1)) ∧
  ∀ i : Fin s.fans.length, s.fans[i].Contains (H.faceArity (localDart H x (i + 2)))

def matchBool {n : ℕ} (s : Sector) (H : Hypermap n) (x : Fin n) : Bool :=
  s.spoke.contains (faceArity H (localDart H x 0)) &&
  s.hat.contains (faceArity H (localDart H x 1)) &&
  decide (∀ i : Fin s.fans.length,
    s.fans[i].Contains (faceArity H (localDart H x (i + 2))))

theorem matches_iff {n : ℕ} (s : Sector) (H : Hypermap n) (x : Fin n) :
    s.matchBool H x = true ↔ s.Matches H x := by
  simp [matchBool, Matches, faceArity_eq, ArityRange.contains, and_assoc]

end Sector

namespace Part

def rotate (i : ℕ) (p : Part) : Part := p.drop i ++ p.take i

private def mirrorAux (firstHat : ArityRange) (acc : Part) : Part → Part
  | [] => acc
  | s :: rest =>
    let nextHat := match rest with | [] => firstHat | t :: _ => t.hat
    mirrorAux firstHat (s.reflect nextHat :: acc) rest

/-- The source's reflection across the first spoke, without changing the hub. -/
def mirror (p : Part) : Part :=
  mirrorAux (match p with | [] => .free | s :: _ => s.hat) [] p

/-- Sufficient source-compatible containment of sectors. -/
def subset : Part → Part → Bool
  | _, [] => true
  | [], _ :: _ => false
  | p :: ps, q :: qs => p.subset q && subset ps qs

def sectorFits {n : ℕ} (H : Hypermap n) : Fin n → Part → Prop
  | _, [] => True
  | x, s :: rest => s.Matches H x ∧ sectorFits H (H.face x) rest

def sectorMatches {n : ℕ} (H : Hypermap n) : Fin n → Part → Bool
  | _, [] => true
  | x, s :: rest => s.matchBool H x && sectorMatches H (H.face x) rest

/-- Exact matching includes hub arity, rather than merely matching a partial sector. -/
def Matches {n : ℕ} (p : Part) (H : Hypermap n) (x : Fin n) : Prop :=
  H.faceArity x = p.length ∧ sectorFits H x p

def matchBool {n : ℕ} (p : Part) (H : Hypermap n) (x : Fin n) : Bool :=
  decide (faceArity H x = p.length) && sectorMatches H x p

theorem sectorMatches_iff {n : ℕ} (H : Hypermap n) (x : Fin n) (p : Part) :
    sectorMatches H x p = true ↔ sectorFits H x p := by
  induction p generalizing x with
  | nil => simp [sectorMatches, sectorFits]
  | cons s p ih => simp [sectorMatches, sectorFits, Sector.matches_iff, ih]

theorem matches_iff {n : ℕ} (p : Part) (H : Hypermap n) (x : Fin n) :
    p.matchBool H x = true ↔ p.Matches H x := by
  simp [matchBool, Matches, faceArity_eq, sectorMatches_iff]

end Part

/-- Complete the rule list with source-prescribed reflected patterns.
The rotation is repeated five times, exactly as in `symmetrize_drules`. -/
def symmetrize : List Part → List Part
  | [] => []
  | p :: rest =>
    let reflected := (Part.rotate (p.length - 1))^[5] (Part.mirror p)
    let tail := p :: symmetrize rest
    if p.subset reflected then tail else reflected :: tail

-- BEGIN GENERATED BASE RULES
/-- The 38 base entries preserve all original multiplicities and specializations. -/
def baseRules : List Part := [
  -- drule1
  [.basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free, .basic (.atLeast 6) ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free],
  -- drule1
  [.basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free, .basic (.atLeast 6) ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free],
  -- drule2
  [.basic ArityRange.free ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.atLeast 7) ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free],
  -- drule2'
  [.basic ArityRange.free ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.atLeast 7) ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free],
  -- drule3
  [.basic (.exactly 5) ArityRange.free, .basic (.atMost 6) ArityRange.free, .basic (.atLeast 6) ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free],
  -- drule3'
  [.basic (.exactly 5) ArityRange.free, .basic (.atMost 6) ArityRange.free, .basic (.atLeast 6) ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free],
  -- drule4
  [.basic (.atMost 6) ArityRange.free, .basic (.exactly 5) (.exactly 5), .basic (.atLeast 6) ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free],
  -- drule4'
  [.basic (.atMost 6) ArityRange.free, .basic (.exactly 6) (.exactly 5), .basic (.atLeast 6) ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free],
  -- drule5
  [.basic (.exactly 6) ArityRange.free, .six (.atMost 6) (.exactly 5), .basic (.atLeast 6) ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free],
  -- drule6
  [.basic (.exactly 6) ArityRange.free, .basic (.exactly 5) (.atMost 6), .basic (.atLeast 7) (.exactly 5), .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free],
  -- drule7
  [.basic (.exactly 6) ArityRange.free, .six (.exactly 6) (.atMost 6), .basic (.atLeast 7) (.exactly 5), .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free],
  -- drule8
  [.basic (.exactly 5) ArityRange.free, .basic (.atMost 6) ArityRange.free, .basic (.atLeast 7) ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free],
  -- drule9
  [.basic (.atMost 6) ArityRange.free, .basic (.atMost 6) ArityRange.free, .basic (.atLeast 7) ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free, .basic (.exactly 5) ArityRange.free],
  -- drule10
  [.basic (.exactly 5) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.atLeast 7) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.atLeast 6) ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free],
  -- drule10'
  [.basic (.exactly 5) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.atLeast 7) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free],
  -- drule11
  [.basic (.exactly 6) ArityRange.free, .basic (.exactly 5) (.exactly 5), .basic (.atLeast 7) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.atLeast 6) ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free],
  -- drule12
  [.basic (.exactly 5) ArityRange.free, .basic (.exactly 5) (.exactly 5), .basic (.atLeast 7) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.exactly 5) (.exactly 5), .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free],
  -- drule13
  [.basic (.exactly 6) ArityRange.free, .basic (.exactly 5) (.exactly 5), .basic (.atLeast 8) (.exactly 5), .basic (.exactly 5) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free],
  -- drule14
  [.basic (.exactly 5) ArityRange.free, .basic (.exactly 6) (.exactly 5), .basic (.atLeast 7) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free],
  -- drule15
  [.basic (.exactly 5) ArityRange.free, .basic (.exactly 6) ArityRange.free, .basic (.atLeast 7) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.atLeast 7) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.exactly 6) ArityRange.free],
  -- drule16
  [.basic (.exactly 6) ArityRange.free, .basic (.exactly 6) ArityRange.free, .basic (.atLeast 7) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.exactly 6) ArityRange.free],
  -- drule17
  [.basic (.exactly 5) ArityRange.free, .basic (.exactly 6) (.exactly 6), .basic (.atLeast 7) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.atLeast 7) ArityRange.free, .basic (.exactly 5) ArityRange.free],
  -- drule18
  [.basic (.exactly 6) ArityRange.free, .basic (.exactly 5) (.exactly 5), .basic (.exactly 7) (.exactly 5), .basic (.atLeast 6) ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free, .basic (.exactly 5) ArityRange.free],
  -- drule19
  [.basic (.exactly 6) ArityRange.free, .basic (.atLeast 6) ArityRange.free, .basic (.atLeast 8) ArityRange.free, .basic (.exactly 5) (.exactly 5), .basic (.exactly 6) (.exactly 5), .basic (.exactly 5) ArityRange.free, .basic (.exactly 6) ArityRange.free],
  -- drule20
  [.basic (.exactly 5) ArityRange.free, .basic (.exactly 6) ArityRange.free, .basic (.atLeast 7) ArityRange.free, .basic (.exactly 6) ArityRange.free, .basic (.exactly 6) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.exactly 5) ArityRange.free],
  -- drule21
  [.basic (.atMost 6) ArityRange.free, .basic (.exactly 6) ArityRange.free, .basic (.exactly 7) (.exactly 5), .basic (.atLeast 6) ArityRange.free, .basic ArityRange.free ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.exactly 5) ArityRange.free],
  -- drule22
  [.basic (.exactly 5) ArityRange.free, .basic (.exactly 6) ArityRange.free, .basic (.exactly 7) (.exactly 5), .basic (.atLeast 6) ArityRange.free, .basic ArityRange.free ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.exactly 6) ArityRange.free],
  -- drule23
  [.basic (.exactly 5) ArityRange.free, .basic (.exactly 7) (.exactly 5), .basic (.atLeast 7) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free],
  -- drule24
  [.basic (.exactly 5) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.exactly 7) (.exactly 5), .basic (.atLeast 7) ArityRange.free, .basic (.exactly 6) ArityRange.free, .basic (.exactly 6) ArityRange.free, .basic (.exactly 5) ArityRange.free],
  -- drule25
  [.basic (.exactly 5) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.atLeast 7) ArityRange.free, .seven ArityRange.free ArityRange.free (.exactly 5), .basic (.exactly 5) (.exactly 6), .basic (.exactly 5) ArityRange.free, .basic ArityRange.free ArityRange.free],
  -- drule26
  [.basic (.exactly 6) ArityRange.free, .basic (.exactly 6) ArityRange.free, .basic (.exactly 7) (.exactly 5), .basic (.atLeast 7) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.exactly 6) ArityRange.free],
  -- drule27
  [.basic (.atLeast 7) ArityRange.free, .basic (.exactly 6) ArityRange.free, .seven (.exactly 6) (.exactly 5) (.atLeast 6), .basic (.exactly 7) ArityRange.free, .basic (.atMost 6) (.exactly 5), .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free],
  -- drule28
  [.basic (.exactly 5) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.atLeast 7) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free, .basic (.exactly 5) ArityRange.free],
  -- drule29
  [.basic (.exactly 5) ArityRange.free, .basic (.exactly 5) (.exactly 5), .basic (.atLeast 7) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.exactly 5) ArityRange.free],
  -- drule30
  [.basic (.exactly 5) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.atLeast 7) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.exactly 6) (.exactly 5), .basic (.exactly 5) ArityRange.free, .basic ArityRange.free ArityRange.free, .basic ArityRange.free ArityRange.free],
  -- drule31
  [.basic (.exactly 5) ArityRange.free, .basic (.exactly 5) (.exactly 5), .basic (.atLeast 7) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.exactly 5) (.atLeast 6), .basic (.atLeast 6) ArityRange.free, .basic ArityRange.free ArityRange.free, .basic (.atLeast 6) ArityRange.free],
  -- drule31'
  [.basic (.exactly 5) ArityRange.free, .basic (.exactly 5) (.exactly 5), .basic (.atLeast 7) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.exactly 5) (.exactly 5), .basic (.atLeast 6) ArityRange.free, .basic ArityRange.free ArityRange.free, .basic (.atLeast 6) ArityRange.free],
  -- drule32
  [.basic (.exactly 5) ArityRange.free, .basic (.exactly 6) ArityRange.free, .basic (.exactly 7) (.exactly 5), .basic (.atLeast 7) ArityRange.free, .basic (.exactly 6) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.exactly 5) ArityRange.free, .basic (.exactly 5) ArityRange.free]
]

def rules : List Part := symmetrize baseRules

theorem baseRules_length : baseRules.length = 38 := by decide
theorem rules_length : rules.length = 71 := by decide

/-- Rule-match count transferred from the face of `x` to that of `edge x`. -/
def transferCount {n : ℕ} (H : Hypermap n) (x : Fin n) : ℕ :=
  rules.countP (fun p ↦ p.matchBool H (H.face.symm (H.face.symm x)))

def transfer {n : ℕ} (H : Hypermap n) (x : Fin n) : ℚ :=
  transferCount H x

noncomputable def score {n : ℕ} (H : Hypermap n) (x : Fin n) : ℚ :=
  H.faceCharge (transfer H) x
-- END GENERATED BASE RULES

open scoped BigOperators

/-- The fixed rule counts obey the generic linear bound when every transfer is at most five.
Source: pinned `discharge.v`, `dscore_cap1`, lines 378–389. -/
theorem score_le_of_transfer_cap {n : ℕ} (H : Hypermap n)
    (cap : ∀ y, transferCount H y ≤ 5) (x : Fin n) :
    score H x ≤ 60 - 5 * (H.faceArity x : ℚ) := by
  have bound (y : Fin n) : transfer H (H.edge y) - transfer H y ≤ 5 := by
    have hlo : (0 : ℚ) ≤ transfer H y := by
      exact Nat.cast_nonneg _
    have hhi : transfer H (H.edge y) ≤ (5 : ℚ) := by
      change (transferCount H (H.edge y) : ℚ) ≤ 5
      exact_mod_cast cap (H.edge y)
    linarith
  have hs : (∑ y ∈ H.faceDarts x, (transfer H (H.edge y) - transfer H y)) ≤
      (H.faceArity x : ℚ) * 5 := by
    calc
      _ ≤ ∑ _y ∈ H.faceDarts x, (5 : ℚ) := Finset.sum_le_sum (fun y _ ↦ bound y)
      _ = _ := by simp [Hypermap.faceArity]
  unfold score Hypermap.faceCharge
  linarith

/-- A positive-charge hub has degree at most eleven under the separate transfer cap. -/
theorem positive_score_arity_lt_twelve {n : ℕ} (H : Hypermap n)
    (cap : ∀ y, transferCount H y ≤ 5) (x : Fin n) (positive : 0 < score H x) :
    H.faceArity x < 12 := by
  have h := score_le_of_transfer_cap H cap x
  have hc : (H.faceArity x : ℚ) < 12 := by linarith
  exact_mod_cast hc


end FourColor.Discharge
Source
Georges Gonthier, A Computer-Checked Proof of the Four Colour Theorem (2005), https://www.microsoft.com/en-us/research/wp-content/uploads/2012/10/4colproof.pdf; Section 5.5, PDF p. 45, paragraph on PDF p. 45 giving the unnumbered discharge formula; PDF pp. 44–48, including the 71-pattern paragraph on p. 45. Relevant displays are unnumbered. Pinned executable reference: https://github.com/rocq-community/fourcolor/blob/c1d6b1cd5288bea4b067aac13cdde3c18dffe018/theories/proof/part.v#L159-L175; https://github.com/rocq-community/fourcolor/blob/c1d6b1cd5288bea4b067aac13cdde3c18dffe018/theories/proof/part.v#L603-L626; https://github.com/rocq-community/fourcolor/blob/c1d6b1cd5288bea4b067aac13cdde3c18dffe018/theories/proof/part.v#L801-L852; https://github.com/rocq-community/fourcolor/blob/c1d6b1cd5288bea4b067aac13cdde3c18dffe018/theories/proof/part.v#L892-L927; https://github.com/rocq-community/fourcolor/blob/c1d6b1cd5288bea4b067aac13cdde3c18dffe018/theories/proof/discharge.v#L66-L172; https://github.com/rocq-community/fourcolor/blob/c1d6b1cd5288bea4b067aac13cdde3c18dffe018/theories/proof/discharge.v#L378-L398.
Read-back

What the Lean code literally says, in plain math · gpt-6

ArityRange. An arity range is a natural-number lower endpoint lll and either no upper endpoint or a natural-number upper endpoint uuu. Its data may have u<lu<lu<l; no consistency condition is built into the structure. Equality of these records is decidable.

ArityRange.Contains. For an arity range rrr and natural number mmm, membership means lr≤ml_r\le mlr​≤m and, if an upper endpoint uru_rur​ exists, m≤urm\le u_rm≤ur​. With no upper endpoint only the lower inequality is required. An interval with ur<lru_r<l_rur​<lr​ has no members.

ArityRange.contains and membership decidability. For any range rrr and natural mmm, membership is decidable, and the Boolean membership function returns true exactly for that decision.

ArityRange.free. This is the range with lower endpoint 555 and no upper endpoint; its members are exactly the natural numbers at least 555.

ArityRange.exactly. For any natural mmm, including 000, this range has both endpoints mmm and contains exactly mmm.

ArityRange.atLeast. For any natural mmm, this range has lower endpoint mmm and no upper endpoint, so it contains exactly the natural numbers at least mmm.

ArityRange.atMost. For any natural mmm, this range has lower endpoint 555 and upper endpoint mmm, so it contains exactly the naturals between 555 and mmm inclusive. For m<5m<5m<5 it is empty.

ArityRange.subset. For ranges r,sr,sr,s, the Boolean test first requires ls≤lrl_s\le l_rls​≤lr​. If sss has no upper endpoint the remaining test is true. If sss has an upper endpoint but rrr does not, it is false. If both have upper endpoints, it also requires ur≤usu_r\le u_sur​≤us​. There is no separate treatment of inconsistent or empty ranges.

ArityRange.contains_iff. For every range rrr and natural number mmm, its Boolean membership test is true if and only if lr≤ml_r\le mlr​≤m and every existing upper endpoint of rrr is at least mmm.

ArityRange.subset_sound. For all arity ranges r,sr,sr,s, if their stated endpoint subset test returns true, then every natural number in rrr is in sss. This is a one-directional implication, including possibly empty ranges; the converse is not asserted.

Sector. A sector is one of four forms: a basic sector B(s,h)B(s,h)B(s,h) containing a spoke range sss and a hat range hhh; a six-sector S6(h,a)S_6(h,a)S6​(h,a) containing a hat range and one fan range; a seven-sector S7(h,a,b)S_7(h,a,b)S7​(h,a,b) containing a hat range and two ordered fan ranges; or an eight-sector S8(h,a,b,c)S_8(h,a,b,c)S8​(h,a,b,c) containing a hat range and three ordered fan ranges. The range records may be arbitrary, and sector equality is decidable.

Sector.spoke. The spoke range of B(s,h)B(s,h)B(s,h) is sss; that of S6,S7,S8S_6,S_7,S_8S6​,S7​,S8​ is the singleton range {6},{7},{8}\{6\},\{7\},\{8\}{6},{7},{8} respectively.

Sector.hat. Each of the four sector forms returns its stored hat range.

Sector.fans. A basic sector has the empty fan list. The other three forms return their stored one, two, or three fan ranges in the listed order.

Sector.reflect. Given any replacement hat range hhh, reflection leaves the sector form and its spoke range unchanged, replaces the old hat range by hhh, and reverses the fan order. Thus B(s,a)B(s,a)B(s,a) becomes B(s,h)B(s,h)B(s,h), S6(a,b)S_6(a,b)S6​(a,b) becomes S6(h,b)S_6(h,b)S6​(h,b), S7(a,b,c)S_7(a,b,c)S7​(a,b,c) becomes S7(h,c,b)S_7(h,c,b)S7​(h,c,b), and S8(a,b,c,d)S_8(a,b,c,d)S8​(a,b,c,d) becomes S8(h,d,c,b)S_8(h,d,c,b)S8​(h,d,c,b).

Sector.subset. For sectors p,qp,qp,q, the Boolean test requires the endpoint subset test from the spoke of ppp to the spoke of qqq and from the hat of ppp to the hat of qqq. If qqq is basic, there is no fan condition. If both sectors are six-sectors, both seven-sectors, or both eight-sectors, each corresponding ordered fan range must pass the same endpoint subset test. In all other constructor combinations the test is false, even if some range records are empty.

Part. A part is an arbitrary finite ordered list of sectors; the empty list and repetitions are permitted.

faceArity. For every natural nnn, hypermap HHH on D={0,…,n−1}D=\{0,\ldots,n-1\}D={0,…,n−1}, and dart x∈Dx\in Dx∈D, this is the cardinality of the set of all darts in the same cycle of the face permutation as xxx. A hypermap consists of edge, node, and face permutations e,v,fe,v,fe,v,f with v(f(e(x)))=xv(f(e(x)))=xv(f(e(x)))=x. The arity at a supplied dart is positive; for n=0n=0n=0 there is no dart argument.

faceArity_eq. For every finite hypermap and every dart, the finite-cycle count just defined equals the inherited hypermap face arity, which is the cardinality of the same-face dart set.

localDart. For every finite hypermap with edge and face permutations e,fe,fe,f, dart xxx, and natural index jjj, the local dart is e(x)e(x)e(x) when j=0j=0j=0, and e(fj+1(e(x)))e(f^{j+1}(e(x)))e(fj+1(e(x))) when j≥1j\ge1j≥1. In particular, the first three are e(x)e(x)e(x), e(f2(e(x)))e(f^2(e(x)))e(f2(e(x))), and e(f3(e(x)))e(f^3(e(x)))e(f3(e(x))). Iteration indices are natural numbers; the resulting darts need not be distinct.

Sector.Matches. A sector sss matches at a dart xxx of any finite hypermap if the face arity at local dart 000 lies in its spoke range, the face arity at local dart 111 lies in its hat range, and for every fan-list index iii the face arity at local dart i+2i+2i+2 lies in fan range iii. Here local dart 000 is e(x)e(x)e(x) and local dart j≥1j\ge1j≥1 is e(fj+1(e(x)))e(f^{j+1}(e(x)))e(fj+1(e(x))). For a basic sector the fan condition is vacuous. No distinctness of tested darts is required.

Sector.matchBool. For every sector, finite hypermap, and dart, this Boolean is the conjunction of the spoke, hat, and all fan range-membership tests at those same local darts, using the computable cycle-cardinality version of face arity.

Sector.matches_iff. For every sector, finite hypermap, and dart, the Boolean sector matcher is true if and only if all the spoke, hat, and indexed fan face-arity conditions of Sector.Matches hold.

Part.rotate. For a natural number iii and a part ppp, the result is the list obtained by deleting its first iii entries and then appending those first iii entries. If i≥∣p∣i\ge |p|i≥∣p∣, including an empty part, the result is ppp itself; the index is not first reduced modulo the length.

Part.mirror and its accumulation helper. For a nonempty part [s0,…,sm−1][s_0,\ldots,s_{m-1}][s0​,…,sm−1​], replace each sis_isi​ by its sector reflection with replacement hat equal to the original hat of s(i+1) mod ms_{(i+1)\bmod m}s(i+1)modm​, then reverse the order of the resulting sectors. The empty part yields the empty part. The recursive helper remembers the first original hat, uses the next original sector's hat except at the last sector, and prepends each reflected sector to an accumulator. Its default first hat for an empty input is the range of naturals at least five and does not create an output sector.

Part.subset. This Boolean list test returns true whenever the target list is empty, irrespective of remaining source entries; it returns false for empty source and nonempty target. For two nonempty lists it requires their first sectors to pass Sector.subset and then recurses on both tails. Thus it compares the full target length against a prefix of the source and may ignore surplus source entries.

Part.sectorFits. For a finite hypermap, dart xxx, and part [s0,…,sm−1][s_0,\ldots,s_{m-1}][s0​,…,sm−1​], this predicate requires sis_isi​ to match at fi(x)f^i(x)fi(x) for every 0≤i<m0\le i<m0≤i<m. Equivalently it is true for an empty list, and for a nonempty list it requires the first sector at xxx and the tail at f(x)f(x)f(x). It has no condition equating mmm to the face length, so the face orbit can be traversed repeatedly.

Part.sectorMatches. This Boolean is the sequential conjunction of the Boolean sector tests at x,f(x),…,fm−1(x)x,f(x),\ldots,f^{m-1}(x)x,f(x),…,fm−1(x) for the entries of the part. It returns true on the empty part.

Part.Matches. A part ppp matches at a dart xxx of a finite hypermap exactly when the face arity at xxx equals ∣p∣|p|∣p∣ and each successive sector matches at the corresponding dart fi(x)f^i(x)fi(x). An empty part cannot match a supplied dart, since that dart's face cycle contains the dart itself.

Part.matchBool. The Boolean part matcher checks the equality between the computable face-cycle cardinality and the part length, and conjoins the sequential Boolean sector tests.

Part.sectorMatches_iff. For every finite hypermap, dart, and part, sequential Boolean sector matching is true if and only if every indexed sector matches at the corresponding face iterate. This equivalence also includes the empty part, for which both conditions hold.

Part.matches_iff. For every finite hypermap, dart, and part, the Boolean part matcher is true if and only if the face length equals the list length and all the successive sector conditions hold.

symmetrize. For any finite list of parts, process each original part ppp in order. Form rrr by mirroring ppp and then applying Part.rotate with index ∣p∣−1|p|-1∣p∣−1 exactly five times; subtraction here is natural subtraction, so the index is 000 for an empty part. If the part-prefix subset test from ppp to rrr is true, output only ppp at that position. Otherwise output rrr followed by ppp. Continue recursively through the original list, preserving all original multiplicities. The empty input list yields the empty list.

baseRules. This is the following ordered list of 38 parts, with every repeated entry retained. In this table, F=[5,∞)∩NF=[5,\infty)\cap\mathbb NF=[5,∞)∩N, Ej={j}E_j=\{j\}Ej​={j}, Lj=[j,∞)∩NL_j=[j,\infty)\cap\mathbb NLj​=[j,∞)∩N, and Uj=[5,j]∩NU_j=[5,j]\cap\mathbb NUj​=[5,j]∩N are arity ranges. B(s,h)B(s,h)B(s,h) is a basic sector with spoke sss and hat hhh; S6(h,a)S_6(h,a)S6​(h,a) has spoke exactly six, hat hhh, and the one fan aaa; S7(h,a,b)S_7(h,a,b)S7​(h,a,b) has spoke exactly seven, hat hhh, and ordered fans a,ba,ba,b. Each table row is one entire ordered part. Rows 1 and 2 are identical and occupy two positions in the list.

PositionOrdered part
1[B(F,F),B(F,F),B(L6,F),B(F,F),B(F,F)][B(F,F), B(F,F), B(L_6,F), B(F,F), B(F,F)][B(F,F),B(F,F),B(L6​,F),B(F,F),B(F,F)]
2[B(F,F),B(F,F),B(L6,F),B(F,F),B(F,F)][B(F,F), B(F,F), B(L_6,F), B(F,F), B(F,F)][B(F,F),B(F,F),B(L6​,F),B(F,F),B(F,F)]
3[B(F,F),B(E5,F),B(L7,F),B(F,F),B(F,F)][B(F,F), B(E_5,F), B(L_7,F), B(F,F), B(F,F)][B(F,F),B(E5​,F),B(L7​,F),B(F,F),B(F,F)]
4[B(F,F),B(E5,F),B(L7,F),B(F,F),B(F,F),B(F,F)][B(F,F), B(E_5,F), B(L_7,F), B(F,F), B(F,F), B(F,F)][B(F,F),B(E5​,F),B(L7​,F),B(F,F),B(F,F),B(F,F)]
5[B(E5,F),B(U6,F),B(L6,F),B(F,F),B(F,F)][B(E_5,F), B(U_6,F), B(L_6,F), B(F,F), B(F,F)][B(E5​,F),B(U6​,F),B(L6​,F),B(F,F),B(F,F)]
6[B(E5,F),B(U6,F),B(L6,F),B(F,F),B(F,F),B(F,F)][B(E_5,F), B(U_6,F), B(L_6,F), B(F,F), B(F,F), B(F,F)][B(E5​,F),B(U6​,F),B(L6​,F),B(F,F),B(F,F),B(F,F)]
7[B(U6,F),B(E5,E5),B(L6,F),B(F,F),B(F,F),B(F,F)][B(U_6,F), B(E_5,E_5), B(L_6,F), B(F,F), B(F,F), B(F,F)][B(U6​,F),B(E5​,E5​),B(L6​,F),B(F,F),B(F,F),B(F,F)]
8[B(U6,F),B(E6,E5),B(L6,F),B(F,F),B(F,F),B(F,F)][B(U_6,F), B(E_6,E_5), B(L_6,F), B(F,F), B(F,F), B(F,F)][B(U6​,F),B(E6​,E5​),B(L6​,F),B(F,F),B(F,F),B(F,F)]
9[B(E6,F),S6(U6,E5),B(L6,F),B(F,F),B(F,F),B(F,F)][B(E_6,F), S_6(U_6,E_5), B(L_6,F), B(F,F), B(F,F), B(F,F)][B(E6​,F),S6​(U6​,E5​),B(L6​,F),B(F,F),B(F,F),B(F,F)]
10[B(E6,F),B(E5,U6),B(L7,E5),B(F,F),B(F,F),B(F,F)][B(E_6,F), B(E_5,U_6), B(L_7,E_5), B(F,F), B(F,F), B(F,F)][B(E6​,F),B(E5​,U6​),B(L7​,E5​),B(F,F),B(F,F),B(F,F)]
11[B(E6,F),S6(E6,U6),B(L7,E5),B(F,F),B(F,F),B(F,F)][B(E_6,F), S_6(E_6,U_6), B(L_7,E_5), B(F,F), B(F,F), B(F,F)][B(E6​,F),S6​(E6​,U6​),B(L7​,E5​),B(F,F),B(F,F),B(F,F)]
12[B(E5,F),B(U6,F),B(L7,F),B(F,F),B(F,F),B(F,F),B(F,F)][B(E_5,F), B(U_6,F), B(L_7,F), B(F,F), B(F,F), B(F,F), B(F,F)][B(E5​,F),B(U6​,F),B(L7​,F),B(F,F),B(F,F),B(F,F),B(F,F)]
13[B(U6,F),B(U6,F),B(L7,F),B(F,F),B(F,F),B(F,F),B(E5,F)][B(U_6,F), B(U_6,F), B(L_7,F), B(F,F), B(F,F), B(F,F), B(E_5,F)][B(U6​,F),B(U6​,F),B(L7​,F),B(F,F),B(F,F),B(F,F),B(E5​,F)]
14[B(E5,F),B(E5,F),B(L7,F),B(E5,F),B(L6,F),B(F,F),B(F,F)][B(E_5,F), B(E_5,F), B(L_7,F), B(E_5,F), B(L_6,F), B(F,F), B(F,F)][B(E5​,F),B(E5​,F),B(L7​,F),B(E5​,F),B(L6​,F),B(F,F),B(F,F)]
15[B(E5,F),B(E5,F),B(L7,F),B(E5,F),B(E5,F),B(F,F),B(F,F)][B(E_5,F), B(E_5,F), B(L_7,F), B(E_5,F), B(E_5,F), B(F,F), B(F,F)][B(E5​,F),B(E5​,F),B(L7​,F),B(E5​,F),B(E5​,F),B(F,F),B(F,F)]
16[B(E6,F),B(E5,E5),B(L7,F),B(E5,F),B(L6,F),B(F,F),B(F,F)][B(E_6,F), B(E_5,E_5), B(L_7,F), B(E_5,F), B(L_6,F), B(F,F), B(F,F)][B(E6​,F),B(E5​,E5​),B(L7​,F),B(E5​,F),B(L6​,F),B(F,F),B(F,F)]
17[B(E5,F),B(E5,E5),B(L7,F),B(E5,F),B(E5,E5),B(F,F),B(F,F)][B(E_5,F), B(E_5,E_5), B(L_7,F), B(E_5,F), B(E_5,E_5), B(F,F), B(F,F)][B(E5​,F),B(E5​,E5​),B(L7​,F),B(E5​,F),B(E5​,E5​),B(F,F),B(F,F)]
18[B(E6,F),B(E5,E5),B(L8,E5),B(E5,F),B(E5,F),B(F,F),B(F,F)][B(E_6,F), B(E_5,E_5), B(L_8,E_5), B(E_5,F), B(E_5,F), B(F,F), B(F,F)][B(E6​,F),B(E5​,E5​),B(L8​,E5​),B(E5​,F),B(E5​,F),B(F,F),B(F,F)]
19[B(E5,F),B(E6,E5),B(L7,F),B(E5,F),B(F,F),B(F,F),B(F,F)][B(E_5,F), B(E_6,E_5), B(L_7,F), B(E_5,F), B(F,F), B(F,F), B(F,F)][B(E5​,F),B(E6​,E5​),B(L7​,F),B(E5​,F),B(F,F),B(F,F),B(F,F)]
20[B(E5,F),B(E6,F),B(L7,F),B(E5,F),B(L7,F),B(E5,F),B(E6,F)][B(E_5,F), B(E_6,F), B(L_7,F), B(E_5,F), B(L_7,F), B(E_5,F), B(E_6,F)][B(E5​,F),B(E6​,F),B(L7​,F),B(E5​,F),B(L7​,F),B(E5​,F),B(E6​,F)]
21[B(E6,F),B(E6,F),B(L7,F),B(E5,F),B(E5,F),B(E5,F),B(E6,F)][B(E_6,F), B(E_6,F), B(L_7,F), B(E_5,F), B(E_5,F), B(E_5,F), B(E_6,F)][B(E6​,F),B(E6​,F),B(L7​,F),B(E5​,F),B(E5​,F),B(E5​,F),B(E6​,F)]
22[B(E5,F),B(E6,E6),B(L7,F),B(E5,F),B(E5,F),B(L7,F),B(E5,F)][B(E_5,F), B(E_6,E_6), B(L_7,F), B(E_5,F), B(E_5,F), B(L_7,F), B(E_5,F)][B(E5​,F),B(E6​,E6​),B(L7​,F),B(E5​,F),B(E5​,F),B(L7​,F),B(E5​,F)]
23[B(E6,F),B(E5,E5),B(E7,E5),B(L6,F),B(F,F),B(F,F),B(E5,F)][B(E_6,F), B(E_5,E_5), B(E_7,E_5), B(L_6,F), B(F,F), B(F,F), B(E_5,F)][B(E6​,F),B(E5​,E5​),B(E7​,E5​),B(L6​,F),B(F,F),B(F,F),B(E5​,F)]
24[B(E6,F),B(L6,F),B(L8,F),B(E5,E5),B(E6,E5),B(E5,F),B(E6,F)][B(E_6,F), B(L_6,F), B(L_8,F), B(E_5,E_5), B(E_6,E_5), B(E_5,F), B(E_6,F)][B(E6​,F),B(L6​,F),B(L8​,F),B(E5​,E5​),B(E6​,E5​),B(E5​,F),B(E6​,F)]
25[B(E5,F),B(E6,F),B(L7,F),B(E6,F),B(E6,F),B(E5,F),B(E5,F)][B(E_5,F), B(E_6,F), B(L_7,F), B(E_6,F), B(E_6,F), B(E_5,F), B(E_5,F)][B(E5​,F),B(E6​,F),B(L7​,F),B(E6​,F),B(E6​,F),B(E5​,F),B(E5​,F)]
26[B(U6,F),B(E6,F),B(E7,E5),B(L6,F),B(F,F),B(E5,F),B(E5,F)][B(U_6,F), B(E_6,F), B(E_7,E_5), B(L_6,F), B(F,F), B(E_5,F), B(E_5,F)][B(U6​,F),B(E6​,F),B(E7​,E5​),B(L6​,F),B(F,F),B(E5​,F),B(E5​,F)]
27[B(E5,F),B(E6,F),B(E7,E5),B(L6,F),B(F,F),B(E5,F),B(E6,F)][B(E_5,F), B(E_6,F), B(E_7,E_5), B(L_6,F), B(F,F), B(E_5,F), B(E_6,F)][B(E5​,F),B(E6​,F),B(E7​,E5​),B(L6​,F),B(F,F),B(E5​,F),B(E6​,F)]
28[B(E5,F),B(E7,E5),B(L7,F),B(E5,F),B(F,F),B(F,F),B(F,F)][B(E_5,F), B(E_7,E_5), B(L_7,F), B(E_5,F), B(F,F), B(F,F), B(F,F)][B(E5​,F),B(E7​,E5​),B(L7​,F),B(E5​,F),B(F,F),B(F,F),B(F,F)]
29[B(E5,F),B(E5,F),B(E7,E5),B(L7,F),B(E6,F),B(E6,F),B(E5,F)][B(E_5,F), B(E_5,F), B(E_7,E_5), B(L_7,F), B(E_6,F), B(E_6,F), B(E_5,F)][B(E5​,F),B(E5​,F),B(E7​,E5​),B(L7​,F),B(E6​,F),B(E6​,F),B(E5​,F)]
30[B(E5,F),B(E5,F),B(L7,F),S7(F,F,E5),B(E5,E6),B(E5,F),B(F,F)][B(E_5,F), B(E_5,F), B(L_7,F), S_7(F,F,E_5), B(E_5,E_6), B(E_5,F), B(F,F)][B(E5​,F),B(E5​,F),B(L7​,F),S7​(F,F,E5​),B(E5​,E6​),B(E5​,F),B(F,F)]
31[B(E6,F),B(E6,F),B(E7,E5),B(L7,F),B(E5,F),B(E5,F),B(E6,F)][B(E_6,F), B(E_6,F), B(E_7,E_5), B(L_7,F), B(E_5,F), B(E_5,F), B(E_6,F)][B(E6​,F),B(E6​,F),B(E7​,E5​),B(L7​,F),B(E5​,F),B(E5​,F),B(E6​,F)]
32[B(L7,F),B(E6,F),S7(E6,E5,L6),B(E7,F),B(U6,E5),B(F,F),B(F,F)][B(L_7,F), B(E_6,F), S_7(E_6,E_5,L_6), B(E_7,F), B(U_6,E_5), B(F,F), B(F,F)][B(L7​,F),B(E6​,F),S7​(E6​,E5​,L6​),B(E7​,F),B(U6​,E5​),B(F,F),B(F,F)]
33[B(E5,F),B(E5,F),B(L7,F),B(E5,F),B(E5,F),B(F,F),B(F,F),B(E5,F)][B(E_5,F), B(E_5,F), B(L_7,F), B(E_5,F), B(E_5,F), B(F,F), B(F,F), B(E_5,F)][B(E5​,F),B(E5​,F),B(L7​,F),B(E5​,F),B(E5​,F),B(F,F),B(F,F),B(E5​,F)]
34[B(E5,F),B(E5,E5),B(L7,F),B(E5,F),B(F,F),B(F,F),B(E5,F),B(E5,F)][B(E_5,F), B(E_5,E_5), B(L_7,F), B(E_5,F), B(F,F), B(F,F), B(E_5,F), B(E_5,F)][B(E5​,F),B(E5​,E5​),B(L7​,F),B(E5​,F),B(F,F),B(F,F),B(E5​,F),B(E5​,F)]
35[B(E5,F),B(E5,F),B(L7,F),B(E5,F),B(E6,E5),B(E5,F),B(F,F),B(F,F)][B(E_5,F), B(E_5,F), B(L_7,F), B(E_5,F), B(E_6,E_5), B(E_5,F), B(F,F), B(F,F)][B(E5​,F),B(E5​,F),B(L7​,F),B(E5​,F),B(E6​,E5​),B(E5​,F),B(F,F),B(F,F)]
36[B(E5,F),B(E5,E5),B(L7,F),B(E5,F),B(E5,L6),B(L6,F),B(F,F),B(L6,F)][B(E_5,F), B(E_5,E_5), B(L_7,F), B(E_5,F), B(E_5,L_6), B(L_6,F), B(F,F), B(L_6,F)][B(E5​,F),B(E5​,E5​),B(L7​,F),B(E5​,F),B(E5​,L6​),B(L6​,F),B(F,F),B(L6​,F)]
37[B(E5,F),B(E5,E5),B(L7,F),B(E5,F),B(E5,E5),B(L6,F),B(F,F),B(L6,F)][B(E_5,F), B(E_5,E_5), B(L_7,F), B(E_5,F), B(E_5,E_5), B(L_6,F), B(F,F), B(L_6,F)][B(E5​,F),B(E5​,E5​),B(L7​,F),B(E5​,F),B(E5​,E5​),B(L6​,F),B(F,F),B(L6​,F)]
38[B(E5,F),B(E6,F),B(E7,E5),B(L7,F),B(E6,F),B(E5,F),B(E5,F),B(E5,F)][B(E_5,F), B(E_6,F), B(E_7,E_5), B(L_7,F), B(E_6,F), B(E_5,F), B(E_5,F), B(E_5,F)][B(E5​,F),B(E6​,F),B(E7​,E5​),B(L7​,F),B(E6​,F),B(E5​,F),B(E5​,F),B(E5​,F)]

rules. This is exactly the list obtained from the specified 38-entry base list by symmetrize: each base part contributes either itself or its computed reflected part followed by itself according to the stated subset test. It is a list with multiplicities, not a set of distinct conditions.

baseRules_length. The length of the specified base-rule list is exactly 383838.

rules_length. The length of the symmetrized rule list is exactly 717171.

transferCount. For any natural nnn, hypermap HHH with face permutation fff, and dart xxx, the transfer count is the number of positions in the 71-entry rule list whose part matcher accepts at f−1(f−1(x))f^{-1}(f^{-1}(x))f−1(f−1(x)). Thus a rule contributes one for each list occurrence, including repetitions. Part matching requires equality of the tested face length and the part length and all the specified sector arity conditions along that face. The count is a natural number between 000 and 717171; no admissibility condition is assumed on HHH.

transfer. For every finite hypermap and dart, transfer is its transfer count regarded as a rational number.

score. For any finite hypermap with edge permutation eee, dart xxx, face-cycle set F(x)F(x)F(x), face length a(x)=∣F(x)∣a(x)=|F(x)|a(x)=∣F(x)∣, and transfer-count function TTT, the rational score is

60−10a(x)+∑y∈F(x)(T(e(y))−T(y)).60-10a(x)+\sum_{y\in F(x)}\bigl(T(e(y))-T(y)\bigr).60−10a(x)+y∈F(x)∑​(T(e(y))−T(y)).

Here T(y)T(y)T(y) counts, with multiplicity, the rules accepting at the double inverse-face iterate of yyy, and its natural values are cast to rationals. The definition imposes no bound of five on TTT and no planarity or plainness hypothesis.

score_le_of_transfer_cap. For every natural nnn, hypermap HHH on nnn darts, and dart xxx, if T(y)≤5T(y)\le5T(y)≤5 for every dart yyy of HHH, then its score as defined by the rational face sum satisfies score⁡H(x)≤60−5a(x)\operatorname{score}_H(x)\le60-5a(x)scoreH​(x)≤60−5a(x). The cap is assumed on all darts. No geometric hypothesis on HHH is needed; when n=0n=0n=0 there is no choice of xxx.

positive_score_arity_lt_twelve. For every finite hypermap and dart xxx, if every dart's rule-transfer count is at most five and the rational score at xxx is strictly positive, then its face length satisfies the strict inequality a(x)<12a(x)<12a(x)<12. The conclusion follows under precisely that global cap and strict positivity, without an additional face-length lower bound or admissibility assumption.

Human review
  • Endorsed by Shuze Chen · Sep 27, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Minghui · Sep 27, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me