awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
exists_gcd : ∀ (a b : α), lcm a b ∣ a * b := ⋯
a b c : α
ac : a ∣ c
ab : a ∣ b
h : ¬c = 0
h_1 : ¬b = 0
con : lcm c b = 0
h_2 : c = 0
⊢ False

Tactic:
exact absurd ‹c = 0› h

Premises used: absurd
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
exists_gcd : ∀ (a b : α), lcm a b ∣ a * b := ⋯
a b c : α
ac : a ∣ c
ab : a ∣ b
h : ¬c = 0
h_1 : ¬b = 0
con : lcm c b = 0
h_2 : b = 0
⊢ False

Tactic:
absurd ‹b = 0› h_1

Premises used: absurd
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
exists_gcd : ∀ (a b : α), lcm a b ∣ a * b := ⋯
a b c : α
ac : a ∣ c
ab : a ∣ b
h : ¬c = 0
h_1 : ¬b = 0
con : lcm c b = 0
h_2 : b = 0
⊢ False

Tactic:
exact absurd ‹b = 0› h_1

Premises used: absurd
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
exists_gcd : ∀ (a b : α), lcm a b ∣ a * b := ⋯
a b c : α
ac : a ∣ c
ab : a ∣ b
h : ¬c = 0
h_1 : ¬b = 0
⊢ lcm c b ≠ 0

Tactic:
have h0 : lcm c b ≠ 0 := by
        intro con
        have h := lcm_dvd (Dvd.intro b rfl) (Dvd.intro_left c rfl)
        rw [con, zero_dvd_iff, mul_eq_zero] at h
        cases h
        · exact absurd ‹c = 0› h
        · exact absurd ‹b = 0› h_1
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
exists_gcd : ∀ (a b : α), lcm a b ∣ a * b := ⋯
a b c : α
ac : a ∣ c
ab : a ∣ b
h : ¬c = 0
h_1 : ¬b = 0
h0 : lcm c b ≠ 0
neg : lcm c b * a ∣ c * b
⊢ a ∣ Classical.choose (p := fun (x : α) ↦ c * b = lcm c b * x) ⋯

Tactic:
rw [← mul_dvd_mul_iff_left h0, ← Classical.choose_spec (exists_gcd c b)]

Premises used: Classical.choose_spec, mul_dvd_mul_iff_left
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
exists_gcd : ∀ (a b : α), lcm a b ∣ a * b := ⋯
a b c : α
ac : a ∣ c
ab : a ∣ b
h : ¬c = 0
h_1 : ¬b = 0
h0 : lcm c b ≠ 0
neg : ∀ (d : α) (h_1 : ¬a * d = 0) (h0 : lcm c (a * d) ≠ 0), lcm c (a * d) * a ∣ c * (a * d)
⊢ lcm c b * a ∣ c * b

Tactic:
rcases ab with ⟨d, rfl⟩

Premises used: rfl
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
exists_gcd : ∀ (a b : α), lcm a b ∣ a * b := ⋯
a c : α
ac : a ∣ c
h : ¬c = 0
d : α
h_1 : ¬a * d = 0
h0 : lcm c (a * d) ≠ 0
⊢ ¬(a = 0 ∨ d = 0)

Tactic:
rw [mul_eq_zero] at ‹a * d ≠ 0›

Premises used: mul_eq_zero
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
exists_gcd : ∀ (a b : α), lcm a b ∣ a * b := ⋯
a c : α
ac : a ∣ c
h : ¬c = 0
d : α
h_1 : ¬a * d = 0
h0 : lcm c (a * d) ≠ 0
h_1₁ : ¬(a = 0 ∨ d = 0)
⊢ lcm c (a * d) ≠ 0

Tactic:
rw [mul_eq_zero] at ‹a * d ≠ 0›

Premises used: mul_eq_zero
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
exists_gcd : ∀ (a b : α), lcm a b ∣ a * b := ⋯
a c : α
ac : a ∣ c
h : ¬c = 0
d : α
h_1 : ¬(a = 0 ∨ d = 0)
h0 : lcm c (a * d) ≠ 0
⊢ a ≠ 0 ∧ d ≠ 0

Tactic:
push Not at h_1

Premises used: Not
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
exists_gcd : ∀ (a b : α), lcm a b ∣ a * b := ⋯
a c : α
ac : a ∣ c
h : ¬c = 0
d : α
h0 : lcm c (a * d) ≠ 0
h_1 : a ≠ 0 ∧ d ≠ 0
neg : lcm c (d * a) ∣ c * d
⊢ lcm c (a * d) * a ∣ c * (a * d)

