-
Notifications
You must be signed in to change notification settings - Fork 367
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] - feat: port Data.Int.Cast.Basic #670
Conversation
@digama0 can you confirm for me that |
I use the convention that any |
@[simp, norm_cast] | ||
theorem cast_negSucc (n : ℕ) : (-[n+1] : R) = -(n + 1 : ℕ) := | ||
AddGroupWithOne.intCast_negSucc n | ||
#align int.cast_neg_succ_of_nat Int.cast_negSuccₓ |
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.
#align int.cast_neg_succ_of_nat Int.cast_negSuccₓ | |
#align int.cast_neg_succ_of_nat Int.cast_negSucc |
We definitely want to translate these without the ₓ. The only reason this statement is different is because coe
is gone now, but this lemma is the closest approximation we've got in Lean 4. I think the statement is even defeq to the Lean 3 version.
(Note sure about the precise semantics of #align foo Fooₓ
so maybe the ₓ does what I want.)
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.
There is no ₓ
that appears in the final translation. The ₓ
is just a signal to mathport that the types don't match and it should use the type of Foo
downstream instead of foo
.
I think in this case the dubious translations are arising mostly (if not entirely) from the fact that the nightly on which this mathport output was based came from a mathlib4 before I had ported Data.{Nat, Int}.Cast.Defs
. I will check again when the next nightly comes out to see if these are still marked as dubious.
bors merge |
mathlib3 SHA: 39af7d3bf61a98e928812dbc3e16f4ea8b795ca3 Porting notes: 1. Some lemmas were transferred from `Data.Int.Cast.Defs` in order to match mathlib3 (I accidentally put them in the wrong place when I had ported that file because those lemmas were already present in mathlib4.) 2. The lemmas just mentioned have retained their `simp` attribute for the reason Gabriel mentioned on that PR (#641), even though that attribute isn't present on the mathlib3 version. 3. The `bit0` and `bit1` lemmas have been marked as deprecated. 4. There were many dubious translation errors, I believe primarily because of the difference in the way coercions are handled, so I have `#align`ed all of these with `ₓ`. I believe this is the correct thing to do, but confirmation would be nice.
Pull request successfully merged into master. Build succeeded: |
Regenerated from the [port status wiki page](https://github.com/leanprover-community/mathlib/wiki/mathlib4-port-status). Relates to the following PRs: * leanprover-community/mathlib4#643 * leanprover-community/mathlib4#646 * leanprover-community/mathlib4#648 * leanprover-community/mathlib4#649 * leanprover-community/mathlib4#651 * leanprover-community/mathlib4#655 * leanprover-community/mathlib4#656 * leanprover-community/mathlib4#657 * leanprover-community/mathlib4#661 * leanprover-community/mathlib4#670 * leanprover-community/mathlib4#671 * leanprover-community/mathlib4#672 * leanprover-community/mathlib4#686
Regenerated from the [port status wiki page](https://github.com/leanprover-community/mathlib/wiki/mathlib4-port-status). Relates to the following PRs: * `algebra.char_zero.defs`: leanprover-community/mathlib4#661 * `algebra.group.order_synonym`: leanprover-community/mathlib4#651 * `algebra.hierarchy_design`: leanprover-community/mathlib4#657 * `algebra.quotient`: leanprover-community/mathlib4#643 * `algebra.ring.defs`: leanprover-community/mathlib4#655 * `algebra.ring.order_synonym`: leanprover-community/mathlib4#671 * `control.equiv_functor`: leanprover-community/mathlib4#649 * `data.dlist.basic`: leanprover-community/mathlib4#616 * `data.int.cast.basic`: leanprover-community/mathlib4#670 * `data.lazy_list`: leanprover-community/mathlib4#686 * `data.list.lex`: leanprover-community/mathlib4#672 * `data.option.n_ary`: leanprover-community/mathlib4#656 * `data.sigma.lex`: leanprover-community/mathlib4#646 * `group_theory.eckmann_hilton`: leanprover-community/mathlib4#626 * `logic.equiv.basic`: leanprover-community/mathlib4#631 * `order.iterate`: leanprover-community/mathlib4#648
Regenerated from the [port status wiki page](https://github.com/leanprover-community/mathlib/wiki/mathlib4-port-status). Relates to the following PRs: * `algebra.char_zero.defs`: leanprover-community/mathlib4#661 * `algebra.group.inj_surj`: leanprover-community/mathlib4#707 * `algebra.group.order_synonym`: leanprover-community/mathlib4#651 * `algebra.group.units`: leanprover-community/mathlib4#549 * `algebra.hierarchy_design`: leanprover-community/mathlib4#657 * `algebra.quotient`: leanprover-community/mathlib4#643 * `algebra.ring.defs`: leanprover-community/mathlib4#655 * `algebra.ring.order_synonym`: leanprover-community/mathlib4#671 * `control.equiv_functor`: leanprover-community/mathlib4#649 * `data.dlist.basic`: leanprover-community/mathlib4#616 * `data.int.cast.basic`: leanprover-community/mathlib4#670 * `data.lazy_list`: leanprover-community/mathlib4#686 * `data.list.lex`: leanprover-community/mathlib4#672 * `data.option.n_ary`: leanprover-community/mathlib4#656 * `data.sigma.lex`: leanprover-community/mathlib4#646 * `data.ulift`: leanprover-community/mathlib4#703 * `group_theory.eckmann_hilton`: leanprover-community/mathlib4#626 * `logic.equiv.basic`: leanprover-community/mathlib4#631 * `order.iterate`: leanprover-community/mathlib4#648
Regenerated from the [port status wiki page](https://github.com/leanprover-community/mathlib/wiki/mathlib4-port-status). Relates to the following PRs: * `algebra.char_zero.defs`: leanprover-community/mathlib4#661 * `algebra.group.inj_surj`: leanprover-community/mathlib4#707 * `algebra.group.order_synonym`: leanprover-community/mathlib4#651 * `algebra.group.units`: leanprover-community/mathlib4#549 * `algebra.hierarchy_design`: leanprover-community/mathlib4#657 * `algebra.opposites`: leanprover-community/mathlib4#644 * `algebra.quotient`: leanprover-community/mathlib4#643 * `algebra.ring.defs`: leanprover-community/mathlib4#655 * `algebra.ring.order_synonym`: leanprover-community/mathlib4#671 * `control.equiv_functor`: leanprover-community/mathlib4#649 * `data.dlist.basic`: leanprover-community/mathlib4#616 * `data.int.cast.basic`: leanprover-community/mathlib4#670 * `data.lazy_list`: leanprover-community/mathlib4#686 * `data.list.lex`: leanprover-community/mathlib4#672 * `data.option.n_ary`: leanprover-community/mathlib4#656 * `data.sigma.lex`: leanprover-community/mathlib4#646 * `data.ulift`: leanprover-community/mathlib4#703 * `group_theory.eckmann_hilton`: leanprover-community/mathlib4#626 * `logic.equiv.basic`: leanprover-community/mathlib4#631 * `order.iterate`: leanprover-community/mathlib4#648
mathlib3 SHA: 39af7d3bf61a98e928812dbc3e16f4ea8b795ca3
Porting notes:
Data.Int.Cast.Defs
in order to match mathlib3 (I accidentally put them in the wrong place when I had ported that file because those lemmas were already present in mathlib4.)simp
attribute for the reason Gabriel mentioned on that PR ([Merged by Bors] - feat: port data.{nat, int}.cast.defs #641), even though that attribute isn't present on the mathlib3 version.bit0
andbit1
lemmas have been marked as deprecated.#align
ed all of these withₓ
. I believe this is the correct thing to do, but confirmation would be nice.