-
Notifications
You must be signed in to change notification settings - Fork 297
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
fix(tactic/omega): reify non-constant ints and nats #1748
Conversation
@skbaek thanks! Does this address both of the new bug reports in #1484 or only the one? If both, could you add the second as a test? The Travis failure is because of missing documentation. Since this is a big refactor and |
I've changed the PR name to "fix(tactic/omega)", assuming that "tactic/ring" is a typo. |
@bryangingechen Right, I was copying and pasting the PR format and forgot to change that, thanks. |
@robertylewis I added the |
src/tactic/omega/int/main.lean
Outdated
@@ -213,6 +213,10 @@ meta def intro_ints : tactic unit := | |||
do (expr.pi _ _ `(int) _) ← target, | |||
intro_ints_core | |||
|
|||
/- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docstring syntax is /-- ... -/
Yep, that's what I meant, thanks!
Travis will fail if there is any declaration named You should do the following:
|
If you do the first two steps, I'm happy to take care of the rest. |
We've just been discussing this PR in a maintainers' meeting. We all think it is a very important and useful PR, but unfortunately none of us is able to add the missing documentation as we don't really understand the tactic. Do you think you could add the documentation, and then we'll be happy to take care of the rest? |
I think a lot of documentation is still missing: the linter output of travis gives -- tactic/omega/nat/sub_elim.lean
#print omega.nat.preform.sub_terms /- def missing doc string -/
#print omega.nat.preform.sub_subst /- def missing doc string -/
-- tactic/omega/nat/main.lean
#print omega.nat.to_exprterm /- def missing doc string -/
#print omega.nat.exprterm.to_preterm /- def missing doc string -/
#print omega.nat.wff /- def missing doc string -/
#print omega.nat.to_exprform /- def missing doc string -/
#print omega.nat.prove /- def missing doc string -/
#print omega.nat.exprform.to_preform /- def missing doc string -/
#print omega.nat.exprform.exprs /- def missing doc string -/
#print omega.nat.wfx /- def missing doc string -/
#print omega.nat.intro_nats_core /- def missing doc string -/
#print omega.nat.intro_nats /- def missing doc string -/
#print omega.nat.eq_nat /- def missing doc string -/
#print omega.nat.exprterm.exprs /- def missing doc string -/
#print omega.nat.to_preform /- def missing doc string -/
-- tactic/omega/nat/form.lean
#print omega.nat.preform.repr /- def missing doc string -/
#print omega.nat.preform.sub_free /- def missing doc string -/
#print omega.nat.preform /- constant missing doc string -/
#print omega.nat.preform.fresh_index /- def missing doc string -/
#print omega.nat.preform.implies /- def missing doc string -/
#print omega.nat.preform.sat /- def missing doc string -/
#print omega.nat.exprform /- constant missing doc string -/
#print omega.nat.preform.valid /- def missing doc string -/
#print omega.nat.preform.unsat /- def missing doc string -/
#print omega.nat.preform.equiv /- def missing doc string -/
#print omega.nat.preform.neg_free /- def missing doc string -/
-- tactic/omega/misc.lean
#print omega.app_first /- def missing doc string -/
#print omega.intro_fresh /- def missing doc string -/
-- tactic/omega/main.lean
#print omega.determine_domain /- def missing doc string -/
-- tactic/omega/int/main.lean
#print omega.int.exprform.to_preform /- def missing doc string -/
#print omega.int.to_exprterm /- def missing doc string -/
#print omega.int.eq_int /- def missing doc string -/
#print omega.int.intro_ints_core /- def missing doc string -/
#print omega.int.prove /- def missing doc string -/
#print omega.int.to_exprform /- def missing doc string -/
#print omega.int.exprterm.exprs /- def missing doc string -/
#print omega.int.wfx /- def missing doc string -/
#print omega.int.intro_ints /- def missing doc string -/
#print omega.int.exprterm.to_preterm /- def missing doc string -/
#print omega.int.wff /- def missing doc string -/
#print omega.int.exprform.exprs /- def missing doc string -/
#print omega.int.to_preform /- def missing doc string -/
-- tactic/omega/int/form.lean
#print omega.int.preform.sat /- def missing doc string -/
#print omega.int.preform.holds /- def missing doc string -/
#print omega.int.preform.implies /- def missing doc string -/
#print omega.int.preform.unsat /- def missing doc string -/
#print omega.int.exprform /- constant missing doc string -/
#print omega.int.preform.equiv /- def missing doc string -/
#print omega.int.preform /- constant missing doc string -/
#print omega.int.preform.valid /- def missing doc string -/
#print omega.int.preform.repr /- def missing doc string -/
#print omega.int.preform.fresh_index /- def missing doc string -/ |
@skbaek Do you know if or when you'll have time to return to this? |
@robertylewis I made a PR but realized I was working on the wrong branch and closed it. I'll move the docs here |
@skbaek It looks like there was a problem with the merge. The git history here is pretty complicated, maybe you can rebase only the relevant (non-merge) commits onto master? I hope there wouldn't be too many conflicts since |
Oh, I see there are some conflicts with derived instances added in #1898 that will complicate things. |
@skbaek : @fpvandoorn made an attempt to extract the intended changes from this PR, https://github.com/leanprover-community/mathlib/tree/seul_omega We're not sure if it's exactly right. An example is failing that worked with the old example (k : ℕ) : ¬1 + (1 + 2 * 2) = k * 2 ∨ k = 3 :=
by omega A little debugging turns up example (k : ℕ) : ¬1 + (1 + 2 * 2) = k * 2 ∨ k = 3 :=
by do desugar, preprocess, e ← target >>= to_preform, trace e, skip which traces |
It is very possible that it is because of a bad resolution of a merge conflict. I didn't know the code, but hopefully @skbaek can figure out what went wrong. |
@robertylewis I've rebased the commits to As for the failing example, |
@skbaek I'm afraid this is still reverting changes made to master since the original PR. For instance, a number of I suppose the failing example would work with a call to |
Could we try to get this merged? As far as I understand, the example that is now failing has never been really in the scope of |
I have added various fixes and cleanups in a branch |
My branch didn't pass the linter, since there are still a few missing docstrings. Way less than in the first PRs, but still...
Do you want to merge it anyway (and update |
Make omega treat any non-constant integers and natural numbers as variables