Exemple #1
0
 def commute(self, initIdx=None, finalIdx=None, assumptions=USE_DEFAULTS):
     '''
     From self, derive and return a form in which the operand
     at index initIdx has been moved to finalIdx.
     For example, given (A and B and ... and Y and Z) derive (A and ... and Y and B and Z)
     via initIdx = 1 and finalIdx = -2.
     '''
     from ._theorems_ import commute, leftwardCommute, rightwardCommute      
     return apply_commutation_thm(self, initIdx, finalIdx, commute, leftwardCommute, rightwardCommute, assumptions)  
Exemple #2
0
 def commutation(self, initIdx=None, finalIdx=None, assumptions=USE_DEFAULTS):
     '''
     Given Boolean operands, deduce that this expression is equal to a form in which the operand
     at index initIdx has been moved to finalIdx.
     For example, (A and B and ... and Y and Z) = (A and ... and Y and B and Z)
     via initIdx = 1 and finalIdx = -2.
     '''
     from ._theorems_ import commutation, leftwardCommutation, rightwardCommutation
     return apply_commutation_thm(self, initIdx, finalIdx, commutation, leftwardCommutation, rightwardCommutation, assumptions)
Exemple #3
0
 def commute(self, init_idx=None, final_idx=None, **defaults_config):
     '''
     From self, derive and return a form in which the operand
     at index init_idx has been moved to final_idx.
     For example, given (A or B or ... or Y or Z) derive (A or ... or Y or B or Z)
     via init_idx = 1 and final_idx = -2.
     '''
     from . import commute, leftward_commute, rightward_commute
     return apply_commutation_thm(self, init_idx, final_idx, commute,
                                  leftward_commute, rightward_commute)
Exemple #4
0
 def commutation(self, init_idx=None, final_idx=None, **defaults_config):
     '''
     Given Boolean operands, deduce that this expression is equal to a form in which the operand
     at index init_idx has been moved to final_idx.
     For example, (A and B and ... and Y and Z) = (A and ... and Y and B and Z)
     via init_idx = 1 and final_idx = -2.
     '''
     from . import commutation, leftward_commutation, rightward_commutation
     return apply_commutation_thm(self, init_idx, final_idx, commutation,
                                  leftward_commutation,
                                  rightward_commutation)
Exemple #5
0
 def commutation(self,
                 init_idx=None,
                 final_idx=None,
                 assumptions=USE_DEFAULTS):
     '''
     Given Boolean operands, deduce that this expression is equal to a form in which the operand
     at index init_idx has been moved to final_idx.
     For example, (A or B or ... or Y or Z) = (A or ... or Y or B or Z)
     via init_idx = 1 and final_idx = -2.
     '''
     from . import (commutation, leftward_commutation,
                    rightward_commutation)
     return apply_commutation_thm(self, init_idx, final_idx, commutation,
                                  leftward_commutation,
                                  rightward_commutation, assumptions)
Exemple #6
0
 def permutation_move(self,
                      initIdx=None,
                      finalIdx=None,
                      assumptions=USE_DEFAULTS):
     '''
     Deduce that this Set expression is equal to a Set
     in which the element at index initIdx has been moved to
     finalIdx. For example, {a, b, c, d} = {a, c, b, d} via
     initIdx = 1 (i.e. 'b') and finalIdx = -2. In traditional
     cycle notation, this corresponds to an index-based cycle
     (initIdx, initIdx+1, ..., finalIdx) where
     0 ≤ initIdx ≤ finalIdx ≤ n - 1 for a set of size n.
     '''
     from ._theorems_ import (binaryPermutation, leftwardPermutation,
                              rightwardPermutation)
     return apply_commutation_thm(self, initIdx, finalIdx,
                                  binaryPermutation, leftwardPermutation,
                                  rightwardPermutation, assumptions)