AFTD Auto-Formalizing Theoretical Domains

numerical_semigroup_genus

def

The genus of a numerical semigroup S is the natural number defined as the cardinality of its complement in ℕ: Set.ncard ((S.toAddSubmonoid : Set ℕ)ᶜ).

Statement

noncomputable def numerical_semigroup_genus (S : NumericalSemigroup) : ℕ
Defined in
arXiv:2611.11559
Verified
10 Nov 2026
Axioms
none listed
Built on 1
  • NumericalSemigroupA numerical semigroup is an additive submonoid of the natural numbers whose complement in ℕ is finite.
Used by 5

Read back from the Lean

The function numerical_semigroup_genus takes a numerical semigroup $S$ (defined as an additive submonoid of $\mathbb{N}$ whose complement in $\mathbb{N}$ is finite) and returns the cardinality (as a natural number via Set.ncard) of the complement of $S$ in $\mathbb{N}$ (that is, the number of natural numbers not belonging to $S$).

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

/-- The genus of a numerical semigroup is the cardinality of its complement in ℕ. -/
noncomputable def numerical_semigroup_genus (S : NumericalSemigroup) : ℕ := Set.ncard ((S.toAddSubmonoid : Set ℕ)ᶜ)
See it in the graphDiscuss this resultChallenge it