Skip to content

spectral: spectral theorem for real symmetric matrices#1611

Open
gbdrt wants to merge 7 commits into
math-comp:masterfrom
gbdrt:spectral-real-symmetric
Open

spectral: spectral theorem for real symmetric matrices#1611
gbdrt wants to merge 7 commits into
math-comp:masterfrom
gbdrt:spectral-real-symmetric

Conversation

@gbdrt

@gbdrt gbdrt commented Jun 5, 2026

Copy link
Copy Markdown
Motivation for this change

This PR proves the spectral theorem for real symmetric matrices over a numClosedFieldType (real_spectral_theorem): such a matrix is diagonalized by a real orthogonal matrix, with the same spectral diagonal as the existing (complex) spectral theorem.

To reuse Gram–Schmidt for this, it is generalized from numClosedFieldType to a new common ancestor conjFieldType of rcfType and numClosedFieldType — a numFieldType with an involutive conjugation conj such that |x| ^+ 2 = x * conj x and a square root of nonnegatives. Existing interfaces are unchanged. As a building block, the PR also shows that the real subfield of a numClosedFieldType is an rcfType.

Minimal TODO list
  • added changelog entries with doc/changelog/make-entry.sh
  • added corresponding documentation in the headers
  • tried to abide by the contribution guide
  • this PR contains an optimum number of meaningful commits

See this Checklist for details.

Automatic note to reviewers

Read this Checklist.

gbdrt and others added 6 commits June 5, 2026 11:51
`conjFieldType` is a `numFieldType` with an involutive conjugation `conj`
(`|x| ^+ 2 = x * conj x`) and a square root of nonnegatives; `numClosedFieldType`
and `rcfType` inherit it via HB factories. Adds `archimedean.v` join structures.

Developed with the assistance of Claude Opus 4.8 (1M context) and Rocq-MCP
(https://github.com/LLM4Rocq/rocq-mcp).

Co-authored-by: Cyril Cohen <cyril.cohen@inria.fr>
Generalize the `conjC` `involutive_rmorphism` instance, `map_mxCK`, the dot-norm
theory and `hermitian1mx` from `numClosedFieldType` to `conjFieldType`.

Developed with the assistance of Claude Opus 4.8 (1M context) and Rocq-MCP
(https://github.com/LLM4Rocq/rocq-mcp).

Co-authored-by: Cyril Cohen <cyril.cohen@inria.fr>
Move `dotmx`, `unitarymx`, the orthogonal complement and `schmidt` to a new
`Section ConjSpectral` over `conjFieldType`; the eigenvalue/spectral results stay
over `numClosedFieldType` and reuse `schmidt` by subtyping. Statements unchanged.

Developed with the assistance of Claude Opus 4.8 (1M context) and Rocq-MCP
(https://github.com/LLM4Rocq/rocq-mcp).

Co-authored-by: Cyril Cohen <cyril.cohen@inria.fr>
Define `realsubfield C`, the reals of a `numClosedFieldType` `C`, and equip it
via subType factories with an `rcfType` structure; `realsubval` is the inclusion
into `C`. Generalizes Abel's `algR`.

Developed with the assistance of Claude Opus 4.8 (1M context) and Rocq-MCP
(https://github.com/LLM4Rocq/rocq-mcp).

Co-authored-by: Cyril Cohen <cyril.cohen@inria.fr>
`real_spectral_theorem` (over any `numClosedFieldType`, axiom-free): a real
symmetric `A` is `invmx P *m diag_mx (spectral_diag A) *m P` for some real
unitary `P`, via diagonalization over the real subfield (`schmidt_diag_real`).

Developed with the assistance of Claude Opus 4.8 (1M context) and Rocq-MCP
(https://github.com/LLM4Rocq/rocq-mcp).

Co-authored-by: Cyril Cohen <cyril.cohen@inria.fr>
Developed with the assistance of Claude Opus 4.8 (1M context) and Rocq-MCP
(https://github.com/LLM4Rocq/rocq-mcp).

Co-authored-by: Cyril Cohen <cyril.cohen@inria.fr>
@gbdrt gbdrt force-pushed the spectral-real-symmetric branch 2 times, most recently from f6719f1 to 6c48901 Compare June 5, 2026 07:49
- silence `HB.no-new-instance` on the intermediate `NumField_hasImaginary`
  and `RealField_hasPolyIvt` instances built by the `NumField_isImaginary`
  and `RealField_isClosed` factories
- use `&` rather than `of` in the `HB.factory Record` and `HB.builders
  Context` headers (Rocq 9.2 syntax)
- parenthesize `(x \is Num.real)` in `realsubpfactor` (Rocq 9.2
  level-tolerance)
- drop contributor names from the changelog entries

Developed with the assistance of Claude Opus 4.8 (1M context) and Rocq-MCP
(https://github.com/LLM4Rocq/rocq-mcp).

Co-authored-by: Cyril Cohen <cyril.cohen@inria.fr>
@gbdrt gbdrt force-pushed the spectral-real-symmetric branch from 6c48901 to 9b7ea63 Compare June 5, 2026 08:05
@gbdrt

gbdrt commented Jun 5, 2026

Copy link
Copy Markdown
Author

The remaining errors (building mathcomp-analysis) should be fixed with MCA PR#1987.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant