English
If α is a non-unital non-associative commutative semiring and d1, d2 : n → α, then the corresponding diagonal matrices commute: diag(d1) · diag(d2) = diag(d2) · diag(d1).
Русский
Если α — коносерийно неединичный коммутативный полугруппа, а d1, d2 : n → α, то диагональные матрицы диагонализируются и commute: diag(d1) diag(d2) = diag(d2) diag(d1).
LaTeX
$$$\\operatorname{diagonal}(d_1) \\cdot \\operatorname{diagonal}(d_2) = \\operatorname{diagonal}(d_2) \\cdot \\operatorname{diagonal}(d_1)$$$
Lean4
theorem commute_diagonal {α : Type*} [NonUnitalNonAssocCommSemiring α] [Fintype n] [DecidableEq n] (d₁ d₂ : n → α) :
Commute (diagonal d₁) (diagonal d₂) := by simp_rw [commute_iff_eq, diagonal_mul_diagonal, mul_comm]