def readProofFromFile(save_filename): enrichedArrow = pickle.load(open(save_filename, "r")) proof = library.Proof( library=lib, arrow=PathArrow(src=new_path(enrichedArrow.src), tgt=new_path(enrichedArrow.tgt), enrichedArrow=enrichedArrow), ) return proof
def setUp(self): self.add_common_objects() self.P0 = path.new_path(self.W_AND_X_and_Y_and_Z) self.P1 = self.P0.advance(0).tgt self.P2 = self.P0.advance(1).tgt.advance().tgt.advance(1).tgt self.EP0 = path.new_path(self.exists_a_in_domain_b_X_and_Y_and_Z) self.EP1 = self.EP0.advance().tgt.advance().tgt.advance(1).tgt self.WDEP0 = path.new_path(formula.And([self.B, self.exists_wd_a_in_domain_b_X_and_Y_and_Z])) self.WDEP1 = self.WDEP0.advance(1).tgt.advance().tgt.advance().tgt.advance(1).tgt
def __init__(self, library, arrow = None): self.library = library if arrow is None: self.arrow = path.new_path(library.formula()).advance() self.arrow = self.arrow.forwardFollow(lambda p: p.advance()) self.arrow = self.arrow.forwardFollow(lambda p: p.forwardAndTrue()) else: assert(arrow.src.top().translate() == library.formula().translate()) self.arrow = arrow self.tgt = self.arrow.tgt