teorth / equational_theories

A project to map out the relations between different equational theories of Magmas.
Apache License 2.0
75 stars 19 forks source link

TOOL: Given one or more Lean files, extract the implication status of all equations appearing in the file #29

Open teorth opened 4 hours ago

teorth commented 4 hours ago

Given one or more Lean files as input, extract all the implications and proof_wanted statements from that file. Then, for any two equations i, j that appear anywhere in these implications, report the status of the implication i => j as one of the following:

Command-Master commented 3 hours ago

claim

Command-Master commented 2 hours ago

Should this tool be a metaprogram, or is it fine for it to shallowly parse the files (i.e. search for (G: Type*) [Magma G] (G: Equation(\d+) G) : Equation(\d+) G and ∃ (G: Type) (_: Magma G), Equation(\d+) G ∧ ¬ Equation(\d+) G, and add special suuport for Equation1_true)?

dwrensha commented 2 hours ago

22 demonstrates a starting point for one way to do this kind of analysis directly in Lean.

teorth commented 2 hours ago

Should this tool be a metaprogram, or is it fine for it to shallowly parse the files (i.e. search for (G: Type*) [Magma G] (G: Equation(\d+) G) : Equation(\d+) G and ∃ (G: Type) (_: Magma G), Equation(\d+) G ∧ ¬ Equation(\d+) G, and add special suuport for Equation1_true)?

In the longer term I think a metaprogram would be the most robust solution (that would also be adaptable for other projects), but a "quick and dirty" shallow approach may be faster in the short term. So it could go either way. One compromise is to try to write a quick and dirty program, but in a way that many of the components of the code could be refactored into a more robust long-term solution later.

Command-Master commented 2 hours ago

If #22 could be modified so Implication contains whether it's conjectured I could directly process the Output structure it produces

Command-Master commented 9 minutes ago

Isn't this already implemented in scripts/process_implications.py?