# Function and divergence on a graph

Let $X$ be the set of edges for an undirected connected graph with edge set $E(X)$ (So $e \mapsto e^{-1}$ is a bijection $E(X) \rightarrow E(X)$.)

A field on $X$ is a map $\phi : E(X) \rightarrow \Bbb R$ such that $\phi(e^{-1}) = - \phi(e)$. A function $f : X \rightarrow \Bbb R$ has a corresponding field $\Delta f(e):= f(e_+) - f(e_-)$ (if e_+ is the starting vertex of $e$ and $e_-$ the ending.) and a field $\phi$ has corresponding function $div \phi(x):= \sum_{e_- = x} \phi(e)$

There's a lemma in notes I'm reading that states:

$\frac{-1}{2} \sum_{e\in E(X)}\Delta f(e)\phi(e) = \sum_{x \in X} f(x)div \phi(x)$

We have

$\sum_{e \in E(X)} \Delta f(e) \phi(e) = \sum_{e} [f(e_+) - f(e_-)]\phi(e)=\sum_ef(e_+)\phi(e) + \sum_ef(e_-)\phi(e^{-1})$

but I don't see how to simplify anything else. Any help is appreciated.

It's a bit weird that you write $\Delta$ for that operator. I will write it as $d$, $df(e) = f(e_+) - f(e_-)$. Then we have: $$\sum_e df(e) \phi(e) = \sum_e f(e_+) \phi(e) - \sum_e f(e_-) \phi(e)\\ = \sum_v \sum_{\substack{ e \\ e_+ = v }} f(e_+) \phi(e) - \sum_v \sum_{\substack{ e \\ e_+ = v }} f(e_-) \phi(e) \\ = \sum_v f(v) \sum_{\substack{ e \\ e_+ = v }} \phi(e) -\sum_v f(v) \sum_{\substack{ e \\ e_- = v }} \phi(e) \\ = \sum_v f(v) \; \text{div} \phi(v) -\sum_v f(v) (- \text{div} \phi(v) ) \\ = 2\sum_v f(v) \; \text{div} \phi(v)$$ Moving from the first to second line, I used the fact that every edge has a unique $e_+$. In moving from the third to fourth, I used the fact that $\phi(e^{-1}) = - \phi(e)$.