Zulip Chat Archive
Stream: Equational
Topic: Getting magma laws in MetaM
Adam Topaz (Oct 15 2024 at 21:14):
I tried looking for some (meta) code that obtains a term of MagmaLaw
corresponding to an equation given by a n : Nat
(assuming Equationn
is in the environment). Does the repo already have something like this? If not, I wrote some code that does this that I will be happy to PR.
Shreyas Srinivas (Oct 15 2024 at 21:57):
It's either the EquationCommand or FactsSyntax
Shreyas Srinivas (Oct 15 2024 at 21:57):
Depending on what you want
Shreyas Srinivas (Oct 15 2024 at 21:57):
EquationCommand produces MagmaLaw
s
Shreyas Srinivas (Oct 15 2024 at 21:58):
FactsSyntax
can be used to provide large classes of implications/anti-implications by referring to lists of Nat numbers of the equations
Shreyas Srinivas (Oct 15 2024 at 22:01):
It is possible that there is no exact function that returns the name of the equation given a number but FactsSyntax needs to translate those Nats to equation names, and so contains code you could use.
Adam Topaz (Oct 15 2024 at 22:12):
Okay, I see they're just all stored in the env extension associated with magmaLawExt
.
Shreyas Srinivas (Oct 15 2024 at 22:29):
By the way Anand tried to add the laws into some environment extension last week and this significantly slowed CI run time. Do please look into that thread. I have forgotten the details
Shreyas Srinivas (Oct 15 2024 at 22:33):
https://leanprover.zulipchat.com/#narrow/stream/458659-Equational/topic/slow.20build/near/475869383
Shreyas Srinivas (Oct 15 2024 at 22:33):
(deleted)
Mario Carneiro (Oct 15 2024 at 23:53):
That issue is fixed, the current version of the equation command adds everything to the extension
Andrés Goens (Oct 16 2024 at 06:06):
I'm confused about the given an n : Nat
? Is this the number of the equation? there is this draft PR https://github.com/teorth/equational_theories/pull/322 but I don't know it'll ever be used. As others pointed out we instead do that when elaborating equation and build both at the same time
Last updated: May 02 2025 at 03:31 UTC