Skip to content

chore(library/init/data): constructive nat #171

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Jack-Pumpkinhead
Copy link

Add lemmas to avoid classical.choice used in theorems/lemmas/defs prefix with nat.
(There are 121 usages, for example nat.strong_induction_on, nat.mod_lt, etc.

add nat lemmas to avoid classical.choice
@digama0
Copy link
Member

digama0 commented Apr 1, 2020

Rather than having nat versions of these theorems, I suggest importing the decidable.* order lemmas in algebra.order from mathlib and using them instead.

@digama0
Copy link
Member

digama0 commented Apr 1, 2020

Also, it would be nice if this extended to int as well. Again, it should be as simple as applying the decidable.* theorems instead of the regular ones when constructing the instance.

@Jack-Pumpkinhead
Copy link
Author

Oh.. int.decidable_le use (implicit) subtraction int.has_sub which comes from int.comm_ring which contains classical...

In other situations decidable.* is a good choice.

@digama0
Copy link
Member

digama0 commented Apr 1, 2020

Right, because the proof of int.comm_ring uses facts about linear ordered rings (on nat, I think) that ultimately trace back to those theorems. I originally wrote the decidable.* series with exactly this refactor in mind, but that was before we unfroze the lean repo.

@gebner gebner added this to the Lean 3.9 milestone Apr 9, 2020
@gebner gebner modified the milestones: Lean 3.9, Lean 3.10 Apr 18, 2020
@gebner gebner modified the milestones: Lean 3.10, Lean 3.11, Lean 3.12 May 1, 2020
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.

3 participants