Counting true endpoints in edge labelings #
Each edge variable has two endpoint bits. It contributes two true endpoints when both bits are true, one precisely when it is a defect, and zero otherwise. This elementary accounting connects minimum-defect optimization to maximum-cardinality graph matching.
theorem Cslib.Logic.PL.CSP.card_true_eq_sum_count {Rel : Type u_1} {V : Type u_2} {F : CSP Rel V} (f : F.OccurrenceLabeling Bool) :
Counting true incidences constraint by constraint preserves their total count.
def Cslib.Logic.PL.CSP.selectedVariables {Rel : Type u_1} {V : Type u_2} [DecidableEq V] {F : CSP Rel V} (f : F.OccurrenceLabeling Bool) :
Finset V
Actual occurring variables whose every endpoint is labeled true.
Instances For
@[simp]
theorem Cslib.Logic.PL.CSP.mem_selectedVariables {Rel : Type u_1} {V : Type u_2} [DecidableEq V] {F : CSP Rel V} {f : F.OccurrenceLabeling Bool} {v : V} :
theorem Cslib.Logic.PL.CSP.EdgeInstance.mem_selectedVariables_iff {Rel : Type u_1} {V : Type u_2} [DecidableEq V] {F : CSP Rel V} (hF : F.EdgeInstance) (f : F.OccurrenceLabeling Bool) (o : F.Occurrence) :
An edge is mutually selected iff both its endpoint labels are true.
theorem Cslib.Logic.PL.CSP.EdgeInstance.card_true_eq {Rel : Type u_1} {V : Type u_2} [DecidableEq V] {F : CSP Rel V} (hF : F.EdgeInstance) (f : F.OccurrenceLabeling Bool) :
True endpoints split into twice the mutually selected edges and the defective edges.