I'm writing my own Symbolic Logic module where I have classes of sentences, subclasses of atoms and conjunctions, and so on. I would like to define operations between sentence in a somewhat natural way, and possibly eventually define operations for universal quantification and so on. So far I've defined __invert__
and __and__
.
I'm slightly unhappy with using |
for "or" since in Logic this is usually represented with a v-shaped wedge, but I can live with it. Similarly I'd like an infix operator for "if ... then ..." and "... if and only if ...". I'd ideally like the "if ... then ..." to be something like ->
but I'm again willing to live with >
so I defined __gt__
.
But I'm at a bit of an impasse with "... if and only if ..." There seems to be genuinely no good option for that one. I might use ==
but then again I might want to reserve that for sentences being equivalent, so ...
Any suggestions?