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

[Merged by Bors] - chore(library/init/data/nat): backport Nat.le from Lean4 #603

Closed
wants to merge 17 commits into from

Conversation

semorrison
Copy link
Contributor

@semorrison semorrison commented Aug 18, 2021

The corresponding PR to mathlib is leanprover-community/mathlib#8756.

@gebner
Copy link
Member

gebner commented Aug 19, 2021

The reason for the timeouts seems to be related to strings:

set_option profiler true
example (h : 'h' = 'w') : false := by cases h -- before and now 0.4s
example (h : "h" = "w") : false := by cases h -- before 0.5s, now 7s
example (h : ['h'] = ['w']) : false := by cases h -- before 0.4s, now 2.7s

From what I can tell, this is because Lean tries to unify 104 < 0xd800 and 119 < 0xd800. This used to be fast (and not unifiable), but now it requires computing the inequality (and it's also unifiable now!).

@fpvandoorn
Copy link
Member

would it make sense to make nat.ble irreducible?

@gebner
Copy link
Member

gebner commented Aug 19, 2021

I'd rather make nat.le irreducible. Making nat.ble irreducible means you can't use it in dec_trivial anymore.

@gebner
Copy link
Member

gebner commented Aug 20, 2021

bors r+

bors bot pushed a commit that referenced this pull request Aug 20, 2021
The corresponding PR to mathlib is leanprover-community/mathlib#8756.

Co-authored-by: Gabriel Ebner <gebner@gebner.org>
@bors
Copy link

bors bot commented Aug 20, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title chore(library/init/data/nat): backport Nat.le from Lean4 [Merged by Bors] - chore(library/init/data/nat): backport Nat.le from Lean4 Aug 20, 2021
@bors bors bot closed this Aug 20, 2021
@bors bors bot deleted the nat.le branch August 20, 2021 10:01
bors bot pushed a commit that referenced this pull request Aug 25, 2021
…' (#607)

Daniel and Leo have decided to instead to try forward porting Lean3's `nat.le`, so in the meantime I think we should revert #603 to maintain compatibility with mathlib. :-)

https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Nat.2Ele.20backport
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.

None yet

3 participants