AFTD Auto-Formalizing Theoretical Domains

QuantumMechanics.FiniteHilbertSpace

structureimported Lean

The Hilbert space of a finite target quantum mechanical system whose target is a finite type d with decidable equality. It is defined as a structure with a single field val, wrapping an element of EuclideanSpace ℂ d — the space of functions d → ℂ carrying the L² inner product ⟪ψ, φ⟫ = ∑ i, conj (ψ i) * φ i. Using a structure in preference to EuclideanSpace ℂ d itself makes the Hilbert space of states a type of its own, with its own API and the notation 𝓗[d]. Being finite dimensional, it is automatically a complete inner product space, that is, a genuine Hilbert space.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
@[ext]
structure QuantumMechanics.FiniteHilbertSpace (d : Type*) [Fintype d] [DecidableEq d]
Defined in
Physlib, `QuantumMechanics.FiniteHilbertSpace`
Lean proof
By Joseph Tooby-Smith, from github.com/leanprover-community/physlib at e411c6e89692 (Copyright (c) 2025 Joseph Tooby-Smith. 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
09 Oct 2026
Axioms
none listed
Used by 17

Lean source view module on GitHub

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
/-- The Hilbert space of a finite target quantum mechanical system whose target is a finite type `d` with decidable equality. It is defined as a structure with a single field `val`, wrapping an element of `EuclideanSpace ℂ d` — the space of functions `d → ℂ` carrying the `L²` inner product `⟪ψ, φ⟫ = ∑ i, conj (ψ i) * φ i`. Using a structure in preference to `EuclideanSpace ℂ d` itself makes the Hilbert space of states a type of its own, with its own API and the notation `𝓗[d]`. Being finite dimensional, it is automatically a complete inner product space, that is, a genuine Hilbert space. -/
@[ext]
structure QuantumMechanics.FiniteHilbertSpace (d : Type*) [Fintype d] [DecidableEq d] where
  /-- The underlying element of `EuclideanSpace ℂ d`. -/
  val : EuclideanSpace ℂ d
See it in the graphDiscuss this resultChallenge it