I'm trying to use those Logical equivalence as axioms to prove some PL statements,
In this case I followed the examples in the documentation that didn't use the build-in logic functions$\{\text{And}[,],\text{Or}[,],\text{etc}\}$, the reason is, otherwise it will evaluate some axioms as True.
Here is my code: (Updated)
PL = {ForAll[{p, q, r}, and[p, True] == p],
ForAll[{p, q, r}, or[p, False] == p],
ForAll[{p, q, r}, or[p, True] == True],
ForAll[{p, q, r}, and[p, False] == False],
ForAll[{p, q, r}, or[p, p] == p],
ForAll[{p, q, r}, and[p, p] == p],
ForAll[{p, q, r}, not[not[p]] == p],
ForAll[{p, q, r}, or[p, q] == or[q, p]],
ForAll[{p, q, r}, and[p, q] == and[q, p]],
ForAll[{p, q, r}, or[or[p, q], r] == or[p, or[q, r]]],
ForAll[{p, q, r}, and[and[p, q], r] == and[p, and[q, r]]],
ForAll[{p, q, r}, or[p, and[q, r]] == and[or[p, q], or[p, r]]],
ForAll[{p, q, r}, and[p, or[q, r]] == or[and[p, q], and[p, r]]],
ForAll[{p, q, r}, not[and[p, q]] == or[not[p], not[q]]],
ForAll[{p, q, r}, not[or[p, q]] == and[not[p], not[q]]],
ForAll[{p, q, r}, or[p, and[p, q]] == p],
ForAll[{p, q, r}, and[p, or[p, q]] == p],
ForAll[{p, q, r}, or[p, not[p]] == True],
ForAll[{p, q, r}, and[p, not[p]] == False]}
proof = FindEquationalProof[
ForAll[{p, q, r},
and[or[and[and[r, not[q]], not[p]],
and[q, not[and[q, not[or[p, r]]]]]],
not[and[p, not[and[q, not[r]]]]]] ==
or[and[and[p, q], not[and[r, q]]], and[r, not[p]]]], PL]
proof["ProofGraph"]
proof["ProofNotebook"]
I just fixed the typo in the axiom, yet trying to let it prove that statement:
$$((r ∧ ¬q ∧ ¬p) ∨ (q ∧ ¬(q ∧ ¬(p ∨ r)))) ∧ ¬(p ∧ ¬(q ∧ ¬r))$$
$$\equiv(p ∧ q ∧ ¬(r ∧ q)) ∨ (r ∧ ¬p)$$
and[or[and[and[r, not[q]], not[p]],
and[q, not[and[q, not[or[p, r]]]]]],
not[and[p, not[and[q, not[r]]]]]] ==
or[and[and[p, q], not[and[r, q]]], and[r, not[p]]]], PL]
But seems not work, i tried shorter ones, which works fine, is it because this statement too long or something I missed $?$
However it can be proved with booleanLogic axioms given in documentation, with 402 steps:
booleanLogic = {ForAll[{a, b}, and[a, b] == and[b, a]],
ForAll[{a, b}, or[a, b] == or[b, a]],
ForAll[{a, b}, and[a, or[b, not[b]]] == a],
ForAll[{a, b}, or[a, and[b, not[b]]] == a],
ForAll[{a, b, c}, and[a, or[b, c]] == or[and[a, b], and[a, c]]],
ForAll[{a, b, c}, or[a, and[b, c]] == and[or[a, b], or[a, c]]]}
proof = FindEquationalProof[
ForAll[{p, q, r},
and[or[and[and[r, not[q]], not[p]],
and[q, not[and[q, not[or[p, r]]]]]],
not[and[p, not[and[q, not[r]]]]]] ==
or[and[and[p, q], not[and[r, q]]], and[r, not[p]]]], booleanLogic]
proof["ProofGraph"]
proof["ProofNotebook"]
And here is the proof graph:
Any help would be appreciated.