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

Porting note: need dsimp only #10971

Open
pitmonticone opened this issue Feb 25, 2024 · 1 comment
Open

Porting note: need dsimp only #10971

pitmonticone opened this issue Feb 25, 2024 · 1 comment
Labels
porting-notes Mathlib3 to Mathlib4 porting notes.

Comments

@pitmonticone
Copy link
Collaborator

Classifies porting notes claiming:

need dsimp only.

Examples

/-- Define `GCDMonoid` on a structure just from the `gcd` and its properties. -/
noncomputable def gcdMonoidOfGCD [DecidableEq α] (gcd : α → α → α)
(gcd_dvd_left : ∀ a b, gcd a b ∣ a) (gcd_dvd_right : ∀ a b, gcd a b ∣ b)
(dvd_gcd : ∀ {a b c}, a ∣ c → a ∣ b → a ∣ gcd c b) : GCDMonoid α :=
{ gcd
gcd_dvd_left
gcd_dvd_right
dvd_gcd := fun {a b c} => dvd_gcd
lcm := fun a b =>
if a = 0 then 0 else Classical.choose ((gcd_dvd_left a b).trans (Dvd.intro b rfl))
gcd_mul_lcm := fun a b => by
-- Porting note: need `dsimp only` before `split_ifs`
dsimp only
split_ifs with a0
· rw [mul_zero, a0, zero_mul]
· rw [← Classical.choose_spec ((gcd_dvd_left a b).trans (Dvd.intro b rfl))]
lcm_zero_left := fun a => if_pos rfl
lcm_zero_right := fun a => by
-- Porting note: need `dsimp only` before `split_ifs`
dsimp only
split_ifs with a0
· rfl
have h := (Classical.choose_spec ((gcd_dvd_left a 0).trans (Dvd.intro 0 rfl))).symm
have a0' : gcd a 00 := by
contrapose! a0
rw [← associated_zero_iff_eq_zero, ← a0]
exact associated_of_dvd_dvd (dvd_gcd (dvd_refl a) (dvd_zero a)) (gcd_dvd_left _ _)
apply Or.resolve_left (mul_eq_zero.1 _) a0'
rw [h, mul_zero] }
#align gcd_monoid_of_gcd gcdMonoidOfGCD

@pitmonticone pitmonticone added the porting-notes Mathlib3 to Mathlib4 porting notes. label Feb 25, 2024
mathlib-bors bot pushed a commit that referenced this issue Feb 27, 2024
Classifies by adding issue number #10971 to porting notes claiming: 

> need `dsimp only`.
riccardobrasca pushed a commit that referenced this issue Mar 1, 2024
Classifies by adding issue number #10971 to porting notes claiming: 

> need `dsimp only`.
kbuzzard pushed a commit that referenced this issue Mar 12, 2024
Classifies by adding issue number #10971 to porting notes claiming: 

> need `dsimp only`.
dagurtomas pushed a commit that referenced this issue Mar 22, 2024
Classifies by adding issue number #10971 to porting notes claiming: 

> need `dsimp only`.
@grunweg
Copy link
Collaborator

grunweg commented Apr 14, 2024

Some of these are just about beta-reduction; I'm re-classifying these as #12129 in #12130.

mathlib-bors bot pushed a commit that referenced this issue Apr 15, 2024
…ion (#12130)

This subsumes some of the notes in #10752 and #10971.
I'm on the fence as to whether replacing the dsimp only by beta_reduce is useful; this is easy to revert if needed.
Louddy pushed a commit that referenced this issue Apr 15, 2024
Classifies by adding issue number #10971 to porting notes claiming: 

> need `dsimp only`.
Louddy pushed a commit that referenced this issue Apr 15, 2024
…ion (#12130)

This subsumes some of the notes in #10752 and #10971.
I'm on the fence as to whether replacing the dsimp only by beta_reduce is useful; this is easy to revert if needed.
atarnoam pushed a commit that referenced this issue Apr 16, 2024
…ion (#12130)

This subsumes some of the notes in #10752 and #10971.
I'm on the fence as to whether replacing the dsimp only by beta_reduce is useful; this is easy to revert if needed.
uniwuni pushed a commit that referenced this issue Apr 19, 2024
…ion (#12130)

This subsumes some of the notes in #10752 and #10971.
I'm on the fence as to whether replacing the dsimp only by beta_reduce is useful; this is easy to revert if needed.
callesonne pushed a commit that referenced this issue Apr 22, 2024
…ion (#12130)

This subsumes some of the notes in #10752 and #10971.
I'm on the fence as to whether replacing the dsimp only by beta_reduce is useful; this is easy to revert if needed.
Jun2M pushed a commit that referenced this issue Apr 24, 2024
…ion (#12130)

This subsumes some of the notes in #10752 and #10971.
I'm on the fence as to whether replacing the dsimp only by beta_reduce is useful; this is easy to revert if needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
porting-notes Mathlib3 to Mathlib4 porting notes.
Projects
None yet
Development

No branches or pull requests

2 participants