The purpose of this project, launched on Sep 25, 2024, is to explore the space of equational theories of magmas, ordered by implication. To begin with we shall focus only on theories of a single equation, and specifically on the 4694 equational laws involving at most four magma operations, up to symmetry and relabeling (here is the list in Lean and in plain text). This creates 4694*(4694-1) = 22,028,942 implications that need to be proven or disproven, creating both "implications" and "anti-implications".
We will accumulate both "proven" and "conjectured" implications and anti-implications: proven assertions will be verified in the proof assistant language Lean, and "conjectured" assertions represent all claims (either human-generated or computer-generated) that have not yet been verified in Lean. The current status of the project can be found on the dashboard.
Some selected equations of interest are listed here (in Lean form) and here (in a human readable blueprint). Examples include
x = x
. The trivial law.x = y
. The singleton law.x ◇ y = y ◇ x
. The commutative law.x ◇ y = z ◇ w
. The constant law.x ◇ (y ◇ z) = (x ◇ y) ◇ z
. The associative law.Here is a tour of several selected equations, including the ones above.
Current statistics and data files, updated automatically:
Current visualizations, updated automatically:
For guidelines on how to contribute, see the CONTRIBUTING.md file. Participants are requested to abide by our code of conduct.
To build this project after installing Lean and cloning this repository, follow these steps:
% cd equational_theories/
% lake exe cache get
% lake build
run_before_push
– performs some of the CI checks, suitable for running just before pushing a new PRextract_implications
– extracts implications from one or more Lean files. This outputs the "ground truth" of implication data, for use by other scriptsexplore_magma
– test a given magma table against all or a subset of the equations in Equations/All.lean
find_dual
– finds the dual of an equationfind_equation_id
– finds the equation number of an equation stringfind_powerful_theorems.py
– finds theorems that, if proved, would imply many othersgenerate_eqs_list
– generates a list of equationsgenerate_image
– generates an image of implicationsgenerate_most_wanted_list
– generates the "most wanted" implicationsgenerate_z3_counterexample
– given an implication statement between two equations, calls Z3 to try to generate a counterexampleprocess_implications
– processes implications from one or more Lean filesgenerate_graphviz_graph
– creates a graphviz graphtransitive_closure
– computes the transitive closure of a set of implicationstransitive_reduction
– finds a transitive reduction of a set of implicationsgraph
– graph library