English
By iterating over a finite type, one can lift an existential statement ∃ a, P a to a truncation of the dependent sum Σ' a, P a.
Русский
Перебивая элементы конечного типа, можно заменить существование ∃ a, P a на усечённый сопряжённый суммовый тип Σ' a, P a.
LaTeX
$$$$ \\text{truncSigmaOfExists} \\; {α} \\; [Fintype α] \\; {P : α → Prop} \\; (h : ∃ a, P a) : Trunc (\\Sigma' a, P a). $$$$
Lean4
/-- Given that `α × β` is a fintype, `α` is also a fintype. -/
def prodLeft {α β} [DecidableEq α] [Fintype (α × β)] [Nonempty β] : Fintype α :=
⟨(@univ (α × β) _).image Prod.fst, fun a => by simp⟩