case h
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n : ℕ
⊢ ↑((f * g) • h) n = ↑(f • g • h) n
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
⊢ (f * g) • h = f • g • h
ext n
case h
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n : ℕ
⊢ ∑ x in Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst,
      ↑f x.snd.fst • ↑g x.snd.snd • ↑h x.fst.snd =
    ∑ x in Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.snd,
      ↑f x.fst.fst • ↑g x.snd.fst • ↑h x.snd.snd
case h
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n : ℕ
⊢ ↑((f * g) • h) n = ↑(f • g • h) n
simp only [mul_apply, smul_apply, sum_smul, mul_smul, smul_sum, Finset.sum_sigma']
case h.hi
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n : ℕ
⊢ ∀ (a : (_ : ℕ × ℕ) × ℕ × ℕ) (ha : a ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst),
    ?h.i a ha ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.snd

case h.h
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n : ℕ
⊢ ∀ (a : (_ : ℕ × ℕ) × ℕ × ℕ) (ha : a ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst),
    ↑f a.snd.fst • ↑g a.snd.snd • ↑h a.fst.snd =
      ↑f (?h.i a ha).fst.fst • ↑g (?h.i a ha).snd.fst • ↑h (?h.i a ha).snd.snd

case h.i_inj
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n : ℕ
⊢ ∀ (a₁ a₂ : (_ : ℕ × ℕ) × ℕ × ℕ) (ha₁ : a₁ ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst)
    (ha₂ : a₂ ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst),
    ?h.i a₁ ha₁ = ?h.i a₂ ha₂ → a₁ = a₂

case h.i_surj
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n : ℕ
⊢ ∀ (b : (_ : ℕ × ℕ) × ℕ × ℕ),
    (b ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.snd) → ∃ a ha, b = ?h.i a ha

case h.i
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n : ℕ
⊢ (a : (_ : ℕ × ℕ) × ℕ × ℕ) →
    (a ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) → (_ : ℕ × ℕ) × ℕ × ℕ
case h
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n : ℕ
⊢ ∑ x in Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst,
      ↑f x.snd.fst • ↑g x.snd.snd • ↑h x.fst.snd =
    ∑ x in Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.snd,
      ↑f x.fst.fst • ↑g x.snd.fst • ↑h x.snd.snd
apply Finset.sum_bij
case h.i
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n : ℕ
⊢ (a : (_ : ℕ × ℕ) × ℕ × ℕ) →
    (a ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) → (_ : ℕ × ℕ) × ℕ × ℕ

case h.hi
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n : ℕ
⊢ ∀ (a : (_ : ℕ × ℕ) × ℕ × ℕ) (ha : a ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst),
    ?h.i a ha ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.snd

case h.h
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n : ℕ
⊢ ∀ (a : (_ : ℕ × ℕ) × ℕ × ℕ) (ha : a ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst),
    ↑f a.snd.fst • ↑g a.snd.snd • ↑h a.fst.snd =
      ↑f (?h.i a ha).fst.fst • ↑g (?h.i a ha).snd.fst • ↑h (?h.i a ha).snd.snd

case h.i_inj
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n : ℕ
⊢ ∀ (a₁ a₂ : (_ : ℕ × ℕ) × ℕ × ℕ) (ha₁ : a₁ ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst)
    (ha₂ : a₂ ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst),
    ?h.i a₁ ha₁ = ?h.i a₂ ha₂ → a₁ = a₂

case h.i_surj
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n : ℕ
⊢ ∀ (b : (_ : ℕ × ℕ) × ℕ × ℕ),
    (b ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.snd) → ∃ a ha, b = ?h.i a ha
case h.hi
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n : ℕ
⊢ ∀ (a : (_ : ℕ × ℕ) × ℕ × ℕ) (ha : a ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst),
    ?h.i a ha ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.snd

case h.h
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n : ℕ
⊢ ∀ (a : (_ : ℕ × ℕ) × ℕ × ℕ) (ha : a ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst),
    ↑f a.snd.fst • ↑g a.snd.snd • ↑h a.fst.snd =
      ↑f (?h.i a ha).fst.fst • ↑g (?h.i a ha).snd.fst • ↑h (?h.i a ha).snd.snd

case h.i_inj
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n : ℕ
⊢ ∀ (a₁ a₂ : (_ : ℕ × ℕ) × ℕ × ℕ) (ha₁ : a₁ ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst)
    (ha₂ : a₂ ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst),
    ?h.i a₁ ha₁ = ?h.i a₂ ha₂ → a₁ = a₂

case h.i_surj
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n : ℕ
⊢ ∀ (b : (_ : ℕ × ℕ) × ℕ × ℕ),
    (b ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.snd) → ∃ a ha, b = ?h.i a ha

case h.i
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n : ℕ
⊢ (a : (_ : ℕ × ℕ) × ℕ × ℕ) →
    (a ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) → (_ : ℕ × ℕ) × ℕ × ℕ
pick_goal 5
case h.i.mk.mk.mk
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n i j k l : ℕ
_H : { fst := (i, j), snd := (k, l) } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst
⊢ (_ : ℕ × ℕ) × ℕ × ℕ
case h.i
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n : ℕ
⊢ (a : (_ : ℕ × ℕ) × ℕ × ℕ) →
    (a ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) → (_ : ℕ × ℕ) × ℕ × ℕ
rintro ⟨⟨i, j⟩, ⟨k, l⟩⟩ _H
no goals
case h.i.mk.mk.mk
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n i j k l : ℕ
_H : { fst := (i, j), snd := (k, l) } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst
⊢ (_ : ℕ × ℕ) × ℕ × ℕ
exact ⟨(k, l * j), (l, j)⟩
case h.hi.mk.mk.mk
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n i j k l : ℕ
H : { fst := (i, j), snd := (k, l) } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst
⊢ Sigma.casesOn (motive := fun x =>
      (x ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) → (_ : ℕ × ℕ) × ℕ × ℕ)
      { fst := (i, j), snd := (k, l) }
      (fun fst snd =>
        Prod.casesOn (motive := fun x =>
          ({ fst := x, snd := snd } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
            (_ : ℕ × ℕ) × ℕ × ℕ)
          fst fun i j =>
          Prod.casesOn (motive := fun x =>
            ({ fst := (i, j), snd := x } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
              (_ : ℕ × ℕ) × ℕ × ℕ)
            snd fun k l _H => { fst := (k, l * j), snd := (l, j) })
      H ∈
    Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.snd
case h.hi
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n : ℕ
⊢ ∀ (a : (_ : ℕ × ℕ) × ℕ × ℕ) (ha : a ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst),
    Sigma.casesOn (motive := fun x =>
        (x ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) → (_ : ℕ × ℕ) × ℕ × ℕ) a
        (fun fst snd =>
          Prod.casesOn (motive := fun x =>
            ({ fst := x, snd := snd } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
              (_ : ℕ × ℕ) × ℕ × ℕ)
            fst fun i j =>
            Prod.casesOn (motive := fun x =>
              ({ fst := (i, j), snd := x } ∈
                  Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                (_ : ℕ × ℕ) × ℕ × ℕ)
              snd fun k l _H => { fst := (k, l * j), snd := (l, j) })
        ha ∈
      Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.snd
rintro ⟨⟨i, j⟩, ⟨k, l⟩⟩ H
case h.hi.mk.mk.mk
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n i j k l : ℕ
H : (i * j = n ∧ n ≠ 0) ∧ k * l = i ∧ i ≠ 0
⊢ (k * (l * j) = n ∧ n ≠ 0) ∧ True ∧ l * j ≠ 0
case h.hi.mk.mk.mk
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n i j k l : ℕ
H : { fst := (i, j), snd := (k, l) } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst
⊢ Sigma.casesOn (motive := fun x =>
      (x ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) → (_ : ℕ × ℕ) × ℕ × ℕ)
      { fst := (i, j), snd := (k, l) }
      (fun fst snd =>
        Prod.casesOn (motive := fun x =>
          ({ fst := x, snd := snd } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
            (_ : ℕ × ℕ) × ℕ × ℕ)
          fst fun i j =>
          Prod.casesOn (motive := fun x =>
            ({ fst := (i, j), snd := x } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
              (_ : ℕ × ℕ) × ℕ × ℕ)
            snd fun k l _H => { fst := (k, l * j), snd := (l, j) })
      H ∈
    Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.snd
simp only [Finset.mem_sigma, mem_divisorsAntidiagonal] at H⊢
case h.hi.mk.mk.mk.intro.intro.intro
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
j k l : ℕ
n0 : k * l * j ≠ 0
i0 : k * l ≠ 0
⊢ (k * (l * j) = k * l * j ∧ k * l * j ≠ 0) ∧ True ∧ l * j ≠ 0
case h.hi.mk.mk.mk
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n i j k l : ℕ
H : (i * j = n ∧ n ≠ 0) ∧ k * l = i ∧ i ≠ 0
⊢ (k * (l * j) = n ∧ n ≠ 0) ∧ True ∧ l * j ≠ 0
rcases H with ⟨⟨rfl, n0⟩, rfl, i0⟩
case h.hi.mk.mk.mk.intro.intro.intro
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
j k l : ℕ
n0 : k * l * j ≠ 0
i0 : k * l ≠ 0
⊢ l * j ≠ 0
case h.hi.mk.mk.mk.intro.intro.intro
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
j k l : ℕ
n0 : k * l * j ≠ 0
i0 : k * l ≠ 0
⊢ (k * (l * j) = k * l * j ∧ k * l * j ≠ 0) ∧ True ∧ l * j ≠ 0
refine' ⟨⟨(mul_assoc _ _ _).symm, n0⟩, trivial, _⟩
case h.hi.mk.mk.mk.intro.intro.intro
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
j k l : ℕ
n0 : k * l ≠ 0 ∧ j ≠ 0
i0 : k ≠ 0 ∧ l ≠ 0
⊢ l ≠ 0 ∧ j ≠ 0
case h.hi.mk.mk.mk.intro.intro.intro
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
j k l : ℕ
n0 : k * l * j ≠ 0
i0 : k * l ≠ 0
⊢ l * j ≠ 0
rw [mul_ne_zero_iff] at *
no goals
case h.hi.mk.mk.mk.intro.intro.intro
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
j k l : ℕ
n0 : k * l ≠ 0 ∧ j ≠ 0
i0 : k ≠ 0 ∧ l ≠ 0
⊢ l ≠ 0 ∧ j ≠ 0
exact ⟨i0.2, n0.2⟩
case h.h.mk.mk.mk
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n i j k l : ℕ
_H : { fst := (i, j), snd := (k, l) } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst
⊢ ↑f { fst := (i, j), snd := (k, l) }.snd.fst •
      ↑g { fst := (i, j), snd := (k, l) }.snd.snd • ↑h { fst := (i, j), snd := (k, l) }.fst.snd =
    ↑f
        (Sigma.casesOn (motive := fun x =>
              (x ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) → (_ : ℕ × ℕ) × ℕ × ℕ)
              { fst := (i, j), snd := (k, l) }
              (fun fst snd =>
                Prod.casesOn (motive := fun x =>
                  ({ fst := x, snd := snd } ∈
                      Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                    (_ : ℕ × ℕ) × ℕ × ℕ)
                  fst fun i j =>
                  Prod.casesOn (motive := fun x =>
                    ({ fst := (i, j), snd := x } ∈
                        Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                      (_ : ℕ × ℕ) × ℕ × ℕ)
                    snd fun k l _H => { fst := (k, l * j), snd := (l, j) })
              _H).fst.fst •
      ↑g
          (Sigma.casesOn (motive := fun x =>
                (x ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) → (_ : ℕ × ℕ) × ℕ × ℕ)
                { fst := (i, j), snd := (k, l) }
                (fun fst snd =>
                  Prod.casesOn (motive := fun x =>
                    ({ fst := x, snd := snd } ∈
                        Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                      (_ : ℕ × ℕ) × ℕ × ℕ)
                    fst fun i j =>
                    Prod.casesOn (motive := fun x =>
                      ({ fst := (i, j), snd := x } ∈
                          Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                        (_ : ℕ × ℕ) × ℕ × ℕ)
                      snd fun k l _H => { fst := (k, l * j), snd := (l, j) })
                _H).snd.fst •
        ↑h
          (Sigma.casesOn (motive := fun x =>
                (x ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) → (_ : ℕ × ℕ) × ℕ × ℕ)
                { fst := (i, j), snd := (k, l) }
                (fun fst snd =>
                  Prod.casesOn (motive := fun x =>
                    ({ fst := x, snd := snd } ∈
                        Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                      (_ : ℕ × ℕ) × ℕ × ℕ)
                    fst fun i j =>
                    Prod.casesOn (motive := fun x =>
                      ({ fst := (i, j), snd := x } ∈
                          Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                        (_ : ℕ × ℕ) × ℕ × ℕ)
                      snd fun k l _H => { fst := (k, l * j), snd := (l, j) })
                _H).snd.snd
case h.h
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n : ℕ
⊢ ∀ (a : (_ : ℕ × ℕ) × ℕ × ℕ) (ha : a ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst),
    ↑f a.snd.fst • ↑g a.snd.snd • ↑h a.fst.snd =
      ↑f
          (Sigma.casesOn (motive := fun x =>
                (x ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) → (_ : ℕ × ℕ) × ℕ × ℕ) a
                (fun fst snd =>
                  Prod.casesOn (motive := fun x =>
                    ({ fst := x, snd := snd } ∈
                        Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                      (_ : ℕ × ℕ) × ℕ × ℕ)
                    fst fun i j =>
                    Prod.casesOn (motive := fun x =>
                      ({ fst := (i, j), snd := x } ∈
                          Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                        (_ : ℕ × ℕ) × ℕ × ℕ)
                      snd fun k l _H => { fst := (k, l * j), snd := (l, j) })
                ha).fst.fst •
        ↑g
            (Sigma.casesOn (motive := fun x =>
                  (x ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) → (_ : ℕ × ℕ) × ℕ × ℕ)
                  a
                  (fun fst snd =>
                    Prod.casesOn (motive := fun x =>
                      ({ fst := x, snd := snd } ∈
                          Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                        (_ : ℕ × ℕ) × ℕ × ℕ)
                      fst fun i j =>
                      Prod.casesOn (motive := fun x =>
                        ({ fst := (i, j), snd := x } ∈
                            Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                          (_ : ℕ × ℕ) × ℕ × ℕ)
                        snd fun k l _H => { fst := (k, l * j), snd := (l, j) })
                  ha).snd.fst •
          ↑h
            (Sigma.casesOn (motive := fun x =>
                  (x ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) → (_ : ℕ × ℕ) × ℕ × ℕ)
                  a
                  (fun fst snd =>
                    Prod.casesOn (motive := fun x =>
                      ({ fst := x, snd := snd } ∈
                          Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                        (_ : ℕ × ℕ) × ℕ × ℕ)
                      fst fun i j =>
                      Prod.casesOn (motive := fun x =>
                        ({ fst := (i, j), snd := x } ∈
                            Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                          (_ : ℕ × ℕ) × ℕ × ℕ)
                        snd fun k l _H => { fst := (k, l * j), snd := (l, j) })
                  ha).snd.snd
rintro ⟨⟨i, j⟩, ⟨k, l⟩⟩ _H
no goals
case h.h.mk.mk.mk
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n i j k l : ℕ
_H : { fst := (i, j), snd := (k, l) } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst
⊢ ↑f { fst := (i, j), snd := (k, l) }.snd.fst •
      ↑g { fst := (i, j), snd := (k, l) }.snd.snd • ↑h { fst := (i, j), snd := (k, l) }.fst.snd =
    ↑f
        (Sigma.casesOn (motive := fun x =>
              (x ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) → (_ : ℕ × ℕ) × ℕ × ℕ)
              { fst := (i, j), snd := (k, l) }
              (fun fst snd =>
                Prod.casesOn (motive := fun x =>
                  ({ fst := x, snd := snd } ∈
                      Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                    (_ : ℕ × ℕ) × ℕ × ℕ)
                  fst fun i j =>
                  Prod.casesOn (motive := fun x =>
                    ({ fst := (i, j), snd := x } ∈
                        Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                      (_ : ℕ × ℕ) × ℕ × ℕ)
                    snd fun k l _H => { fst := (k, l * j), snd := (l, j) })
              _H).fst.fst •
      ↑g
          (Sigma.casesOn (motive := fun x =>
                (x ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) → (_ : ℕ × ℕ) × ℕ × ℕ)
                { fst := (i, j), snd := (k, l) }
                (fun fst snd =>
                  Prod.casesOn (motive := fun x =>
                    ({ fst := x, snd := snd } ∈
                        Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                      (_ : ℕ × ℕ) × ℕ × ℕ)
                    fst fun i j =>
                    Prod.casesOn (motive := fun x =>
                      ({ fst := (i, j), snd := x } ∈
                          Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                        (_ : ℕ × ℕ) × ℕ × ℕ)
                      snd fun k l _H => { fst := (k, l * j), snd := (l, j) })
                _H).snd.fst •
        ↑h
          (Sigma.casesOn (motive := fun x =>
                (x ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) → (_ : ℕ × ℕ) × ℕ × ℕ)
                { fst := (i, j), snd := (k, l) }
                (fun fst snd =>
                  Prod.casesOn (motive := fun x =>
                    ({ fst := x, snd := snd } ∈
                        Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                      (_ : ℕ × ℕ) × ℕ × ℕ)
                    fst fun i j =>
                    Prod.casesOn (motive := fun x =>
                      ({ fst := (i, j), snd := x } ∈
                          Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                        (_ : ℕ × ℕ) × ℕ × ℕ)
                      snd fun k l _H => { fst := (k, l * j), snd := (l, j) })
                _H).snd.snd
simp only [mul_assoc]
case h.i_inj.mk.mk.mk.mk.mk.mk
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n a b c d i j k l : ℕ
H₁ : { fst := (a, b), snd := (c, d) } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst
H₂ : { fst := (i, j), snd := (k, l) } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst
⊢ Sigma.casesOn (motive := fun x =>
        (x ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) → (_ : ℕ × ℕ) × ℕ × ℕ)
        { fst := (a, b), snd := (c, d) }
        (fun fst snd =>
          Prod.casesOn (motive := fun x =>
            ({ fst := x, snd := snd } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
              (_ : ℕ × ℕ) × ℕ × ℕ)
            fst fun i j =>
            Prod.casesOn (motive := fun x =>
              ({ fst := (i, j), snd := x } ∈
                  Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                (_ : ℕ × ℕ) × ℕ × ℕ)
              snd fun k l _H => { fst := (k, l * j), snd := (l, j) })
        H₁ =
      Sigma.casesOn (motive := fun x =>
        (x ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) → (_ : ℕ × ℕ) × ℕ × ℕ)
        { fst := (i, j), snd := (k, l) }
        (fun fst snd =>
          Prod.casesOn (motive := fun x =>
            ({ fst := x, snd := snd } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
              (_ : ℕ × ℕ) × ℕ × ℕ)
            fst fun i j =>
            Prod.casesOn (motive := fun x =>
              ({ fst := (i, j), snd := x } ∈
                  Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                (_ : ℕ × ℕ) × ℕ × ℕ)
              snd fun k l _H => { fst := (k, l * j), snd := (l, j) })
        H₂ →
    { fst := (a, b), snd := (c, d) } = { fst := (i, j), snd := (k, l) }
case h.i_inj
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n : ℕ
⊢ ∀ (a₁ a₂ : (_ : ℕ × ℕ) × ℕ × ℕ) (ha₁ : a₁ ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst)
    (ha₂ : a₂ ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst),
    Sigma.casesOn (motive := fun x =>
          (x ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) → (_ : ℕ × ℕ) × ℕ × ℕ) a₁
          (fun fst snd =>
            Prod.casesOn (motive := fun x =>
              ({ fst := x, snd := snd } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                (_ : ℕ × ℕ) × ℕ × ℕ)
              fst fun i j =>
              Prod.casesOn (motive := fun x =>
                ({ fst := (i, j), snd := x } ∈
                    Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                  (_ : ℕ × ℕ) × ℕ × ℕ)
                snd fun k l _H => { fst := (k, l * j), snd := (l, j) })
          ha₁ =
        Sigma.casesOn (motive := fun x =>
          (x ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) → (_ : ℕ × ℕ) × ℕ × ℕ) a₂
          (fun fst snd =>
            Prod.casesOn (motive := fun x =>
              ({ fst := x, snd := snd } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                (_ : ℕ × ℕ) × ℕ × ℕ)
              fst fun i j =>
              Prod.casesOn (motive := fun x =>
                ({ fst := (i, j), snd := x } ∈
                    Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                  (_ : ℕ × ℕ) × ℕ × ℕ)
                snd fun k l _H => { fst := (k, l * j), snd := (l, j) })
          ha₂ →
      a₁ = a₂
rintro ⟨⟨a, b⟩, ⟨c, d⟩⟩ ⟨⟨i, j⟩, ⟨k, l⟩⟩ H₁ H₂
case h.i_inj.mk.mk.mk.mk.mk.mk
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n a b c d i j k l : ℕ
H₁ : (a * b = n ∧ n ≠ 0) ∧ c * d = a ∧ a ≠ 0
H₂ : (i * j = n ∧ n ≠ 0) ∧ k * l = i ∧ i ≠ 0
⊢ { fst := (c, d * b), snd := (d, b) } = { fst := (k, l * j), snd := (l, j) } →
    { fst := (a, b), snd := (c, d) } = { fst := (i, j), snd := (k, l) }
case h.i_inj.mk.mk.mk.mk.mk.mk
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n a b c d i j k l : ℕ
H₁ : { fst := (a, b), snd := (c, d) } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst
H₂ : { fst := (i, j), snd := (k, l) } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst
⊢ Sigma.casesOn (motive := fun x =>
        (x ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) → (_ : ℕ × ℕ) × ℕ × ℕ)
        { fst := (a, b), snd := (c, d) }
        (fun fst snd =>
          Prod.casesOn (motive := fun x =>
            ({ fst := x, snd := snd } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
              (_ : ℕ × ℕ) × ℕ × ℕ)
            fst fun i j =>
            Prod.casesOn (motive := fun x =>
              ({ fst := (i, j), snd := x } ∈
                  Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                (_ : ℕ × ℕ) × ℕ × ℕ)
              snd fun k l _H => { fst := (k, l * j), snd := (l, j) })
        H₁ =
      Sigma.casesOn (motive := fun x =>
        (x ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) → (_ : ℕ × ℕ) × ℕ × ℕ)
        { fst := (i, j), snd := (k, l) }
        (fun fst snd =>
          Prod.casesOn (motive := fun x =>
            ({ fst := x, snd := snd } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
              (_ : ℕ × ℕ) × ℕ × ℕ)
            fst fun i j =>
            Prod.casesOn (motive := fun x =>
              ({ fst := (i, j), snd := x } ∈
                  Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                (_ : ℕ × ℕ) × ℕ × ℕ)
              snd fun k l _H => { fst := (k, l * j), snd := (l, j) })
        H₂ →
    { fst := (a, b), snd := (c, d) } = { fst := (i, j), snd := (k, l) }
simp only [Finset.mem_sigma, mem_divisorsAntidiagonal, and_imp, Prod.mk.inj_iff, add_comm,
  heq_iff_eq] at H₁ H₂⊢
case h.i_inj.mk.mk.mk.mk.mk.mk
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n a b c d i j k l : ℕ
H₁ : (a * b = n ∧ n ≠ 0) ∧ c * d = a ∧ a ≠ 0
H₂ : (i * j = n ∧ n ≠ 0) ∧ k * l = i ∧ i ≠ 0
⊢ c = k → d * b = l * j → d = l → b = j → (a = i ∧ b = j) ∧ c = k ∧ d = l
case h.i_inj.mk.mk.mk.mk.mk.mk
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n a b c d i j k l : ℕ
H₁ : (a * b = n ∧ n ≠ 0) ∧ c * d = a ∧ a ≠ 0
H₂ : (i * j = n ∧ n ≠ 0) ∧ k * l = i ∧ i ≠ 0
⊢ { fst := (c, d * b), snd := (d, b) } = { fst := (k, l * j), snd := (l, j) } →
    { fst := (a, b), snd := (c, d) } = { fst := (i, j), snd := (k, l) }
simp only [Sigma.mk.inj_iff, Prod.mk.injEq, heq_eq_eq, and_imp]
case h.i_inj.mk.mk.mk.mk.mk.mk
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h✝ : ArithmeticFunction M
n a b c d i k : ℕ
H₁ : (a * b = n ∧ n ≠ 0) ∧ c * d = a ∧ a ≠ 0
h : c = k
H₂ : (i * b = n ∧ n ≠ 0) ∧ k * d = i ∧ i ≠ 0
h2 : d * b = d * b
⊢ (a = i ∧ b = b) ∧ c = k ∧ d = d
case h.i_inj.mk.mk.mk.mk.mk.mk
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n a b c d i j k l : ℕ
H₁ : (a * b = n ∧ n ≠ 0) ∧ c * d = a ∧ a ≠ 0
H₂ : (i * j = n ∧ n ≠ 0) ∧ k * l = i ∧ i ≠ 0
⊢ c = k → d * b = l * j → d = l → b = j → (a = i ∧ b = j) ∧ c = k ∧ d = l
rintro h h2 rfl rfl
case h.i_inj.mk.mk.mk.mk.mk.mk
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n a b c d i : ℕ
H₁ : (a * b = n ∧ n ≠ 0) ∧ c * d = a ∧ a ≠ 0
h2 : d * b = d * b
H₂ : (i * b = n ∧ n ≠ 0) ∧ c * d = i ∧ i ≠ 0
⊢ (a = i ∧ b = b) ∧ c = c ∧ d = d
case h.i_inj.mk.mk.mk.mk.mk.mk
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h✝ : ArithmeticFunction M
n a b c d i k : ℕ
H₁ : (a * b = n ∧ n ≠ 0) ∧ c * d = a ∧ a ≠ 0
h : c = k
H₂ : (i * b = n ∧ n ≠ 0) ∧ k * d = i ∧ i ≠ 0
h2 : d * b = d * b
⊢ (a = i ∧ b = b) ∧ c = k ∧ d = d
subst h
no goals
case h.i_inj.mk.mk.mk.mk.mk.mk
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n a b c d i : ℕ
H₁ : (a * b = n ∧ n ≠ 0) ∧ c * d = a ∧ a ≠ 0
h2 : d * b = d * b
H₂ : (i * b = n ∧ n ≠ 0) ∧ c * d = i ∧ i ≠ 0
⊢ (a = i ∧ b = b) ∧ c = c ∧ d = d
exact ⟨⟨Eq.trans H₁.2.1.symm H₂.2.1, rfl⟩, rfl, rfl⟩
case h.i_surj.mk.mk.mk
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n i j k l : ℕ
H : { fst := (i, j), snd := (k, l) } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.snd
⊢ ∃ a ha,
    { fst := (i, j), snd := (k, l) } =
      Sigma.casesOn (motive := fun x =>
        (x ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) → (_ : ℕ × ℕ) × ℕ × ℕ) a
        (fun fst snd =>
          Prod.casesOn (motive := fun x =>
            ({ fst := x, snd := snd } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
              (_ : ℕ × ℕ) × ℕ × ℕ)
            fst fun i j =>
            Prod.casesOn (motive := fun x =>
              ({ fst := (i, j), snd := x } ∈
                  Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                (_ : ℕ × ℕ) × ℕ × ℕ)
              snd fun k l _H => { fst := (k, l * j), snd := (l, j) })
        ha
case h.i_surj
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n : ℕ
⊢ ∀ (b : (_ : ℕ × ℕ) × ℕ × ℕ),
    (b ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.snd) →
      ∃ a ha,
        b =
          Sigma.casesOn (motive := fun x =>
            (x ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) → (_ : ℕ × ℕ) × ℕ × ℕ) a
            (fun fst snd =>
              Prod.casesOn (motive := fun x =>
                ({ fst := x, snd := snd } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                  (_ : ℕ × ℕ) × ℕ × ℕ)
                fst fun i j =>
                Prod.casesOn (motive := fun x =>
                  ({ fst := (i, j), snd := x } ∈
                      Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                    (_ : ℕ × ℕ) × ℕ × ℕ)
                  snd fun k l _H => { fst := (k, l * j), snd := (l, j) })
            ha
rintro ⟨⟨i, j⟩, ⟨k, l⟩⟩ H
case h.i_surj.mk.mk.mk.refine'_1
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n i j k l : ℕ
H : { fst := (i, j), snd := (k, l) } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.snd
⊢ { fst := (i * k, l), snd := (i, k) } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst

case h.i_surj.mk.mk.mk.refine'_2
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n i j k l : ℕ
H : { fst := (i, j), snd := (k, l) } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.snd
⊢ { fst := (i, j), snd := (k, l) } =
    Sigma.casesOn (motive := fun x =>
      (x ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) → (_ : ℕ × ℕ) × ℕ × ℕ)
      { fst := (i * k, l), snd := (i, k) }
      (fun fst snd =>
        Prod.casesOn (motive := fun x =>
          ({ fst := x, snd := snd } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
            (_ : ℕ × ℕ) × ℕ × ℕ)
          fst fun i j =>
          Prod.casesOn (motive := fun x =>
            ({ fst := (i, j), snd := x } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
              (_ : ℕ × ℕ) × ℕ × ℕ)
            snd fun k l _H => { fst := (k, l * j), snd := (l, j) })
      ?h.i_surj.mk.mk.mk.refine'_1
case h.i_surj.mk.mk.mk
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n i j k l : ℕ
H : { fst := (i, j), snd := (k, l) } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.snd
⊢ ∃ a ha,
    { fst := (i, j), snd := (k, l) } =
      Sigma.casesOn (motive := fun x =>
        (x ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) → (_ : ℕ × ℕ) × ℕ × ℕ) a
        (fun fst snd =>
          Prod.casesOn (motive := fun x =>
            ({ fst := x, snd := snd } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
              (_ : ℕ × ℕ) × ℕ × ℕ)
            fst fun i j =>
            Prod.casesOn (motive := fun x =>
              ({ fst := (i, j), snd := x } ∈
                  Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
                (_ : ℕ × ℕ) × ℕ × ℕ)
              snd fun k l _H => { fst := (k, l * j), snd := (l, j) })
        ha
refine' ⟨⟨(i * k, l), (i, k)⟩, _, _⟩
case h.i_surj.mk.mk.mk.refine'_1
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n i j k l : ℕ
H : (i * j = n ∧ n ≠ 0) ∧ k * l = j ∧ j ≠ 0
⊢ (i * k * l = n ∧ n ≠ 0) ∧ True ∧ i * k ≠ 0
case h.i_surj.mk.mk.mk.refine'_1
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n i j k l : ℕ
H : { fst := (i, j), snd := (k, l) } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.snd
⊢ { fst := (i * k, l), snd := (i, k) } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst
simp only [Finset.mem_sigma, mem_divisorsAntidiagonal] at H⊢
case h.i_surj.mk.mk.mk.refine'_1.intro.intro.intro
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
i k l : ℕ
n0 : i * (k * l) ≠ 0
j0 : k * l ≠ 0
⊢ (i * k * l = i * (k * l) ∧ i * (k * l) ≠ 0) ∧ True ∧ i * k ≠ 0
case h.i_surj.mk.mk.mk.refine'_1
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n i j k l : ℕ
H : (i * j = n ∧ n ≠ 0) ∧ k * l = j ∧ j ≠ 0
⊢ (i * k * l = n ∧ n ≠ 0) ∧ True ∧ i * k ≠ 0
rcases H with ⟨⟨rfl, n0⟩, rfl, j0⟩
case h.i_surj.mk.mk.mk.refine'_1.intro.intro.intro
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
i k l : ℕ
n0 : i * (k * l) ≠ 0
j0 : k * l ≠ 0
⊢ i * k ≠ 0
case h.i_surj.mk.mk.mk.refine'_1.intro.intro.intro
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
i k l : ℕ
n0 : i * (k * l) ≠ 0
j0 : k * l ≠ 0
⊢ (i * k * l = i * (k * l) ∧ i * (k * l) ≠ 0) ∧ True ∧ i * k ≠ 0
refine' ⟨⟨mul_assoc _ _ _, n0⟩, trivial, _⟩
case h.i_surj.mk.mk.mk.refine'_1.intro.intro.intro
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
i k l : ℕ
n0 : i ≠ 0 ∧ k * l ≠ 0
j0 : k ≠ 0 ∧ l ≠ 0
⊢ i ≠ 0 ∧ k ≠ 0
case h.i_surj.mk.mk.mk.refine'_1.intro.intro.intro
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
i k l : ℕ
n0 : i * (k * l) ≠ 0
j0 : k * l ≠ 0
⊢ i * k ≠ 0
rw [mul_ne_zero_iff] at *
no goals
case h.i_surj.mk.mk.mk.refine'_1.intro.intro.intro
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
i k l : ℕ
n0 : i ≠ 0 ∧ k * l ≠ 0
j0 : k ≠ 0 ∧ l ≠ 0
⊢ i ≠ 0 ∧ k ≠ 0
exact ⟨n0.1, j0.1⟩
case h.i_surj.mk.mk.mk.refine'_2
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n i j k l : ℕ
H : (i * j = n ∧ ¬n = 0) ∧ k * l = j ∧ ¬j = 0
⊢ { fst := (i, j), snd := (k, l) } = { fst := (i, k * l), snd := (k, l) }
case h.i_surj.mk.mk.mk.refine'_2
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n i j k l : ℕ
H : { fst := (i, j), snd := (k, l) } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.snd
⊢ { fst := (i, j), snd := (k, l) } =
    Sigma.casesOn (motive := fun x =>
      (x ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) → (_ : ℕ × ℕ) × ℕ × ℕ)
      { fst := (i * k, l), snd := (i, k) }
      (fun fst snd =>
        Prod.casesOn (motive := fun x =>
          ({ fst := x, snd := snd } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
            (_ : ℕ × ℕ) × ℕ × ℕ)
          fst fun i j =>
          Prod.casesOn (motive := fun x =>
            ({ fst := (i, j), snd := x } ∈ Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst) →
              (_ : ℕ × ℕ) × ℕ × ℕ)
            snd fun k l _H => { fst := (k, l * j), snd := (l, j) })
      (_ :
        { fst := (i * k, l), snd := (i, k) } ∈
          Finset.sigma (divisorsAntidiagonal n) fun a => divisorsAntidiagonal a.fst)
simp only [true_and_iff, mem_divisorsAntidiagonal, and_true_iff, Prod.mk.inj_iff,
  eq_self_iff_true, Ne.def, mem_sigma, heq_iff_eq] at H⊢
no goals
case h.i_surj.mk.mk.mk.refine'_2
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f g : ArithmeticFunction R
h : ArithmeticFunction M
n i j k l : ℕ
H : (i * j = n ∧ ¬n = 0) ∧ k * l = j ∧ ¬j = 0
⊢ { fst := (i, j), snd := (k, l) } = { fst := (i, k * l), snd := (k, l) }
rw [H.2.1]