AFTD Auto-Formalizing Theoretical Domains

dedekind_number

def

The n-th Dedekind number d_n is the number of monotone Boolean functions on n variables, defined as the cardinality of the poset of monotone functions from {0, 1}^n to {0, 1}.

Statement

noncomputable def dedekind_number (n : ℕ) : ℕ
Defined in
arXiv:2611.13887 Section 1
Verified
12 Nov 2026
Axioms
none listed
Built on 3
  • inst_fintype_orderHomThe type of order-preserving maps between two finite partial orders is finite.
  • TotalPreorderA total preorder: a preorder where ≤ is total (complete). This is weaker than LinearOrder — it does NOT require antisymmetry or…
  • LinearOrder.toTotalPreorderEvery LinearOrder is a TotalPreorder.
Used by 2

Read back from the Lean

The function dedekind_number, given a natural number n, is defined as the cardinality of the type of order-preserving (monotone) functions from Fin n → Bool to Bool (with Bool ordered by false ≤ true and functions ordered pointwise).

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 n-th Dedekind number, the cardinality of the poset of monotone Boolean functions on n variables. -/
noncomputable def dedekind_number (n : ℕ) : ℕ := Fintype.card ((Fin n → Bool) →o Bool)
See it in the graphDiscuss this resultChallenge it