[Earlier Version]
[Earlier Version]
[[ Earlier version is in ARCHIVES ]]
FindReplacePath[{f[x_,y_]f[y,x],f[f[x_,y_],z_]f[x,f[y,z]],f[x_,f[y_,z_]]f[f[x,y],z]},f[f[b,a],f[b,a]],f[f[f[a,b],b],a],"MultiwayFragment"]
This is a basic function of multicomputation
FindReplacePath[rules,init,dest]
FindReplacePath[rules,init,FixedPoint]
where FixedPoint is a “meta pattern”
Or I could get multiple destinations....
Nik’s Version
Nik’s Version
In[]:=
AxiomaticTheory["BooleanAxioms"]
Out[]=
a.⊗b.b.⊗a.,a.⊗(b.⊕c.)a.⊗b.⊕a.⊗c.,a.⊕b.⊗a.,a.⊗b.⊕a.,a.⊕b.b.⊕a.,a.⊕b.⊗c.(a.⊕b.)⊗(a.⊕c.)
∀
{a.,b.}
∀
{a.,b.,c.}
∀
{a.,b.}
b.
∀
{a.,b.}
b.
∀
{a.,b.}
∀
{a.,b.,c.}
In[]:=
AxiomaticTheory["BooleanAxioms","NotableTheorems"]
Out[]=
Absorptiona.a.⊗(a.⊕b.),AbsorptionOrAnda.a.⊕a.⊗b.,AndAssociativity(a.⊗b.)⊗c.a.⊗(b.⊗c.),AndCommutativitya.⊗b.b.⊗a.,AndDistributivitya.⊗(b.⊕c.)a.⊗b.⊕a.⊗c.,AndIdempotencea.a.⊗a.,AndPreAssociativitya.⊗b.a.⊗(a.⊗b.),DeMorgan⊗,⊕,DoubleNegationa.,DroppingAlwaysFalsea.a.⊕b.⊗,DroppingAlwaysTruea.a.⊗b.⊕,ExcludedMiddle⊕a.⊕b.,ImpliesHuntingtonAxiomsa.⊕b.b.⊕a.,a.⊕(b.⊕c.)(a.⊕b.)⊕c.,⊕b.⊕⊕a.,ImpliesRobbinsAxiomsa.⊕b.b.⊕a.,a.⊕(b.⊕c.)(a.⊕b.)⊕c.,⊕a.,NegationRedundancya.⊕b.a.⊕⊗b.,Noncontradiction⊗a.⊗b.,OrAssociativity(a.⊕b.)⊕c.a.⊕(b.⊕c.),OrCommutativitya.⊕b.b.⊕a.,OrDistributivitya.⊕b.⊗c.(a.⊕b.)⊗(a.⊕c.),OrIdempotencea.a.⊕a.,Transposition⊕b.⊕
∀
{a.,b.}
∀
{a.,b.}
∀
{a.,b.,c.}
∀
{a.,b.}
∀
{a.,b.,c.}
∀
a.
∀
{a.,b.}
∀
{a.,b.}
a.⊕b.
a.
b.
∀
{a.,b.}
a.⊗b.
a.
b.
∀
a.
a.
∀
{a.,b.}
b.
∀
{a.,b.}
b.
∀
{a.,b.}
a.
b.
∀
{a.,b.}
∀
{a.,b.,c.}
∀
{a.,b.}
a.
a.
b.
∀
{a.,b.}
∀
{a.,b.,c.}
∀
{a.,b.}
a.⊕b.
a.⊕
b.
∀
{a.,b.}
a.
∀
{a.,b.}
a.
b.
∀
{a.,b.,c.}
∀
{a.,b.}
∀
{a.,b.,c.}
∀
a.
∀
{a.,b.}
a.
b.
a.
In[]:=
FindReplacePath["Absorption","BooleanAxioms"]
Out[]=
In[]:=
FindReplacePath["Absorption","BooleanAxioms","Path"]
Out[]=
a._⊗(a._⊕b._),a._⊗a._⊕a._⊗b._,(a._⊗a._⊕a._⊗)⊕a._⊗b._,a._⊗(a._⊕)⊕a._⊗b._,a._⊕a._⊗b._,a._⊕b._⊗a._,a._⊕b._⊗a._⊕b._⊗,a._⊕b._⊗a._⊕,(a._⊕b._)⊗a._⊕a._⊕,(a._⊕b._)⊗a._⊕a._⊕⊗(a._⊕),(a._⊕b._)⊗(a._⊕)⊗a._⊕a._⊕,(a._⊕b._)⊗a._⊕⊗a._⊕,(a._⊕b._)⊗a._⊕⊗a._⊕⊗⊕,(a._⊕b._)⊗a._⊕⊗(a._⊕)⊗a._⊕⊕,(a._⊕b._)⊗a._⊕⊗a._⊕⊗(a._⊕)⊕,(a._⊕b._)⊗a._⊕⊗a._⊕⊕,(a._⊕b._)⊗a._⊕⊗⊕a._⊕,(a._⊕b._)⊗a._⊕⊗⊕a._⊗⊕⊕,(a._⊕b._)⊗a._⊕⊗⊕a._⊗⊕,(a._⊕b._)⊗a._⊕⊗⊕a._⊗⊕a._⊗⊕,(a._⊕b._)⊗a._⊕⊗⊕a._⊗⊕a._⊗⊕,(a._⊕b._)⊗a._⊕⊗⊕a._⊗⊕⊕,(a._⊕b._)⊗a._⊕⊗⊕a._⊗⊕⊗⊕⊕,(a._⊕b._)⊗a._⊕⊗⊕a._⊗⊕⊗⊕⊕,(a._⊕b._)⊗a._⊕⊗⊕a._⊗⊕⊗⊕,(a._⊕b._)⊗a._⊕⊗⊕a._⊗⊕,(a._⊕b._)⊗a._⊕⊗⊕,(a._⊕b._)⊗a._⊕⊗⊕⊗,(a._⊕b._)⊗a._⊕⊗⊕⊗,(a._⊕b._)⊗a._⊕⊗,(a._⊕b._)⊗(a._⊕)⊗a._⊕,(a._⊕b._)⊗a._⊕⊗(a._⊕),(a._⊕b._)⊗a._⊕,a._⊕b._⊗,a._
a._
a._
b._
b._
b._
b._
a._
a._
b._
a._
b._
a._
a._
a._
b._
a._
a._
a._
b._
a._
a._
a._
b._
a._
a._
b._
a._
a._
b._
a._
a._
a._
a._
b._
a._
a._
a._
b._
a._
a._
a._
a._
b._
a._
a._
a._
a._
b._
a._
a._
a._
a._
b._
a._
a._
a._
a._
a._
a._
b._
a._
a._
a._
a._
a._
a._
b._
a._
a._
a._
a._
a._
b._
a._
a._
a._
b._
a._
a._
b._
a._
a._
a._
b._
a._
b._
a._
a._
a._
b._
a._
b._
b._
a._
b._
b._
In[]:=
FindReplacePath[p∘(p∘p)q∘(q∘p),ForAll[{a,b},a==b∘a]]
Out[]=
Statementq∘(q∘p)p∘(p∘p),PathTestSuccess,RewriteTestSuccess,Justification{{{Axiom,1},Left,{}},{{Axiom,1},Left,{}},{{Axiom,1},Right,{}},{{Axiom,1},Right,{}}},Rewrites{Replace[b_∘a_a],Replace[b_∘a_a],Replace[a_b$1_∘a]/*ReplaceAll[b$1_p],Replace[a_b$2_∘a]/*ReplaceAll[b$2_p]},Path{q∘(q∘p),q∘p,p,p∘p,p∘(p∘p)}
In[]:=
FindReplacePath[p∘(p∘p)q∘(q∘p),ForAll[{a,b},a==b∘a],"Path"]
Out[]=
{q∘(q∘p),q∘p,p,p∘p,p∘(p∘p)}
In[]:=
FindReplacePath[p·q==q·p,"WolframAxioms","Path"]
Out[]=
$Aborted[]