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] - feat(Algebra/GroupWithZero): remove already existing lemmas #11691

Closed
wants to merge 1 commit into from

Conversation

pitmonticone
Copy link
Collaborator

Undo #11677 since we have found out that the lemmas

lemma dvd_of_mul_dvd_mul_left {c : α} (hc : c ≠ 0)
(H : c * a ∣ c * b) : a ∣ b := by
rcases H with ⟨d, hd⟩
exact ⟨d, by simpa [mul_assoc, hc] using hd⟩
lemma dvd_of_mul_dvd_mul_right {c : α} (hc : c ≠ 0)
(H : a * c ∣ b * c) : a ∣ b := by
rw [mul_comm a c, mul_comm b c] at H
exact dvd_of_mul_dvd_mul_left hc H

already exist in the same file with different names mul_dvd_mul_iff_left and mul_dvd_mul_iff_right:

/-- Given two elements `b`, `c` of a `CancelMonoidWithZero` and a nonzero element `a`,
`a*b` divides `a*c` iff `b` divides `c`. -/
theorem mul_dvd_mul_iff_left [CancelMonoidWithZero α] {a b c : α} (ha : a ≠ 0) :
a * b ∣ a * c ↔ b ∣ c :=
exists_congr fun d => by rw [mul_assoc, mul_right_inj' ha]
#align mul_dvd_mul_iff_left mul_dvd_mul_iff_left
/-- Given two elements `a`, `b` of a commutative `CancelMonoidWithZero` and a nonzero
element `c`, `a*c` divides `b*c` iff `a` divides `b`. -/
theorem mul_dvd_mul_iff_right [CancelCommMonoidWithZero α] {a b c : α} (hc : c ≠ 0) :
a * c ∣ b * c ↔ a ∣ b :=
exists_congr fun d => by rw [mul_right_comm, mul_left_inj' hc]
#align mul_dvd_mul_iff_right mul_dvd_mul_iff_right

@pitmonticone pitmonticone added awaiting-review The author would like community review of the PR easy < 20s of review time. See the lifecycle page for guidelines. awaiting-CI labels Mar 26, 2024
@riccardobrasca
Copy link
Member

Oh gosh. We want these to have the same name as the Int and Nat version (that are in Std I think).

@riccardobrasca
Copy link
Member

Ah sorry, these already match the names in Std, but we were looking for only one implication.

@pitmonticone
Copy link
Collaborator Author

@riccardobrasca Yes, exactly.

@fpvandoorn fpvandoorn force-pushed the pitmonticone/dvd_of_mul_dvd_mul_left branch from 0f2ac67 to 9be4054 Compare March 26, 2024 14:01
@fpvandoorn
Copy link
Member

Thanks!

bors d+

@mathlib-bors
Copy link

mathlib-bors bot commented Mar 26, 2024

✌️ pitmonticone can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@github-actions github-actions bot added delegated and removed awaiting-review The author would like community review of the PR awaiting-CI labels Mar 26, 2024
@pitmonticone
Copy link
Collaborator Author

bors merge

@mathlib-bors
Copy link

mathlib-bors bot commented Mar 27, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(Algebra/GroupWithZero): remove already existing lemmas [Merged by Bors] - feat(Algebra/GroupWithZero): remove already existing lemmas Mar 27, 2024
@mathlib-bors mathlib-bors bot closed this Mar 27, 2024
@mathlib-bors mathlib-bors bot deleted the pitmonticone/dvd_of_mul_dvd_mul_left branch March 27, 2024 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated easy < 20s of review time. See the lifecycle page for guidelines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants