Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Massive generation of refutations via polynomials over Z/nZ #19

Merged
merged 41 commits into from
Sep 30, 2024

Conversation

nomeata
Copy link
Collaborator

@nomeata nomeata commented Sep 27, 2024

This PR adds a large number of automatically generated refutations by @carlini in https://github.com/carlini/equational_theories. All of them are magmas over Z/nZ with a polynomial of degree ≤2 as the operations.

For now, until we know better what to actually run, I excluded all magmas with 6 or more elements, just to keep this PR sizable.

@Shreyas4991 Shreyas4991 marked this pull request as ready for review September 27, 2024 10:50
@nomeata
Copy link
Collaborator Author

nomeata commented Sep 27, 2024

Hmm, the blueprint CI broke. I think I’ll wait for the overall discussion around file structure to settle before continueing here. Anyone is welcome to pick it up though.

DecideBang.lean Outdated Show resolved Hide resolved
DecideBang.lean Outdated Show resolved Hide resolved
@Shreyas4991 Shreyas4991 added the WIP Work in Progress label Sep 27, 2024
@few few mentioned this pull request Sep 29, 2024
6 tasks
@pitmonticone pitmonticone added do-not-merge This PR is not meant to be merged and removed do-not-merge This PR is not meant to be merged labels Sep 29, 2024
nomeata added a commit that referenced this pull request Sep 29, 2024
this extracts the “infrastructure” built in #19 into its own PR. In
particular

 * The `Facts G [1,2] [3,4]` syntax to concisely and efficiently state
   that G satisfies Equation1 and Equation2, but not Equation3 and
   Equation4

   There is also a crude `calculate_facts` command that takes a magma
   and an instance and a tactic and lists those for which the tactic
   succeeds.

* The `decideFin!` tactic that is a bit like `decide` but simply
  believes that the statement is true, so that the check only happens by
  the kernel, and uses custom code to construct the `Decidable` instance
  for the kind of theorems we actually encounter, to avoid the (slow)
  type inference.

* The `memoFinOp` elaborator that take a function
  `Fin n → Fin n → Fin n`, tabulates it, encodes this table in a single
  number and implements the lookup based on that. Presumably that's more
  compact and faster to evaluate by `decide` than other forms (array
  indexing, polynomials etc.)
@nomeata
Copy link
Collaborator Author

nomeata commented Sep 29, 2024

Should be merged after #110 only.

@nomeata nomeata removed the WIP Work in Progress label Sep 30, 2024
@nomeata nomeata merged commit 8cc1cd8 into teorth:main Sep 30, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants