AFTD Auto-Formalizing Theoretical Domains

IsMaximalSelfAdjoint

classimported Lean

IsMaximalSelfAdjoint R α witnesses that R is the maximal TrivialStar subring of the star ring α, via an additive map selfadjMap : α →+ R collecting the self-adjoint part of each element. This lets HermitianMat.trace return 𝕜 when 𝕜 already has a trivial star, and the "clean" underlying type otherwise, e.g. ℝ when the input field is ℂ.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
class IsMaximalSelfAdjoint (R : outParam Type*) (α : Type*) [Star α] [Star R] [CommSemiring R]
    [Semiring α] [TrivialStar R] [Algebra R α]
Defined in
QuantumInfo, `IsMaximalSelfAdjoint`
Lean proof
By Alex Meiburg, from github.com/leanprover-community/physlib at e411c6e89692 (Copyright (c) 2025 Alex Meiburg. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.34.1.
Verified
16 Oct 2026
Axioms
none listed
Used by 15

Lean source view module on GitHub

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
/-- `IsMaximalSelfAdjoint R α` witnesses that `R` is the maximal `TrivialStar` subring of the star ring `α`, via an additive map `selfadjMap : α →+ R` collecting the self-adjoint part of each element. This lets `HermitianMat.trace` return `𝕜` when `𝕜` already has a trivial star, and the "clean" underlying type otherwise, e.g. `ℝ` when the input field is `ℂ`. -/
class IsMaximalSelfAdjoint (R : outParam Type*) (α : Type*) [Star α] [Star R] [CommSemiring R]
    [Semiring α] [TrivialStar R] [Algebra R α] where
  /-- The additive map sending an element of `α` to its self-adjoint part in `R`. -/
  selfadjMap : α →+ R
  /-- `selfadjMap` pulls scalar multiplication by `R` out of its argument. -/
  selfadj_smul : ∀ (r : R) (a : α), selfadjMap (r • a) = r * (selfadjMap a)
  /-- On self-adjoint elements, `selfadjMap` is a section of `algebraMap R α`. -/
  selfadj_algebra : ∀ {a : α}, IsSelfAdjoint a → algebraMap _ _ (selfadjMap a) = a
See it in the graphDiscuss this resultChallenge it