From 01241769f51589262128d67f402db6c9ac447c04 Mon Sep 17 00:00:00 2001 From: Morris Kyn Date: Tue, 12 Apr 2022 13:01:04 -0700 Subject: [PATCH] Split QED into QED and for all introduction. Made introducing elements a proof step (still uses group class). --- __pycache__/element.cpython-38.pyc | Bin 0 -> 2963 bytes __pycache__/environment.cpython-38.pyc | Bin 0 -> 1454 bytes __pycache__/group.cpython-38.pyc | Bin 0 -> 2443 bytes __pycache__/integer.cpython-38.pyc | Bin 0 -> 1896 bytes __pycache__/logicObjects.cpython-38.pyc | Bin 0 -> 8096 bytes __pycache__/proof.cpython-38.pyc | Bin 0 -> 16353 bytes abelian_proof.py | 33 ++++++++------- environment.py | 34 --------------- logicObjects.py | 34 +++++++++++---- proof.py | 54 +++++++++++++++++------- proofs/proof1.py | 0 11 files changed, 83 insertions(+), 72 deletions(-) create mode 100644 __pycache__/element.cpython-38.pyc create mode 100644 __pycache__/environment.cpython-38.pyc create mode 100644 __pycache__/group.cpython-38.pyc create mode 100644 __pycache__/integer.cpython-38.pyc create mode 100644 __pycache__/logicObjects.cpython-38.pyc create mode 100644 __pycache__/proof.cpython-38.pyc delete mode 100644 environment.py delete mode 100644 proofs/proof1.py diff --git a/__pycache__/element.cpython-38.pyc b/__pycache__/element.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5cc1d56fd16b90ae1742693068bdd78a5eb43236 GIT binary patch literal 2963 zcmb_eO>^5s7~Yj+MRpuFO$%vY08tpgE%oqGI!wtl1zHLh7jQELO&E=$RU9>nrLJT` zJnku->6tr+_LzUbZ{R2B#0;nYgs*+j}yrR#r#Kz}_83S(rp&fCJ)wfWzflJ^6siLEI z6E*!FCSVQ+cbedi-e-;xGN&faD(1Lj7K}M_Voq3(nPZ8%Xy92F^P-7oLoA3Ep7Y|2 zSj4j_G;q3<&y{@Ttm~6XRiQSW{v~Sq4$PR3najpnpPqcI3$~-ni(~dcd#aE1XPiUV z9y{dSwvo@5n|8h3Aa8;h2y%zWPV=+n)VIg-%N3us==_S z!-`2?P0%C?wdo9X*hMr(Ejn(@AFv(mK91$;_aj24$9_;Wx3%t9asf-*nnID+;EjQt z1!KBy@X&QHU}1TCjkmzSsC9CCTHw>Ysxqbg2%}@|0eb|E0f_II@|xh(650xRz%@XH zH!K6(GC_tF==B)ZV+QNDglY*xt>41i7%x`Qd&N6gU+z=&$(!1>?h$|QIUzgZ?dN}^ zv^A%-84f(Te;48HW$*?9+%^g|7SYaYDzKdz*4<5JIWZ_AU&pev2}AyHq4;T|X2l9E zIVBNsq$HvO)wCpHu7bR&7x>{Lfng0OuUQf%2Ado1Siu| zeo3xERpFpZ6j_we++qj(k>Zy4AA@1=XLL`!PS@z6rb{q=T;!()UW2dwsy#H|;uLOe zp4SzJ6u@mQ*E%0ar1jIcSdGFo^W)v*#%0=)lrRBsbh*06)-Z|?tG)~qN^zalDE7T5 zy@5vc=4c)%u*kWoT~b(RTKKkODk#w`g=c2=zEmM#e36fqUw~lB)rkwLip~}ql;jY3 z+Nz4OLR792QClwp%__eu`%bfJ5lOS)<{@C2;`TcPj8sD=I9I`%m~SIzE>PkaU?bPf z8?L(>i(y3Vrt3Z&dQmZ>SWzyfAW3pyNvTbqC9_Osh0JSY-XKG2P8dp2k`fz@r{`fT zZqQF_n3istRvp$*D|}2&6(WjC`Zi4UEqcPXxbi{E(Ti`mV?1F7zDyLo_z?U8nUR%4 zFFM71m1vYFX6!%()L46_6`ztK*=l($9U{`zWe*Dx6c3J;^bg^u$X=0`rbxT$uIh$F z%qIl3Wc~aEjLr)a{;?;#f>%|VVn|aOf(fZf=qvctl|eOH`dn^?nM4+wQhpG21AQIh^-NCkIV$W;PU3b}NA(ElRi z`P(P%c`T%C6A+S6ULx}%+14g-t(@SR5lvEJoKXElk1Lq?jP@WmQF_n_{e7BqT@m|` gks?*8Bx!15mt%%(b)fKb{_AUH||9 literal 0 HcmV?d00001 diff --git a/__pycache__/environment.cpython-38.pyc b/__pycache__/environment.cpython-38.pyc new file mode 100644 index 0000000000000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ir;8x)syyaGB0%hAs>>|eFU1Ohm+Pouj;ZXyVxwGAH!0Y?Pzi?riy^COc z{ManFQVTtGwm#aHoudTq;udvjvOo(6HR z-Jh;pFBvyRO-LME_`CZu`Ypo@zQ2tP3LC@*$=E-kr1!ugvP^VQjCmLB@xHt8;VV4V zB`oxNE;i$-9L?4a%9fA9<^x^VqY;`ai0;9h)tiv{r#qQFFBZvcRm zSh#SItU$;OoB52Ft`oZf)MNuKUFg}mleh5lK^hQgK4kONhO_Q59yO!8m^1OvR+uPU z)&&Oh<|^8>8;SY|3G#gzRV@SD=!H7*qO}ozE1_qTOC*__UO^_%q}xsw+d**7Tu5)} zAtuDP>qYZ``yu21}(&4%BIZbpftZ$@%SC0;KW#JBNF+8jJeADKt|B$VG3-1u)O zQ56+Kuqu8VT7XEAI^3HPJoT%0&l4x}>B^n3kKa#bymkv~YEc^oKYv9L_kxrK@%xf- zu{Zb-Klz27Ofj&a#2Hf&e}IPAf^aDs5eEW${5&(ka|6E>8R1S_QsKHHTw8?eWuqZn zI~6XX5eQdQMIPCF`$H7(;$JRA{S%_{UZeOlvkjTNe#!<4OG7wc(QVGp!-1UjWb@y-2u&BPCtlwx_K%;D+i_d8B8()GNs6f|nULmT zj5Uv%#|g=+huJ4hziLj%7l{NHVz(k#*46getodc=MTJ=rGcCTV*uGtTq*|_4 Ss&iGp>Z0uT_o3y;Lg~NYKA|uG literal 0 HcmV?d00001 diff --git a/__pycache__/proof.cpython-38.pyc b/__pycache__/proof.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..aca1409174df7a03e77fe9d601a16ba89956017c GIT binary patch literal 16353 zcmeHOOOPB#TCS?DeoW6p zx_h!}^r-FGAdqAWoi`j+QvUmn@^5>K6;;0EG%6pV52xX#?gbV{TD%FLaMRcml?>mdWs;DZCWmQuXI960$P2yNpQ)(K=nwn92 zaGX%H>H!?G558^nb9#Z>poK^?aK^$k)!|D+n_ozqJV>r&LL+WuHA5ejM z0>?S^1@$D3d(~6w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<&$>uYlD%p^6J7K#AhM7=qIwXV{60daFJ?x*Wo5CNku2FGyE^2P5%Cd{ zedn@G9C<4W;>Kh#@f(0xL!(?vBy11wy~ScETqi^gEl%Z;4-PH$F^*_)hDbP1Vac13 z(Nf=IbK2*rd)pZZ?DnQ( zXdp5y8qVQj;BqM-A1Gg-Vi~}gz}Hx!(N-m6G$y5Y(rRWoELKl6930Z^@TfkAwMVZcU~D literal 0 HcmV?d00001 diff --git a/abelian_proof.py b/abelian_proof.py index 475f456..341e2bb 100644 --- a/abelian_proof.py +++ b/abelian_proof.py @@ -1,6 +1,5 @@ from proof import * from element import * -from environment import * from group import * from integer import * from logicObjects import * @@ -9,18 +8,22 @@ abelianG = forall(['x', 'y'], G, Eq(Mult(['x', 'y']), Mult(['y','x']),G)) p = Proof('Simple Abelian Proof', forall(['x'], G, Eq(Mult(['x', 'x']), G.elements['e'],G)), goal=abelianG) p.introGroup(G) -G.newElement('a') -G.newElement('b') -G.mulElements('a','b') +#G.newElement('a') +#G.newElement('b') +#G.mulElements('a','b') +p.introElement(G,'a') +p.introElement(G,'b') +p.closure(G,'a','b') p.accessAssumption() -p.forallElim(1,['a * b']) -p.leftMult(G.elements['a'],2) -p.forallElim(1,['a']) -p.substituteRHS(3,4) -p.identleft(5) -p.identright(6) -p.rightMult(G.elements['b'],7) -p.forallElim(1,['b']) -p.substituteRHS(8,9) -p.identleft(10) -p.qed(['b','a'],11) +p.forallElim(4,['a * b']) +p.leftMult(G.elements['a'],5) +p.forallElim(4,['a']) +p.substituteRHS(6,7) +p.identleft(8) +p.identright(9) +p.rightMult(G.elements['b'],10) +p.forallElim(4,['b']) +p.substituteRHS(11,12) +p.identleft(13) +p.forAllIntroduction(14,["a","b"],[1,2]) +p.qed(15) diff --git a/environment.py b/environment.py deleted file mode 100644 index c8ffba8..0000000 --- a/environment.py +++ /dev/null @@ -1,34 +0,0 @@ -import copy - -class Environment: - env = [{}] - assumption = [] - depth = 0 - - #ELEMENTS - - def getElem(self, elem): - return self.env[self.depth]["Elements"][elem] - - def addElemProp(self, elem, type, prop): - #type could be in group, or equality, ect - self.env[self.depth]["Elements"][elem][type].append(prop) - - #GROUPS - - def getGroup(self, group): - return self.env[self.depth]["Groups"][group] - - def addGroupProp(self, group, type, prop): - #type could be for all, contains, ect - self.env[self.depth]["Groups"][group][type].append(prop) - - def newSubproof(self, assume): - self.env.append(self.env[-1].copy()) - self.assumption.append(assume) - self.depth+=1 - - def endSubproof(self): - self.env.pop() - self.depth -= 1 - return self.assumption.pop() \ No newline at end of file diff --git a/logicObjects.py b/logicObjects.py index 44d0f49..e90723f 100644 --- a/logicObjects.py +++ b/logicObjects.py @@ -82,6 +82,14 @@ class Bottom: def elim(self, conclusion): return conclusion +class In: + def __init__(self, elem, grp): + self.elem = elem + self.grp = grp + + def __repr__(self): + return str(self.elem) + " ∈ " + str(self.grp) + class Eq: def __init__(self,LHS,RHS,pg): self.LHS = LHS @@ -131,18 +139,28 @@ def __repr__(self): return 'forall(' + str(self.arbelems) + ' in ' + str(self.group) + ', ' + str(self.eq) +')' def __eq__(self,other): - return self.arbelems == other.arbelems and self.group == other.group and self.eq == other.eq + if not isinstance(other,forall): + return False + if len(self.arbelems)==len(other.arbelems): + print(self,other) + new = copy.deepcopy(self) + replaced = new.replace(other.arbelems) + return replaced == other.eq + else: + return False def replace(self, replacements): # replacements = ['x','y'] - strings of the elements if len(replacements) == len(self.arbelems): - if all(elem in self.group.elements for elem in replacements): # check if replacements are all normal elements of self.group - neweq = copy.deepcopy(self.eq) - for i in range(len(replacements)): - neweq = neweq.replace(Mult([self.arbelems[i]]),self.group.elements[replacements[i]]) # repeatedly replace - return neweq - else: - print(f"Replacements contains elements that are not in {self.group}") + #if all(elem in self.group.elements for elem in replacements): # check if replacements are all normal elements of self.group + #The scope of thee elements in a for all should be contained in that for all + #Checking if in the group should happen at elimination and introduction + neweq = copy.deepcopy(self.eq) + for i in range(len(replacements)): + neweq = neweq.replace(Mult([self.arbelems[i]]),self.group.elements[replacements[i]]) # repeatedly replace + return neweq + #else: + #print(f"Replacements contains elements that are not in {self.group}") else: print("Replacements is not the same length as the list of arbitrary elements") diff --git a/proof.py b/proof.py index 6508d36..5238355 100644 --- a/proof.py +++ b/proof.py @@ -1,5 +1,5 @@ +from re import L from element import * -from environment import * from group import * from integer import * from logicObjects import * @@ -12,21 +12,17 @@ def __init__(self, label, assumption, goal=None, steps=[], justifications = []): self.goal = goal # this is an implies self.steps = [] self.justifications = [] - self.environment = {} # add strings names to environment for parsing + self.env = {} self.depth = 0 - # self.currAssumption = [goal.assum] # is this neccessary? - self.show() - def qed(self, replacements, lineNum): - if isinstance(self.goal, forall): # how do I know a line is a replacement of a forall? - if self.goal.replace(replacements) == self.steps[lineNum]: # how do I know replacement variables are all arbitrarily introduced? - self.steps += [True] - self.justifications += [f"Proof is finished by line {lineNum}"] - self.show() - else: - print("Hmm, that line doesn't seem to prove what you think it does. Is there another line you meant? You may have also replaced incorrectly.") - else: - return self.goal.conc in self.steps + def qed(self, lineNum): + print(self.goal, self.steps[lineNum]) + if self.goal == self.steps[lineNum]: + self.steps+=["□"] + self.justifications += ["QED"] + self.show() + else: + print("This is not the same as the goal") def undo(self): self.steps = self.steps[:-1] @@ -50,7 +46,7 @@ def introGroup(self, grp): self.steps += [grp] self.justifications += ["introGroup"] #deal with environments - self.environment[grp.groupName] = grp + self.env[grp.groupName] = grp self.show() def accessAssumption(self): @@ -461,3 +457,31 @@ def concludeSubproof(self, lineNum): """ conc = Implies(self.assumption, self.steps[lineNum]) return conc + + def introElement(self,G, name): + self.env[name] = G.newElement(name) + self.steps += [In(name, G)] + self.justifications += ["Introducing an arbitrary element"] + self.show() + + def forAllIntroduction(self, equationLine, vars, elemIntroLines): + evidence = copy.deepcopy(self.steps[equationLine]) + G = self.steps[elemIntroLines[0]].grp + #Checking that the lines introduce the arbitrary variables, and that the variables are all in the same group + for i in range(len(vars)): + v = vars[i] + l = elemIntroLines[i] + if self.steps[l].elem!=vars[i]: + print("Line", l, "does not introduce variable", v) + if self.steps[l].grp!=G: + print("Element", v, "is not in group", G) + #If you make it here, this is a valid for all intro + self.steps+=[forall(vars,G,self.steps[equationLine])] + self.justifications+=["For all introduction"] + self.show() + + def closure(self,G,a,b): + G.mulElements(a,b) + self.steps+=[In(G,Mult([a,b]))] + self.justifications+=["Closure"] + self.show() diff --git a/proofs/proof1.py b/proofs/proof1.py deleted file mode 100644 index e69de29..0000000