Ill first just give some preliminary Definitions I am trying to relate and a bit confused the first definition for summing up a partition.
Definition (Summation over finite sets) Let $X$ be a finite set with $n$ elements let $f:X \rightarrow\mathbb R$ be a function. We define $\displaystyle \sum_{x \in X} f(x)$ as follows. Select any bijection $g$ from {${i \in N : 1 \leq i \leq n}$} to $X$ we then define: $\displaystyle \sum_{x \in X} f(x)$ $:=$ $\sum_{i=1}^{n} f(g(i))$
Definition If $I$ is a bounded interval, we define the length of $I$, denoted $|I|$ as follows. If $I$ is one of the intervals $(a,b), [a,b], (a,b], [a,b)$ for some real numbers $a<b$ then we define $|I| := |b-a|$
Definition (Partions) Let $I$ be a bounded interval. A Partition of $I$ is a finite set P of bounded intervals contained in $I$, such that every $x$ in $I$ lies in exactly one of the bounded intervals $J$ in P
He then goes on to state a theorem where
$|I| = \displaystyle \sum_{J \in P} |J|$
and my question is how does the notation:
"$\displaystyle \sum_{J \in P} |J|$" translate into the above definition? Im a bit confused by it when talking about partitions. For example if we let $P$ be the partition of $(0,1)$ by $\{(0,\frac{1}{2}], (\frac{1}{2},1)\}$
then is it simply:
let $g:\{1,2\} \rightarrow\ P$ by say $g(1) := (0,\frac{1}{2}]$ and $g(2) := (\frac{1}{2},1)$ then we have $\displaystyle \sum_{J \in P} |J| = \sum_{i=1}^{2} |(g(i)|$ ?
or is it this one (following the above definition more precisely)
$f:P \rightarrow\mathbb R$ by $f(J) = |b-a|$ and let $g:\{1,2\} \rightarrow\ P$ by say $g(1) := (0,\frac{1}{2}]$ and $g(2) := (\frac{1}{2},1)$ then we have $\displaystyle \sum_{J \in P} |J| = \sum_{J \in P} f(J)$ $:= \sum_{i=1}^{2} f(g(i))$
Both are correct.
Your second version is just introducing a formal "length" function $f$, which is exactly the two bars in your first interpretation.