Skip to content

Commit

Permalink
fixing merge
Browse files Browse the repository at this point in the history
  • Loading branch information
isahers1 committed Nov 15, 2022
2 parents 6eee135 + 7a5fb04 commit 878e05a
Show file tree
Hide file tree
Showing 8 changed files with 316 additions and 23 deletions.
Binary file removed Simple Abelian Proof.pdf
Binary file not shown.
17 changes: 0 additions & 17 deletions Simple Abelian Proof.tex

This file was deleted.

2 changes: 1 addition & 1 deletion abelian_proof.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
p.substituteRHS(11,12)
p.identleft(13)
p.forAllIntroduction(14,["a","b"],[1,2])
p.qed(15)
p.qed(15)
13 changes: 12 additions & 1 deletion group.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class group:
elements = {}
groupProperties = {}
elementProperties = {}
subGroups = []
binaryOperator = ""
groupName = ""

Expand All @@ -30,6 +31,12 @@ def __mul__(self,other): # group cartesian product. Worry about this later
return group(newName, [self.binaryOperator,other.binaryOperator], newProperties)

# group functions
def newInverse(self, elementName):
if elementName in self.elements:
inverseName = '(' + elementName + ')^(-1)'
self.elements.update({inverseName:inverse(elementName,self)})
else:
print("Sorry, you cannot add the inverse of an element that does not exist!")

# declare new element in group with elementName
def newElement(self,elementName):
Expand All @@ -50,6 +57,10 @@ def mulElements(self, elem1, elem2): # should this return an equation?
self.elements.update({repr(result):result}) # is this the right?
except:
print("Sorry, one or both of these elements are not in the group!")

def subGroup(self, property):
self.subGroups.append(property)
return f'{property} is a subgroup of {self}'

def addGroupProperty(self, property, propertyName):
self.groupProperties[propertyName] = property
Expand All @@ -67,4 +78,4 @@ def contains(self, elementName):
return elementName in self.elements

def toLaTeX(self):
return self.groupName
return self.groupName
2 changes: 2 additions & 0 deletions logicObjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ def replace(self, replacements):
def toLaTeX(self):
return r"\exists " + ",".join(self.existelems) + r" \in " + str(self.group) + r"\ " + self.toLaTeX(self.eq)



## Unique class - idk if we need this

class uniqueElementProperty:
Expand Down
263 changes: 259 additions & 4 deletions proof.py

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions sub_group_proof.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from proof import *
from element import *
from group import *
from integer import *
from logicObjects import *

G = group('G','*')
subGroupG = G.subGroup(Eq('x',G.elements['e'],G))
p = Proof('Simple Subgroup Proof', None, goal=subGroupG)
p.introGroup(G)
p.introSet('S',G,Eq('x',G.elements['e'],G)) # change to mult objects?
p.getArbElem('S','a')
p.getArbElem('S','b')
p.multBothSides(2,3)
p.identright(4)
p.setClosure('S',[2,3],5)
p.setContainsIdentity('S',2)
p.setInverse('S',5)
p.concludeSubgroup('S')
p.qed(9)
22 changes: 22 additions & 0 deletions sub_group_proof_2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from proof import *
from element import *
from group import *
from integer import *
from logicObjects import *

G = group('G','*')
subGroupG = G.subGroup(In('x',G))
p = Proof('Simple Subgroup Proof', None, goal=subGroupG)
p.introGroup(G)
p.introSet('S',G,In('x',G))
p.getSpecificElem('S','e')
p.setContainsIdentity('S',2)
p.getArbElem('S','a')
p.getArbElem('S','b')
p.closure(G,'a','b')
p.setClosure('S',[4,5],6)
p.introInverse(G,'a')
p.addElemToSet('S','(a)^(-1)',G)
p.setInverse('S',8)
p.concludeSubgroup('S')
p.qed(11)

0 comments on commit 878e05a

Please sign in to comment.