Function Repository Resource:

FindEquationalModels

Source Notebook

Find instances of a binary operator that satisfy equational constraints

Contributed by: Stephen Wolfram

ResourceFunction["FindEquationalModels"][eqns,f,vars]

finds size-2 models of the operator f that appear in the equation eqns, with variables vars.

ResourceFunction["FindEquationalModels"][eqns,f,vars,k]

finds size-k models.

Examples

Basic Examples (4) 

Find the "multiplication tables" for semigroups of size 2:

In[1]:=
Grid /@ ResourceFunction["FindEquationalModels"][
  f[f[a, b], c] == f[a, f[b, c]], f, {a, b, c}]
Out[1]=

Find size-3 models of an equational axiom:

In[2]:=
Grid /@ ResourceFunction["FindEquationalModels"][
  f[a, f[a, f[b, a]]] == a, f, {a, b}, 3]
Out[2]=

Find size-2 models of Wolfram's axiom:

In[3]:=
Grid /@ ResourceFunction["FindEquationalModels"][
  f[f[f[p, q], r], f[p, f[f[p, r], p]]] == r, f, {p, q, r}]
Out[4]=

There are no size-3 models:

In[5]:=
Grid /@ ResourceFunction["FindEquationalModels"][
  f[f[f[p, q], r], f[p, f[f[p, r], p]]] == r, f, {p, q, r}, 3]
Out[5]=

Version History

  • 1.0.0 – 17 December 2019

Author Notes

See https://www.wolframscience.com/nks/notes-12-9--implementation-of-operators-from-axioms/ which may be a better thing to do....

In[1]:=
Module[{c, v}, c = Apply[
   Function, {v = Union[Level[axioms, {-1}]], Apply[And, axioms]}]; Select[Range[0, k^(k^2) - 1], With[{u = IntegerDigits[#, k, k^2]}, Block[{f}, f[x_, y_] := u[[-1 - k x - y]]; Array[c, Table[k, {Length[v]}], 0, And]]] &]]

License Information