The dagger is not assumed. It is the reversal of rows: reading a row of marks backwards.
Groupoid. If a mark followed by its reverse is cancelled, reversal becomes the inverse, and \(p^{-1}\cdot p=\mathsf {refl}\): the identity types of homotopy type theory.
Without cancellation. If nothing is cancelled, \(p^\dagger p\) is a palindrome, a row that goes out and comes back, and palindromes are the positive elements.
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:
the swap, the sign and trichotomy;
the cone;
positive Gram matrices;
positivity-preserving states and maps.
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
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
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:
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.
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,
P7 (the adjoint). Reversal on rows together with conjugation on weights gives
C1 (palindromes carry norms).
C2 (the cone).
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.
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\),
S1 (states). For a point \(\Omega \) with \(\Omega ^\dagger \Omega =1\), the map \(\omega (a)=\Omega ^\dagger a\Omega \) satisfies
S2 (positivity-preserving maps). For any arrow \(g\),
| 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 |
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.
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
| 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).
\(x<y\Rightarrow x+c<y+c\), since the difference is unchanged.
\(x<y\) and \(c>0\Rightarrow cx<cy\), since \(P\) is closed under products.
\(x<y\) and \(c<0\Rightarrow cx>cy\), since the sign exchanges \(P\) and \(-P\).
\(x<y\) and \(y<z\Rightarrow x<z\), since \(P\) is closed under sums.
I1 (squares). \(x^2\ge 0\), with equality only at \(x=0\).
I2 (AM–GM, two terms). For \(a,b\ge 0\),
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\).
V1 (convex functions lie above tangents). If \(f''\ge 0\), then \(f'\) is nondecreasing, and for all \(x,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
V3 (exponential and logarithm). \(e^x\) is convex with tangent \(1+x\) at \(0\), and \(\log \) is concave with tangent \(x-1\) at \(1\):
V4 (AM–GM, \(n\) terms). Jensen for the concave \(\log \), with weights \(w_i\ge 0\), \(\sum w_i=1\):
V5 (Young). For \(a,b\ge 0\) and \(1/p+1/q=1\), V4 with two terms gives
V6 (Hölder). Normalising \(\|a\|_p=\|b\|_q=1\) and summing Young term by term,
V7 (Minkowski). Writing \(|a+b|^p\le |a||a+b|^{p-1}+|b||a+b|^{p-1}\) and applying Hölder to each term,
V8 (power means). For \(r<s\), Jensen for the convex \(t\mapsto t^{s/r}\) gives
V9 (Klein and log-sum). From \(\log x\le x-1\), for densities \(\rho ,\sigma \),
P1 (Markov). For \(X\ge 0\) and \(a>0\), \(X-a\,1_{\{X\ge a\}}\) lies in the cone, so
P2 (Chebyshev). Markov applied to \((X-\mathbb EX)^2\):
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)\):
G3 (triangle). Expanding \(\|a+b\|^2\) and applying G2,
G4 (Bessel). For orthonormal \(e_1,\ldots ,e_n\) with projection \(P\), the complement \(1-P\) is a cut, so
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,
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
G7 (integral form). In \(L^2\), G2 reads
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
W2 (Chebyshev’s sum inequality). Averaging W1 over all cyclic shifts, for similarly ordered sequences,
| 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.
| 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 |