Tactic:
rw [mul_comm a, ← mul_assoc, mul_dvd_mul_iff_right h_1.1]

Premises used: mul_dvd_mul_iff_right, mul_assoc, And.left, mul_comm
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
exists_gcd : ∀ (a b : α), lcm a b ∣ a * b := ⋯
a c : α
ac : a ∣ c
h : ¬c = 0
d : α
h0 : lcm c (a * d) ≠ 0
h_1 : a ≠ 0 ∧ d ≠ 0
neg : d * a ∣ c * d
⊢ lcm c (d * a) ∣ c * d

Tactic:
apply lcm_dvd (Dvd.intro d rfl)

Premises used: Dvd.intro, rfl
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
exists_gcd : ∀ (a b : α), lcm a b ∣ a * b := ⋯
a c : α
ac : a ∣ c
h : ¬c = 0
d : α
h0 : lcm c (a * d) ≠ 0
h_1 : a ≠ 0 ∧ d ≠ 0
neg : a ∣ c
⊢ d * a ∣ c * d

Tactic:
rw [mul_comm, mul_dvd_mul_iff_right h_1.2]

Premises used: mul_dvd_mul_iff_right, And.right, mul_comm
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
exists_gcd : ∀ (a b : α), lcm a b ∣ a * b := ⋯
a c : α
ac : a ∣ c
h : ¬c = 0
d : α
h0 : lcm c (a * d) ≠ 0
h_1 : a ≠ 0 ∧ d ≠ 0
⊢ a ∣ c

Tactic:
apply ac
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
exists_gcd : ∀ (a b : α), lcm a b ∣ a * b := ⋯
a b : α
pos : ∀ (h : a = 0), Associated (b * lcm a b) (a * b)
pos₁ : ∀ (h : ¬a = 0) (h_1 : b = 0), Associated (a * lcm a b) (a * b)
neg :
  ∀ (h : ¬a = 0) (h_1 : ¬b = 0),
    Associated (Classical.choose (p := fun (x : α) ↦ a * b = lcm a b * x) ⋯ * lcm a b) (a * b)
⊢ Associated
    ((if a = 0 then b else if b = 0 then a else Classical.choose (p := fun (x : α) ↦ a * b = lcm a b * x) ⋯) * lcm a b)
    (a * b)

Tactic:
split_ifs with h h_1
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
exists_gcd : ∀ (a b : α), lcm a b ∣ a * b := ⋯
a b : α
h : a = 0
pos : Associated (b * lcm 0 b) (0 * b)
pos₁ : Associated (b * 0) (0 * b)
pos₂ : Associated 0 (0 * b)
pos₃ pos₄ : Associated.{u_1} (M := α) 0 0
⊢ Associated (b * lcm a b) (a * b)

Tactic:
rw [h, eq_zero_of_zero_dvd (dvd_lcm_left _ _), mul_zero, zero_mul]

Premises used: MulZeroClass.zero_mul, MulZeroClass.mul_zero, eq_zero_of_zero_dvd
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
exists_gcd : ∀ (a b : α), lcm a b ∣ a * b := ⋯
a b : α
h : ¬a = 0
h_1 : b = 0
pos : Associated (a * lcm a 0) (a * 0)
pos₁ pos₂ : Associated (a * 0) (a * 0)
⊢ Associated (a * lcm a b) (a * b)

Tactic:
rw [h_1, eq_zero_of_zero_dvd (dvd_lcm_right _ _)]

Premises used: eq_zero_of_zero_dvd
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
exists_gcd : ∀ (a b : α), lcm a b ∣ a * b := ⋯
a b : α
h : ¬a = 0
h_1 : ¬b = 0
neg : Associated (lcm a b * Classical.choose (p := fun (x : α) ↦ a * b = lcm a b * x) ⋯) (a * b)
neg₁ neg₂ : Associated (a * b) (a * b)
⊢ Associated (Classical.choose (p := fun (x : α) ↦ a * b = lcm a b * x) ⋯ * lcm a b) (a * b)

Tactic:
rw [mul_comm, ← Classical.choose_spec (exists_gcd a b)]

