Double factorials #
This file defines the double factorial,
n‼ := n * (n - 2) * (n - 4) * ...
.
Main declarations #
Nat.doubleFactorial
: The double factorial.
Nat.doubleFactorial n
is the double factorial of n
.
Equations
- Nat.doubleFactorial 0 = 1
- Nat.doubleFactorial 1 = 1
- k.succ.succ.doubleFactorial = (k + 2) * k.doubleFactorial
Instances For
Nat.doubleFactorial n
is the double factorial of n
.
Equations
- Nat.«term_‼» = Lean.ParserDescr.trailingNode `Nat.«term_‼» 10000 0 (Lean.ParserDescr.symbol "‼")
Instances For
theorem
Nat.doubleFactorial_eq_prod_even
(n : ℕ)
:
(2 * n).doubleFactorial = ∏ i ∈ Finset.range n, 2 * (i + 1)
Extension for Nat.doubleFactorial
.