[Merged by Bors] - feat: port of Data.Nat.Gcd.Basic#965
Closed
siddhartha-gadgil wants to merge 3 commits intomasterfrom
Closed
[Merged by Bors] - feat: port of Data.Nat.Gcd.Basic#965siddhartha-gadgil wants to merge 3 commits intomasterfrom
siddhartha-gadgil wants to merge 3 commits intomasterfrom
Conversation
Member
ChrisHughes24
left a comment
There was a problem hiding this comment.
In future, commit the Mathlib3Port file without editing it so it is easier to compare.
| · rintro ⟨y, z, hy, hz, rfl⟩ | ||
| exact mul_dvd_mul hy hz | ||
| #align nat.dvd_mul Nat.dvd_mul | ||
|
|
Mathlib/Data/Nat/Gcd/Basic.lean
Outdated
Comment on lines
+276
to
+278
|
|
||
|
|
||
| #check Nat.dvd_mul_right |
Member
There was a problem hiding this comment.
Suggested change
| #check Nat.dvd_mul_right |
| -- @[simp] | ||
| theorem coprime_one_right_iff (n : ℕ) : coprime n 1 ↔ True := by simp [coprime] | ||
| #align nat.coprime_one_right_iff Nat.coprime_one_right_iff | ||
|
|
| Nat.coprime a (b ^ n) ↔ Nat.coprime a b := by | ||
| rw [Nat.coprime_comm, coprime_pow_left_iff hn, Nat.coprime_comm] | ||
| #align nat.coprime_pow_right_iff Nat.coprime_pow_right_iff | ||
|
|
Mathlib/Data/Nat/Gcd/Basic.lean
Outdated
Comment on lines
+130
to
+131
|
|
||
|
|
|
|
||
| See also `nat.coprime_of_dvd` and `nat.coprime_of_dvd'` to prove `nat.coprime m n`. | ||
| -/ | ||
|
|
Mathlib/Data/Nat/Gcd/Basic.lean
Outdated
Comment on lines
+102
to
+103
|
|
||
| #check Nat.coprime |
Member
There was a problem hiding this comment.
Suggested change
| #check Nat.coprime |
Mathlib/Data/Nat/Gcd/Basic.lean
Outdated
Comment on lines
+92
to
+93
|
|
||
|
|
| namespace Nat | ||
|
|
||
| /-! ### `gcd` -/ | ||
|
|
Mathlib/Data/Nat/Gcd/Basic.lean
Outdated
Comment on lines
+11
to
+17
| # Definitions and properties of `nat.gcd`, `nat.lcm`, and `nat.coprime` | ||
|
|
||
| Generalizations of these are provided in a later file as `gcd_monoid.gcd` and | ||
| `gcd_monoid.lcm`. | ||
|
|
||
| Note that the global `is_coprime` is not a straightforward generalization of `nat.coprime`, see | ||
| `nat.is_coprime_iff_coprime` for the connection between the two. |
Member
There was a problem hiding this comment.
Suggested change
| # Definitions and properties of `nat.gcd`, `nat.lcm`, and `nat.coprime` | |
| Generalizations of these are provided in a later file as `gcd_monoid.gcd` and | |
| `gcd_monoid.lcm`. | |
| Note that the global `is_coprime` is not a straightforward generalization of `nat.coprime`, see | |
| `nat.is_coprime_iff_coprime` for the connection between the two. | |
| # Definitions and properties of `Nat.gcd`, `Nat.lcm`, and `Nat.coprime` | |
| Generalizations of these are provided in a later file as `gcd_monoid.gcd` and | |
| `gcd_monoid.lcm`. | |
| Note that the global `IsCoprime` is not a straightforward generalization of `Nat.coprime`, see | |
| `nat.is_coprime_iff_coprime` for the connection between the two. |
Member
|
bors merge |
bors bot
pushed a commit
that referenced
this pull request
Dec 12, 2022
tracking cf9386b56953fb40904843af98b7a80757bbe7f9 Most of the code was already ported to Std. A couple of lemmas gave a linting error with simp normal form. I have commented out the simp attribute for this. Co-authored-by: ChrisHughes24 <chrishughes24@gmail.com>
|
Pull request successfully merged into master. Build succeeded: |
bors bot
pushed a commit
to leanprover-community/mathlib3
that referenced
this pull request
Dec 15, 2022
Regenerated from the [port status wiki page](https://github.com/leanprover-community/mathlib/wiki/mathlib4-port-status). Relates to the following PRs: * `algebra.euclidean_domain.basic`: leanprover-community/mathlib4#919 * `algebra.field.basic`: leanprover-community/mathlib4#975 * `algebra.group.opposite`: leanprover-community/mathlib4#912 * `algebra.group.prod`: leanprover-community/mathlib4#968 * `algebra.group.with_one.units`: leanprover-community/mathlib4#955 * `algebra.group_power.ring`: leanprover-community/mathlib4#979 * `algebra.hom.equiv.type_tags`: leanprover-community/mathlib4#943 * `algebra.hom.ring`: leanprover-community/mathlib4#958 * `algebra.invertible`: leanprover-community/mathlib4#930 * `algebra.order.field.canonical.basic`: leanprover-community/mathlib4#1018 * `algebra.order.field.canonical.defs`: leanprover-community/mathlib4#985 * `algebra.order.field.inj_surj`: leanprover-community/mathlib4#1017 * `algebra.order.group.densely_ordered`: leanprover-community/mathlib4#956 * `algebra.order.group.min_max`: leanprover-community/mathlib4#933 * `algebra.order.group.prod`: leanprover-community/mathlib4#1026 * `algebra.order.group.with_top`: leanprover-community/mathlib4#946 * `algebra.order.hom.monoid`: leanprover-community/mathlib4#944 * `algebra.order.monoid.prod`: leanprover-community/mathlib4#987 * `algebra.order.monoid.to_mul_bot`: leanprover-community/mathlib4#1024 * `algebra.order.ring.abs`: leanprover-community/mathlib4#929 * `algebra.order.ring.cone`: leanprover-community/mathlib4#935 * `algebra.order.sub.basic`: leanprover-community/mathlib4#936 * `algebra.order.sub.with_top`: leanprover-community/mathlib4#932 * `algebra.order.with_zero`: leanprover-community/mathlib4#903 * `combinatorics.quiver.arborescence`: leanprover-community/mathlib4#997 * `combinatorics.quiver.cast`: leanprover-community/mathlib4#990 * `control.traversable.lemmas`: leanprover-community/mathlib4#948 * `data.bool.set`: leanprover-community/mathlib4#960 * `data.int.cast.field`: leanprover-community/mathlib4#1016 * `data.int.cast.lemmas`: leanprover-community/mathlib4#995 * `data.int.cast.prod`: leanprover-community/mathlib4#1015 * `data.int.div`: leanprover-community/mathlib4#1011 * `data.int.dvd.basic`: leanprover-community/mathlib4#996 * `data.int.order.basic`: leanprover-community/mathlib4#938 * `data.nat.cast.basic`: leanprover-community/mathlib4#980 * `data.nat.cast.prod`: leanprover-community/mathlib4#1010 * `data.nat.cast.with_top`: leanprover-community/mathlib4#1019 * `data.nat.gcd.basic`: leanprover-community/mathlib4#965 * `data.nat.order.basic`: leanprover-community/mathlib4#907 * `data.nat.order.lemmas`: leanprover-community/mathlib4#927 * `data.nat.set`: leanprover-community/mathlib4#961 * `data.nat.upto`: leanprover-community/mathlib4#1020 * `data.pequiv`: leanprover-community/mathlib4#1008 * `data.set.basic`: leanprover-community/mathlib4#892 * `data.set.bool_indicator`: leanprover-community/mathlib4#988 * `data.set.image`: leanprover-community/mathlib4#949 * `data.set.n_ary`: leanprover-community/mathlib4#969 * `data.set.opposite`: leanprover-community/mathlib4#983 * `data.set.prod`: leanprover-community/mathlib4#1004 * `data.set.sigma`: leanprover-community/mathlib4#982 * `data.set_like.basic`: leanprover-community/mathlib4#993 * `data.two_pointing`: leanprover-community/mathlib4#984 * `logic.embedding.set`: leanprover-community/mathlib4#986 * `logic.equiv.embedding`: leanprover-community/mathlib4#1021 * `order.directed`: leanprover-community/mathlib4#963 * `order.rel_iso.set`: leanprover-community/mathlib4#1005 * `order.well_founded`: leanprover-community/mathlib4#970 * `ring_theory.coprime.basic`: leanprover-community/mathlib4#899 Co-authored-by: Jireh Loreaux <loreaujy@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tracking cf9386b56953fb40904843af98b7a80757bbe7f9
Most of the code was already ported to Std. A couple of lemmas gave a linting error with simp normal form. I have commented out the simp attribute for this.