The binomial theorem for the integers
Content created by Egbert Rijke, Fredrik Bakke, Jonathan Prieto-Cubides and Gregor Perčič.
Created on 2023-02-20.
Last modified on 2024-10-29.
module elementary-number-theory.binomial-theorem-integers where
Imports
open import commutative-algebra.binomial-theorem-commutative-rings open import elementary-number-theory.addition-integers open import elementary-number-theory.distance-natural-numbers open import elementary-number-theory.integers open import elementary-number-theory.multiplication-integers open import elementary-number-theory.natural-numbers open import elementary-number-theory.powers-integers open import elementary-number-theory.ring-of-integers open import foundation.homotopies open import foundation.identity-types open import linear-algebra.vectors open import univalent-combinatorics.standard-finite-types
Idea
The binomial theorem for the integers asserts that for any two integers x
and
y
and any natural number n
, we have
(x + y)ⁿ = ∑_{0 ≤ i < n+1} (n choose i) xⁱ yⁿ⁻ⁱ.
The binomial theorem is the 44th theorem on Freek Wiedijk’s list of 100 theorems [Wie].
Definitions
Binomial sums
binomial-sum-ℤ : (n : ℕ) (f : functional-vec ℤ (succ-ℕ n)) → ℤ binomial-sum-ℤ = binomial-sum-Commutative-Ring ℤ-Commutative-Ring
Properties
Binomial sums of one and two elements
binomial-sum-one-element-ℤ : (f : functional-vec ℤ 1) → binomial-sum-ℤ 0 f = head-functional-vec 0 f binomial-sum-one-element-ℤ = binomial-sum-one-element-Commutative-Ring ℤ-Commutative-Ring binomial-sum-two-elements-ℤ : (f : functional-vec ℤ 2) → binomial-sum-ℤ 1 f = (f (zero-Fin 1)) +ℤ (f (one-Fin 1)) binomial-sum-two-elements-ℤ = binomial-sum-two-elements-Commutative-Ring ℤ-Commutative-Ring
Binomial sums are homotopy invariant
htpy-binomial-sum-ℤ : (n : ℕ) {f g : functional-vec ℤ (succ-ℕ n)} → (f ~ g) → binomial-sum-ℤ n f = binomial-sum-ℤ n g htpy-binomial-sum-ℤ = htpy-binomial-sum-Commutative-Ring ℤ-Commutative-Ring
Multiplication distributes over sums
left-distributive-mul-binomial-sum-ℤ : (n : ℕ) (x : ℤ) (f : functional-vec ℤ (succ-ℕ n)) → x *ℤ (binomial-sum-ℤ n f) = binomial-sum-ℤ n (λ i → x *ℤ (f i)) left-distributive-mul-binomial-sum-ℤ = left-distributive-mul-binomial-sum-Commutative-Ring ℤ-Commutative-Ring right-distributive-mul-binomial-sum-ℤ : (n : ℕ) (f : functional-vec ℤ (succ-ℕ n)) (x : ℤ) → (binomial-sum-ℤ n f) *ℤ x = binomial-sum-ℤ n (λ i → (f i) *ℤ x) right-distributive-mul-binomial-sum-ℤ = right-distributive-mul-binomial-sum-Commutative-Ring ℤ-Commutative-Ring
Theorem
Binomial theorem for the integers
binomial-theorem-ℤ : (n : ℕ) (x y : ℤ) → power-ℤ n (x +ℤ y) = binomial-sum-ℤ n ( λ i → ( power-ℤ (nat-Fin (succ-ℕ n) i) x) *ℤ ( power-ℤ (dist-ℕ (nat-Fin (succ-ℕ n) i) n) y)) binomial-theorem-ℤ = binomial-theorem-Commutative-Ring ℤ-Commutative-Ring
References
- [Wie]
- Freek Wiedijk. Formalizing 100 theorems. URL: https://www.cs.ru.nl/~freek/100/.
Recent changes
- 2024-10-29. Egbert Rijke. Linked names (#1216).
- 2024-10-28. Egbert Rijke. Formula for the number of combinations (#1213).
- 2023-09-21. Egbert Rijke and Gregor Perčič. The classification of cyclic rings (#757).
- 2023-05-16. Fredrik Bakke. Swap from
md
totext
code blocks (#622). - 2023-05-13. Fredrik Bakke. Refactor to use infix binary operators for arithmetic (#620).