{
  "id": "8645",
  "ident": "NS.08645",
  "slug": "wikipedia-wilfnumericalsemigroupconjecture",
  "title": "Wilf's Conjecture on Numerical Semigroups",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "**Wilf's Conjecture** [Wi78]: Every numerical semigroup $S \\le \\mathbb{N}$ obeys\n$c(S) \\le e(S) \\cdot n(S)$.",
  "subjects": [
    "math.NT",
    "math.GR",
    "msc:11",
    "msc:20"
  ],
  "tags": [],
  "collection": "wikipedia",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "WilfNumericalSemigroupConjecture.wilf_numerical_semigroup_conjecture",
  "statement_lean": "theorem wilf_numerical_semigroup_conjecture {S : AddSubmonoid ℕ} (hS : IsNumericalSemigroup S) :\n    conductor S ≤ embeddingDim S * sporadicCount S",
  "challenge_source": "/-\nCopyright 2026 The Formal Conjectures Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-/\nmodule\n\npublic import FormalConjecturesUtil\n\n/-!\n# Wilf's Conjecture on Numerical Semigroups\n\nAn additive submonoid $S \\le \\mathbb{N}$ with finite complement $G(S) = \\mathbb{N} \\setminus S$\nforms a *numerical semigroup*. Write\n$c(S) = \\min\\{c \\in \\mathbb{N} : \\forall m \\ge c,\\, m \\in S\\}$\nfor its conductor, $n(S) = |S \\cap [0, c(S))| = c(S) - |G(S)|$ for the count of sporadic elements\nbelow $c(S)$, and $e(S) = |S_{>0} \\setminus (S_{>0} + S_{>0})|$ for its embedding dimension (the\nsize of its unique minimal generating set).\n\nHerbert S. Wilf [Wi78] conjectured that $c(S) \\le e(S) \\cdot n(S)$ holds for all numerical\nsemigroups $S$ (equivalently $e(S) \\ge (F(S) + 1) / (F(S) + 1 - |G(S)|)$ when $S \\subsetneq\n\\mathbb{N}$ has largest gap $F(S) = c(S) - 1$, as stated on Wikipedia's Coin problem page).\nFröberg, Gottlieb, and Häggkvist [FGH87, Theorem 20] proved the inequality whenever $e(S) \\le 3$\n(sourced directly from [FGH87]); the general case remains open.\n\n*References:*\n- [Wi78] H. S. Wilf, *A circle-of-lights algorithm for the \"money-changing problem\"*, Amer. Math.\n  Monthly **85** (1978), no. 7, 562–565, DOI: `10.1080/00029890.1978.11994639`.\n- [FGH87] R. Fröberg, C. Gottlieb, and R. Häggkvist, *On numerical semigroups*, Semigroup Forum\n  **35** (1987), no. 1, 63–83, DOI: `10.1007/BF02573091`.\n- [Wikipedia: Coin problem — Wilf's conjecture](https://en.wikipedia.org/wiki/Coin_problem#Wilf%27s_conjecture)\n-/\n\n@[expose] public section\n\nnamespace WilfNumericalSemigroupConjecture\n\nopen AddSubmonoid\n\n/-- Count $n(S)$ of elements in $S$ strictly below `conductor S`. -/\nnoncomputable def sporadicCount (S : AddSubmonoid ℕ) : ℕ :=\n  open scoped Classical in\n  ((Finset.range (conductor S)).filter (fun x => x ∈ S)).card\n\n/-- On `⊤ : AddSubmonoid ℕ`, `conductor ⊤ = 0`, `sporadicCount ⊤ = 0`, and `embeddingDim ⊤ = 1`,\nsatisfying $0 \\le 1 \\cdot 0$. -/\n@[category test, AMS 11 20]\ntheorem top_numericalSemigroup_invariants :\n    IsNumericalSemigroup ⊤ ∧\n      conductor ⊤ = 0 ∧\n      sporadicCount ⊤ = 0 ∧\n      embeddingDim ⊤ = 1 := by\n  simp [sporadicCount]\n\n/-- On $S_{2,3} = \\langle 2, 3 \\rangle = \\mathbb{N} \\setminus \\{1\\}$, `conductor = 2`,\n`sporadicCount = 1`, and `embeddingDim = 2`, attaining equality $2 = 2 \\cdot 1$. -/\n@[category test, AMS 11 20]\ntheorem numericalSemigroup_two_three_wilf_tight :\n    let S₂₃ : AddSubmonoid ℕ :=\n      { carrier := {n : ℕ | n ≠ 1}, zero_mem' := Nat.zero_ne_one\n        add_mem' := fun {a b} (ha : a ≠ 1) (hb : b ≠ 1) (h : a + b = 1) =>\n          absurd (show a = 1 ∨ b = 1 by omega) (by tauto) }\n    IsNumericalSemigroup S₂₃ ∧ conductor S₂₃ = 2 ∧\n      sporadicCount S₂₃ = 1 ∧ embeddingDim S₂₃ = 2 := by\n  intro S₂₃\n  have hmem (n : ℕ) : n ∈ S₂₃ ↔ n ≠ 1 := Iff.rfl\n  have hc2 : conductor S₂₃ = 2 := le_antisymm\n    (Nat.sInf_le fun m hm => (hmem m).mpr (by omega))\n    (le_csInf ⟨2, fun m hm => (hmem m).mpr (by omega)⟩ fun c hc =>\n      by by_contra!; exact (hmem 1).mp (hc 1 (by omega)) rfl)\n  refine ⟨by simp [IsNumericalSemigroup, show (S₂₃ : Set ℕ)ᶜ = {1} by ext; simp [hmem]],\n    hc2, by classical simp [sporadicCount, hc2,\n      show (Finset.range 2).filter (· ∈ S₂₃) = {0} by ext; simp [hmem]; omega], ?_⟩\n  have hset : {x : ℕ | 0 < x ∧ x ∈ S₂₃ ∧\n      ¬ ∃ a b : ℕ, 0 < a ∧ 0 < b ∧ a ∈ S₂₃ ∧ b ∈ S₂₃ ∧ x = a + b} = {2, 3} := by\n    ext x; simp only [Set.mem_ofPred_eq, Set.mem_insert_iff, Set.mem_singleton_iff, hmem]\n    refine ⟨fun ⟨_, _, hmin⟩ => ?_, fun h => by rcases h with rfl | rfl <;>\n      exact ⟨by omega, by omega, fun ⟨a, b, _⟩ => by omega⟩⟩\n    by_cases hx : x ≤ 3; · omega\n    exact (if h4 : x = 4 then hmin ⟨2, 2, by omega, by omega, by omega, by omega, by omega⟩ else\n      hmin ⟨2, x - 2, by omega, by omega, by omega, by omega, by omega⟩).elim\n  rw [embeddingDim, hset, Set.ncard_pair (by decide)]\n\n/-- **Wilf's Conjecture** [Wi78]: Every numerical semigroup $S \\le \\mathbb{N}$ obeys\n$c(S) \\le e(S) \\cdot n(S)$. -/\n@[category research open, AMS 11 20]\ntheorem wilf_numerical_semigroup_conjecture {S : AddSubmonoid ℕ} (hS : IsNumericalSemigroup S) :\n    conductor S ≤ embeddingDim S * sporadicCount S := by\n  sorry\n\n/-- **Fröberg–Gottlieb–Häggkvist Theorem** [FGH87, Theorem 20]: Every numerical semigroup\n$S \\le \\mathbb{N}$ with embedding dimension $e(S) \\le 3$ satisfies $c(S) \\le e(S) \\cdot n(S)$. -/\n@[category research solved, AMS 11 20]\ntheorem wilf_conjecture_embedding_dim_le_three {S : AddSubmonoid ℕ} (hS : IsNumericalSemigroup S)\n    (he : embeddingDim S ≤ 3) :\n    conductor S ≤ embeddingDim S * sporadicCount S := by\n  sorry\n\nend WilfNumericalSemigroupConjecture\n",
  "statement_hash": "f6f3fe8071cac76de187fc88b0c0b588fe78548cc3a69eea309ddbed56bf3621",
  "toolchain": "leanprover/lean4:v4.33.1",
  "upstream_commit": "f9b3868d5ca994a7bf95039bcec05338c0c21e2f",
  "workspace": "formal-conjectures",
  "field": "math",
  "formalization": "formal",
  "verification": "lean-kernel",
  "license": "Apache-2.0",
  "attribution": "google-deepmind/formal-conjectures contributors",
  "metric_name": null,
  "metric_direction": null,
  "critiques": [],
  "public_partial_proofs": [],
  "research_threads": [],
  "instructions": "Read research_threads first: other people's public repositories and what they already tried. Write Solution.lean starting from challenge_source. Keep every definition identical, prove decl_name with exactly the same type, no sorry in its dependency closure, no new axioms, no native_decide, no metaprogramming. Submit with POST /api/v1/submissions."
}