Exact Lean source
Nonadditivity.GaussianConstruction
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
2 project constants, including generated, internal and private declarations.
2 declarations
Nonadditivity.GaussianConstruction.exists_channelNonadditivity.GaussianConstruction.exists_channel._proof_1_1internal/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.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 GaussianRectangular24GaussianNormalization 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 := by34classical35have hKnat : 0 < K := by omega36have hNnat : 0 < N := lt_of_lt_of_le (pow_pos hKnat _) hN37have hKr : (0 : ℝ) < K := by exact_mod_cast hKnat38have hNr : (0 : ℝ) < N := by exact_mod_cast hNnat39letI : NeZero N := ⟨ne_of_gt hNnat⟩40obtain ⟨inputs, hiunit, hinet, hicard⟩ := QuadraticNet.exists_complex_input_net (Fin N)41obtain ⟨outputs, hounit, honet, hocard⟩ := QuadraticNet.exists_observable_net (ZMod K)42let T₀ : inputs → Sample (ZMod K) (Fin N) (Fin N) →L[ℝ]43Sample (ZMod K) (Fin N) (Fin N) :=44fun x => quadraticOperator (Env := Fin N) (1 : Matrix (ZMod K) (ZMod K) ℂ) x.val45let T₁ : (outputs × inputs) → Sample (ZMod K) (Fin N) (Fin N) →L[ℝ]46Sample (ZMod K) (Fin N) (Fin N) :=47fun ax => quadraticOperator (Env := Fin N) (observableMatrix ax.1.val) ax.2.val48have hhs (a : outputs) : AdjointPurity.hsLength (observableMatrix a.val) = 1 := by49rw [← observable_norm_eq_hsLength]50exact hounit a.val a.property51have hop (a : outputs) : ‖observableMatrix a.val‖ ≤ 1 := by52exact (InitialNetReduction.norm_le_hsLength _ (observableMatrix_isHermitian a.val)).trans_eq (hhs a)53have hn₀ (x : inputs) : (2 * (K : ℝ) * N) * ‖T₀ x‖ ≤ 1 := by54have h := quadraticOperator_norm_le (Env := Fin N)55(1 : Matrix (ZMod K) (ZMod K) ℂ) x.val (hiunit x.val x.property)56simp only [norm_one, ZMod.card, Fintype.card_fin] at h57simpa only [T₀, mul_comm] using58(le_div_iff₀ (show (0 : ℝ) < 2 * K * N by positivity)).mp h59have hn₁ (ax : outputs × inputs) : (2 * (K : ℝ) * N) * ‖T₁ ax‖ ≤ 1 := by60have h := quadraticOperator_norm_le (Env := Fin N)61(observableMatrix ax.1.val) ax.2.val (hiunit ax.2.val ax.2.property)62have hbase : ‖T₁ ax‖ ≤ ‖observableMatrix ax.1.val‖ / (2 * (K : ℝ) * N) := by63simpa only [T₁, ZMod.card, Fintype.card_fin] using h64have h' : ‖T₁ ax‖ ≤ 1 / (2 * (K : ℝ) * N) :=65hbase.trans (div_le_div_of_nonneg_right (hop ax.1) (by positivity))66simpa only [mul_comm] using (le_div_iff₀ (show (0 : ℝ) < 2 * K * N by positivity)).mp h'67have hv₀ (x : inputs) : (2 * (K : ℝ) * N) *68((T₀ x).toLinearMap * (T₀ x).toLinearMap).trace ℝ (Sample (ZMod K) (Fin N) (Fin N)) ≤ 1 := by69dsimp only [T₀]70rw [quadraticOperator_trace_square _ _ (hiunit x.val x.property)]71simp only [Matrix.one_mul, Matrix.trace_one, Complex.natCast_re, ZMod.card, Fintype.card_fin]72apply le_of_eq73field_simp74have hv₁ (ax : outputs × inputs) : (2 * (K : ℝ) ^ 2 * N) *75((T₁ ax).toLinearMap * (T₁ ax).toLinearMap).trace ℝ (Sample (ZMod K) (Fin N) (Fin N)) ≤ 1 := by76dsimp only [T₁]77rw [quadraticOperator_trace_square _ _ (hiunit ax.2.val ax.2.property),78← AdjointPurity.hsLength_sq_of_isHermitian _ (observableMatrix_isHermitian ax.1.val), hhs ax.1]79simp only [one_pow, ZMod.card, Fintype.card_fin]80apply le_of_eq81field_simp82have hc₀ : (Fintype.card inputs : ℝ) ≤ (9 : ℝ) ^ (2 * N) := by83simp only [Fintype.card_coe]84exact_mod_cast (by simpa only [Fintype.card_fin] using hicard)85have hc₁ : (Fintype.card (outputs × inputs) : ℝ) ≤86(5 : ℝ) ^ (K ^ 2) * (9 : ℝ) ^ (2 * N) := by87simp only [Fintype.card_prod, Fintype.card_coe, Nat.cast_mul]88apply 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· positivity93obtain ⟨z, hz₀, hz₁⟩ := GaussianCertificates.exists_isometry_and_observable_tests K N hK hN94T₀ T₁95(fun x => quadraticOperator_symmetric _ Matrix.isHermitian_one x.val)96(fun ax => quadraticOperator_symmetric _ (observableMatrix_isHermitian ax.1.val) ax.2.val)97hn₀ hn₁ hv₀ hv₁ hc₀ hc₁98let G := sampleMatrix (ZMod K) (Fin N) (Fin N) z99have hgram : ∀ x ∈ inputs, |quadratic (gram G) x - 1| ≤ 1 / 4 := by100intro x hx101have h := (hz₀ ⟨x, hx⟩).le102dsimp only [T₀] at h103rw [quadraticOperator_one_quadratic, quadraticOperator_trace _ _ (hiunit x hx)] at h104simpa only [Matrix.trace_one, Complex.natCast_re, ZMod.card, div_self (ne_of_gt hKr), G] using h105have hraw : ∀ a ∈ outputs, ∀ x ∈ inputs,106|quadratic (rawAdjoint G (observableMatrix a)) x| ≤ 64 / (K : ℝ) := by107intro a ha x hx108have h := (hz₁ (⟨a, ha⟩, ⟨x, hx⟩)).le109dsimp only [T₁] at h110rw [quadraticOperator_quadratic, quadraticOperator_trace _ _ (hiunit x hx)] at h111simpa only [observableMatrix_trace_zero, Complex.zero_re, zero_div, sub_zero, G] using h112obtain ⟨T, hT⟩ := channel_certificate_of_tests G inputs outputs hiunit hinet honet113(64 / (K : ℝ)) (by positivity) hgram hraw114refine ⟨T, fun A hA htr => ?_⟩115convert hT A hA htr using 1; ring116117end Nonadditivity.GaussianConstruction