mirror of
https://github.com/Brandon-Rozek/matmod.git
synced 2025-11-03 03:11:12 +00:00
Added case for when negation is defined
This commit is contained in:
parent
4b907281a5
commit
d431030b41
2 changed files with 12 additions and 6 deletions
7
vsp.py
7
vsp.py
|
|
@ -107,7 +107,10 @@ Subalgebra 1: {set_to_str(self.subalgebra1)}
|
|||
Subalgebra 2: {set_to_str(self.subalgebra2)}
|
||||
"""
|
||||
|
||||
def has_vsp(model: Model, impfunction: ModelFunction, mconjunction: Optional[ModelFunction] = None, mdisjunction: Optional[ModelFunction] = None) -> VSP_Result:
|
||||
def has_vsp(model: Model, impfunction: ModelFunction,
|
||||
mconjunction: Optional[ModelFunction] = None,
|
||||
mdisjunction: Optional[ModelFunction] = None,
|
||||
mnegation: Optional[ModelFunction] = None) -> VSP_Result:
|
||||
"""
|
||||
Checks whether a model has the variable
|
||||
sharing property.
|
||||
|
|
@ -173,6 +176,8 @@ def has_vsp(model: Model, impfunction: ModelFunction, mconjunction: Optional[Mod
|
|||
# If the subalgebras are order-dependent, skip this pair
|
||||
if order_dependent(xs, ys, model.ordering):
|
||||
continue
|
||||
if mnegation is not None and order_dependent(ys, xs, model.ordering):
|
||||
continue
|
||||
|
||||
# Compute the closure of all operations
|
||||
# with just the xs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue