43 Positivity from reading rows backwards

The dagger is not assumed. It is the reversal of rows: reading a row of marks backwards.

With complex weights, rows become matrices, reversal becomes the adjoint, and each palindrome carries weight \(w\bar w\ge 0\). From reversal and joining follow:

Rows and their reversal

P0 (rows). A row is a sequence of marks \(a_0\to a_1\to \cdots \to a_n\). Rows join by concatenation, which is associative with the empty row as identity. In type theory, rows are paths, joined by concatenation with unit \(\mathsf {refl}\).

P1 (reversing a mark). A mark \(m:a\to b\) has a reverse \(\bar m:b\to a\): the swap applied to its endpoints, \((a,b)\mapsto (b,a)\). The marks form a swap-invariant relation, and \(\bar {\bar m}=m\).

P2 (reversing a row). Define by recursion

\begin{equation} \mathrm {rev}(())=(), \qquad \mathrm {rev}(m,p)=\mathrm {rev}(p)\cdot (\bar m). \tag{914}\end{equation}
By induction on the first row,
\begin{equation} \mathrm {rev}(p\cdot q)=\mathrm {rev}(q)\cdot \mathrm {rev}(p), \qquad \mathrm {rev}(\mathrm {rev}\,p)=p, \qquad \mathrm {rev}(())=() . \tag{915}\end{equation}
Write \(p^\dagger =\mathrm {rev}(p)\). This is a dagger on the category of rows: an involution reversing direction and composition, fixing identities.
Two worlds

P3 (cancelling: the groupoid). Identify \(m\cdot \bar m\) and \(\bar m\cdot m\) with the empty row. Then \(p^\dagger \) is the inverse of \(p\), and

\begin{equation} p^{-1}\cdot p=\mathsf {refl}. \tag{916}\end{equation}
These are the identity types of homotopy type theory, with inversion derived from path induction.

P4 (not cancelling: palindromes). Without cancellation, \(p^\dagger \cdot p\) is the row that runs \(p\) backwards from its end and then forwards again. It is a palindrome:

\begin{equation} (p^\dagger \cdot p)^\dagger =p^\dagger \cdot p^{\dagger \dagger }=p^\dagger \cdot p . \tag{917}\end{equation}
It is self-adjoint, and it is the empty row only if \(p\) is empty:
\begin{equation} p^\dagger \cdot p=()\iff p=() . \tag{918}\end{equation}
These are the two defining properties of positive elements: self-adjointness and definiteness.

P5 (positivity as the shadow of the identity). In the groupoid, every palindrome \(p^\dagger p\) collapses to the identity. Without cancellation it survives as a positive element. Positivity is the trace left by \(p^{-1}\cdot p=\mathsf {refl}\) when arrows cannot be inverted.

Weights

P6 (weighted rows are matrices). Attach complex weights to rows, with \(\mathbb C\) from the doubling, whose conjugation is the swap followed by the sign on one place. A combination of marks \(i\to j\) with weights \(A_{ji}\) is a matrix \(A=\sum A_{ji}e_{ji}\). The product of matrices sums the weights of joined rows over the intermediate place,

\begin{equation} (AB)_{ki}=\sum _jA_{kj}B_{ji}, \tag{919}\end{equation}
which is concatenation, summed.

P7 (the adjoint). Reversal on rows together with conjugation on weights gives

\begin{equation} (A^\dagger )_{ij}=\overline {A_{ji}}, \qquad (AB)^\dagger =B^\dagger A^\dagger , \tag{920}\end{equation}
the second from P2 and commutativity of weights.
The cone

C1 (palindromes carry norms).

\begin{equation} (A^\dagger A)_{ii}=\sum _j\overline {A_{ji}}A_{ji}=\sum _j|A_{ji}|^2\ge 0, \tag{921}\end{equation}
a sum of norms \(w\bar w\), each a sum of squares in \(\mathbb R\). More generally \(\langle v,A^\dagger Av\rangle =\|Av\|^2\ge 0\).

C2 (the cone).

\begin{equation} \mathcal A_+=\Bigl \{\textstyle \sum _kA_k^\dagger A_k\Bigr \}, \tag{922}\end{equation}
sums of weighted palindromes. On \(\mathbb R\), where conjugation is trivial, \(x^\dagger x=x^2\): the cone of squares.
Sign and trichotomy

T1 (sign). On additive pairs \((a,b)\), read \(a-b\), the swap is negation, and \((a,b)+(b,a)\) lies on the diagonal: the swap of P1, applied to pairs of numbers.

T2 (trichotomy). Pairing two rows mark by mark ends in exactly one of three ways: the first runs out first, both together, or the second first. These are \(a<b\), \(a=b\), \(a>b\), that is \(-P\), the diagonal \(\{0\}\) and \(P\). The sign exchanges the outer two and fixes the diagonal.

Gram matrices

G1 (positivity of Gram matrices). For states \(\psi _1,\ldots ,\psi _n\), with \(G_{ij}=\psi _i^\dagger \psi _j\) and \(\phi =\sum _jv_j\psi _j\),

\begin{equation} v^\dagger Gv=\phi ^\dagger \phi , \tag{923}\end{equation}
a palindrome, hence in the cone. Every Gram matrix is positive: the cone applied to a combination.
States and positive maps

S1 (states). For a point \(\Omega \) with \(\Omega ^\dagger \Omega =1\), the map \(\omega (a)=\Omega ^\dagger a\Omega \) satisfies

\begin{equation} \omega (f^\dagger f)=\Omega ^\dagger f^\dagger f\Omega =(f\Omega )^\dagger (f\Omega )\ge 0, \qquad \omega (1)=1 . \tag{924}\end{equation}
Wrapping with a point carries palindromes to palindromes. Mixed states are convex combinations of such maps.

S2 (positivity-preserving maps). For any arrow \(g\),

\begin{equation} g^\dagger (f^\dagger f)g=(fg)^\dagger (fg), \tag{925}\end{equation}
so conjugation by \(g\) preserves the cone, and so do sums \(a\mapsto \sum _kg_k^\dagger ag_k\). These are the completely positive maps in Kraus form.
The chain

Structure Built as From
rows, joining sequences of marks the identity, empty row
swap reverse of a mark endpoints exchanged
dagger \(\mathrm {rev}\) recursion, induction
groupoid, HoTT cancel \(m\bar m\) \(p^{-1}p=\mathsf {refl}\)
positive element palindrome \(p^\dagger p\) no cancellation
adjoint reversal and conjugation weights from the doubling
cone sums of \(A^\dagger A\); squares on \(\mathbb R\) palindromes carry \(w\bar w\)
sign, trichotomy swap of additive pairs; three ends of pairing rows
Gram \(v^\dagger Gv=\phi ^\dagger \phi \) palindrome of a combination
state \(\Omega ^\dagger (\cdot )\Omega \) wrapping with a point
positive maps \(\sum g_k^\dagger (\cdot )g_k\) conjugation

43.1 Order and the Core Inequalities

Order has three cases, \(<\), \(=\), \(>\). They correspond to the positive cone \(P\), its image \(-P\) under the sign involution, and the diagonal \(\{0\}\), the fixed point of that involution. Every core inequality of mathematics follows from five sources:

Source Inequalities
squares are positive AM–GM, Bernoulli
the cone is closed under \(+\) and \(\times \) Markov, Chebyshev, order rules
convexity and positivity of states Jensen, Young, Hölder, Minkowski, power means, Klein
positive Gram matrices Cauchy–Schwarz, triangle, Bessel, Hadamard, uncertainty
the swap rearrangement, Chebyshev’s sum inequality

In each case equality holds on the diagonal or on rank one: equal values, proportional vectors, a single outcome. Equality is the identity.

43.2 Three cases

O1 (the cone of \(\mathbb R\)). \(P=\{x:\ x>0\}\) is the set of nonzero squares, by completeness. It is closed under sums and products.

O2 (trichotomy). The sign \(x\mapsto -x\) is an involution with unique fixed point \(0\), and

\begin{equation} \mathbb R=P\ \sqcup \ \{0\}\ \sqcup \ (-P). \tag{926}\end{equation}
Hence for any \(x,y\) exactly one holds:

Relation Condition Part
\(x<y\) \(y-x\in P\) the cone
\(x=y\) \(y-x=0\) the diagonal
\(x>y\) \(y-x\in -P\) the cone under the sign

