Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.GaussianConstruction

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

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

2 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.GaussianCertificates7import Nonadditivity.GaussianSampleEvaluation8import Nonadditivity.InitialNetReduction910/-! # Unconditional finite Gaussian channel construction1112An actual rectangular Gaussian sample simultaneously passes the two finite13nets, and its polar normalization gives an actual trace-preserving channel.14No Haar convergence or concentration proposition is assumed.15-/1617noncomputable section18set_option backward.isDefEq.respectTransparency false19set_option maxHeartbeats 16000002021namespace Nonadditivity.GaussianConstruction2223open MeasureTheory ProbabilityTheory FiniteRealization GaussianRectangular24  GaussianNormalization GaussianNetRealization Channels25open scoped BigOperators Matrix Matrix.Norms.L2Operator2627/-- A finite channel with a dimension-independent Hilbert--Schmidt-to-operator28constant, constructed with no unproved probabilistic assumption. -/29theorem exists_channel (K N : ℕ) [NeZero K]30    (hK : 4096 ≤ K) (hN : K ^ 2 ≤ N) :31    ∃ T : KrausChannel (Fin N) (ZMod K) (Fin N),32      ∀ A : Matrix (ZMod K) (ZMod K) ℂ, A.IsHermitian → A.trace = 0 →33        ‖T.adjointMap A‖ ≤ (512 / (K : ℝ)) * AdjointPurity.hsLength A := by34  classical35  have hKnat : 0 < K := by omega36  have hNnat : 0 < N := lt_of_lt_of_le (pow_pos hKnat _) hN37  have hKr : (0 : ℝ) < K := by exact_mod_cast hKnat38  have hNr : (0 : ℝ) < N := by exact_mod_cast hNnat39  letI : NeZero N := ⟨ne_of_gt hNnat⟩40  obtain ⟨inputs, hiunit, hinet, hicard⟩ := QuadraticNet.exists_complex_input_net (Fin N)41  obtain ⟨outputs, hounit, honet, hocard⟩ := QuadraticNet.exists_observable_net (ZMod K)42  let T₀ : inputs → Sample (ZMod K) (Fin N) (Fin N) →L[ℝ]43      Sample (ZMod K) (Fin N) (Fin N) :=44    fun x => quadraticOperator (Env := Fin N) (1 : Matrix (ZMod K) (ZMod K) ℂ) x.val45  let T₁ : (outputs × inputs) → Sample (ZMod K) (Fin N) (Fin N) →L[ℝ]46      Sample (ZMod K) (Fin N) (Fin N) :=47    fun ax => quadraticOperator (Env := Fin N) (observableMatrix ax.1.val) ax.2.val48  have hhs (a : outputs) : AdjointPurity.hsLength (observableMatrix a.val) = 1 := by49    rw [← observable_norm_eq_hsLength]50    exact hounit a.val a.property51  have hop (a : outputs) : ‖observableMatrix a.val‖ ≤ 1 := by52    exact (InitialNetReduction.norm_le_hsLength _ (observableMatrix_isHermitian a.val)).trans_eq (hhs a)53  have hn₀ (x : inputs) : (2 * (K : ℝ) * N) * ‖T₀ x‖ ≤ 1 := by54    have h := quadraticOperator_norm_le (Env := Fin N)55      (1 : Matrix (ZMod K) (ZMod K) ℂ) x.val (hiunit x.val x.property)56    simp only [norm_one, ZMod.card, Fintype.card_fin] at h57    simpa only [T₀, mul_comm] using58      (le_div_iff₀ (show (0 : ℝ) < 2 * K * N by positivity)).mp h59  have hn₁ (ax : outputs × inputs) : (2 * (K : ℝ) * N) * ‖T₁ ax‖ ≤ 1 := by60    have h := quadraticOperator_norm_le (Env := Fin N)61      (observableMatrix ax.1.val) ax.2.val (hiunit ax.2.val ax.2.property)62    have hbase : ‖T₁ ax‖ ≤ ‖observableMatrix ax.1.val‖ / (2 * (K : ℝ) * N) := by63      simpa only [T₁, ZMod.card, Fintype.card_fin] using h64    have h' : ‖T₁ ax‖ ≤ 1 / (2 * (K : ℝ) * N) :=65      hbase.trans (div_le_div_of_nonneg_right (hop ax.1) (by positivity))66    simpa only [mul_comm] using (le_div_iff₀ (show (0 : ℝ) < 2 * K * N by positivity)).mp h'67  have hv₀ (x : inputs) : (2 * (K : ℝ) * N) *68      ((T₀ x).toLinearMap * (T₀ x).toLinearMap).trace ℝ (Sample (ZMod K) (Fin N) (Fin N)) ≤ 1 := by69    dsimp only [T₀]70    rw [quadraticOperator_trace_square _ _ (hiunit x.val x.property)]71    simp only [Matrix.one_mul, Matrix.trace_one, Complex.natCast_re, ZMod.card, Fintype.card_fin]72    apply le_of_eq73    field_simp74  have hv₁ (ax : outputs × inputs) : (2 * (K : ℝ) ^ 2 * N) *75      ((T₁ ax).toLinearMap * (T₁ ax).toLinearMap).trace ℝ (Sample (ZMod K) (Fin N) (Fin N)) ≤ 1 := by76    dsimp only [T₁]77    rw [quadraticOperator_trace_square _ _ (hiunit ax.2.val ax.2.property),78      ← AdjointPurity.hsLength_sq_of_isHermitian _ (observableMatrix_isHermitian ax.1.val), hhs ax.1]79    simp only [one_pow, ZMod.card, Fintype.card_fin]80    apply le_of_eq81    field_simp82  have hc₀ : (Fintype.card inputs : ℝ) ≤ (9 : ℝ) ^ (2 * N) := by83    simp only [Fintype.card_coe]84    exact_mod_cast (by simpa only [Fintype.card_fin] using hicard)85  have hc₁ : (Fintype.card (outputs × inputs) : ℝ) ≤86      (5 : ℝ) ^ (K ^ 2) * (9 : ℝ) ^ (2 * N) := by87    simp only [Fintype.card_prod, Fintype.card_coe, Nat.cast_mul]88    apply mul_le_mul89    · exact_mod_cast (by simpa only [ZMod.card] using hocard)90    · exact_mod_cast (by simpa only [Fintype.card_fin] using hicard)91    · positivity92    · positivity93  obtain ⟨z, hz₀, hz₁⟩ := GaussianCertificates.exists_isometry_and_observable_tests K N hK hN94    T₀ T₁95    (fun x => quadraticOperator_symmetric _ Matrix.isHermitian_one x.val)96    (fun ax => quadraticOperator_symmetric _ (observableMatrix_isHermitian ax.1.val) ax.2.val)97    hn₀ hn₁ hv₀ hv₁ hc₀ hc₁98  let G := sampleMatrix (ZMod K) (Fin N) (Fin N) z99  have hgram : ∀ x ∈ inputs, |quadratic (gram G) x - 1| ≤ 1 / 4 := by100    intro x hx101    have h := (hz₀ ⟨x, hx⟩).le102    dsimp only [T₀] at h103    rw [quadraticOperator_one_quadratic, quadraticOperator_trace _ _ (hiunit x hx)] at h104    simpa only [Matrix.trace_one, Complex.natCast_re, ZMod.card, div_self (ne_of_gt hKr), G] using h105  have hraw : ∀ a ∈ outputs, ∀ x ∈ inputs,106      |quadratic (rawAdjoint G (observableMatrix a)) x| ≤ 64 / (K : ℝ) := by107    intro a ha x hx108    have h := (hz₁ (⟨a, ha⟩, ⟨x, hx⟩)).le109    dsimp only [T₁] at h110    rw [quadraticOperator_quadratic, quadraticOperator_trace _ _ (hiunit x hx)] at h111    simpa only [observableMatrix_trace_zero, Complex.zero_re, zero_div, sub_zero, G] using h112  obtain ⟨T, hT⟩ := channel_certificate_of_tests G inputs outputs hiunit hinet honet113    (64 / (K : ℝ)) (by positivity) hgram hraw114  refine ⟨T, fun A hA htr => ?_⟩115  convert hT A hA htr using 1; ring116117end Nonadditivity.GaussianConstruction