Skip to content

Commit

Permalink
Added readme, fixed latex button
Browse files Browse the repository at this point in the history
  • Loading branch information
isahers1 committed Sep 21, 2022
1 parent 5b97a16 commit 37d349e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
# global-environment
# 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.

3 changes: 2 additions & 1 deletion proof.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:"))
Expand All @@ -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):
Expand Down

0 comments on commit 37d349e

Please sign in to comment.