Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.StructuredLinearization

Download original .lean · View on GitHub · Jump to source

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

49 project constants, including generated, internal and private declarations.

49 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.InitialNetReduction7import Nonadditivity.StructuredReductionCosts89/-! # Actual structured linearization1011The tensor-coordinate partitions and one-factor word balls are applied to the12same polynomial and coefficients, followed by the norm-preserving Hermitian13dilation.  Every intermediate polynomial is explicitly constructed.14-/15noncomputable section16set_option backward.isDefEq.respectTransparency false17set_option linter.unusedSectionVars false18set_option maxHeartbeats 100000019namespace Nonadditivity.StructuredLinearization20open scoped BigOperators Matrix Matrix.Norms.L2Operator Kronecker21open PolynomialReduction2223variable {n K : ℕ} [NeZero K]24abbrev G (n : ℕ) := Fin n → FreeGroup (Fin 2)2526def tensor (v : Fin n → Fin K → FreeGroup (Fin 2)) (P : Polynomial (G n)) :27    Polynomial (G n) := TensorPartitionReduction.reduce v P (Nat.clog 2 n)2829def linear (v : Fin n → Fin K → FreeGroup (Fin 2)) (P : Polynomial (G n)) (ell : ℕ) :30    Polynomial (G n) := WordBallReduction.stage (tensor v P) ell (Nat.clog 2 ell)3132def final (v : Fin n → Fin K → FreeGroup (Fin 2)) (P : Polynomial (G n)) (ell : ℕ) :33    Polynomial (G n) := (linear v P ell).dilate3435def dimensionMultiplier (v : Fin n → Fin K → FreeGroup (Fin 2)) (ell : ℕ) : ℕ :=36  TensorPartitionReduction.dimensionCost v (Nat.clog 2 n) *37    WordBallReduction.dimensionCost n ell (Nat.clog 2 ell)3839def errorMultiplier (v : Fin n → Fin K → FreeGroup (Fin 2)) (ell : ℕ) : ℕ :=40  TensorPartitionReduction.errorCost v (Nat.clog 2 n) *41    WordBallReduction.errorCost n ell (Nat.clog 2 ell)4243theorem dimensionMultiplier_pos (v : Fin n → Fin K → FreeGroup (Fin 2)) (ell : ℕ) :44    0 < dimensionMultiplier v ell :=45  Nat.mul_pos (TensorPartitionReduction.dimensionCost_pos _ _)46    (WordBallReduction.dimensionCost_pos _ _ _)4748theorem errorMultiplier_pos (v : Fin n → Fin K → FreeGroup (Fin 2)) (ell : ℕ) :49    0 < errorMultiplier v ell :=50  Nat.mul_pos (TensorPartitionReduction.errorCost_pos _ _)51    (WordBallReduction.errorCost_pos _ _ _)5253theorem errorMultiplier_eq (v : Fin n → Fin K → FreeGroup (Fin 2)) (ell : ℕ) :54    errorMultiplier v ell = 3^(Nat.clog 2 n + Nat.clog 2 ell)*dimensionMultiplier v ell := by55  simp only [errorMultiplier,dimensionMultiplier,TensorPartitionReduction.errorCost_eq,56    WordBallReduction.errorCost_eq,pow_add]57  ring5859theorem tensor_bound (v : Fin n → Fin K → FreeGroup (Fin 2)) (P : Polynomial (G n))60    (hP : P.support ⊆ TensorPartitionReduction.stageSupport v 0)61    (ell : ℕ) (hn : 1 ≤ n) (hv : ∀ i a, FreeGroup.norm (v i a) ≤ ell) :62    ∀ w ∈ (tensor v P).support, WordBallReduction.SingleFactorBound ell w := by63  intro w hw64  exact TensorPartitionReduction.stageSupport_single_factor v _ ell hn65    (Nat.le_pow_clog (by omega) n) hv w66    (TensorPartitionReduction.reduce_support v P hP _ hw)6768theorem linear_letters (v : Fin n → Fin K → FreeGroup (Fin 2)) (P : Polynomial (G n))69    (hP : P.support ⊆ TensorPartitionReduction.stageSupport v 0)70    (ell : ℕ) (hn : 1 ≤ n) (hv : ∀ i a, FreeGroup.norm (v i a) ≤ ell) :71    ∀ w ∈ (linear v P ell).support, w=1 ∨ ∃ x : Fin n × Fin 2,72      w=ProductPolynomialReduction.generator x ∨ w=(ProductPolynomialReduction.generator x)⁻¹ :=73  WordBallReduction.stage_clog_linear (tensor v P) ell hn (tensor_bound v P hP ell hn hv)7475theorem final_letters (v : Fin n → Fin K → FreeGroup (Fin 2)) (P : Polynomial (G n))76    (hP : P.support ⊆ TensorPartitionReduction.stageSupport v 0)77    (ell : ℕ) (hn : 1 ≤ n) (hv : ∀ i a, FreeGroup.norm (v i a) ≤ ell) :78    ∀ w ∈ (final v P ell).support, w=1 ∨ ∃ x : Fin n × Fin 2,79      w=ProductPolynomialReduction.generator x ∨ w=(ProductPolynomialReduction.generator x)⁻¹ := by80  intro w hw81  change w ∈ (linear v P ell).support ∪ (linear v P ell).support.image Inv.inv at hw82  rcases Finset.mem_union.mp hw with hw | hw83  · exact linear_letters v P hP ell hn hv w hw84  · obtain ⟨u,hu,rfl⟩ := Finset.mem_image.mp hw85    rcases linear_letters v P hP ell hn hv u hu with rfl | ⟨x,rfl | rfl⟩86    · exact Or.inl (by simp)87    · exact Or.inr ⟨x,Or.inr rfl⟩88    · exact Or.inr ⟨x,Or.inl (by simp)⟩8990theorem final_dimension (v : Fin n → Fin K → FreeGroup (Fin 2))91    (P : Polynomial (G n)) (ell : ℕ) :92    Fintype.card (final v P ell).Index = 2*Fintype.card P.Index*dimensionMultiplier v ell := by93  simp only [final,linear,tensor,Polynomial.dilate_dimension,WordBallReduction.stage_dimension,94    TensorPartitionReduction.reduce_dimension,dimensionMultiplier]95  ring9697theorem final_isHermitian (v : Fin n → Fin K → FreeGroup (Fin 2))98    (P : Polynomial (G n)) (ell : ℕ)99    {ν : Type*} [Fintype ν] [DecidableEq ν]100    (π : G n →* unitary (Matrix ν ν ℂ)) : ((final v P ell).finiteEval π).IsHermitian :=101  Polynomial.dilate_finite_isHermitian _ π102103/-- Transfer through the two concrete stage families and the final dilation. -/104theorem final_error_transfer (v : Fin n → Fin K → FreeGroup (Fin 2)) (P : Polynomial (G n))105    (hP : P.support ⊆ TensorPartitionReduction.stageSupport v 0)106    (ell : ℕ) (hn : 1 ≤ n) (hv : ∀ i a, FreeGroup.norm (v i a) ≤ ell)107    {ν : Type*} [Fintype ν] [DecidableEq ν] [Nonempty ν]108    (π : G n →* unitary (Matrix ν ν ℂ))109    (ε : ℝ) (hε : 0 ≤ ε) (hε1 : ε ≤ 1)110    (hfinal : ‖(final v P ell).finiteEval π‖ ≤111      (1+ε/(errorMultiplier v ell:ℝ))*‖(final v P ell).regularEval‖) :112    ‖P.finiteEval π‖ ≤ (1+ε)*‖P.regularEval‖ := by113  have hE : (0:ℝ) < TensorPartitionReduction.errorCost v (Nat.clog 2 n) := by114    exact_mod_cast TensorPartitionReduction.errorCost_pos v (Nat.clog 2 n)115  have hE1 : (1:ℝ) ≤ TensorPartitionReduction.errorCost v (Nat.clog 2 n) := by116    exact_mod_cast TensorPartitionReduction.errorCost_pos v (Nat.clog 2 n)117  have hδ0 : 0 ≤ ε/(TensorPartitionReduction.errorCost v (Nat.clog 2 n):ℝ) :=118    div_nonneg hε hE.le119  have hδ1 : ε/(TensorPartitionReduction.errorCost v (Nat.clog 2 n):ℝ) ≤ 1 :=120    (div_le_iff₀ hE).mpr (by linarith)121  apply TensorPartitionReduction.reduce_error_transfer v P hP _ π ε hε hε1122  apply WordBallReduction.stage_error_transfer (tensor v P) ell _ hn123    (tensor_bound v P hP ell hn hv) π _ hδ0 hδ1124  simpa only [final,Polynomial.dilate_finite_norm,Polynomial.dilate_regular_norm,125    errorMultiplier,Nat.cast_mul,div_div,linear] using hfinal126127128section Initial129open FreeModel StructuredCostBounds130variable {J : Type} [Fintype J] [DecidableEq J] [Nonempty J]131132def individualWord (v : Fin n → Fin K → FreeGroup (Fin 2)) (a : Branch K n) : G n :=133  fun i => v i (a i)134135def initialPolynomial (v : Fin n → Fin K → FreeGroup (Fin 2))136    (A : J → Matrix (Branch K n) (Branch K n) ℂ) (b₀ : Branch K n) : Polynomial (G n) :=137  InitialNetReduction.polynomial (individualWord v) A b₀138139def testFinal (v : Fin n → Fin K → FreeGroup (Fin 2))140    (A : J → Matrix (Branch K n) (Branch K n) ℂ) (b₀ : Branch K n) (ell : ℕ) :141    Polynomial (G n) := final v (initialPolynomial v A b₀) ell142143def referenceNorm (v : Fin n → Fin K → FreeGroup (Fin 2))144    (A : J → Matrix (Branch K n) (Branch K n) ℂ) : ℝ :=145  ‖InitialNetReduction.regularPaired (individualWord v) A‖146147def fullError (v : Fin n → Fin K → FreeGroup (Fin 2))148    (A : J → Matrix (Branch K n) (Branch K n) ℂ) (ell : ℕ) : ℝ :=149  3*(1+1/referenceNorm v A)*(errorMultiplier v ell:ℝ)150151theorem initialPolynomial_support (v : Fin n → Fin K → FreeGroup (Fin 2))152    (A : J → Matrix (Branch K n) (Branch K n) ℂ) (b₀ : Branch K n) :153    (initialPolynomial v A b₀).support ⊆ TensorPartitionReduction.stageSupport v 0 :=154  TensorPartitionReduction.initial_support_subset v155156theorem testFinal_dimension (v : Fin n → Fin K → FreeGroup (Fin 2))157    (A : J → Matrix (Branch K n) (Branch K n) ℂ) (b₀ : Branch K n) (ell : ℕ) :158    Fintype.card (testFinal v A b₀ ell).Index =159      2 * Fintype.card J * K^n * dimensionMultiplier v ell := by160  rw [testFinal,final_dimension]161  simp only [initialPolynomial,InitialNetReduction.polynomial_dimension,162    Branch,Fintype.card_fun,Fintype.card_fin]163  ring164165theorem fullError_pos (v : Fin n → Fin K → FreeGroup (Fin 2))166    (A : J → Matrix (Branch K n) (Branch K n) ℂ) (ell : ℕ)167    (hρ : 0 < referenceNorm v A) : 0 < fullError v A ell := by168  have he : (0:ℝ) < errorMultiplier v ell := by exact_mod_cast errorMultiplier_pos v ell169  unfold fullError170  positivity171172/-- Complete error transfer through the initial, undoubled Gram construction,173all balanced tensor splits, all one-factor word cuts, and the final dilation. -/174theorem testFinal_error_transfer (v : Fin n → Fin K → FreeGroup (Fin 2))175    (A : J → Matrix (Branch K n) (Branch K n) ℂ) (b₀ : Branch K n)176    (hA : ∀ j, (A j).IsHermitian) (hAn : ∀ j, ‖A j‖ ≤ 1)177    (e : J ≃ J) (he : ∀ j, A (e j) = -A j)178    (ell : ℕ) (hn : 1 ≤ n) (hv : ∀ i a, FreeGroup.norm (v i a) ≤ ell)179    (hρ : 0 < referenceNorm v A)180    {ν : Type*} [Fintype ν] [DecidableEq ν] [Nonempty ν]181    (π : G n →* unitary (Matrix ν ν ℂ))182    (ε : ℝ) (hε : 0 ≤ ε) (hε1 : ε ≤ 1)183    (hfinal : ‖(testFinal v A b₀ ell).finiteEval π‖ ≤184      (1+ε/fullError v A ell)*‖(testFinal v A b₀ ell).regularEval‖) :185    ‖InitialNetReduction.finitePaired (fun b => π (individualWord v b)) A‖ ≤186      (1+ε)*referenceNorm v A := by187  let F := 3*(1+1/referenceNorm v A)188  have hF : 0 < F := by dsimp [F]; positivity189  have hF1 : 1 ≤ F := by dsimp [F]; have := one_div_nonneg.mpr hρ.le; linarith190  have hδ0 : 0 ≤ ε/F := div_nonneg hε hF.le191  have hδ1 : ε/F ≤ 1 := (div_le_iff₀ hF).mpr (by linarith)192  have hQ := final_error_transfer v (initialPolynomial v A b₀)193    (initialPolynomial_support v A b₀) ell hn hv π (ε/F) hδ0 hδ1 (by194      simpa only [testFinal,fullError,F,div_div] using hfinal)195  have ht := InitialNetReduction.initial_relative_transfer (individualWord v) A hA hAn196    e he b₀ π (ε/F) (referenceNorm v A) hδ0 hδ1 hρ (le_refl _) hQ197  have hc : 3*(1+1/referenceNorm v A)*(ε/F) = ε := mul_div_cancel₀ ε hF.ne'198  simpa only [hc] using ht199200/-- The actual complete error multiplier meets the manuscript's exponential201budget, with every intermediate cardinality and logarithmic estimate proved. -/202theorem fullError_bound (v : Fin n → Fin K → FreeGroup (Fin 2))203    (A : J → Matrix (Branch K n) (Branch K n) ℂ)204    (hK : 2 ≤ K) (hn : Quantitative.n₀ K ≤ n)205    (hρ : Real.sqrt 2*(K:ℝ)^(-((n:ℝ)+1)/2) ≤ referenceNorm v A) :206    fullError v A (wordLength K) ≤ Real.exp (Quantitative.gamma (Real.log K)*n) := by207  simpa only [fullError,errorMultiplier,Nat.cast_mul,one_div,tensorSteps,wordSteps]208    using StructuredReductionCosts.actual_error_bound v hK hn hρ209210/-- The actual coefficient size, including the final Hermitian doubling, meets211`log(2m) ≤ 2 K^(2n) log(1+2n)`. -/212theorem testFinal_log_dimension (v : Fin n → Fin K → FreeGroup (Fin 2))213    (A : J → Matrix (Branch K n) (Branch K n) ℂ) (b₀ : Branch K n)214    (hK : 2 ≤ K) (hn : Quantitative.n₀ K ≤ n)215    (hJ : Fintype.card J ≤ netCardBound K n) :216    Real.log (2*(Fintype.card (testFinal v A b₀ (wordLength K)).Index:ℝ)) ≤217      2*(K:ℝ)^(2*n)*Real.log (1+2*(n:ℝ)) := by218  have hd : Fintype.card (initialPolynomial v A b₀).Index ≤ netCardBound K n*K^n := by219    simp only [initialPolynomial,InitialNetReduction.polynomial_dimension,220      Branch,Fintype.card_fun,Fintype.card_fin]221    simpa [Nat.mul_comm] using Nat.mul_le_mul_right (K^n) hJ222  have hs := StructuredReductionCosts.actual_coefficient_bound v hK hn hd223    (Fintype.card_pos (α := (initialPolynomial v A b₀).Index))224  rw [testFinal,final_dimension]225  simpa only [dimensionMultiplier,tensorSteps,wordSteps,Nat.cast_mul,Nat.cast_ofNat,226    mul_assoc] using hs227228/-- The manuscript's chosen small final error suffices at every finite unitary229representation.  This theorem is entirely deterministic. -/230theorem testFinal_error_transfer_exp (v : Fin n → Fin K → FreeGroup (Fin 2))231    (A : J → Matrix (Branch K n) (Branch K n) ℂ) (b₀ : Branch K n)232    (hA : ∀ j, (A j).IsHermitian) (hAn : ∀ j, ‖A j‖ ≤ 1)233    (e : J ≃ J) (he : ∀ j, A (e j) = -A j)234    (hK : 2 ≤ K) (hn : Quantitative.n₀ K ≤ n)235    (hv : ∀ i a, FreeGroup.norm (v i a) ≤ wordLength K)236    (hρ : Real.sqrt 2*(K:ℝ)^(-((n:ℝ)+1)/2) ≤ referenceNorm v A)237    {ν : Type*} [Fintype ν] [DecidableEq ν] [Nonempty ν]238    (π : G n →* unitary (Matrix ν ν ℂ))239    (ε : ℝ) (hε : 0 ≤ ε) (hε1 : ε ≤ 1)240    (hfinal : ‖(testFinal v A b₀ (wordLength K)).finiteEval π‖ ≤241      (1+ε*Real.exp (-(Quantitative.gamma (Real.log K)*n)))*242        ‖(testFinal v A b₀ (wordLength K)).regularEval‖) :243    ‖InitialNetReduction.finitePaired (fun b => π (individualWord v b)) A‖ ≤244      (1+ε)*referenceNorm v A := by245  have hKr : (0:ℝ) < K := by exact_mod_cast (by omega : 0 < K)246  have hρpos : 0 < referenceNorm v A := lt_of_lt_of_le (by positivity) hρ247  obtain ⟨_,hn64,_,_⟩ := Quantitative.threshold_consequences hK hn248  have hn1 : 1 ≤ n := by exact_mod_cast (show (1:ℝ) ≤ n by linarith)249  apply testFinal_error_transfer v A b₀ hA hAn e he _ hn1 hv hρpos π ε hε hε1250  apply hfinal.trans251  apply mul_le_mul_of_nonneg_right _ (norm_nonneg _)252  apply add_le_add le_rfl253  rw [Real.exp_neg,← div_eq_mul_inv]254  exact div_le_div_of_nonneg_left hε (fullError_pos v A _ hρpos)255    (fullError_bound v A hK hn hρ)256257end Initial258259section ActualNet260open FreeModel FiniteRealization StructuredCostBounds261local instance (tests : Finset (ObservableSpace (Branch K n))) : DecidableEq tests := Classical.decEq _262263/-- Steps 1--3 of the explicit-dimension argument on the actual prescribed net:264an actual self-adjoint linear polynomial with the exact manuscript coefficient265budget and the prescribed exponential error transfer.  This result has only266numeric hypotheses.  The finite-Haar comparison in Step 4 is not asserted here. -/267theorem exists_net_linearization (hK : 2 ≤ K) (hn : Quantitative.n₀ K ≤ n) :268    ∃ tests : Finset (ObservableSpace (Branch K n)), tests.Nonempty ∧269      (∀ x ∈ tests, ‖x‖ = 1) ∧ (∀ x ∈ tests, -x ∈ tests) ∧270      UnitSphereNet tests (1/(n:ℝ)) ∧271      ∃ H : Polynomial (G n),272        (∀ w ∈ H.support, w=1 ∨ ∃ x : Fin n × Fin 2,273          w=ProductPolynomialReduction.generator x ∨ w=(ProductPolynomialReduction.generator x)⁻¹) ∧274        Real.log (2*(Fintype.card H.Index:ℝ)) ≤275          2*(K:ℝ)^(2*n)*Real.log (1+2*(n:ℝ)) ∧276        ∀ (ν : Type) [Fintype ν] [DecidableEq ν] [Nonempty ν]277          (π : G n →* unitary (Matrix ν ν ℂ)),278          (H.finiteEval π).IsHermitian ∧279          (‖H.finiteEval π‖ ≤280            (1+Real.exp (-(Quantitative.gamma (Real.log K)*n))/(n:ℝ))*‖H.regularEval‖ →281            ‖InitialNetReduction.finitePaired282              (fun b => π (InitialNetReduction.shortProductEmbedding K n hK (branchWord b)))283              (fun j : tests => observableMatrix j.val)‖ ≤ (1+1/(n:ℝ))*c K n) := by284  classical285  obtain ⟨_,hn64,_,_⟩ := Quantitative.threshold_consequences hK hn286  have hn1 : 1 ≤ n := by exact_mod_cast (show (1:ℝ) ≤ n by linarith)287  have hnr : (1:ℝ) ≤ n := by exact_mod_cast hn1288  obtain ⟨tests,hne,hnorm,hsymm,hnet,hcard,hlower,hupper⟩ :=289    NetPolynomial.exists_net_polynomial hK hn1290  letI : Nonempty tests := hne.to_subtype291  let v : Fin n → Fin K → FreeGroup (Fin 2) := fun _ => InitialNetReduction.shortWord K hK292  let A : tests → Matrix (Branch K n) (Branch K n) ℂ := fun j => observableMatrix j.val293  let b₀ : Branch K n := fun _ => 0294  have hA : ∀ j, (A j).IsHermitian := fun j => observableMatrix_isHermitian j.val295  have hAn : ∀ j, ‖A j‖ ≤ 1 := by296    intro j297    have hh : AdjointPurity.hsLength (A j) = 1 := by298      rw [← observable_norm_eq_hsLength]299      exact hnorm j.val j.property300    exact (InitialNetReduction.norm_le_hsLength (A j) (hA j)).trans hh.le301  let e := NetPolynomial.netNegationEquiv tests hsymm302  have he : ∀ j, A (e j) = -A j := fun _ => rfl303  have hv : ∀ i a, FreeGroup.norm (v i a) ≤ wordLength K := by304    intro i a305    simpa only [v,wordLength,Nat.log2_eq_log_two] using306      InitialNetReduction.shortWord_norm_le K hK a307  have href : referenceNorm v A = ‖NetPolynomial.netRegularPolynomial tests‖ := by308    change ‖InitialNetReduction.regularPaired309      (fun b => InitialNetReduction.shortProductEmbedding K n hK (branchWord b)) A‖ = _310    rw [InitialNetReduction.regularPaired_injective_norm_eq311      (InitialNetReduction.shortProductEmbedding K n hK)312      (InitialNetReduction.shortProductEmbedding_injective K n hK),313      InitialNetReduction.net_regularPaired_eq]314  have hρ : Real.sqrt 2*(K:ℝ)^(-((n:ℝ)+1)/2) ≤ referenceNorm v A := by rwa [href]315  have hJ : Fintype.card tests ≤ netCardBound K n := by316    simp only [Fintype.card_coe]317    change tests.card ≤ (1+2*n)^(K^(2*n)-1)318    exact_mod_cast hcard319  let H := testFinal v A b₀ (wordLength K)320  refine ⟨tests,hne,hnorm,hsymm,hnet,H,?_,?_,?_⟩321  · exact final_letters v (initialPolynomial v A b₀) (initialPolynomial_support v A b₀)322      _ hn1 hv323  · exact testFinal_log_dimension v A b₀ hK hn hJ324  · intro ν _ _ _ π325    refine ⟨final_isHermitian v (initialPolynomial v A b₀) _ π,?_⟩326    intro hH327    have ht := testFinal_error_transfer_exp v A b₀ hA hAn e he hK hn hv hρ π328      (1/(n:ℝ)) (by positivity) (by apply (div_le_iff₀ (by linarith)).mpr; linarith) (by329        simpa only [H,one_div,div_eq_mul_inv,mul_comm,mul_one] using hH)330    rw [href] at ht331    exact ht.trans (mul_le_mul_of_nonneg_left hupper (by positivity))332333end ActualNet334end Nonadditivity.StructuredLinearization