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
- not_numerical_semigroup_frobenius_le_two_mul_genusThe statement
numerical_semigroup_frobenius_le_two_mul_genusis false: The structure NumericalSemigroup only requires the complement of… - numerical_semigroup_countThe counting function n_{F,m,g} of numerical semigroups, defined as the number (cardinality) of numerical semigroups with Frobenius number…
- numerical_semigroup_count_of_dvd_frobeniusIf F is a positive integer and m divides F, then the number of numerical semigroups with Frobenius number F, multiplicity m, and genus g…
- not_numerical_semigroup_count_fibonacci_recurrenceThe statement
numerical_semigroup_count_fibonacci_recurrenceis false: The identity is false. Take F = 3, m = 2, g = 2: indeed F + 2 = 5… - numerical_semigroup_exists_at_m_eq_succ_frobeniusFor every positive integer F, there exists a numerical semigroup S with Frobenius number F, multiplicity F + 1, and genus F.
- not_numerical_semigroup_frobenius_le_two_mul_genusThe statement
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 ℕ)ᶜ)