English
In a commutative semiring, for any a,b we have the expansion (a+b)^n = sum over s ⊆ {1,...,n} of a^{|s|} b^{n-|s|}. Here the sum is taken over all finite subsets s of Fin n, yielding (a^|s|)(b^{n-|s|}).
Русский
В коммутативном полускольном кольце выполняется биномиальная формула: (a+b)^n = сумма по подмножествам s ⊆ {1,...,n} от a^{|s|} b^{n-|s|}.
LaTeX
$$$$\\sum_{s \\in \\mathrm{Finset.univ}} a^{|s|} b^{n-|s|} = (a+b)^n.$$$$
Lean4
theorem sum_pow_mul_eq_add_pow {n : ℕ} {R : Type*} [CommSemiring R] (a b : R) :
(∑ s : Finset (Fin n), a ^ s.card * b ^ (n - s.card)) = (a + b) ^ n := by
simpa using Fintype.sum_pow_mul_eq_add_pow (Fin n) a b