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(*): don't assume sub_eq_add_neg and div_eq_mul_inv are defeq #5302

Closed
wants to merge 13 commits into from

Conversation

Vierkantor
Copy link
Collaborator

@Vierkantor Vierkantor commented Dec 10, 2020

This PR prepares for a follow-up PR (#5303) that adds div and sub fields to (add_)group(_with_zero). That follow-up PR is intended to fix the following kind of diamonds:
Let foo X be a type with a ∀ X, has_div (foo X) instance but no ∀ X, has_inv (foo X), e.g. when foo X is a euclidean_domain. Suppose we also have an instance ∀ X [cromulent X], group_with_zero (foo X). Then the (/) coming from group_with_zero_has_div cannot be defeq to the (/) coming from foo.has_div.

As a consequence of making the has_div instances defeq, we can no longer assume that (div_eq_mul_inv a b : a / b = a * b⁻¹) = rfl for all groups. This preparation PR should have changed all places in mathlib that assumed defeqness, to rewrite explicitly instead.

Zulip thread: https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/.60div.60.20as.20a.20field.20in.20.60group(_with_zero).60


This commit prepares for a follow-up that makes `div` and `sub` fields in
(`add_`)`group`(`_with_zero`).
@Vierkantor Vierkantor added the awaiting-review The author would like community review of the PR label Dec 10, 2020
@Vierkantor Vierkantor added WIP Work in progress and removed awaiting-review The author would like community review of the PR labels Dec 10, 2020
@Vierkantor
Copy link
Collaborator Author

Since the PR is still getting errors, I'm marking it as WIP until it compiles again.

@sgouezel
Copy link
Collaborator

I have fixed times_cont_diff.

@sgouezel sgouezel added awaiting-review The author would like community review of the PR and removed WIP Work in progress labels Dec 11, 2020
@Vierkantor
Copy link
Collaborator Author

Great, thank you so much!

@sgouezel
Copy link
Collaborator

The linter complains. I'll let you fix it, then I'll review your changes (and you will have to review mine!)

Copy link
Collaborator Author

@Vierkantor Vierkantor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your changes LGTM otherwise 👍

src/analysis/normed_space/multilinear.lean Show resolved Hide resolved
@sgouezel
Copy link
Collaborator

Let's merge this. Thanks a lot!
bors r+

@github-actions github-actions bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Dec 11, 2020
bors bot pushed a commit that referenced this pull request Dec 11, 2020
#5302)

This PR prepares for a follow-up PR (#5303) that adds `div` and `sub` fields to (`add_`)`group`(`_with_zero`). That follow-up PR is intended to fix the following kind of diamonds:
Let `foo X` be a type with a `∀ X, has_div (foo X)` instance but no `∀ X, has_inv (foo X)`, e.g. when `foo X` is a `euclidean_domain`. Suppose we also have an instance `∀ X [cromulent X], group_with_zero (foo X)`. Then the `(/)` coming from `group_with_zero_has_div` cannot be defeq to the `(/)` coming from `foo.has_div`.

As a consequence of making the `has_div` instances defeq, we can no longer assume that `(div_eq_mul_inv a b : a / b = a * b⁻¹) = rfl` for all groups. This preparation PR should have changed all places in mathlib that assumed defeqness, to rewrite explicitly instead.

Zulip thread: https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/.60div.60.20as.20a.20field.20in.20.60group(_with_zero).60



Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr>
@bors
Copy link

bors bot commented Dec 11, 2020

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title chore(*): don't assume sub_eq_add_neg and div_eq_mul_inv are defeq [Merged by Bors] - chore(*): don't assume sub_eq_add_neg and div_eq_mul_inv are defeq Dec 11, 2020
@bors bors bot closed this Dec 11, 2020
@bors bors bot deleted the no-defeq-sub_eq_add_neg branch December 11, 2020 16:43
bors bot pushed a commit that referenced this pull request Dec 16, 2020
…5303)

This PR is intended to fix the following kind of diamonds:
Let `foo X` be a type with a `∀ X, has_div (foo X)` instance but no `∀ X, has_inv (foo X)`, e.g. when `foo X` is a `euclidean_domain`. Suppose we also have an instance `∀ X [cromulent X], group_with_zero (foo X)`. Then the `(/)` coming from `group_with_zero_has_div` cannot be defeq to the `(/)` coming from `foo.has_div`.

As a consequence of making the `has_div` instances defeq, we can no longer assume that `(div_eq_mul_inv a b : a / b = a * b⁻¹) = rfl` for all groups. The previous preparation PR #5302 should have changed all places in mathlib that assumed defeqness, to rewrite explicitly instead.



Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.

None yet

2 participants