Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

fix(algebra/euclidean_domain): remove decidable_eq assumption#2362

Merged
mergify[bot] merged 3 commits intomasterfrom
constructive_euclidean_field
Apr 9, 2020
Merged

fix(algebra/euclidean_domain): remove decidable_eq assumption#2362
mergify[bot] merged 3 commits intomasterfrom
constructive_euclidean_field

Conversation

@gebner
Copy link
Member

@gebner gebner commented Apr 8, 2020

Commit Message

This PR removes the decidable_eq assumption on the field.to_euclidean_domain instance. Decidable equality was only used to define the remainder with an if-then-else, but this can also be done by exploiting the fact that 0⁻¹ = 0.

The current instance is a bit problematic since it can cause a + b : ℝ to be noncomputable if type-class inference happens to choose the wrong instance (going through euclidean_domain instead of "directly" through some kind of ring).

TO CONTRIBUTORS:

Make sure you have:

If this PR is related to a discussion on Zulip, please include a link in the discussion.

For reviewers: code review check list

@sgouezel sgouezel added the ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) label Apr 8, 2020
@mergify mergify bot merged commit 80d3ed8 into master Apr 9, 2020
@mergify mergify bot deleted the constructive_euclidean_field branch April 9, 2020 06:10
butterthebuddha pushed a commit to butterthebuddha/mathlib that referenced this pull request May 15, 2020
…over-community#2362)

This PR removes the `decidable_eq` assumption on the `field.to_euclidean_domain` instance.  Decidable equality was only used to define the remainder with an if-then-else, but this can also be done by exploiting the fact that `0⁻¹ = 0`.

The current instance is a bit problematic since it can cause `a + b : ℝ` to be noncomputable if type-class inference happens to choose the wrong instance (going through `euclidean_domain` instead of "directly" through some kind of ring).
butterthebuddha pushed a commit to butterthebuddha/mathlib that referenced this pull request May 16, 2020
…over-community#2362)

This PR removes the `decidable_eq` assumption on the `field.to_euclidean_domain` instance.  Decidable equality was only used to define the remainder with an if-then-else, but this can also be done by exploiting the fact that `0⁻¹ = 0`.

The current instance is a bit problematic since it can cause `a + b : ℝ` to be noncomputable if type-class inference happens to choose the wrong instance (going through `euclidean_domain` instead of "directly" through some kind of ring).
cipher1024 pushed a commit to cipher1024/mathlib that referenced this pull request Mar 15, 2022
…over-community#2362)

This PR removes the `decidable_eq` assumption on the `field.to_euclidean_domain` instance.  Decidable equality was only used to define the remainder with an if-then-else, but this can also be done by exploiting the fact that `0⁻¹ = 0`.

The current instance is a bit problematic since it can cause `a + b : ℝ` to be noncomputable if type-class inference happens to choose the wrong instance (going through `euclidean_domain` instead of "directly" through some kind of ring).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants