p xor q === [something very long]
Hell's teeth! You weren't kidding.
I remember xor as (p and not q) or (q and not p) and it's been something like 30 years since I played with nand and nor expansions, so I expanded that:
xor === (p and not q) or (q and not p)
expand the 'not's
=== (p and (q nor q)) or (q and (p nor p))
expand the 'and's
=== ((p nor p) nor ((q nor q) nor (q nor q)))
or ((q nor q) nor ((p nor p) nor (p nor p)))
expand the 'or's
=== (((p nor p) nor ((q nor q) nor (q nor q)))
nor ((q nor q) nor ((p nor p) nor (p nor p))))
nor (((q nor q) nor ((p nor p) nor (p nor p)))
nor ((p nor p) nor ((q nor q) nor (q nor q))))
Then it struck me that ((x nor x) nor (x nor x)) is x, which reduces it to
=== (((p nor p) nor q) nor ((q nor q) nor p))
nor (((q nor q) nor p) nor ((p nor p) nor q))
It's certainly more digestable (just :), but are there any other reductions in there?
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||