Documentation

Mathlib.Data.Nat.Factorial.DoubleFactorial

Double factorials #

This file defines the double factorial, n‼ := n * (n - 2) * (n - 4) * ....

Main declarations #

Nat.doubleFactorial n is the double factorial of n.

Equations
Instances For

    Nat.doubleFactorial n is the double factorial of n.

    Equations
    Instances For
      theorem Nat.doubleFactorial_pos (n : ) :
      0 < n.doubleFactorial
      theorem Nat.doubleFactorial_add_two (n : ) :
      (n + 2).doubleFactorial = (n + 2) * n.doubleFactorial
      theorem Nat.doubleFactorial_add_one (n : ) :
      (n + 1).doubleFactorial = (n + 1) * (n - 1).doubleFactorial
      theorem Nat.factorial_eq_mul_doubleFactorial (n : ) :
      (n + 1).factorial = (n + 1).doubleFactorial * n.doubleFactorial
      theorem Nat.doubleFactorial_le_factorial (n : ) :
      n.doubleFactorial n.factorial
      theorem Nat.doubleFactorial_two_mul (n : ) :
      (2 * n).doubleFactorial = 2 ^ n * n.factorial
      theorem Nat.doubleFactorial_eq_prod_even (n : ) :
      (2 * n).doubleFactorial = iFinset.range n, 2 * (i + 1)
      theorem Nat.doubleFactorial_eq_prod_odd (n : ) :
      (2 * n + 1).doubleFactorial = iFinset.range n, (2 * (i + 1) + 1)