From 37d349ee6557e61c27ae7818d172ecb1074fc3c3 Mon Sep 17 00:00:00 2001 From: Isaac Date: Wed, 21 Sep 2022 13:35:47 -0700 Subject: [PATCH] Added readme, fixed latex button --- README.md | 27 ++++++++++++++++++++++++++- proof.py | 3 ++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2d31569..392d39e 100644 --- a/README.md +++ b/README.md @@ -1 +1,26 @@ -# global-environment \ No newline at end of file +# Automated Proof Checker + +## Set up + +1. Clone the repository using `git clone` +2. Install packages using preferred installer - need to fix, create pip requirements file + +## Codebase + +The codebase we have designed seperates the elements of abstract algebra into different environments to make writing proofs a seamless experience. The main files are `proof.py,group.py,element.py,` and `logicObjects.py`. The names are pretty self explanatory, but to learn more about how each of the files work poke around some of the `__init__` calls and member functions of those files to see how they interact together. + +## Usage + +There are two options to use our proof-checker, but we **highly** recommend using the first option. + ++ Using our graphical user interface! + 1. Run `python gui.py` to open the interface + 2. The **Enter** button is used to enter new steps. As you type in the black text box the possible functions yoiu could call will appear below so you never make spelling errors! Warnings will appear if you attempt a step that is not valid. + 3. The **Generate Latex** will take the proof, convert it to a latex file and display the corresponding pdf inside of the GUI in real time! + 4. The **Undo** button deletes the last step you did - be careful to only use this when you need it! ++ Using our raw language in a python file + 1. Open a new file called `my_proof_name_here.py`, with a descriptive name for your proof + 2. Create a new proof object using the `Proof` function from `proof.py` + 3. Enter the steps of your proof using the functions in `proof.py` + 4. Run the command `python my_proof_name_here.py` to see the proof steps in the console. + diff --git a/proof.py b/proof.py index 3be9e55..5a26adb 100644 --- a/proof.py +++ b/proof.py @@ -36,7 +36,7 @@ def undo(self): self.show() def writeLaTeXfile(self): - doc = Document('basic') + doc = Document(page_numbers=False) doc.preamble.append(Command('title', self.label)) doc.append(NoEscape(r'\maketitle')) doc.append(italic("Proof:")) @@ -48,6 +48,7 @@ def writeLaTeXfile(self): else: enum.add_item(NoEscape("$"+self.steps[i].toLaTeX()+r"$\hfill")) enum.append(" by " + str(self.justifications[i])) + doc.generate_tex(self.label) doc.generate_pdf(self.label) def showReturn(self):