| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- The Binomial Theorem for Commutative Semirings |
| 5 |
------------------------------------------------------------------------ |
| 6 |
|
| 7 |
{-# OPTIONS --cubical-compatible --safe #-} |
| 8 |
|
| 9 |
open import Algebra.Bundles using (CommutativeSemiring) |
| 10 |
|
| 11 |
module Algebra.Properties.CommutativeSemiring.Binomial {a ℓ} (S : CommutativeSemiring a ℓ) where |
| 12 |
|
| 13 |
open CommutativeSemiring S |
| 14 |
open import Algebra.Properties.Semiring.Exp semiring using (_^_) |
| 15 |
import Algebra.Properties.Semiring.Binomial semiring as Binomial |
| 16 |
open Binomial public hiding (theorem) |
| 17 |
|
| 18 |
------------------------------------------------------------------------ |
| 19 |
-- Here it is |
| 20 |
|
| 21 |
theorem : ∀ n x y → (x + y) ^ n ≈ binomialExpansion x y n |
| 22 |
theorem n x y = Binomial.theorem x y (*-comm x y) n |
| 23 |
|