The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V02. Numbers

Mathlib.Data.Nat.Factorial.NatCast

7 declarations. Mathlib docs · Source

theorem IsUnit.natCast_factorial_of_le E1 #

∀ {A : Type u_1} [inst : Semiring A] {n : ℕ}, IsUnit ↑n.factorial → ∀ {m : ℕ}, m ≤ n → IsUnit ↑m.factorial

theorem IsUnit.natCast_factorial_of_lt E1 #

∀ {A : Type u_1} [inst : Semiring A] {n : ℕ}, IsUnit ↑(n - 1).factorial → ∀ {m : ℕ}, m < n → IsUnit ↑m.factorial

theorem IsUnit.natCast_factorial_of_algebra E1 #

∀ {A : Type u_1} [inst : Semiring A] (K : Type u_2) [inst_1 : Semifield K] [CharZero K] [Algebra K A] (n : ℕ),
  IsUnit ↑n.factorial

If A is an algebra over a characteristic-zero (semi)field, then n! is a unit.

theorem IsUnit.natCast_factorial_iff_of_charP E1 #

∀ {A : Type u_1} [inst : Ring A] (p : ℕ) [Fact (Nat.Prime p)] [CharP A p] {n : ℕ}, IsUnit ↑n.factorial ↔ n < p

theorem IsUnit.natCast_of_isNilpotent_of_coprime E1 #

∀ {A : Type u_1} [inst : CommRing A] {n p : ℕ}, IsNilpotent ↑p → p.Coprime n → IsUnit ↑n

theorem IsUnit.natCast_factorial_of_isNilpotent E1 #

∀ {A : Type u_1} [inst : CommRing A] {n p : ℕ}, IsNilpotent ↑p → ∀ [Fact (Nat.Prime p)], n < p → IsUnit ↑n.factorial

theorem Nat.castChoose_eq E0 #

∀ {A : Type u_1} [inst : CommSemiring A] {m : ℕ} {k : ℕ × ℕ},
  IsUnit ↑m.factorial →
    k ∈ Finset.HasAntidiagonal.antidiagonal m →
      ↑(m.choose k.1) = ↑m.factorial * Ring.inverse ↑k.1.factorial * Ring.inverse ↑k.2.factorial