AFTD Auto-Formalizing Theoretical Domains

charity

def

Given natural numbers m and n and an allocation X : Fin n → Finset (Fin m), charity X is the finset of items in Fin m not allocated to any agent, defined as Finset.univ \ Finset.univ.biUnion X.

Statement

def charity {m n : ℕ} (X : Fin n → Finset (Fin m)) : Finset (Fin m)
Defined in
arXiv:2611.12740 Section 2
Verified
11 Nov 2026
Axioms
none listed
Used by 1
  • charity_emptyFor any natural numbers m and n, the charity of the empty allocation (fun _ => ∅) : Fin n → Finset (Fin m) equals Finset.univ.

Read back from the Lean

Given natural numbers $m$ and $n$, and a family of finite sets $X$ indexed by $\mathrm{Fin}(n)$ whose elements are drawn from $\mathrm{Fin}(m)$, charity X is defined as the complement in $\mathrm{Fin}(m)$ of the union of all $X(i)$ for $i \in \mathrm{Fin}(n)$ (that is, the set of all elements in $\mathrm{Fin}(m)$ that do not belong to $X(i)$ for any $i$).

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 charity set of an allocation is the finset of unallocated items in Fin m. -/
def charity {m n : ℕ} (X : Fin n → Finset (Fin m)) : Finset (Fin m) := Finset.univ \ Finset.univ.biUnion X
See it in the graphDiscuss this resultChallenge it