Example #1
0
 def __init__(self, *operands):
     '''
     Or together any number of operands: A or B or C
     '''
     Operation.__init__(self, Or._operator_, operands)
     #deduce trivial disjunctive equivalances with 0 or 1 operand
     #avoid infinite recursion by storing previously encountered expressions
     if self in Or.trivialDisjunctions:
         return
     if len(operands) == 0:
         Or.trivialDisjunctions.add(self)
         try:
             from proveit.logic.boolean.disjunction._axioms_ import emptyDisjunction
         except:
             pass  # emptyDisjunction not initially defined when doing a clean rebuild
     if len(operands) == 1:
         operand = operands[0]
         try:
             Or.trivialDisjunctions.add(self)
             inBool(operand).prove(automation=False)
             self.unaryReduction()
         except:
             pass
Example #2
0
 def deriveInBool(self, assumptions=USE_DEFAULTS):
     '''
     From (A or B or ... or Z) derive [(A or B or ... or Z) in Booleans].
     '''
     inBool(self).conclude(assumptions=assumptions)
Example #3
0
 def deriveInBool(self, assumptions=USE_DEFAULTS):
     '''
     From Not(A) derive [Not(A) in Booleans].
     '''
     return inBool(self).prove(assumptions=assumptions)
Example #4
0
 def deriveInBool(self, assumptions=USE_DEFAULTS):
     '''
     From (A and B and ... and Z) derive [(A and B and ... and Z) in Booleans].
     '''
     return inBool(self).prove(assumptions=assumptions)
Example #5
0
 def deriveInBool(self, assumptions=USE_DEFAULTS):
     '''
     From (A and B and ... and Z) derive [(A and B and ... and Z) in Booleans].
     '''
     inBool(self).conclude(assumptions=assumptions)