Theorem: ArithmeticFunction.sum_eq_iff_sum_smul_moebius_eq
File: Mathlib/NumberTheory/ArithmeticFunction.lean

tactic: let f' : ArithmeticFunction R := ⟨fun x => if x = 0 then 0 else f x, if_pos rfl⟩
state_before: R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
⊢ (∀ n > 0, ∑ i ∈ n.divisors, f i = g n) ↔ ∀ n > 0, ∑ x ∈ n.divisorsAntidiagonal, μ x.1 • g x.2 = f n
state_after: R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
⊢ (∀ n > 0, ∑ i ∈ n.divisors, f i = g n) ↔ ∀ n > 0, ∑ x ∈ n.divisorsAntidiagonal, μ x.1 • g x.2 = f n

tactic: let g' : ArithmeticFunction R := ⟨fun x => if x = 0 then 0 else g x, if_pos rfl⟩
state_before: R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
⊢ (∀ n > 0, ∑ i ∈ n.divisors, f i = g n) ↔ ∀ n > 0, ∑ x ∈ n.divisorsAntidiagonal, μ x.1 • g x.2 = f n
state_after: R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
⊢ (∀ n > 0, ∑ i ∈ n.divisors, f i = g n) ↔ ∀ n > 0, ∑ x ∈ n.divisorsAntidiagonal, μ x.1 • g x.2 = f n

tactic: trans (ζ : ArithmeticFunction ℤ) • f' = g'
state_before: R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
⊢ (∀ n > 0, ∑ i ∈ n.divisors, f i = g n) ↔ ∀ n > 0, ∑ x ∈ n.divisorsAntidiagonal, μ x.1 • g x.2 = f n
state_after: R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
⊢ (∀ n > 0, ∑ i ∈ n.divisors, f i = g n) ↔ ↑ζ • f' = g'

R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
⊢ ↑ζ • f' = g' ↔ ∀ n > 0, ∑ x ∈ n.divisorsAntidiagonal, μ x.1 • g x.2 = f n

tactic: trans μ • g' = f'
state_before: R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
⊢ ↑ζ • f' = g' ↔ ∀ n > 0, ∑ x ∈ n.divisorsAntidiagonal, μ x.1 • g x.2 = f n
state_after: R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
⊢ ↑ζ • f' = g' ↔ μ • g' = f'

R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
⊢ μ • g' = f' ↔ ∀ n > 0, ∑ x ∈ n.divisorsAntidiagonal, μ x.1 • g x.2 = f n

tactic: rw [ext_iff]
state_before: R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
⊢ (∀ n > 0, ∑ i ∈ n.divisors, f i = g n) ↔ ↑ζ • f' = g'
state_after: R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
⊢ (∀ n > 0, ∑ i ∈ n.divisors, f i = g n) ↔ ∀ (x : ℕ), (↑ζ • f') x = g' x

tactic: apply forall_congr'
state_before: R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
⊢ (∀ n > 0, ∑ i ∈ n.divisors, f i = g n) ↔ ∀ (x : ℕ), (↑ζ • f') x = g' x
state_after: case h
R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
⊢ ∀ (a : ℕ), a > 0 → ∑ i ∈ a.divisors, f i = g a ↔ (↑ζ • f') a = g' a

tactic: intro n
state_before: case h
R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
⊢ ∀ (a : ℕ), a > 0 → ∑ i ∈ a.divisors, f i = g a ↔ (↑ζ • f') a = g' a
state_after: case h
R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
n : ℕ
⊢ n > 0 → ∑ i ∈ n.divisors, f i = g n ↔ (↑ζ • f') n = g' n

tactic: cases n with
| zero => simp
| succ n =>
  rw [coe_zeta_smul_apply]
  simp only [n.succ_ne_zero, forall_prop_of_true, succ_pos', if_false, ZeroHom.coe_mk]
  simp only [f', g', coe_mk, succ_ne_zero, ite_false]
  rw [sum_congr rfl fun x hx => ?_]
  rw [if_neg (Nat.pos_of_mem_divisors hx).ne']
state_before: case h
R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
n : ℕ
⊢ n > 0 → ∑ i ∈ n.divisors, f i = g n ↔ (↑ζ • f') n = g' n
state_after: no goals

tactic: simp
state_before: case h.zero
R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
⊢ 0 > 0 → ∑ i ∈ divisors 0, f i = g 0 ↔ (↑ζ • f') 0 = g' 0
state_after: no goals

tactic: rw [coe_zeta_smul_apply]
state_before: case h.succ
R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
n : ℕ
⊢ n + 1 > 0 → ∑ i ∈ (n + 1).divisors, f i = g (n + 1) ↔ (↑ζ • f') (n + 1) = g' (n + 1)
state_after: case h.succ
R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
n : ℕ
⊢ n + 1 > 0 → ∑ i ∈ (n + 1).divisors, f i = g (n + 1) ↔ ∑ i ∈ (n + 1).divisors, f' i = g' (n + 1)

tactic: simp only [n.succ_ne_zero, forall_prop_of_true, succ_pos', if_false, ZeroHom.coe_mk]
state_before: case h.succ
R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
n : ℕ
⊢ n + 1 > 0 → ∑ i ∈ (n + 1).divisors, f i = g (n + 1) ↔ ∑ i ∈ (n + 1).divisors, f' i = g' (n + 1)
state_after: case h.succ
R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
n : ℕ
⊢ ∑ i ∈ (n + 1).divisors, f i = g (n + 1) ↔ ∑ i ∈ (n + 1).divisors, f' i = g' (n + 1)

tactic: simp only [f', g', coe_mk, succ_ne_zero, ite_false]
state_before: case h.succ
R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
n : ℕ
⊢ ∑ i ∈ (n + 1).divisors, f i = g (n + 1) ↔ ∑ i ∈ (n + 1).divisors, f' i = g' (n + 1)
state_after: case h.succ
R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
n : ℕ
⊢ ∑ i ∈ (n + 1).divisors, f i = g (n + 1) ↔ (∑ x ∈ (n + 1).divisors, if x = 0 then 0 else f x) = g (n + 1)

tactic: rw [sum_congr rfl fun x hx => ?_]
state_before: case h.succ
R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
n : ℕ
⊢ ∑ i ∈ (n + 1).divisors, f i = g (n + 1) ↔ (∑ x ∈ (n + 1).divisors, if x = 0 then 0 else f x) = g (n + 1)
state_after: R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
n x : ℕ
hx : x ∈ (n + 1).divisors
⊢ f x = if x = 0 then 0 else f x

tactic: rw [if_neg (Nat.pos_of_mem_divisors hx).ne']
state_before: R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
n x : ℕ
hx : x ∈ (n + 1).divisors
⊢ f x = if x = 0 then 0 else f x
state_after: no goals

tactic: constructor <;> intro h
state_before: R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
⊢ ↑ζ • f' = g' ↔ μ • g' = f'
state_after: case mp
R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
h : ↑ζ • f' = g'
⊢ μ • g' = f'

case mpr
R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
h : μ • g' = f'
⊢ ↑ζ • f' = g'

tactic: rw [← h, ← mul_smul, moebius_mul_coe_zeta, one_smul]
state_before: case mp
R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
h : ↑ζ • f' = g'
⊢ μ • g' = f'
state_after: no goals

tactic: rw [← h, ← mul_smul, coe_zeta_mul_moebius, one_smul]
state_before: case mpr
R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
h : μ • g' = f'
⊢ ↑ζ • f' = g'
state_after: no goals

tactic: rw [ext_iff]
state_before: R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
⊢ μ • g' = f' ↔ ∀ n > 0, ∑ x ∈ n.divisorsAntidiagonal, μ x.1 • g x.2 = f n
state_after: R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
⊢ (∀ (x : ℕ), (μ • g') x = f' x) ↔ ∀ n > 0, ∑ x ∈ n.divisorsAntidiagonal, μ x.1 • g x.2 = f n

tactic: apply forall_congr'
state_before: R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
⊢ (∀ (x : ℕ), (μ • g') x = f' x) ↔ ∀ n > 0, ∑ x ∈ n.divisorsAntidiagonal, μ x.1 • g x.2 = f n
state_after: case h
R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
⊢ ∀ (a : ℕ), (μ • g') a = f' a ↔ a > 0 → ∑ x ∈ a.divisorsAntidiagonal, μ x.1 • g x.2 = f a

tactic: intro n
state_before: case h
R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
⊢ ∀ (a : ℕ), (μ • g') a = f' a ↔ a > 0 → ∑ x ∈ a.divisorsAntidiagonal, μ x.1 • g x.2 = f a
state_after: case h
R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
n : ℕ
⊢ (μ • g') n = f' n ↔ n > 0 → ∑ x ∈ n.divisorsAntidiagonal, μ x.1 • g x.2 = f n

tactic: cases n with
| zero => simp
| succ n =>
  simp only [n.succ_ne_zero, forall_prop_of_true, succ_pos', smul_apply, if_false,
    ZeroHom.coe_mk]
  simp only [f', g', Nat.isUnit_iff, coe_mk, ZeroHom.toFun_eq_coe, succ_ne_zero, ite_false]
  rw [sum_congr rfl fun x hx => ?_]
  rw [if_neg (Nat.pos_of_mem_divisors (snd_mem_divisors_of_mem_antidiagonal hx)).ne']
state_before: case h
R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
n : ℕ
⊢ (μ • g') n = f' n ↔ n > 0 → ∑ x ∈ n.divisorsAntidiagonal, μ x.1 • g x.2 = f n
state_after: no goals

tactic: simp
state_before: case h.zero
R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
⊢ (μ • g') 0 = f' 0 ↔ 0 > 0 → ∑ x ∈ divisorsAntidiagonal 0, μ x.1 • g x.2 = f 0
state_after: no goals

tactic: simp only [n.succ_ne_zero, forall_prop_of_true, succ_pos', smul_apply, if_false,
  ZeroHom.coe_mk]
state_before: case h.succ
R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
n : ℕ
⊢ (μ • g') (n + 1) = f' (n + 1) ↔ n + 1 > 0 → ∑ x ∈ (n + 1).divisorsAntidiagonal, μ x.1 • g x.2 = f (n + 1)
state_after: case h.succ
R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
n : ℕ
⊢ ∑ x ∈ (n + 1).divisorsAntidiagonal, μ x.1 • g' x.2 = f' (n + 1) ↔
    ∑ x ∈ (n + 1).divisorsAntidiagonal, μ x.1 • g x.2 = f (n + 1)

tactic: simp only [f', g', Nat.isUnit_iff, coe_mk, ZeroHom.toFun_eq_coe, succ_ne_zero, ite_false]
state_before: case h.succ
R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
n : ℕ
⊢ ∑ x ∈ (n + 1).divisorsAntidiagonal, μ x.1 • g' x.2 = f' (n + 1) ↔
    ∑ x ∈ (n + 1).divisorsAntidiagonal, μ x.1 • g x.2 = f (n + 1)
state_after: case h.succ
R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
n : ℕ
⊢ (∑ x ∈ (n + 1).divisorsAntidiagonal, μ x.1 • if x.2 = 0 then 0 else g x.2) = f (n + 1) ↔
    ∑ x ∈ (n + 1).divisorsAntidiagonal, μ x.1 • g x.2 = f (n + 1)

tactic: rw [sum_congr rfl fun x hx => ?_]
state_before: case h.succ
R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
n : ℕ
⊢ (∑ x ∈ (n + 1).divisorsAntidiagonal, μ x.1 • if x.2 = 0 then 0 else g x.2) = f (n + 1) ↔
    ∑ x ∈ (n + 1).divisorsAntidiagonal, μ x.1 • g x.2 = f (n + 1)
state_after: R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
n : ℕ
x : ℕ × ℕ
hx : x ∈ (n + 1).divisorsAntidiagonal
⊢ (μ x.1 • if x.2 = 0 then 0 else g x.2) = μ x.1 • g x.2

tactic: rw [if_neg (Nat.pos_of_mem_divisors (snd_mem_divisors_of_mem_antidiagonal hx)).ne']
state_before: R : Type u_1
inst✝ : AddCommGroup R
f g : ℕ → R
f' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else f x, map_zero' := ⋯ }
g' : ArithmeticFunction R := { toFun := fun x => if x = 0 then 0 else g x, map_zero' := ⋯ }
n : ℕ
x : ℕ × ℕ
hx : x ∈ (n + 1).divisorsAntidiagonal
⊢ (μ x.1 • if x.2 = 0 then 0 else g x.2) = μ x.1 • g x.2
state_after: no goals