MindFormal v1.0.0One Mind

MindFormal.Tools.GivenHistoryRecords.Routing

theorem MindFormal.GivenHistoryRecords.routing_residual {C : Type u_1} {S : Type u_2} [Fintype C] [Fintype S] [DecidableEq C] (label : S → C) (weight : S → ℝ) (presence value : C → ℝ) :
∑ i : C, presence i * value i - ∑ s : S, weight s * value (label s) = ∑ i : C, (presence i - ∑ s : S, if label s = i then weight s else 0) * value i