I recently found this thing called a weak derivative. I think it is what I have been trying to express for quite some time, but it's definition makes it mildly hard for me to prove the following (which is probably quite trivial... or not):
Let $f$ and $g$ be continuous functions and $x'$ denote the weak derivative, then $\forall_{x \in R} f(\lfloor g(x) \rfloor)'=0$.
I am not real sure how to prove it if it is true. The form I gave is my definition of piecewise constant. Mostly, I am concerned on whether or not it is what has this property as I've been trying for quite some time to formally define such a 'derivative'. If it does, then my next thing to ask is whether or not there is an associated weak integral as that is more what I care about.
In order to define a weak derivative you typically want to use some real or complex valued bilinear form $\langle \phi,g \rangle$ where $\phi \in {\cal D}$ is your 'test' function for a suitable nice class ${\cal D}$ (vector space) and $g\in {\cal D'}$ the objects (called distributions) in some (vector space) class you want to differentiate.
A couple of important points:
(a) The set ${\cal D}$ should be large enough so that you separate points in ${\cal D'}$ .
(b) You should be able to differentiate all $\phi\in {\cal D}$ and best if the derivative $\phi'$ again belongs to ${\cal D}$. [I bypass some topological/semi-norm aspects that introduce other constraints on this construction].
Then you may (hopefully) define the weak derivative of $g$ by declaring it to be the 'object' $Dg$ such that $$\langle \phi,Dg \rangle = -\langle \phi',g \rangle$$ for all $\phi\in {\cal D}$. The standard example is $\phi \in {\cal D}=C^\infty_c({\Bbb R})$ and the objects a class that in particular contains locally integrable functions $g\in L^1_{\rm loc}({\Bbb R})$. The bilinear form used in that case is:
$$ \langle \phi,g \rangle = \int_{\Bbb R} \phi(x) g(x) \; dx $$
It then make perfectly sense to differentiate any 'nasty' (though locally integrable) function $g$ be declaring that $Dg$ is the object that verifies: $$ \langle \phi,Dg \rangle = -\int_{\Bbb R} \phi'(x) g(x) \; dx $$ for all $\phi \in {\cal D}$. The crucial point that gives sense to the definition is that it extends our usual notion of differentiation on functions that are $C^1$. You see this by partial integration, which is allowed in that case. Now in your case, if I understand correctly (and I just consider $f(x)=x$), you want to differentiate e.g. $\lfloor g(x) \rfloor$ which is a slightly 'nasty' but locally integrable function for $g$ continuous. Now, the 'derivative' should verify the essential property for all $\phi\in {\cal D}$: $$ \langle \phi,D(\lfloor g \rfloor) \rangle = -\int_{\Bbb R} \phi'(x) \lfloor g(x)\rfloor \; dx .$$ This, however, is very far from being the 'zero' object (for which the right hand side should be identically zero). For example if $g(x)=x$ then try to integrate against $\phi'(x)$ where $\phi(x)= (1-x)^2 (1+x)^2$ for $x\in [-1,1]$ zero outside and you get $1$. (admitted, this $\phi$ is not $C^\infty$ at $\pm 1$ but it still works). If you carry out the details you find that for any $\phi\in {\cal D}$: $$ \langle \phi,D(\lfloor \cdot \rfloor) \rangle = \sum_{k\in {\Bbb Z}} \phi(k) .$$ This corresponds to $D\lfloor x \rfloor=\sum_{k\in {\Bbb Z}} \delta_k$ being a sum of delta functions at the integers. Note that this actually is no longer in $L^1_{\rm loc}$ so the space of distributions ${\cal D'}$ in the end will be quite a lot bigger and also contain e.g. derivatives of delta-functions and a lot more.
You may show that any distribution $g$ for which $Dg\equiv 0$ is necessarily (equivalent to) a constant.