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

feat: add BitVec.toNat_[udiv|umod] and [udiv|umod]_eq #15

Closed
wants to merge 37 commits into from

Conversation

tobiasgrosser
Copy link

Co-authored-by: Siddharth siddu.druid@gmail.com

@tobiasgrosser
Copy link
Author

tobiasgrosser commented Aug 10, 2024

Hey @bollu, I pulled these out of #12 and cleaned them up, as I need them for my ForLean.lean upstreaming effort. I golfed the proofs a bit and dropped the unnecessary (hy : 0 < y) hypothesis from toNat_udiv. Is this OK to PR in lean?

kmill and others added 14 commits August 10, 2024 16:54
Adds `@[app_delab ident]` as a macro for `@[delab app.ident]`. Resolves
the identifier when expanding the macro, saving needing to use the fully
qualified identifiers that `@[delab]` requires. Also, unlike `@[delab]`,
throws an error if the identifier cannot be resolved.

Closes leanprover#4899
.. as well as neg_neq_iff_neq_neg.

---------

Co-authored-by: Henrik Böving <hargonix@gmail.com>
Closes leanprover#4513

---------

Co-authored-by: Kim Morrison <kim@tqft.net>
After having added already `BitVec.ushiftRight_*_distrib`in
leanprover#4667 for ushiftRight, this PR
now completes the `*_distrib` theorems for shift.
david-christiansen and others added 9 commits August 12, 2024 07:08
Without this change, a stack overflow on Mac OS during tactic execution
can lead to the message:

    terminated by signal SIGBUS (Misaligned address error)

This comes from `lean_alloc_small`. With the change, the process instead
terminates with the more accurate and actionable:

    Stack overflow detected. Aborting.
The prior default of 1000000 could not be achieved in practice, because
the stack would overflow after around 5000 recursive invocations. This
meant that a poorly-chosen @[ext] lemma could crash Lean.

Talking to Mathlib users, it seems that 10 would be a very large number
in practice, so a default limit of 100 should not change successful
uses. But it does make it much easier to diagnose and recover from poor
choices of @[ext] lemmas.
Co-authored-by: Atticus Kuhn <52258164+AtticusKuhn@users.noreply.github.com>
Kha and others added 12 commits August 12, 2024 12:15
...unless we are about to kill the process anyway (which is not the
default)

Ensures panics are visible as regular messages in the language server
and properly ordered in relation to other messages on the cmdline
Step 2/~7 in upstreaming LeanSAT.

---------

Co-authored-by: Tobias Grosser <tobias@grosser.es>
Co-authored-by: Siddharth <siddu.druid@gmail.com>
Co-authored-by: Markus Himmel <markus@lean-fro.org>
Co-authored-by: Kim Morrison <scott.morrison@gmail.com>
According to the release notes of cache this should not break anything
as they merely upgraded the node version.
…over#4982)

For structure projections, the pretty printer assumed that the
expression was type correct. Now it checks that the object being
projected is of the correct type. Such terms appear in type mismatch
errors.

Also, fixes and improves `#print` for structures. The types of
projections now use MessageData (so are now hoverable), and the type of
`self` is now the correct type.

Closes leanprover#4670
…5004)

leanprover#4976 moved resolution of a promise to an earlier point, but that led to
object being marked MT earlier, so we need to move the code that
minimizes those objects earlier too to revert the performance
regression.
@tobiasgrosser
Copy link
Author

This has been merged in leanprover@7c5d866

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants