AFTD Auto-Formalizing Theoretical Domains

LinearPMap.re_inner_apply_sq_eq_norm_sq

theoremverifiedformalizationimported Lean

For symmetric T, re ⟪ψ, T(Tψ)⟫ is ‖Tψ‖ ^ 2.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open LinearPMap in
open InnerProductSpace in
variable {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] in
variable (T : H →ₗ.[ℂ] H) (hT : T.IsSymmetric) in
variable (ψ : T.domain) in
variable (hTψ : T ψ ∈ T.domain) in
variable (hψ_norm : ‖(ψ : H)‖ = 1) in
include hT in
lemma LinearPMap.re_inner_apply_sq_eq_norm_sq :
    (⟪(ψ : H), T ⟨T ψ, hTψ⟩⟫_ℂ).re = ‖T ψ‖ ^ 2
Formalizes
Physlib, `LinearPMap.re_inner_apply_sq_eq_norm_sq`
Lean proof
By Matteo Cipollina, Krystian Nowakowski, from github.com/leanprover-community/physlib at e411c6e89692 (Copyright (c) 2026 Axiomatic-AI. 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
10 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
  • LinearPMap.IsSymmetricA LinearPMap T is symmetric iff ⟪T x, y⟫_ℂ = ⟪x, T y⟫_ℂ for all x y : T.domain.

Lean source view module on GitHub

set_option autoImplicit true inset_option relaxedAutoImplicit true inopen LinearPMap inopen InnerProductSpace invariable {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] invariable (T : H →ₗ.[ℂ] H) (hT : T.IsSymmetric) invariable (ψ : T.domain) invariable (hTψ : T ψ ∈ T.domain) invariable (hψ_norm : ‖(ψ : H)‖ = 1) ininclude hT in/-- For symmetric `T`, `re ⟪ψ, T(Tψ)⟫` is `‖Tψ‖ ^ 2`. -/lemma LinearPMap.re_inner_apply_sq_eq_norm_sq :    (⟪(ψ : H), T ⟨T ψ, hTψ⟩⟫_ℂ).re = ‖T ψ‖ ^ 2 := by  rw [← hT ψ ⟨T ψ, hTψ⟩, inner_self_eq_norm_sq_to_K]  rw [sq, sq, Complex.mul_re]  simp [Complex.ofReal_re, Complex.ofReal_im]
See it in the graphDiscuss this resultChallenge it