Exact Lean source
Nonadditivity.TensorPowers
Download original .lean · View on GitHub · Jump to source
Direct imports
Imported by project modules
2 direct reverse imports
Relationships above come from literal import commands. The declarations below link to types and references extracted from Lean’s environment. Source text is complete and unchanged.
Declarations in this module
44 project constants, including generated, internal and private declarations.
44 declarations
Nonadditivity.Channels.KrausChannel.emptyTensorChannelNonadditivity.Channels.KrausChannel.emptyTensorChannel._proof_1internal/detail/privateNonadditivity.Channels.KrausChannel.emptyTensorChannel.eq_1internal/detail/privateNonadditivity.Channels.KrausChannel.emptyTensorChannel_outputNonadditivity.Channels.KrausChannel.output.eq_1internal/detail/privateNonadditivity.Channels.KrausChannel.tensorChainNonadditivity.Channels.KrausChannel.tensorChain._sunfoldinternal/detail/privateNonadditivity.Channels.KrausChannel.tensorChain._unsafe_recinternal/detail/privateNonadditivity.Channels.KrausChannel.tensorChain_outputNonadditivity.Channels.KrausChannel.tensorChain_output_entropyNonadditivity.Channels.KrausChannel.tensorPower_output_entropyNonadditivity.Channels.KrausChannel.tensor_outputNonadditivity.Channels.KrausChannel.tensor_output_entropyNonadditivity.Entropy.DensityMatrix.tensorChainNonadditivity.Entropy.DensityMatrix.tensorChain._sunfoldinternal/detail/privateNonadditivity.Entropy.DensityMatrix.tensorChain._unsafe_recinternal/detail/privateNonadditivity.Entropy.DensityMatrix.tensorChain_entropyNonadditivity.Entropy.DensityMatrix.tensorPower_entropyNonadditivity.Entropy.TensorChainIndexNonadditivity.Entropy.TensorChainIndex._sunfoldinternal/detail/privateNonadditivity.Entropy.TensorChainIndex._unsafe_recinternal/detail/privateNonadditivity.Entropy.TensorChainIndex.match_1internal/detail/privateNonadditivity.Entropy.emptyTensorStateNonadditivity.Entropy.emptyTensorState._proof_1internal/detail/privateNonadditivity.Entropy.emptyTensorState._proof_2internal/detail/privateNonadditivity.Entropy.emptyTensorState.eq_1internal/detail/privateNonadditivity.Entropy.emptyTensorState_entropyNonadditivity.Entropy.pairChainEquivNonadditivity.Entropy.pairChainEquiv._proof_1internal/detail/privateNonadditivity.Entropy.pairChainEquiv._proof_2internal/detail/privateNonadditivity.Entropy.pairChainEquiv._proof_3internal/detail/privateNonadditivity.Entropy.pairChainEquiv._proof_4internal/detail/privateNonadditivity.Entropy.pairChainEquiv._proof_5internal/detail/privateNonadditivity.Entropy.pairChainEquiv._proof_6internal/detail/privateNonadditivity.Entropy.pairChainEquiv._sunfoldinternal/detail/privateNonadditivity.Entropy.pairChainEquiv._unsafe_recinternal/detail/privateNonadditivity.Entropy.pairChainEquiv_succ_applyNonadditivity.Entropy.pairChainEquiv_succ_symm_applyNonadditivity.Entropy.tensorChainIndexDecidableEqNonadditivity.Entropy.tensorChainIndexDecidableEq._sunfoldinternal/detail/privateNonadditivity.Entropy.tensorChainIndexDecidableEq._unsafe_recinternal/detail/privateNonadditivity.Entropy.tensorChainIndexFintypeNonadditivity.Entropy.tensorChainIndexFintype._sunfoldinternal/detail/privateNonadditivity.Entropy.tensorChainIndexFintype._unsafe_recinternal/detail/private
Full module
1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.PureChannelEntropy78/-!9# Finite tensor blocks of genuine density matrices and channels1011The Hilbert-space indices are nested products. Block states and channels12are defined recursively using their actual Kronecker products, and the13entropy identities are proved by induction from the concrete binary law.14-/1516namespace Nonadditivity.Entropy1718open scoped BigOperators ComplexOrder ComplexConjugate Kronecker Matrix1920noncomputable section2122universe u2324/-- Index type of a finite block, with the empty block the one-dimensional space. -/25def TensorChainIndex (ι : Type u) : ℕ → Type u26| 0 => PUnit.{u + 1}27| n + 1 => TensorChainIndex ι n × ι2829instance tensorChainIndexFintype (ι : Type u) [Fintype ι] :30(n : ℕ) → Fintype (TensorChainIndex ι n)31| 0 => inferInstanceAs (Fintype PUnit.{u + 1})32| n + 1 => by33change Fintype (TensorChainIndex ι n × ι)34letI := tensorChainIndexFintype ι n35infer_instance3637instance tensorChainIndexDecidableEq (ι : Type u) [DecidableEq ι] :38(n : ℕ) → DecidableEq (TensorChainIndex ι n)39| 0 => inferInstanceAs (DecidableEq PUnit.{u + 1})40| n + 1 => by41change DecidableEq (TensorChainIndex ι n × ι)42letI := tensorChainIndexDecidableEq ι n43infer_instance4445universe v4647/-- Regroup a finite interleaved tensor index into its two tensor blocks. -/48def pairChainEquiv (ι : Type u) (μ : Type v) :49(n : ℕ) → TensorChainIndex (ι × μ) n ≃ TensorChainIndex ι n × TensorChainIndex μ n50| 0 =>51{ toFun := fun _ => (PUnit.unit, PUnit.unit)52invFun := fun _ => PUnit.unit53left_inv := fun x => by cases x; rfl54right_inv := fun x => by rcases x with ⟨a,b⟩; cases a; cases b; rfl }55| n + 1 =>56{ toFun := fun x =>57let a := (pairChainEquiv ι μ n) x.158((a.1, x.2.1), (a.2, x.2.2))59invFun := fun x =>60((pairChainEquiv ι μ n).symm (x.1.1, x.2.1), (x.1.2, x.2.2))61left_inv := fun x => by62rcases x with ⟨a, ⟨i,j⟩⟩63simp64right_inv := fun x => by65rcases x with ⟨⟨a,i⟩, ⟨b,j⟩⟩66simp }6768@[simp] theorem pairChainEquiv_succ_apply (ι : Type u) (μ : Type v) (n : ℕ)69(a : TensorChainIndex (ι × μ) n) (i : ι) (j : μ) :70pairChainEquiv ι μ (n + 1) (a, (i,j)) =71(((pairChainEquiv ι μ n a).1, i), ((pairChainEquiv ι μ n a).2, j)) := rfl7273@[simp] theorem pairChainEquiv_succ_symm_apply (ι : Type u) (μ : Type v) (n : ℕ)74(a : TensorChainIndex ι n) (b : TensorChainIndex μ n) (i : ι) (j : μ) :75(pairChainEquiv ι μ (n + 1)).symm ((a,i),(b,j)) =76((pairChainEquiv ι μ n).symm (a,b), (i,j)) := rfl7778/-- The unique density matrix of the one-dimensional empty tensor block. -/79def emptyTensorState : DensityMatrix PUnit.{u + 1} where80matrix := 181positive := Matrix.PosSemidef.one82normalized := by simp [Matrix.trace_one]8384theorem emptyTensorState_entropy : emptyTensorState.{u}.vonNeumann = 0 := by85apply le_antisymm86· simpa using emptyTensorState.{u}.vonNeumann_le_log_dim87· exact emptyTensorState.{u}.vonNeumann_nonneg8889/-- An actual finite tensor block of an arbitrary state family. -/90def DensityMatrix.tensorChain {ι : Type u} [Fintype ι] [DecidableEq ι]91(ρ : ℕ → DensityMatrix ι) : (n : ℕ) → DensityMatrix (TensorChainIndex ι n)92| 0 => emptyTensorState93| n + 1 => (tensorChain ρ n).tensor (ρ n)9495theorem DensityMatrix.tensorChain_entropy {ι : Type u} [Fintype ι] [DecidableEq ι]96(ρ : ℕ → DensityMatrix ι) (n : ℕ) :97(tensorChain ρ n).vonNeumann = ∑ j ∈ Finset.range n, (ρ j).vonNeumann := by98induction n with99| zero =>100change emptyTensorState.{u}.vonNeumann = 0101exact emptyTensorState_entropy102| succ n ih =>103calc104(tensorChain ρ (n + 1)).vonNeumann = (tensorChain ρ n).vonNeumann +105(ρ n).vonNeumann := (tensorChain ρ n).tensor_entropy (ρ n)106_ = ∑ j ∈ Finset.range (n + 1), (ρ j).vonNeumann := by107rw [ih, Finset.sum_range_succ]108109/-- The exact entropy of an actual constant tensor-power state. -/110theorem DensityMatrix.tensorPower_entropy {ι : Type u} [Fintype ι] [DecidableEq ι]111(ρ : DensityMatrix ι) (n : ℕ) :112(tensorChain (fun _ => ρ) n).vonNeumann = (n : ℝ) * ρ.vonNeumann := by113rw [tensorChain_entropy]114simp115116end117118end Nonadditivity.Entropy119120namespace Nonadditivity.Channels.KrausChannel121122open Nonadditivity.Entropy123open scoped BigOperators ComplexOrder ComplexConjugate Kronecker Matrix124125noncomputable section126127/-- Concrete tensor channels produce the concrete tensor of their product-input outputs. -/128theorem tensor_output {ι μ ο ν κ η : Type*}129[Fintype ι] [DecidableEq ι] [Fintype μ] [DecidableEq μ]130[Fintype ο] [DecidableEq ο] [Fintype ν] [DecidableEq ν]131[Fintype κ] [Fintype η]132(T : KrausChannel ι ο κ) (S : KrausChannel μ ν η)133(ρ : DensityMatrix ι) (σ : DensityMatrix μ) :134(T.tensor S).output (ρ.tensor σ) = (T.output ρ).tensor (S.output σ) := by135apply Nonadditivity.Channels.densityMatrix_ext136exact T.tensor_map S ρ.matrix σ.matrix137138/-- Entropy of a product-input block's actual output is the sum of output entropies. -/139theorem tensor_output_entropy {ι μ ο ν κ η : Type*}140[Fintype ι] [DecidableEq ι] [Fintype μ] [DecidableEq μ]141[Fintype ο] [DecidableEq ο] [Fintype ν] [DecidableEq ν]142[Fintype κ] [Fintype η]143(T : KrausChannel ι ο κ) (S : KrausChannel μ ν η)144(ρ : DensityMatrix ι) (σ : DensityMatrix μ) :145((T.tensor S).output (ρ.tensor σ)).vonNeumann =146(T.output ρ).vonNeumann + (S.output σ).vonNeumann := by147rw [tensor_output, DensityMatrix.tensor_entropy]148149universe u v w150151/-- The empty channel sends the unique one-dimensional input state to its unique output state. -/152def emptyTensorChannel :153KrausChannel PUnit.{u + 1} PUnit.{v + 1} PUnit.{w + 1} where154kraus := fun _ _ _ => 1155complete := by156ext i j157cases i158cases j159simp [Matrix.sum_apply, Matrix.mul_apply, Matrix.conjTranspose_apply]160161theorem emptyTensorChannel_output :162emptyTensorChannel.{u,v,w}.output emptyTensorState.{u} = emptyTensorState.{v} := by163apply Nonadditivity.Channels.densityMatrix_ext164ext i j165cases i166cases j167simp [output, map, emptyTensorChannel, emptyTensorState, Matrix.mul_apply,168Matrix.conjTranspose_apply]169170/-- The actual tensor block of a local Kraus-channel family. -/171def tensorChain {ι : Type u} {ο : Type v} {κ : Type w}172[Fintype ι] [DecidableEq ι] [Fintype ο] [DecidableEq ο] [Fintype κ]173(T : ℕ → KrausChannel ι ο κ) :174(n : ℕ) → KrausChannel (TensorChainIndex ι n) (TensorChainIndex ο n)175(TensorChainIndex κ n)176| 0 => emptyTensorChannel177| n + 1 => (tensorChain T n).tensor (T n)178179/-- Actual tensor blocks map actual product states to actual products of local outputs. -/180theorem tensorChain_output {ι : Type u} {ο : Type v} {κ : Type w}181[Fintype ι] [DecidableEq ι] [Fintype ο] [DecidableEq ο] [Fintype κ]182(T : ℕ → KrausChannel ι ο κ) (ρ : ℕ → DensityMatrix ι) (n : ℕ) :183(tensorChain T n).output (DensityMatrix.tensorChain ρ n) =184DensityMatrix.tensorChain (fun j => (T j).output (ρ j)) n := by185induction n with186| zero => exact emptyTensorChannel_output187| succ n ih =>188change ((tensorChain T n).tensor (T n)).output189((DensityMatrix.tensorChain ρ n).tensor (ρ n)) =190(DensityMatrix.tensorChain (fun j => (T j).output (ρ j)) n).tensor191((T n).output (ρ n))192exact (tensor_output (tensorChain T n) (T n) (DensityMatrix.tensorChain ρ n) (ρ n)).trans193(congrArg (fun q : DensityMatrix (TensorChainIndex ο n) =>194q.tensor ((T n).output (ρ n))) ih)195196/-- Exact entropy sum for the outputs of a genuine finite channel tensor block. -/197theorem tensorChain_output_entropy {ι : Type u} {ο : Type v} {κ : Type w}198[Fintype ι] [DecidableEq ι] [Fintype ο] [DecidableEq ο] [Fintype κ]199(T : ℕ → KrausChannel ι ο κ) (ρ : ℕ → DensityMatrix ι) (n : ℕ) :200((tensorChain T n).output (DensityMatrix.tensorChain ρ n)).vonNeumann =201∑ j ∈ Finset.range n, ((T j).output (ρ j)).vonNeumann := by202rw [tensorChain_output, DensityMatrix.tensorChain_entropy]203204/-- Exact output entropy of the genuine tensor power on a product input. -/205theorem tensorPower_output_entropy {ι : Type u} {ο : Type v} {κ : Type w}206[Fintype ι] [DecidableEq ι] [Fintype ο] [DecidableEq ο] [Fintype κ]207(T : KrausChannel ι ο κ) (ρ : DensityMatrix ι) (n : ℕ) :208((tensorChain (fun _ => T) n).output (DensityMatrix.tensorChain (fun _ => ρ) n)).vonNeumann =209(n : ℝ) * (T.output ρ).vonNeumann := by210rw [tensorChain_output_entropy]211simp212213end214215end Nonadditivity.Channels.KrausChannel