I just wanted to sum over all vertices $v'\in V$ of a graph (where $v$ is given) such that $\{v,v'\}\in E$ while also binding the variable $e$ to $\{v,v'\}$ and realized that mathematical notation is a bit restricted in what you can do in such a case. Here are a few possibilities, where $T$ is some arbitrary term using $v'$ and $e$:
- $\sum_{v'\in V:(e:=\{v,v'\})\in E}T[v',e]$
- $\sum_{v'\in V, e\in E: e=\{v,v'\}}T[v',e]$
- $\sum_{v'\in V: \exists e\in E.e=\{v,v'\}}T[v',e]$
I think the first one is a bit unconvential, but could be understood from the context. The second one is technically correct, but a bit misleading because it looks like a double sum when in fact it reduces to a 'single sum'. The last one is definitely technically false, as the scope of $e$ ends after the sum sign and $e$ is undefined inside $T$. In Haskell there is the as-pattern for such bindings, which I think would also be handy in math, like $e@\{v,v'\}$, but I have never seen it before. Is there maybe some good alternative to the notations I described?