For brevity, we refer to [1]}, [2]} for the notions of \(p\) -test plans and \(p\) -a.e. curve, \(p=1,2\) .
From [1]}, if \(f\in W^{1,2}(X,\mathsf {d},\mathfrak {m})\)  then \(f\)  is Sobolev along 2-a.e. curve and
\(\left| \frac{\mathsf {d}}{\mathsf {d}t} f\circ \gamma \right| \le |\nabla f| \circ \gamma \; |\dot{\gamma }|, \; \text{a.e. in }[0,1], \; 2\text{-a.e. } \gamma \in {\rm AC}((0,1); (X,\mathsf {d})).\) 
At this point, it is easy to check that \(f^{2}\)  is a \({\rm BV}\)  function in the “weak” formulation of [2]} with “weak” total variation satisfying \(|D(f^{2})|_{w}\le 2 |f|\, |\nabla f| \, \mathfrak {m}\)  as measures.
We conclude thanks to the identification result [2]}.