Premises used: Classical.choose_spec, mul_comm
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : NormalizationMonoid α
inst_3 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
normalize_lcm : ∀ (a b : α), (normalize : (a : α) → α) (lcm a b) = lcm a b
exists_gcd : ∀ (a b : α), lcm a b ∣ (normalize : (a : α) → α) (a * b) := ⋯
a b : α
pos : ∀ (h : a = 0), (normalize : (a : α) → α) b ∣ a
pos₁ : ∀ (h : ¬a = 0) (h_1 : b = 0), (normalize : (a : α) → α) a ∣ a
neg :
  ∀ (h : ¬a = 0) (h_1 : ¬b = 0),
    Classical.choose (p := fun (x : α) ↦ (normalize : (a : α) → α) (a * b) = lcm a b * x) ⋯ ∣ a
⊢ (if a = 0 then (normalize : (a : α) → α) b
    else
      if b = 0 then (normalize : (a : α) → α) a
      else Classical.choose (p := fun (x : α) ↦ (normalize : (a : α) → α) (a * b) = lcm a b * x) ⋯) ∣
    a

Tactic:
split_ifs with h h_1
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : NormalizationMonoid α
inst_3 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
normalize_lcm : ∀ (a b : α), (normalize : (a : α) → α) (lcm a b) = lcm a b
exists_gcd : ∀ (a b : α), lcm a b ∣ (normalize : (a : α) → α) (a * b) := ⋯
a b : α
h : a = 0
pos : Dvd.dvd (α := α) ((normalize : (a : α) → α) b : α) (0 : α)
⊢ (normalize : (a : α) → α) b ∣ a

Tactic:
rw [h]
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : NormalizationMonoid α
inst_3 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
normalize_lcm : ∀ (a b : α), (normalize : (a : α) → α) (lcm a b) = lcm a b
exists_gcd : ∀ (a b : α), lcm a b ∣ (normalize : (a : α) → α) (a * b) := ⋯
a b : α
h : a = 0
⊢ Dvd.dvd (α := α) ((normalize : (a : α) → α) b : α) (0 : α)

Tactic:
apply dvd_zero

Premises used: dvd_zero
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : NormalizationMonoid α
inst_3 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
normalize_lcm : ∀ (a b : α), (normalize : (a : α) → α) (lcm a b) = lcm a b
exists_gcd : ∀ (a b : α), lcm a b ∣ (normalize : (a : α) → α) (a * b) := ⋯
a b : α
h : ¬a = 0
h_1 : b = 0
⊢ (normalize : (a : α) → α) a ∣ a

Tactic:
(normalize_associated _).dvd

Premises used: Associated.dvd, normalize_associated
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : NormalizationMonoid α
inst_3 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
normalize_lcm : ∀ (a b : α), (normalize : (a : α) → α) (lcm a b) = lcm a b
exists_gcd : ∀ (a b : α), lcm a b ∣ (normalize : (a : α) → α) (a * b) := ⋯
a b : α
h : ¬a = 0
h_1 : b = 0
⊢ (normalize : (a : α) → α) a ∣ a

Tactic:
exact (normalize_associated _).dvd

Premises used: Associated.dvd, normalize_associated
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : NormalizationMonoid α
inst_3 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
normalize_lcm : ∀ (a b : α), (normalize : (a : α) → α) (lcm a b) = lcm a b
exists_gcd : ∀ (a b : α), lcm a b ∣ (normalize : (a : α) → α) (a * b) := ⋯
a b : α
h : ¬a = 0
h_1 : ¬b = 0
con : lcm a b = 0
⊢ lcm a b ∣ a * b

Tactic:
have h := lcm_dvd (Dvd.intro b rfl) (Dvd.intro_left a rfl)
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : NormalizationMonoid α
inst_3 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
normalize_lcm : ∀ (a b : α), (normalize : (a : α) → α) (lcm a b) = lcm a b
exists_gcd : ∀ (a b : α), lcm a b ∣ (normalize : (a : α) → α) (a * b) := ⋯
a b : α
h_2 : ¬a = 0
h_1 : ¬b = 0
con : lcm a b = 0
h : lcm a b ∣ a * b
⊢ a = 0 ∨ b = 0

Tactic:
rw [con, zero_dvd_iff, mul_eq_zero] at h

Premises used: zero_dvd_iff, mul_eq_zero
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : NormalizationMonoid α
inst_3 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
normalize_lcm : ∀ (a b : α), (normalize : (a : α) → α) (lcm a b) = lcm a b
exists_gcd : ∀ (a b : α), lcm a b ∣ (normalize : (a : α) → α) (a * b) := ⋯
a b : α
h_2 : ¬a = 0
h_1 : ¬b = 0
con : lcm a b = 0
h : a = 0 ∨ b = 0
inl : a = 0 → False
inr : b = 0 → False
⊢ False

