Skip to content

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