Theorem: Nat.coprime_factorizationLCMLeft_factorizationLCMRight
File: Mathlib/Data/Nat/Factorization/Basic.lean

Proof steps:
state_before: a b m n p : ℕ
⊢ (a.factorizationLCMLeft b).Coprime (a.factorizationLCMRight b)
state_after: a b m n p : ℕ
⊢ ((a.lcm b).factorization.prod fun p n => if b.factorization p ≤ a.factorization p then p ^ n else 1).Coprime
    ((a.lcm b).factorization.prod fun p n => if b.factorization p ≤ a.factorization p then 1 else p ^ n)
tactic: rw [factorizationLCMLeft, factorizationLCMRight]
state_before: a b m n p : ℕ
⊢ ((a.lcm b).factorization.prod fun p n => if b.factorization p ≤ a.factorization p then p ^ n else 1).Coprime
    ((a.lcm b).factorization.prod fun p n => if b.factorization p ≤ a.factorization p then 1 else p ^ n)
state_after: a b m n p✝ p : ℕ
hp : p ∈ (a.lcm b).factorization.support
q : ℕ
hq : q ∈ (a.lcm b).factorization.support
⊢ ((fun p n => if b.factorization p ≤ a.factorization p then p ^ n else 1) p ((a.lcm b).factorization p)).Coprime
    ((fun p n => if b.factorization p ≤ a.factorization p then 1 else p ^ n) q ((a.lcm b).factorization q))
tactic: refine coprime_prod_left_iff.mpr fun p hp ↦ coprime_prod_right_iff.mpr fun q hq ↦ ?_
state_before: a b m n p✝ p : ℕ
hp : p ∈ (a.lcm b).factorization.support
q : ℕ
hq : q ∈ (a.lcm b).factorization.support
⊢ ((fun p n => if b.factorization p ≤ a.factorization p then p ^ n else 1) p ((a.lcm b).factorization p)).Coprime
    ((fun p n => if b.factorization p ≤ a.factorization p then 1 else p ^ n) q ((a.lcm b).factorization q))
state_after: a b m n p✝ p : ℕ
hp : p ∈ (a.lcm b).factorization.support
q : ℕ
hq : q ∈ (a.lcm b).factorization.support
⊢ (if b.factorization p ≤ a.factorization p then p ^ (a.lcm b).factorization p else 1).Coprime
    (if b.factorization q ≤ a.factorization q then 1 else q ^ (a.lcm b).factorization q)
tactic: dsimp only
state_before: a b m n p✝ p : ℕ
hp : p ∈ (a.lcm b).factorization.support
q : ℕ
hq : q ∈ (a.lcm b).factorization.support
⊢ (if b.factorization p ≤ a.factorization p then p ^ (a.lcm b).factorization p else 1).Coprime
    (if b.factorization q ≤ a.factorization q then 1 else q ^ (a.lcm b).factorization q)
state_after: case pos
a b m n p✝ p : ℕ
hp : p ∈ (a.lcm b).factorization.support
q : ℕ
hq : q ∈ (a.lcm b).factorization.support
h : b.factorization p ≤ a.factorization p
h' : b.factorization q ≤ a.factorization q
⊢ (p ^ (a.lcm b).factorization p).Coprime 1

case neg
a b m n p✝ p : ℕ
hp : p ∈ (a.lcm b).factorization.support
q : ℕ
hq : q ∈ (a.lcm b).factorization.support
h : b.factorization p ≤ a.factorization p
h' : ¬b.factorization q ≤ a.factorization q
⊢ (p ^ (a.lcm b).factorization p).Coprime (q ^ (a.lcm b).factorization q)

case pos
a b m n p✝ p : ℕ
hp : p ∈ (a.lcm b).factorization.support
q : ℕ
hq : q ∈ (a.lcm b).factorization.support
h : ¬b.factorization p ≤ a.factorization p
h✝ : b.factorization q ≤ a.factorization q
⊢ Coprime 1 1

