← All comparisons

Fanal vs. Lean-QuantumInfo

arXiv 2024 · Lean 4 / Mathlib

About Lean-QuantumInfo

Lean 4 formalization of quantum information theory. Covers quantum entropy, channels, and proved the Generalized Quantum Stein’s Lemma — the deepest mathematical result in any quantum verification project.

Scope and Goal

AspectLean-QuantumInfoFanal
DomainQuantum information theoryQuantum programming language verification
Driving goalProve the Generalized Quantum Stein's Lemma (GQSL)Verify quantum program correctness, culminating in Shor's algorithm
Nature of outputProved mathematical theorems (no-cloning, trace distance, GQSL)Typed DSL with denotational semantics, equational reasoning, and planned Hoare logic
Target audienceQuantum information theoristsQuantum PL researchers, formal methods community

Mathematical Foundation

AspectLean-QuantumInfoFanal
Mathlib usage depthDeep: PosSemidef, IsHermitian, ENNReal, Filter.Tendsto, topologySelective: Matrix, conjTranspose, PosSemidef, Complex, Fintype
Analysis infrastructureExtensive: limits, compactness, semicontinuity, extended nonneg realsNot engaged; focuses on linear algebra and matrix semantics
Mathlib contributions10+ upstream PRs (eigenvalues, convex sets, trace lemmas)None reported
Mathematical depthVery deep: GQSL involves convergence of hypothesis testing ratesApplied: Dirac notation semantics, operator predicates, Loewner order

Quantum State Representation

AspectLean-QuantumInfoFanal
Core typeMState d: Hermitian matrix + positivity + trace-oneDiracTerm AST: kets, bras, operators, scalars
Type safetyLean wrapper types (HermitianMat, MState, Ket, Bra) prevent ill-typed operationsCustom typing relations (DiracWellTyped, LDiracWellTyped)
Semantics styleDirect mathematical definitions on structured typesDenotational: AST -> Option (Matrix ...)
Mixed statesFirst-class: MState bundles density matrix propertiesExpressible via operator sort, but not a dedicated type

Type System Approach

AspectLean-QuantumInfoFanal
PhilosophyLean's native type system + wrapper structsCustom embedded type system (DataType, DiracSort, UnifiedType)
Type checkingLean's type checker is the type systemExplicit typing judgment as an inductive relation
ContextLean's native context (implicit)UnifiedContext: list of (Var, UnifiedType) bindings
BridgingWould require explicit compilation from Fanal terms to QuantumInfo structuresWould require explicit compilation from Fanal terms to QuantumInfo structures

Unique to Lean-QuantumInfo

AspectLean-QuantumInfoFanal
Entropy theoryVon Neumann entropy, quantum relative entropy, sandwiched Renyi relative entropyNot in scope
Resource theoriesFreeStateTheory, ResourceTheory, tensor product closureNot in scope
GQSLLargest single theorem in physics formalized in LeanNot in scope
Trace distanceFormal definition and D(rho, sigma) <= 1 boundNot formalized
Circuit verification tacticmatrix_expand for automated qubit gate reasoningdirac_eq for Dirac notation equalities (different domain)

Unique to Fanal

AspectLean-QuantumInfoFanal
Dirac notation DSLNot availableFull AST with kets, bras, scalars, variadic operations, big sums/tensors
Hierarchical register labelsNot availableAccess-path model for multi-register systems (tuple/array indexing)
Labelled Dirac notationNot availableRegister-annotated Dirac terms with disjointness premises
Classical expression languageNot availableCExprTerm with variables, arithmetic, booleans, arrays
Equational reasoning frameworkNot availableSemEq, HSemEq, SortIso, DTIso for term equivalence across sorts
Planned program logicNot in scopeQuantum Hoare logic, assertion language, program verification

Maturity

AspectLean-QuantumInfoFanal
Theorems1,000+ proved theoremsGrowing (supportive proofs + equational rules)
LOC~15,000 (as of Oct 2025 paper)~24,500
Contributors3+ (Meiburg, Lessa, Soldati, Bailey, Wu)1 primary (Yingte Xu) + AI agents
Flagship resultGeneralized Quantum Stein's LemmaDirac notation equational reasoning framework
Development modelTraditional human-drivenAI-augmented (Claude Code agents, Steward workflow)

Potential Synergies

AspectLean-QuantumInfoFanal
Loewner orderMature HermitianMat with Loewner order constructionCould import or align with QuantumInfo's ordering
Entropy & distanceCould provide entropy and trace distance for Fanal's assertion reasoningCould use these for program specification properties
Dirac notation for QuantumInfoCould benefit from Fanal's notation layerProvides physicist-friendly notation
Register managementCould use Fanal's label system for multi-party scenariosProvides systematic access-path approach

Summary: Key Differences

AspectLean-QuantumInfoFanal
Proof SystemLean 4 / MathlibLean 4 / Mathlib
FocusQuantum information theory (entropy, channels)Quantum program formalization & verification
LanguageNo programming languageClassical-quantum programming language
Math DepthVery deep (Generalized Quantum Stein’s Lemma)Applied (Dirac notation, Hoare logic)
ComplementarityInformation-theoretic foundationsProgram verification toolchain