AFTD Auto-Formalizing Theoretical Domains

bh_counting

def

For a set of natural numbers A and a positive integer n, A(n) is the cardinality of A ∩ {1, ..., n}.

Statement

open scoped Classical in
noncomputable def bh_counting (A : Set ℕ) (n : ℕ) : ℕ
Defined in
arXiv:2611.01871, Sec. 1, line 96
Verified
04 Nov 2026
Axioms
none listed
Used by 1
  • bh_upper_density_ge_of_subsequenceIf a set A has normalized counting function at least c along a strictly increasing sequence of checkpoints, and the normalized counting…

Read back from the Lean

bh_counting A n is defined as the cardinality of the finite set of natural numbers $x \in \{1, \dots, n\}$ such that $x \in A$ (the counting function of $A$ up to $n$).

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

open scoped Classical in
/-- The counting function A(n) = |A ∩ [1, n]| of a set A ⊆ ℕ. -/
noncomputable def bh_counting (A : Set ℕ) (n : ℕ) : ℕ := ((Finset.Icc 1 n).filter (· ∈ A)).card
See it in the graphDiscuss this resultChallenge it