Example #1
0
 def sideEffects(self, knownTruth):
     '''
     Yield the TransitiveRelation side-effects (which also records knownLeftSides
     and knownRightSides).  Also derive the consequent as a side-effect.
     As a special case, if the consequent is FALSE, do deriveViaContradiction.
     '''
     from proveit.logic.boolean._common_ import FALSE
     for sideEffect in TransitiveRelation.sideEffects(self, knownTruth):
         yield sideEffect
     yield self.deriveConsequent  # B given A=>B and A
     if self.consequent == FALSE:
         yield self.deriveViaContradiction  # Not(A) given A=>FALSE or A given Not(A)=>FALSE
Example #2
0
 def sideEffects(self, knownTruth):
     '''
     Yield the TransitiveRelation side-effects (which also records knownLeftSides
     and knownRightSides).  Also derive the left and right implications,
     derive the reversed version and attempt to derive equality.
     '''
     for sideEffect in TransitiveRelation.sideEffects(self, knownTruth):
         yield sideEffect
     yield self.deriveLeftImplication  # B=>A given A<=>B
     yield self.deriveRightImplication  # A=>B given A<=>B
     yield self.deriveReversed  # B<=>A given A<=>B
     yield self.deriveEquality  # A=B given A<=>B (assuming A and B are in booleans)