∀ {X : Type u_1} {n : Type u_5} {R : Type u_8} [inst : AddCommMonoid R] [inst_1 : TopologicalSpace R]
  {L : SummationFilter X} [inst_2 : DecidableEq n] [T2Space R] {f : X → n → R},
  Matrix.diagonal (∑'[L] (x : X), f x) = ∑'[L] (x : X), Matrix.diagonal (f x)