const fieldName = "theme"; // Your field with linksconst oldPrefix = "Thoughts/01 Themes/";const newPrefix = "Digital Garden/Topics/";const relatedLinks = dv.current()[fieldName];if (Array.isArray(relatedLinks)) { // Map over the links, replace the path, and output only clickable links dv.el("span", relatedLinks .map(link => { if (link && link.path) { let newPath = link.path.startsWith(oldPrefix) ? link.path.replace(oldPrefix, newPrefix) : link.path; return dv.fileLink(newPath); } }) .filter(Boolean).join(", ") // Remove any undefined/null items );} else { dv.el(dv.current().theme);}
Theorem
Let E⊂R be measurable and let f:E→[−∞,+∞]. Then the following are equivalent for all α∈R,
f−1((α,∞])∈M
f−1([α,∞])∈M
f−1([−∞,α))∈M
f−1([−∞,α])∈M
Proof
Not hard!
(1)⟹(2)
Suppose (1) holds. Then for all α∈R
[\alpha, \infty] &= \bigcap_{n} \left( \alpha - \frac{1}{n}, \infty \right] \\
\implies f^{-1}(\,[\alpha, \infty]\,) &= \bigcap_{n} f^{-1} \left( \left( \alpha-\frac{1}{n}, \infty \right] \right)
\end{align}$$
RHS is a countable intersection of measurable sets and is thus measurable.
(2)⟹(1)
Suppose (2) holds. Then for all α∈R,
(α,∞]=⋃n[α+n1,∞]⟹f−1(α,∞]=⋃nf−1([α+n1,∞])
And this is a countable union of measurable sets and is thus Lebesgue measurable
ie (1)⟺(2)
(3)⟺(4) uses the same argument.
(2)⟺(3)
Note that [−∞,α)=([α,∞])c. Thus by taking the preimages and noting that complements of measurable sets are measurable yields the desired result.