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);}
Corollary
Let A∈Mn be hermitian and r:1≤r≤n∈Z. Then
∑k=1rλk(A)=minU∈Mn,r orthonormal colsTrU∗AU
and also
∑k=0r−1λn−k(A)=maxU∈Mn,r orthonormal colsTrU∗AU
And claim that this implies the previous result ( just take take U as the identity )
Proof / Intuition U∈Mn with orthonormal columns, extend Gram-Schmidt to get V=[U∣∗]∈Mnunitary. Then when we do the multiplication
[V∗AV]r×r=U∗AU
So by interlacing 2, we get that
λk(A)=λk(V∗AV)≤λk(U∗AU)
So sum over k=1,2,…,r to get
∑k=1rλk(A)≤Tr(U∗AU)
So we have the desired lower bound, and need to show we can achieve equality.
Given any
Let W be the orthonormalized eigenvectors associated with λ1(A),…,λr(A).
TrU∗AU=TrW∗AW=TrDr
(the sum of the first r eigenvalues)