Denote by $D[0,1]$ the space of [càdlàg](https://en.wikipedia.org/wiki/C%C3%A0dl%C3%A0g) functions on $[0,1]$. Take a Borel set $B$ in $\mathbb R$ such that $0\notin \overline{B}$ and consider the function


$$(Tf)(t) = \sum\_{s\leqslant t, f(s)-f(s-)\in B}\big(f(s)-f(s-)\big)\quad (f\in D[0,1]).$$


As the set $\{s\leqslant t, f(s)-f(s-)\in B\}$ is finite, $Tf$ defines an element of $D[0,1]$. 



> 
> Is the assignment $f\mapsto Tf$ $\mathcal{C}-\mathcal{C}$-measurable, where $\mathcal{C}$ denotes the smallest $\sigma$-algebra on $D[0,1]$ which makes all maps $f\mapsto f(s)$ ($s\in [0,1]$) measurable?
> 
> 
> 


It should be the case as ususally functions that can written by explicit formulae are measurable but not sure how to proceed.


Certainly, $f\mapsto f(s-)$ is measurable as [the limit of a sequence of measurable functions](https://math.stackexchange.com/questions/1327081/how-to-prove-limit-of-measurable-functions-is-measurable).



Transformations of càdlàg functions
*(Edited after Tomek Kania's comment – thanks!).*


The result is true also for Banach space-valued functions.



> 
> **Proposition:** Let $E$ be a Banach space and denote by $D([0,1], E)$ the space of $E$-valued càdlàg functions on $[0,1]$. Let $B$ be a Borel set in $E$ such that $0\notin \overline{B}$. Consider the mapping
>  $$(Tf)(t) = \sum\_{s\leqslant t, f(s)-f(s-)\in B}\big(f(s)-f(s-)\big)\quad \big(f\in D([0,1],E)\big).$$
>  Then $T\colon D([0,1], E) \to D([0,1], E) $ is a Borel map with respect to the cylindrical $\sigma$-algebra in $ D([0,1], E)$.
> 
> 
> 


For an open set $B$ such that $0 \notin \overline{B}$, write $\chi\_B(x,y)=y-x$ if $y-x \in B$ and $\chi\_B(x,y)=0$ otherwise. Define
$$\tilde{T}\_B f(t) = \lim\_{n \to \infty} \sum\_{k=1}^{\lfloor n t\rfloor + 1} \chi\_B(f(\tfrac{k-1}{n}), f(\tfrac{k}{n})) .$$
Next, write $B$ as the union of an increasing sequence $B\_m$ of open and bounded sets, given by $$B\_m = \{x \in E : \operatorname{dist}(x, B^c) > \tfrac{1}{m}\},$$ and define
$$T\_B f(t) = \lim\_{m \to \infty} \tilde{T}\_{B\_m} f(t) .$$
(Both limits above are understood in a pointwise sense).



> 
> **Claim:** $T\_B$ is equal to the mapping $T$ defined in the proposition.
> 
> 
> 


*Proof.* Fix $f \in D[0,1]$ and observe that $\Delta f(s) := f(s) - f(s^-) \in B$ for finitely many $s \in [0, 1]$. Denote these arguments $s$ by $s\_j$, $j = 1, 2, \ldots, J$. Since $B$ is open, for all $m$ large enough we have $\Delta f(s\_j) \in B\_m$ for $j = 1, 2, \ldots, J$. We fix any number $m$ with this property, and we let $$\varepsilon = \min\{\operatorname{dist}(B\_m, B\_{m+1}^c),\operatorname{dist}(B\_{m+1}, B^c)\}.$$
Next, we write $f = g + h$, with $g, h$ càdlàg, $g$ piecewise constant, $\Delta g(s) = \Delta f(s)$ if $\|\Delta f(s)\| \ge \varepsilon$ and $\Delta g(s) = 0$ otherwise (so that $g$ accumulates all jumps of $f$ of magnitude $\varepsilon$ or larger). There is a $\delta > 0$ such that if $t\_1, t\_2 \in [0, 1]$ and $\|t\_1 - t\_2\| < \delta$, then $\|h(t\_1) - h(t\_2)\| < \varepsilon$ (the proof of this property is the same as for continuous functions: otherwise $h$ would have a jump of magnitude at least $\varepsilon$).


For $n > 1/\delta$ large enough we have the following properties:


* Each interval $I\_k = (\tfrac{k-1}{n}, \tfrac{k}{n}]$, $k = 1, 2, \ldots, n$, contains at most one jump of $f$ of magnitude $\varepsilon$ or larger; in particular, it contains at most one of the numbers $s\_j$, $j = 1, 2, \ldots, J$.
* If $s\_j \in I\_k$ for some $j = 1, 2, \ldots, J$, then $$g(\tfrac{k}{n}) - g(\tfrac{k-1}{n}) \in B\_m$$ and $$\|h(\tfrac{k}{n}) - h(\tfrac{k-1}{n})\| < \varepsilon.$$ Therefore, $$g(\tfrac{k}{n}) - g(\tfrac{k-1}{n}) \in B\_{m+1}.$$
* If $I\_k$ contains no $s\_j$, $j = 1, 2, \ldots, J$, then $$g(\tfrac{k}{n}) - g(\tfrac{k-1}{n}) \in B^c$$ and $$\|h(\tfrac{k}{n}) - h(\tfrac{k-1}{n})\| < \varepsilon.$$ Therefore, $$g(\tfrac{k}{n}) - g(\tfrac{k-1}{n}) \notin B\_{m+1}.$$


It follows that for $n$ large enough,
$$ \sum\_{k=1}^{\lfloor n t \rfloor + 1} \chi\_{B\_{m+1}}(f(\tfrac{k-1}{n} t), f(\tfrac{k}{n} t)) = \sum\_{j=1}^J (f(\tfrac{1}{n} \lceil n s\_j \rceil) - f(\tfrac{1}{n} \lceil n s\_j - 1\rceil)) \mathbb{1}\_{\{n s\_j \le \lfloor n t \rfloor + 1\}} . $$
As $n \to \infty$, the right-hand side converges to
$$ \sum\_{j=1}^J (f(s\_j) - f(s\_j^-)) \mathbb{1}\_{\{s\_j \le t\}} , $$
which is the desired quantity $T f(t)$.


We have thus shown that for $m$ large enough, we have
$$ \tilde{T}\_{B\_{m+1}} f(t) = T f(t) . $$
In particular, $T\_B f(t) = T f(t)$. Our claim is proved.




---


By inspection we find that the map which assigns
$$ t \mapsto \sum\_{k=1}^{\lfloor n t \rfloor + 1} \chi\_B(f(\tfrac{k-1}{n}), f(\tfrac{k}{n})) $$
to a function $f \in D[0,1]$ is measurable (with values again in $D[0,1]$). Pointwise limits preserve measurability, and $T\_B$ again takes values in $D[0,1]$, so $T\_B$ is also measurable from $D[0,1]$ to itself. (Note that $\tilde{T}\_B$ does not take values in $D[0,1]$ and it is not even well-defined on all of $D[0,1]$, but this is not an issue: we defined $T\_B$ as an iterated limit, and the inner limit (with respect to $n$) exists for all $m$ large enough).




---


The rest is standard: consider the class $\mathcal{B}$ of sets $B$ for which the corresponding map $T$ is measurable. Then $\mathcal{B}$ is a $\lambda$-system that contains the $\pi$-system of open sets. Here we fix $\varepsilon > 0$ and we consider sets in $\mathcal{B}$ as subsets of $\{x \in E : \|x\| \ge \varepsilon\}$ to avoid addition of infinitely many jumps. By Dynkin's lemma, $\mathcal{B}$ contains all Borel subsets of $\{x \in E: \|x\| \ge \varepsilon\}$. This proves measurability of $T$ for any Borel set $B$ such that $0 \notin \overline{B}$.




---


(By the way, not every formula defines a measurable object; for example, $D[0,1]$ itself (and $C[0,1]$, and balls in the supremum metric) are not measurable subsets of the class of all real-valued functions on $[0,1]$ with the $\sigma$-algebra generated by cylinder sets).


