Skip to content

Commit

Permalink
Fixed line numbers issue after subproof
Browse files Browse the repository at this point in the history
  • Loading branch information
mokyn committed Apr 19, 2022
1 parent 3bf983c commit 2a00f17
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Binary file modified __pycache__/proof.cpython-38.pyc
Binary file not shown.
6 changes: 3 additions & 3 deletions proof.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def show(self):
while i < len(self.steps):
if isinstance(self.steps[i],Proof):
self.steps[i].show()
i+=len(self.steps[i].steps)
i+=len(self.steps[i].steps)-self.steps[i].linestart-1
else:
print("\t"*self.depth + str(i) + ': ' + str(self.steps[i]) + '\t' + str(self.justifications[i]))
i+=1
Expand Down Expand Up @@ -493,8 +493,8 @@ def concludeSubproof(self, lineNum):
evidence = self.steps[-1]
if isinstance(evidence, Proof):
conc = Implies(evidence.assumption,evidence.steps[lineNum])
self.steps += [None]*len(evidence.steps)
self.justifications += [None]*len(evidence.steps)
self.steps += [None]*(len(evidence.steps)-evidence.linestart-1)
self.justifications += [None]*((len(evidence.steps))-evidence.linestart-1)
self.steps += [conc]
self.justifications += ["Conclusion of subproof"]
else:
Expand Down
2 changes: 1 addition & 1 deletion unique inverses.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
p2.cancelLeft(7, ['a'])
p2.switchSidesOfEqual(8)
p.concludeSubproof(9)
p.qed(15)
p.qed(10)

0 comments on commit 2a00f17

Please sign in to comment.