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

refactor(algebra/field): partially migrate to bundled homs #1999

Merged
merged 3 commits into from Feb 17, 2020

Conversation

urkud
Copy link
Member

@urkud urkud commented Feb 16, 2020

TO CONTRIBUTORS:

Make sure you have:

  • reviewed and applied the coding style: coding, naming
  • reviewed and applied the documentation requirements
  • for tactics:
  • make sure definitions and lemmas are put in the right files
  • make sure definitions and lemmas are not redundant

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

For reviewers: code review check list

Copy link
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

Thanks for the work. Looks pretty good to me. Some minor questions.

λ x0 h, one_ne_zero $ calc
1 = f (x * x⁻¹) : by rw [mul_inv_cancel x0, map_one f]
... = 0 : by rw [map_mul f, h, zero_mul]⟩
⟨mt $ λ h, h.symm ▸ f.map_zero,
Copy link
Member

Choose a reason for hiding this comment

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

Should all these map_* lemmas be simp?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't know. I guess they were not marked as simp because looking for is_ring_hom is expensive.

Copy link
Member

Choose a reason for hiding this comment

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

So now, when we bundle, we can (and should?)

Copy link
Member Author

Choose a reason for hiding this comment

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

Added some @[simp] attrs.


lemma map_div' (h : y ≠ 0) : f (x / y) = f x / f y :=
(map_mul f).trans $ congr_arg _ $ map_inv' f h
(f.map_mul _ _).trans $ congr_arg _ $ f.map_inv' h
Copy link
Member

Choose a reason for hiding this comment

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

@digama0 Is it time to make changes to Lean core, and fix the definition of field and division ring?

Copy link
Member

Choose a reason for hiding this comment

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

Fine with me, although I would prefer to delegate the scheduling of the first non-backward compatible lean release to @robertylewis and @cipher1024 .

@ChrisHughes24 ChrisHughes24 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 Feb 17, 2020
@mergify mergify bot merged commit bbf5d1a into master Feb 17, 2020
@mergify mergify bot deleted the bundled-homs-field branch February 17, 2020 21:45
anrddh pushed a commit to anrddh/mathlib that referenced this pull request May 15, 2020
…r-community#1999)

* refactor(algebra/field): partially migrate to bundled homs

* Add a few `@[simp]` attrs

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
anrddh pushed a commit to anrddh/mathlib that referenced this pull request May 16, 2020
…r-community#1999)

* refactor(algebra/field): partially migrate to bundled homs

* Add a few `@[simp]` attrs

Co-authored-by: mergify[bot] <37929162+mergify[bot]@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

4 participants