O3 (order rules).

43.3 Squares

I1 (squares). \(x^2\ge 0\), with equality only at \(x=0\).

I2 (AM–GM, two terms). For \(a,b\ge 0\),

\begin{equation} \frac {a+b}{2}-\sqrt {ab}=\frac 12\bigl (\sqrt a-\sqrt b\bigr )^2\ge 0, \tag{927}\end{equation}
with equality only for \(a=b\).

I3 (Bernoulli). For \(x\ge -1\) and \(n\in \mathbb N\), \((1+x)^n\ge 1+nx\), by induction: \((1+x)^{n+1}\ge (1+nx)(1+x)=1+(n+1)x+nx^2\ge 1+(n+1)x\).

43.4 Convexity and states

V1 (convex functions lie above tangents). If \(f''\ge 0\), then \(f'\) is nondecreasing, and for all \(x,m\),

\begin{equation} f(x)\ge f(m)+f'(m)(x-m), \tag{928}\end{equation}
by the fundamental theorem of calculus applied to \(f'-f'(m)\).

V2 (Jensen). Apply a state, an expectation \(\mathbb E\), to V1 with \(m=\mathbb EX\). The state preserves the cone, and \(\mathbb E[X-m]=0\), so

\begin{equation} f(\mathbb E X)\le \mathbb E f(X), \tag{929}\end{equation}
with equality for strictly convex \(f\) only when \(X\) takes one value.

V3 (exponential and logarithm). \(e^x\) is convex with tangent \(1+x\) at \(0\), and \(\log \) is concave with tangent \(x-1\) at \(1\):

\begin{equation} e^x\ge 1+x, \qquad \log x\le x-1, \tag{930}\end{equation}
each with equality only at the point of tangency.

V4 (AM–GM, \(n\) terms). Jensen for the concave \(\log \), with weights \(w_i\ge 0\), \(\sum w_i=1\):

\begin{equation} \prod _ia_i^{w_i}\le \sum _iw_ia_i, \tag{931}\end{equation}
with equality only when all \(a_i\) with \(w_i>0\) are equal.

V5 (Young). For \(a,b\ge 0\) and \(1/p+1/q=1\), V4 with two terms gives

\begin{equation} ab\le \frac {a^p}{p}+\frac {b^q}{q}. \tag{932}\end{equation}

V6 (Hölder). Normalising \(\|a\|_p=\|b\|_q=1\) and summing Young term by term,

\begin{equation} \sum _i|a_ib_i|\le \|a\|_p\,\|b\|_q . \tag{933}\end{equation}

V7 (Minkowski). Writing \(|a+b|^p\le |a||a+b|^{p-1}+|b||a+b|^{p-1}\) and applying Hölder to each term,

\begin{equation} \|a+b\|_p\le \|a\|_p+\|b\|_p . \tag{934}\end{equation}

V8 (power means). For \(r<s\), Jensen for the convex \(t\mapsto t^{s/r}\) gives

\begin{equation} \Bigl (\mathbb E X^r\Bigr )^{1/r}\le \Bigl (\mathbb E X^s\Bigr )^{1/s}. \tag{935}\end{equation}

V9 (Klein and log-sum). From \(\log x\le x-1\), for densities \(\rho ,\sigma \),

\begin{equation} D(\rho \,\|\,\sigma )\ge 0, \tag{936}\end{equation}
and for positive numbers,
\begin{equation} \sum _ia_i\log \frac {a_i}{b_i}\ge \Bigl (\sum _ia_i\Bigr )\log \frac {\sum _ia_i}{\sum _ib_i}. \tag{937}\end{equation}

43.5 The cone and probabilities

P1 (Markov). For \(X\ge 0\) and \(a>0\), \(X-a\,1_{\{X\ge a\}}\) lies in the cone, so

\begin{equation} P(X\ge a)\le \frac {\mathbb EX}{a}. \tag{938}\end{equation}

P2 (Chebyshev). Markov applied to \((X-\mathbb EX)^2\):

\begin{equation} P(|X-\mathbb EX|\ge \epsilon )\le \frac {\mathrm {Var}\,X}{\epsilon ^2}. \tag{939}\end{equation}

43.6 Gram matrices

G1 (the principle). For a state and vectors \(a_1,\ldots ,a_n\), the Gram matrix \(G_{ij}=\langle a_i,a_j\rangle \) is positive: \(v^{*}Gv=\|\sum _jv_ja_j\|^2\ge 0\).

G2 (Cauchy–Schwarz). The \(2\times 2\) minor of \((a,b)\):

\begin{equation} |\langle a,b\rangle |^2\le \|a\|^2\|b\|^2, \tag{940}\end{equation}
with equality only when \(a,b\) are proportional, a Gram matrix of rank one.

G3 (triangle). Expanding \(\|a+b\|^2\) and applying G2,

\begin{equation} \|a+b\|\le \|a\|+\|b\| . \tag{941}\end{equation}

G4 (Bessel). For orthonormal \(e_1,\ldots ,e_n\) with projection \(P\), the complement \(1-P\) is a cut, so

\begin{equation} \|x\|^2-\sum _k|\langle e_k,x\rangle |^2=\|(1-P)x\|^2\ge 0, \tag{942}\end{equation}
with equality when \(P\) is the whole identity: Parseval.

G5 (Hadamard). For a positive definite \(G\) with unit diagonal, AM–GM on its eigenvalues gives \(\det G=\prod \lambda _i\le (\tfrac 1n\sum \lambda _i)^n=1\). In general,

\begin{equation} \det G\le \prod _iG_{ii}, \tag{943}\end{equation}
with equality only for diagonal \(G\): orthogonal vectors.

G6 (uncertainty). For \(a=(A-\langle A\rangle )\psi \) and \(b=(B-\langle B\rangle )\psi \), \(\mathrm {Im}\langle a,b\rangle =\tfrac 1{2i}\langle [A,B]\rangle \), and G2 gives

\begin{equation} \Delta A\,\Delta B\ge \tfrac 12\bigl |\langle [A,B]\rangle \bigr | . \tag{944}\end{equation}

G7 (integral form). In \(L^2\), G2 reads

\begin{equation} \Bigl |\int \bar fg\Bigr |^2\le \int |f|^2\int |g|^2 . \tag{945}\end{equation}

43.7 The swap

W1 (rearrangement). For real \(a_1\le \cdots \le a_n\) and any permutation \(\pi \), the sum \(\sum _ia_ib_{\pi (i)}\) is largest when the \(b_{\pi (i)}\) are also increasing. If two terms are out of order, swapping them changes the sum by

\begin{equation} (a_i-a_j)(b_i-b_j)\ge 0, \tag{946}\end{equation}
a product of two numbers of the same sign. Repeated swaps sort the \(b\)’s without decreasing the sum.

W2 (Chebyshev’s sum inequality). Averaging W1 over all cyclic shifts, for similarly ordered sequences,

\begin{equation} \frac 1n\sum _ia_ib_i\ge \Bigl (\frac 1n\sum _ia_i\Bigr )\Bigl (\frac 1n\sum _ib_i\Bigr ). \tag{947}\end{equation}

43.8 Equality is the identity

Inequality Equality when
\(x^2\ge 0\) \(x=0\), the diagonal
AM–GM all terms equal
Jensen a single value
\(e^x\ge 1+x\), \(\log x\le x-1\) the point of tangency
Cauchy–Schwarz proportional vectors, rank one
triangle vectors on one ray
Bessel \(P=1\)
Hadamard orthogonal vectors
Klein \(\rho =\sigma \)
rearrangement similarly ordered

Each inequality measures a distance from a diagonal: equal entries, coincident states, a single direction. Its equality case is the identity.

43.9 The chain

Step Result From
O1–O3 trichotomy, order rules cone, sign involution, diagonal
I1–I3 squares, AM–GM, Bernoulli \(x^2\ge 0\)
V1–V9 Jensen, Young, Hölder, Minkowski, power means, Klein tangent lines and states
P1–P2 Markov, Chebyshev cone
G1–G7 Cauchy–Schwarz, triangle, Bessel, Hadamard, uncertainty Gram matrices
W1–W2 rearrangement, Chebyshev’s sum the swap