English
For all n>0 and any ring R, the composition Nat.cast ∘ ZMod.val equals ZMod.cast.
Русский
Для всех n>0 и кольца R композиция Nat.cast ∘ ZMod.val равна ZMod.cast.
LaTeX
$$$\\\\forall {n : \\\\mathbb{N}} (R : Type*), \\\\[Ring R] \\\\land \\\\N eCast, \\\\mathrm{NeZero} n \\\\Rightarrow \\\\operatorname{Nat}.cast \\\\circ \\\\mathrm{ZMod}.val = \\\\mathrm{ZMod}.cast$$
Lean4
/-- The coercions are respectively `Nat.cast` and `ZMod.cast`. -/
@[simp]
theorem natCast_comp_val [NeZero n] : ((↑) : ℕ → R) ∘ (val : ZMod n → ℕ) = cast :=
by
cases n
· cases NeZero.ne 0 rfl
rfl