-
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
[Merged by Bors] - chore(data/fintype): drop a decidable_pred
assumption
#14971
Conversation
fintype.of_bijective (sum.elim (coe : {b // b = a} → α) (coe : {b // b ≠ a} → α)) $ | ||
by { classical, exact (equiv.sum_compl (= a)).bijective } |
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.
Why is this new proof so much longer than the old one? Can't you just do?
fintype.of_bijective (sum.elim (coe : {b // b = a} → α) (coe : {b // b ≠ a} → α)) $ | |
by { classical, exact (equiv.sum_compl (= a)).bijective } | |
by { classical, exact fintype.of_equiv _ (equiv.sum_compl (= a)) } |
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.
With my proof, it is clear that the "data" part of the definition does not depend on classical.choice
. I don't know if your definition is computable.
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.
This is just the old proof with classical
slapped on top, so the data part should be computable as well.
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.
Your definition is noncomputable. My definition still compiles if I remove type annotations from coe
but I'm not sure how much this will affect readability.
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.
Here is a bit more straightforward of an algorithm data-wise, but it still depends on classical.choice
-- the goal is equivalent to x = a ∨ ¬x = a
, and I wouldn't be surprised if LEM could be proved from this definition.
fintype.of_bijective (sum.elim (coe : {b // b = a} → α) (coe : {b // b ≠ a} → α)) $ | |
by { classical, exact (equiv.sum_compl (= a)).bijective } | |
⟨((finset.univ : finset {b // b ≠ a}).map (function.embedding.subtype _)).cons a (by simp), | |
λ x, by { cases eq_or_ne x a; simp [*] }⟩ |
@vihdzp The reason it's not computable when you put classical
at the beginning is that the generated term is of the form let I := foo in bar
where foo
is the noncomputable classical decidability instance.
fintype.of_bijective (sum.elim (coe : {b // b = a} → α) (coe : {b // b ≠ a} → α)) $ | ||
by { classical, exact (equiv.sum_compl (= a)).bijective } |
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.
Here is a bit more straightforward of an algorithm data-wise, but it still depends on classical.choice
-- the goal is equivalent to x = a ∨ ¬x = a
, and I wouldn't be surprised if LEM could be proved from this definition.
fintype.of_bijective (sum.elim (coe : {b // b = a} → α) (coe : {b // b ≠ a} → α)) $ | |
by { classical, exact (equiv.sum_compl (= a)).bijective } | |
⟨((finset.univ : finset {b // b ≠ a}).map (function.embedding.subtype _)).cons a (by simp), | |
λ x, by { cases eq_or_ne x a; simp [*] }⟩ |
@vihdzp The reason it's not computable when you put classical
at the beginning is that the generated term is of the form let I := foo in bar
where foo
is the noncomputable classical decidability instance.
bors r+ |
OTOH, now the proof depends on `classical.choice`.
Pull request successfully merged into master. Build succeeded: |
decidable_pred
assumptiondecidable_pred
assumption
OTOH, now the proof depends on
classical.choice
.