AFTD Auto-Formalizing Theoretical Domains

ArrowTheorem.prod_finset_eq_prod_univ_ite

theoremverifiedimported Lean

Product over a finset as an indicator product. Let $A \subseteq \mathrm{Fin}\,n$ be a finite set of indices and let $g : \mathrm{Fin}\,n \to \bbr$. Then \[ \prod_{j \in A} g(j) \;=\; \prod_{j : \mathrm{Fin}\,n} \begin{cases} g(j) & \text{if } j \in A, \\ 1 & \text{if } j \notin A, \end{cases} \] so that a product taken only over the members of $A$ may equivalently be written as a product over all of $\mathrm{Fin}\,n$ in which each factor outside $A$ is replaced by $1$.

Statement

set_option maxHeartbeats 800000 in
open scoped BigOperators in
variable {n : ℕ} in
lemma ArrowTheorem.prod_finset_eq_prod_univ_ite {n : ℕ} (A : Finset (Fin n)) (g : Fin n → ℝ) :
    ∏ j ∈ A, g j = ∏ j : Fin n, if j ∈ A then g j else 1
Source
TCSlib, `ArrowTheorem.prod_finset_eq_prod_univ_ite`
Lean proof
By Mina, Allan Li, Owen McGinty (from the file's git history), from github.com/Shilun-Allan-Li/tcslib at c8a02591b1e5 (Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.25.0.
Verified
07 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Used by 1
  • ArrowTheorem.profile_kernel_genGeneral profile kernel for paired preference assignments. Let $x, y : \mathrm{Fin}\,6 \to \mathrm{Bool}$ be two preference assignments…

Lean source view module on GitHub

set_option maxHeartbeats 800000 inopen scoped BigOperators invariable {n : ℕ} in/-- Key helper: rewrite a product over a Finset as a product over Fin n with indicator. -/lemma ArrowTheorem.prod_finset_eq_prod_univ_ite {n : ℕ} (A : Finset (Fin n)) (g : Fin n → ℝ) :    ∏ j ∈ A, g j = ∏ j : Fin n, if j ∈ A then g j else 1 := by  rw [← Finset.prod_filter]; congr 1; simp
See it in the graphDiscuss this resultChallenge it