Tactic:
cases h
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : NormalizationMonoid α
inst_3 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
normalize_lcm : ∀ (a b : α), (normalize : (a : α) → α) (lcm a b) = lcm a b
exists_gcd : ∀ (a b : α), lcm a b ∣ (normalize : (a : α) → α) (a * b) := ⋯
a b : α
h : ¬a = 0
h_1 : ¬b = 0
con : lcm a b = 0
h_2 : a = 0
⊢ False

Tactic:
absurd ‹a = 0› h

Premises used: absurd
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : NormalizationMonoid α
inst_3 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
normalize_lcm : ∀ (a b : α), (normalize : (a : α) → α) (lcm a b) = lcm a b
exists_gcd : ∀ (a b : α), lcm a b ∣ (normalize : (a : α) → α) (a * b) := ⋯
a b : α
h : ¬a = 0
h_1 : ¬b = 0
con : lcm a b = 0
h_2 : a = 0
⊢ False

Tactic:
exact absurd ‹a = 0› h

Premises used: absurd
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : NormalizationMonoid α
inst_3 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
normalize_lcm : ∀ (a b : α), (normalize : (a : α) → α) (lcm a b) = lcm a b
exists_gcd : ∀ (a b : α), lcm a b ∣ (normalize : (a : α) → α) (a * b) := ⋯
a b : α
h : ¬a = 0
h_1 : ¬b = 0
con : lcm a b = 0
h_2 : b = 0
⊢ False

Tactic:
absurd ‹b = 0› h_1

Premises used: absurd
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : NormalizationMonoid α
inst_3 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
normalize_lcm : ∀ (a b : α), (normalize : (a : α) → α) (lcm a b) = lcm a b
exists_gcd : ∀ (a b : α), lcm a b ∣ (normalize : (a : α) → α) (a * b) := ⋯
a b : α
h : ¬a = 0
h_1 : ¬b = 0
con : lcm a b = 0
h_2 : b = 0
⊢ False

Tactic:
exact absurd ‹b = 0› h_1

Premises used: absurd
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : NormalizationMonoid α
inst_3 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
normalize_lcm : ∀ (a b : α), (normalize : (a : α) → α) (lcm a b) = lcm a b
exists_gcd : ∀ (a b : α), lcm a b ∣ (normalize : (a : α) → α) (a * b) := ⋯
a b : α
h : ¬a = 0
h_1 : ¬b = 0
⊢ lcm a b ≠ 0

Tactic:
have h0 : lcm a b ≠ 0 := by
        intro con
        have h := lcm_dvd (Dvd.intro b rfl) (Dvd.intro_left a rfl)
        rw [con, zero_dvd_iff, mul_eq_zero] at h
        cases h
        · exact absurd ‹a = 0› h
        · exact absurd ‹b = 0› h_1
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : NormalizationMonoid α
inst_3 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
normalize_lcm : ∀ (a b : α), (normalize : (a : α) → α) (lcm a b) = lcm a b
exists_gcd : ∀ (a b : α), lcm a b ∣ (normalize : (a : α) → α) (a * b) := ⋯
a b : α
h : ¬a = 0
h_1 : ¬b = 0
h0 : lcm a b ≠ 0
neg : b ∣ lcm a b
⊢ Classical.choose (p := fun (x : α) ↦ (normalize : (a : α) → α) (a * b) = lcm a b * x) ⋯ ∣ a

Tactic:
rw [← mul_dvd_mul_iff_left h0, ← Classical.choose_spec (exists_gcd a b), normalize_dvd_iff,
        mul_comm, mul_dvd_mul_iff_right h]

Premises used: normalize_dvd_iff, mul_dvd_mul_iff_right, Classical.choose_spec, mul_dvd_mul_iff_left, mul_comm
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : NormalizationMonoid α
inst_3 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
normalize_lcm : ∀ (a b : α), (normalize : (a : α) → α) (lcm a b) = lcm a b
exists_gcd : ∀ (a b : α), lcm a b ∣ (normalize : (a : α) → α) (a * b) := ⋯
a b : α
h : ¬a = 0
h_1 : ¬b = 0
h0 : lcm a b ≠ 0
⊢ b ∣ lcm a b

