[{"data":1,"prerenderedAt":4},["ShallowReactive",2],{"5XvsZNfGzN":3},"# spectral-positivity\n\nPerron-Frobenius theory, Jentzsch's theorem, and matrix/operator\npositivity in Lean 4. A shared library used by:\n\n- [pphi2](https://github.com/mrdouglasny/pphi2) — transfer matrix spectral gap\n- [graphops-qft](https://github.com/mrdouglasny/graphops-qft) — heat kernel positivity on graphops\n- [markov-semigroups](https://github.com/mrdouglasny/markov-semigroups) — positivity of Markov semigroups\n\n## What this package provides\n\n### Matrix level (`Matrix/`)\n- **Nonneg matrix powers:** $M \\geq 0 \\Rightarrow M^k \\geq 0$ (proved)\n- **Metzler matrix exponential:** $L$ nonneg off-diagonal $\\Rightarrow e^{tL} \\geq 0$ for $t \\geq 0$\n  (the heat kernel on a graph has nonneg entries)\n- **Decomposition:** $L = -cI + N$ with $N \\geq 0$, so $e^{tL} = e^{-ct} e^{tN}$\n- **M-matrix inverse positivity:** if $M$ is a nonsingular M-matrix\n  (a $Z$-matrix with positive principal minors / equivalently $sI - A$\n  with $A \\geq 0$ entrywise and $s > \\rho(A)$), then $M^{-1} > 0$\n  entrywise. Theorem `Matrix.MMatrix.inverse_pos` in\n  `Matrix/MMatrixInverse.lean`. Used by markov-semigroups for the\n  diamagnetic-inequality chain and by graphops-qft for resolvent\n  positivity.\n- **M-matrix inverse non-negativity:** the same conclusion without the\n  irreducibility hypothesis: $M$ PD with $M_{ij} \\leq 0$ for $i \\neq j$\n  $\\Rightarrow M^{-1} \\geq 0$ entrywise. Theorem\n  `Matrix.MMatrix.inverse_nonneg` in `Matrix/MMatrixInverse.lean`. Used\n  by markov-semigroups (`Matrix/LaplaceTransform.lean` re-exports it as\n  `m_matrix_inverse_nonneg`, the previously axiomatized form) for the\n  diamagnetic chain consumed by pphi2N's QHJ thimble proofs.\n\n### Operator level (`Operator/`)\n- **Positivity-preserving:** $f \\geq 0 \\Rightarrow Tf \\geq 0$ (on $L^2(\\Omega, \\mu)$)\n- **Positivity-improving:** $f \\geq 0$, $f \\neq 0 \\Rightarrow Tf > 0$ a.e.\n- **Jentzsch's theorem:** For compact self-adjoint positivity-improving $T$:\n  - Simple ground eigenvalue $\\lambda_0 > 0$\n  - Ground eigenfunction $\\psi_0 > 0$ a.e.\n  - Spectral gap: $|\\lambda| \u003C \\lambda_0$ for all other eigenvalues\n\n## Origin\n\nThe Jentzsch proof was originally developed in pphi2 (1082 lines, fully\nproved) for the P(Phi)_2 transfer matrix. This package extracts and\ngeneralizes it to work on any measure space, making it reusable.\n\nThe matrix positivity was developed in graphops-qft for heat kernels on\ngraphop semigroups.\n\n## File structure\n\n```\nSpectralPositivity/\n  Matrix/\n    NonnegPower.lean      -- M ≥ 0 ⟹ M^k ≥ 0, truncated exp nonneg\n    MetzlerExp.lean       -- Metzler decomposition, e^{tL} ≥ 0\n    MMatrixInverse.lean   -- M-matrix ⟹ M⁻¹ > 0 entrywise\n  Operator/\n    PositivityPreserving.lean -- IsPositivityPreserving, IsPositivityImproving\n    Jentzsch.lean             -- Jentzsch theorem (spectral gap)\n```\n\n## Building\n\n```bash\nlake update\nlake build\n```\n\n## References\n\n- Reed and Simon, *Methods of Modern Mathematical Physics IV*, 1978,\n  Theorems XIII.43–44.\n- Horn and Johnson, *Matrix Analysis*, Cambridge, 2013, Thm 8.5.5.\n- Berman and Plemmons, *Nonnegative Matrices in the Mathematical\n  Sciences*, SIAM, 1994.\n\n## License\n\nCopyright (c) 2026 Michael R. Douglas. Released under the Apache 2.0 license.\n",1780242001685]