AFTD Auto-Formalizing Theoretical Domains

is_two_type_allocation

def

An allocation of a goods of type A and b goods of type B among n agents is a pair of non-negative integer count vectors (x, y) summing to a and b respectively.

Statement

def is_two_type_allocation (n a b : ℕ) (x y : Fin n → ℕ) : Prop
Defined in
arXiv:2610.19099
Verified
28 Oct 2026
Axioms
none listed
Used by 3

Read back from the Lean

Given natural numbers $n$, $a$, and $b$, and two functions $x, y : \mathrm{Fin}\ n \to \mathbb{N}$, is_two_type_allocation n a b x y asserts that the sum of $x(i)$ over all $i \in \mathrm{Fin}\ n$ equals $a$, and the sum of $y(i)$ over all $i \in \mathrm{Fin}\ n$ equals $b$.

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

/-- Complete count allocation of two types of goods with counts a and b among n agents. -/
def is_two_type_allocation (n a b : ℕ) (x y : Fin n → ℕ) : Prop := (∑ i, x i = a) ∧ (∑ i, y i = b)
See it in the graphDiscuss this resultChallenge it