Exact Lean source
Nonadditivity.FiniteBlockModel
Download original .lean · View on GitHub · Jump to source
Direct imports
Imported by project modules
3 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
30 project constants, including generated, internal and private declarations.
30 declarations
Nonadditivity.FiniteBlockModel.LocalIndexNonadditivity.FiniteBlockModel.baseUnitaryNonadditivity.FiniteBlockModel.block_adjoint_moment_leNonadditivity.FiniteBlockModel.block_adjoint_moment_le._simp_1_1internal/detail/privateNonadditivity.FiniteBlockModel.block_adjoint_normalized_moment_leNonadditivity.FiniteBlockModel.finiteEval_eq_block_adjointNonadditivity.FiniteBlockModel.localRepresentationNonadditivity.FiniteBlockModel.localRepresentation_traceNonadditivity.FiniteBlockModel.representationNonadditivity.FiniteBlockModel.representation._proof_1internal/detail/privateNonadditivity.FiniteBlockModel.representation._proof_2internal/detail/privateNonadditivity.FiniteBlockModel.representation_branchWordNonadditivity.FiniteBlockModel.representation_invNonadditivity.FiniteBlockModel.representation_traceNonadditivity.FiniteBlockModel.tensorRepresentationNonadditivity.FiniteBlockModel.tensorRepresentation._proof_1internal/detail/privateNonadditivity.FiniteBlockModel.tensorRepresentation._proof_2internal/detail/privateNonadditivity.FiniteBlockModel.tensorRepresentation._proof_3internal/detail/privateNonadditivity.FiniteBlockModel.tensorRepresentation._proof_4internal/detail/privateNonadditivity.FiniteBlockModel.tensorRepresentation._sunfoldinternal/detail/privateNonadditivity.FiniteBlockModel.tensorRepresentation._unsafe_recinternal/detail/privateNonadditivity.FiniteBlockModel.tensorRepresentation.eq_1internal/detail/privateNonadditivity.FiniteBlockModel.tensorRepresentation.eq_2internal/detail/privateNonadditivity.FiniteBlockModel.tensorRepresentation.eq_defNonadditivity.FiniteBlockModel.tensorRepresentation.match_1internal/detail/privateNonadditivity.FiniteBlockModel.tensorRepresentation_traceNonadditivity.FiniteBlockModel.tensorRepresentation_word_private.Nonadditivity.FiniteBlockModel.0.Nonadditivity.FiniteBlockModel.tensorRepresentation.match_1.eq_1internal/detail/private_private.Nonadditivity.FiniteBlockModel.0.Nonadditivity.FiniteBlockModel.tensorRepresentation.match_1.eq_2internal/detail/private_private.Nonadditivity.FiniteBlockModel.0.Nonadditivity.FiniteBlockModel.tensorRepresentation.match_1.splitterinternal/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.FiniteFreeModel7import Nonadditivity.FiniteMomentMatching8import Nonadditivity.FiniteRegularMatrix9import Nonadditivity.StructuredHaarModel10import Nonadditivity.StructuredFiniteChannel1112/-! # Exact finite block-channel moments1314Finite quotients separating bounded free words give actual finite tensor15unitaries. Their block-channel trace moments agree exactly with the free trace.16-/17noncomputable section18set_option backward.isDefEq.respectTransparency false19set_option linter.unusedSectionVars false20set_option maxHeartbeats 120000021namespace Nonadditivity.FiniteBlockModel22open Entropy Channels.KrausChannel FreeModel FreeBridge FiniteRealization23open scoped Matrix Matrix.Norms.L2Operator Kronecker BigOperators24open StructuredHaarModel (kroneckerUnitary)2526section Tensor27variable {ι : Type} [Fintype ι] [DecidableEq ι] {K : ℕ}2829/-- A literal product-free-group representation on the tensor input space. -/30def tensorRepresentation (u : ℕ → (FreeGroup (Fin K) →* unitary (Matrix ι ι ℂ))) :31(r : ℕ) → (Fin r → FreeGroup (Fin K)) →*32unitary (Matrix (TensorChainIndex ι r) (TensorChainIndex ι r) ℂ)33| 0 => 134| r+1 =>35{ toFun := fun g => kroneckerUnitary (tensorRepresentation u r (Fin.init g)) (u r (g (Fin.last r)))36map_one' := by37apply Subtype.ext38change (tensorRepresentation u r (Fin.init (1 : Fin (r+1) → FreeGroup (Fin K))) : Matrix (TensorChainIndex ι r) (TensorChainIndex ι r) ℂ) ⊗ₖ39(u r 1 : Matrix ι ι ℂ) = 140have hi : Fin.init (1 : Fin (r+1) → FreeGroup (Fin K)) = 1 := rfl41rw [hi,map_one,map_one]42exact Matrix.one_kronecker_one43map_mul' := by44intro g h45apply Subtype.ext46have hi : Fin.init (g*h) = Fin.init g * Fin.init h := rfl47change (tensorRepresentation u r (Fin.init (g*h)) : Matrix (TensorChainIndex ι r) (TensorChainIndex ι r) ℂ) ⊗ₖ48(u r ((g*h) (Fin.last r)) : Matrix ι ι ℂ) = _49rw [hi,map_mul]50change ((tensorRepresentation u r (Fin.init g) : Matrix (TensorChainIndex ι r) (TensorChainIndex ι r) ℂ) *51(tensorRepresentation u r (Fin.init h) : Matrix (TensorChainIndex ι r) (TensorChainIndex ι r) ℂ)) ⊗ₖ52(u r (g (Fin.last r)*h (Fin.last r)) : Matrix ι ι ℂ) = _53rw [map_mul]54exact Matrix.mul_kronecker_mul _ _ _ _ }5556/-- The representation evaluates individual branch words to the actual ordered57tensor words used by the Kraus-channel construction. -/58theorem tensorRepresentation_word59(u : ℕ → (FreeGroup (Fin K) →* unitary (Matrix ι ι ℂ)))60(w : ℕ → Fin K → FreeGroup (Fin K)) (r : ℕ) (a : FreeModel.Branch K r) :61(tensorRepresentation u r (fun i => w i.val (a i)) : Matrix (TensorChainIndex ι r) (TensorChainIndex ι r) ℂ) =62tensorWord (fun j b => u j (w j b)) r ((FreeBridge.chainBranchEquiv K r).symm a) := by63induction r with64| zero => rfl65| succ r ih =>66change (tensorRepresentation u r (fun i => w i.val (a i.castSucc)) : Matrix (TensorChainIndex ι r) (TensorChainIndex ι r) ℂ) ⊗ₖ67(u r (w r (a (Fin.last r))) : Matrix ι ι ℂ) = _68change (tensorRepresentation u r (fun i => w i.val (a i.castSucc)) :69Matrix (TensorChainIndex ι r) (TensorChainIndex ι r) ℂ) ⊗ₖ70(u r (w r (a (Fin.last r))) : Matrix ι ι ℂ) =71tensorWord (fun j b => u j (w j b)) r72((FreeBridge.chainBranchEquiv K r).symm (Fin.init a)) ⊗ₖ73(u r (w r (a (Fin.last r))) : Matrix ι ι ℂ)74congr 175simpa only [Fin.init] using ih (Fin.init a)7677/-- The normalized regular character tensorizes exactly. -/78theorem tensorRepresentation_trace79(u : ℕ → (FreeGroup (Fin K) →* unitary (Matrix ι ι ℂ))) (R : ℕ)80(hu : ∀ j w, FreeGroup.norm w ≤ R →81(u j w : Matrix ι ι ℂ).trace = (Fintype.card ι : ℂ)*(if w=1 then 1 else 0))82(r : ℕ) (w : Fin r → FreeGroup (Fin K)) (hw : ∀ j, FreeGroup.norm (w j) ≤ R) :83(tensorRepresentation u r w : Matrix (TensorChainIndex ι r) (TensorChainIndex ι r) ℂ).trace =84(Fintype.card (TensorChainIndex ι r):ℂ)*(if w=1 then 1 else 0) := by85induction r with86| zero =>87have he : w=1 := by funext i; exact Fin.elim0 i88simp [tensorRepresentation,he]89| succ r ih =>90change ((tensorRepresentation u r (Fin.init w) : Matrix (TensorChainIndex ι r) (TensorChainIndex ι r) ℂ) ⊗ₖ91(u r (w (Fin.last r)) : Matrix ι ι ℂ)).trace = _92rw [Matrix.trace_kronecker,ih (Fin.init w) (fun j => hw j.castSucc),93hu r (w (Fin.last r)) (hw (Fin.last r))]94have he : w=1 ↔ Fin.init w=1 ∧ w (Fin.last r)=1 := by95constructor96· rintro rfl; exact ⟨rfl,rfl⟩97· rintro ⟨ha,hb⟩98funext j99refine Fin.lastCases ?_ (fun i => ?_) j100· exact hb101· exact congrFun ha i102by_cases ha : Fin.init w=1 <;> by_cases hb : w (Fin.last r)=1 <;>103simp [he,ha,hb,TensorChainIndex,Fintype.card_prod]104105end Tensor106107section FiniteModel108109/-- The finite group of completed translations on the word ball. -/110abbrev LocalIndex (K R : ℕ) := Equiv.Perm (FiniteFreeModel.Ball (Fin K) R)111112/-- Genuine local unitary evaluation with exactly regular trace through radius R. -/113def localRepresentation (K R : ℕ) :114FreeGroup (Fin K) →* unitary (Matrix (LocalIndex K R) (LocalIndex K R) ℂ) :=115(FiniteRegularMatrix.regularUnitary (LocalIndex K R)).comp (FiniteFreeModel.model R)116117theorem localRepresentation_trace (K R : ℕ) (w : FreeGroup (Fin K))118(hw : FreeGroup.norm w ≤ R) :119(localRepresentation K R w : Matrix (LocalIndex K R) (LocalIndex K R) ℂ).trace =120(Fintype.card (LocalIndex K R):ℂ)*(if w=1 then 1 else 0) := by121change (FiniteRegularMatrix.regularUnitary (LocalIndex K R) (FiniteFreeModel.model R w) :122Matrix (LocalIndex K R) (LocalIndex K R) ℂ).trace = _123rw [FiniteRegularMatrix.regularUnitaryHom_trace]124simp only [FiniteFreeModel.model_eq_one_iff R w hw]125126/-- The concrete local unitaries supplied to the existing block-channel constructor. -/127def baseUnitary (K R : ℕ) (_j : ℕ) (a : Fin K) :128unitary (Matrix (LocalIndex K R) (LocalIndex K R) ℂ) :=129localRepresentation K R (FreeGroup.of a)130131/-- The concrete tensor representation, with matrix codomain for algebraic moments. -/132def representation (K R n : ℕ) : ProductFreeGroup K n →*133Matrix (TensorChainIndex (LocalIndex K R) n) (TensorChainIndex (LocalIndex K R) n) ℂ where134toFun w := tensorRepresentation (fun _ => localRepresentation K R) n w135map_one' := congrArg Subtype.val (map_one (tensorRepresentation (fun _ => localRepresentation K R) n))136map_mul' v w := congrArg Subtype.val (map_mul (tensorRepresentation (fun _ => localRepresentation K R) n) v w)137138theorem representation_trace (K R n : ℕ) (w : ProductFreeGroup K n)139(hw : ∀j, FreeGroup.norm (w j) ≤ R) :140(representation K R n w).trace =141(Fintype.card (TensorChainIndex (LocalIndex K R) n):ℂ)*(if w=1 then 1 else 0) :=142tensorRepresentation_trace (fun _ => localRepresentation K R) R143(fun _ => localRepresentation_trace K R) n w hw144145theorem representation_branchWord (K R n : ℕ) (a : Branch K n) :146representation K R n (branchWord a) =147tensorWord (baseUnitary K R) n ((chainBranchEquiv K n).symm a) :=148tensorRepresentation_word (fun _ => localRepresentation K R)149(fun _ => FreeGroup.of) n a150151theorem representation_inv (K R n : ℕ) (w : ProductFreeGroup K n) :152representation K R n w⁻¹ = (representation K R n w).conjTranspose := by153change ((tensorRepresentation (fun _ => localRepresentation K R) n w⁻¹) :154Matrix (TensorChainIndex (LocalIndex K R) n) (TensorChainIndex (LocalIndex K R) n) ℂ) = _155rw [map_inv]156rfl157158/-- The algebraic finite polynomial is exactly the actual block adjoint. -/159theorem finiteEval_eq_block_adjoint (K R n : ℕ) [NeZero K]160(A : Matrix (Branch K n) (Branch K n) ℂ) :161FiniteMomentMatching.finiteEval (representation K R n) (FiniteMomentMatching.gammaPolynomial A) =162(BlockConstruction.blockChannel (baseUnitary K R) n).adjointMap163(StructuredFiniteChannel.outputMatrix A) := by164rw [FiniteMomentMatching.finiteEval_gammaPolynomial,165StructuredFiniteChannel.block_adjoint_eq_branch_polynomial]166simp only [Finset.smul_sum,smul_smul,map_mul,representation_inv,representation_branchWord]167apply Finset.sum_congr rfl168intro a _169apply Finset.sum_congr rfl170intro b _171simp [Branch,one_div]172173/-- Exact finite moments for every observable, with the genuine HS factor. -/174theorem block_adjoint_moment_le {K n : ℕ} [NeZero K]175(hK : 2 ≤ K) (hn : 1 ≤ n) (p : ℕ)176(A : Matrix (ZMod (K^n)) (ZMod (K^n)) ℂ) (hA : A.trace=0) :177(((BlockConstruction.blockChannel (baseUnitary K (4*p)) n).adjointMap A)^(2*p)).trace.re ≤178(Fintype.card (TensorChainIndex (LocalIndex K (4*p)) n):ℝ)*179(c K n*AdjointPurity.hsLength A)^(2*p) := by180let B := A.submatrix (branchToOutput K n) (branchToOutput K n)181have ht : B.trace=0 := (trace_submatrix_equiv _ A).trans hA182have hb := FiniteMomentMatching.gamma_trace_pow_re_le hK hn183(representation K (4*p) n) B ht (2*p) (fun w hw =>184representation_trace K (4*p) n w (by simpa only [←Nat.mul_assoc] using hw))185rw [finiteEval_eq_block_adjoint] at hb186have he : StructuredFiniteChannel.outputMatrix B = A := by187ext a b188simp [StructuredFiniteChannel.outputMatrix,B]189rw [he] at hb190simpa only [B,hsLength_submatrix_equiv] using hb191192/-- Normalized even moments of every traceless HS-unit-ball test are at most c^(2p).193All matrices here belong to an explicitly constructed genuine block channel. -/194theorem block_adjoint_normalized_moment_le {K n : ℕ} [NeZero K]195(hK : 2 ≤ K) (hn : 1 ≤ n) (p : ℕ)196(A : Matrix (ZMod (K^n)) (ZMod (K^n)) ℂ) (hA : A.trace=0)197(hhs : AdjointPurity.hsLength A ≤ 1) :198(((BlockConstruction.blockChannel (baseUnitary K (4*p)) n).adjointMap A)^(2*p)).trace.re /199(Fintype.card (TensorChainIndex (LocalIndex K (4*p)) n):ℝ) ≤ (c K n)^(2*p) := by200apply (div_le_iff₀ (by exact_mod_cast Fintype.card_pos)).mpr201apply (block_adjoint_moment_le hK hn p A hA).trans202rw [mul_comm ((c K n)^(2*p))]203apply mul_le_mul_of_nonneg_left _ (by positivity)204apply pow_le_pow_left₀ (by unfold c AdjointPurity.hsLength; positivity)205exact (mul_le_mul_of_nonneg_left hhs (Real.sqrt_nonneg _)).trans_eq (mul_one _)206207end FiniteModel208209end Nonadditivity.FiniteBlockModel