Tactic:
apply dvd_lcm_right
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : NormalizationMonoid α
inst_3 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
normalize_lcm : ∀ (a b : α), (normalize : (a : α) → α) (lcm a b) = lcm a b
exists_gcd : ∀ (a b : α), lcm a b ∣ (normalize : (a : α) → α) (a * b) := ⋯
a b : α
pos : ∀ (h : a = 0), (normalize : (a : α) → α) b ∣ b
pos₁ : ∀ (h : ¬a = 0) (h_1 : b = 0), (normalize : (a : α) → α) a ∣ b
neg :
  ∀ (h : ¬a = 0) (h_1 : ¬b = 0),
    Classical.choose (p := fun (x : α) ↦ (normalize : (a : α) → α) (a * b) = lcm a b * x) ⋯ ∣ b
⊢ (if a = 0 then (normalize : (a : α) → α) b
    else
      if b = 0 then (normalize : (a : α) → α) a
      else Classical.choose (p := fun (x : α) ↦ (normalize : (a : α) → α) (a * b) = lcm a b * x) ⋯) ∣
    b

Tactic:
split_ifs with h h_1
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : NormalizationMonoid α
inst_3 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
normalize_lcm : ∀ (a b : α), (normalize : (a : α) → α) (lcm a b) = lcm a b
exists_gcd : ∀ (a b : α), lcm a b ∣ (normalize : (a : α) → α) (a * b) := ⋯
a b : α
h : a = 0
⊢ (normalize : (a : α) → α) b ∣ b

Tactic:
(normalize_associated _).dvd

Premises used: Associated.dvd, normalize_associated
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : NormalizationMonoid α
inst_3 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
normalize_lcm : ∀ (a b : α), (normalize : (a : α) → α) (lcm a b) = lcm a b
exists_gcd : ∀ (a b : α), lcm a b ∣ (normalize : (a : α) → α) (a * b) := ⋯
a b : α
h : a = 0
⊢ (normalize : (a : α) → α) b ∣ b

Tactic:
exact (normalize_associated _).dvd

Premises used: Associated.dvd, normalize_associated
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : NormalizationMonoid α
inst_3 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
normalize_lcm : ∀ (a b : α), (normalize : (a : α) → α) (lcm a b) = lcm a b
exists_gcd : ∀ (a b : α), lcm a b ∣ (normalize : (a : α) → α) (a * b) := ⋯
a b : α
h : ¬a = 0
h_1 : b = 0
pos : Dvd.dvd (α := α) ((normalize : (a : α) → α) a : α) (0 : α)
⊢ (normalize : (a : α) → α) a ∣ b

Tactic:
rw [h_1]
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : NormalizationMonoid α
inst_3 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
normalize_lcm : ∀ (a b : α), (normalize : (a : α) → α) (lcm a b) = lcm a b
exists_gcd : ∀ (a b : α), lcm a b ∣ (normalize : (a : α) → α) (a * b) := ⋯
a b : α
h : ¬a = 0
h_1 : b = 0
⊢ Dvd.dvd (α := α) ((normalize : (a : α) → α) a : α) (0 : α)

Tactic:
apply dvd_zero

Premises used: dvd_zero
-- Module: Mathlib.Algebra.GCDMonoid.Basic
Goal:
α : Type u_1
inst : CommMonoidWithZero α
inst_1 : IsCancelMulZero α
inst_2 : NormalizationMonoid α
inst_3 : DecidableEq α
lcm : α → α → α
dvd_lcm_left : ∀ (a b : α), a ∣ lcm a b
dvd_lcm_right : ∀ (a b : α), b ∣ lcm a b
lcm_dvd : ∀ {a b c : α}, c ∣ a → b ∣ a → lcm c b ∣ a
normalize_lcm : ∀ (a b : α), (normalize : (a : α) → α) (lcm a b) = lcm a b
exists_gcd : ∀ (a b : α), lcm a b ∣ (normalize : (a : α) → α) (a * b) := ⋯
a b : α
h : ¬a = 0
h_1 : ¬b = 0
h0 : lcm a b ≠ 0
neg : a ∣ lcm a b
⊢ Classical.choose (p := fun (x : α) ↦ (normalize : (a : α) → α) (a * b) = lcm a b * x) ⋯ ∣ b

Tactic:
rw [← mul_dvd_mul_iff_left h0, ← Classical.choose_spec (exists_gcd a b), normalize_dvd_iff,
        mul_dvd_mul_iff_right h_1]

Premises used: normalize_dvd_iff, mul_dvd_mul_iff_right, Classical.choose_spec, mul_dvd_mul_iff_left