Skip model sizes 2-5 and 7 when conjunction, disjunction, and negation are defined

This commit is contained in:
Brandon Rozek 2025-12-12 11:36:21 -05:00
parent ea0b487528
commit f799a1ff5d
3 changed files with 18 additions and 13 deletions

6
vsp.py
View file

@ -28,7 +28,7 @@ Subalgebra 2: {set_to_str(self.subalgebra2)}
"""
def has_vsp(model: Model, impfunction: ModelFunction,
negation_defined: bool) -> VSP_Result:
negation_defined: bool, conjunction_disjunction_defined: bool) -> VSP_Result:
"""
Checks whether a model has the variable
sharing property.
@ -38,6 +38,10 @@ def has_vsp(model: Model, impfunction: ModelFunction,
if len(model.designated_values) == 1:
return VSP_Result(False, model.name)
if len(model.carrier_set) in [2,3,4,5,7] \
and conjunction_disjunction_defined and negation_defined:
return VSP_Result(False, model.name)
assert model.ordering is not None, "Expected ordering table in model"
top = model.ordering.top()