Summation of Summation over Divisors of Function of Two Variables

Theorem
Let $c, d, n \in \Z$.

Then:
 * $\displaystyle \sum_{d \mathop \divides n} \sum_{c \mathop \divides d} \map f {c, d} = \sum_{c \mathop \divides n} \sum_{d \mathop \divides \paren {n / c} } \map f {c, c d}$

where $c \divides d$ denotes that $c$ is a divisor of $d$.

Proof
From Exchange of Order of Summation with Dependency on Both Indices:

We have that:
 * $\map R d$ is the propositional function:
 * $d \divides n$
 * $\map S {d, c}$ is the propositional function:
 * $c \divides d$

Thus $\map {R'} {d, c}$ is the propositional function:
 * Both $d \divides n$ and $c \divides d$

This is the same as:
 * $c \divides n$ and $\dfrac d c \divides \dfrac n c$

Similarly, $\map {S'} c$ is the propositional function:
 * $\exists d$ such that both $d \divides n$ and $c \divides d$

This is the same as:
 * $c \divides n$

This gives:
 * $\displaystyle \sum_{d \mathop \divides n} \sum_{c \mathop \divides d} \map f {c, d} = \sum_{c \mathop \divides n} \sum_{\paren {d / c} \mathrel \divides \paren {n / c} } \map f {c, d}$

Replacing $d / c$ with $d$:
 * $\displaystyle \sum_{d \mathop \divides n} \sum_{c \mathop \divides d} \map f {c, d} = \sum_{c \mathop \divides n} \sum_{d \mathop \divides \paren {n / c} } \map f {c, c d}$