case neg
a b m n p✝ p : ℕ
hp : p ∈ (a.lcm b).factorization.support
q : ℕ
hq : q ∈ (a.lcm b).factorization.support
h : ¬b.factorization p ≤ a.factorization p
h✝ : ¬b.factorization q ≤ a.factorization q
⊢ Coprime 1 (q ^ (a.lcm b).factorization q)
tactic: split_ifs with h h'
state_before: case pos
a b m n p✝ p : ℕ
hp : p ∈ (a.lcm b).factorization.support
q : ℕ
hq : q ∈ (a.lcm b).factorization.support
h : b.factorization p ≤ a.factorization p
h' : b.factorization q ≤ a.factorization q
⊢ (p ^ (a.lcm b).factorization p).Coprime 1

case neg
a b m n p✝ p : ℕ
hp : p ∈ (a.lcm b).factorization.support
q : ℕ
hq : q ∈ (a.lcm b).factorization.support
h : b.factorization p ≤ a.factorization p
h' : ¬b.factorization q ≤ a.factorization q
⊢ (p ^ (a.lcm b).factorization p).Coprime (q ^ (a.lcm b).factorization q)

case pos
a b m n p✝ p : ℕ
hp : p ∈ (a.lcm b).factorization.support
q : ℕ
hq : q ∈ (a.lcm b).factorization.support
h : ¬b.factorization p ≤ a.factorization p
h✝ : b.factorization q ≤ a.factorization q
⊢ Coprime 1 1

case neg
a b m n p✝ p : ℕ
hp : p ∈ (a.lcm b).factorization.support
q : ℕ
hq : q ∈ (a.lcm b).factorization.support
h : ¬b.factorization p ≤ a.factorization p
h✝ : ¬b.factorization q ≤ a.factorization q
⊢ Coprime 1 (q ^ (a.lcm b).factorization q)
state_after: case neg
a b m n p✝ p : ℕ
hp : p ∈ (a.lcm b).factorization.support
q : ℕ
hq : q ∈ (a.lcm b).factorization.support
h : b.factorization p ≤ a.factorization p
h' : ¬b.factorization q ≤ a.factorization q
⊢ (p ^ (a.lcm b).factorization p).Coprime (q ^ (a.lcm b).factorization q)
tactic: any_goals simp only [coprime_one_right_eq_true, coprime_one_left_eq_true]
state_before: case neg
a b m n p✝ p : ℕ
hp : p ∈ (a.lcm b).factorization.support
q : ℕ
hq : q ∈ (a.lcm b).factorization.support
h : b.factorization p ≤ a.factorization p
h' : ¬b.factorization q ≤ a.factorization q
⊢ (p ^ (a.lcm b).factorization p).Coprime (q ^ (a.lcm b).factorization q)
state_after: case neg
a b m n p✝ p : ℕ
hp : p ∈ (a.lcm b).factorization.support
q : ℕ
hq : q ∈ (a.lcm b).factorization.support
h : b.factorization p ≤ a.factorization p
h' : ¬b.factorization q ≤ a.factorization q
⊢ p ≠ q
tactic: refine coprime_pow_primes _ _ (prime_of_mem_primeFactors hp) (prime_of_mem_primeFactors hq) ?_
state_before: case neg
a b m n p✝ p : ℕ
hp : p ∈ (a.lcm b).factorization.support
q : ℕ
hq : q ∈ (a.lcm b).factorization.support
h : b.factorization p ≤ a.factorization p
h' : ¬b.factorization q ≤ a.factorization q
⊢ p ≠ q
state_after: case neg
a b m n p✝ p : ℕ
hp : p ∈ (a.lcm b).factorization.support
q : ℕ
hq : q ∈ (a.lcm b).factorization.support
h : b.factorization p ≤ a.factorization p
h' : p = q
⊢ b.factorization q ≤ a.factorization q
tactic: contrapose! h'
state_before: case neg
a b m n p✝ p : ℕ
hp : p ∈ (a.lcm b).factorization.support
q : ℕ
hq : q ∈ (a.lcm b).factorization.support
h : b.factorization p ≤ a.factorization p
h' : p = q
⊢ b.factorization q ≤ a.factorization q
state_after: no goals
tactic: rwa [← h']