rw [← sum_add_distrib]
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
M : MultiPart α
⊢ ∑ i in range (M.t + 1), card (MultiPart.P M i) * card (M.A \ MultiPart.P M i) +
      ∑ i in range (M.t + 1), card (MultiPart.P M i) ^ 2 =
    (∑ i in range (M.t + 1), card (MultiPart.P M i)) * card M.A
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
M : MultiPart α
⊢ ∑ x in range (M.t + 1), (card (MultiPart.P M x) * card (M.A \ MultiPart.P M x) + card (MultiPart.P M x) ^ 2) =
    (∑ i in range (M.t + 1), card (MultiPart.P M i)) * card M.A