has_constant_level_card
A function f : α → ℤ on a finite type with decidable equality has constant level cardinality if any two non-empty fibers have the same cardinality: for all integers j and k, if the fiber of j is non-empty and the fiber of k is non-empty, then their cardinalities are equal.
Statement
def has_constant_level_card {α : Type*} [Fintype α] [DecidableEq α] (f : α → ℤ) : Prop
- Defined in
- arXiv:2610.24148, Section 4.1
- Verified
- 21 Oct 2026
- Axioms
- none listed
Read back from the Lean
For a finite type α with decidable equality and a function f : α → ℤ, has_constant_level_card f asserts that for every pair of integers j and k, if the fiber f⁻¹({j}) (the finset of elements x : α with f x = j) is nonempty and the fiber f⁻¹({k}) is nonempty, then their cardinalities are equal (that is, all nonempty fibers / level sets of f have the same cardinality).
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
/-- A function has constant level cardinality if all non-empty fibers have equal size. -/ def has_constant_level_card {α : Type*} [Fintype α] [DecidableEq α] (f : α → ℤ) : Prop := ∀ j k : ℤ, (Finset.univ.filter (fun x : α => f x = j)).Nonempty → (Finset.univ.filter (fun x : α => f x = k)).Nonempty → (Finset.univ.filter (fun x : α => f x = j)).card = (Finset.univ.filter (fun x : α => f x = k)).card