block i j t :=L (τ.block i j t)
positive i j t := hpos _ (τ.positive i j t)
measurable i j :=L.continuous_of_finiteDimensional.measurable.comp (τ.measurable i j)
integrable i j :=by simpa only [htr] using τ.integrable i j
normalized :=by simpa only [htr] using τ.normalized
havehm : Measurable (fun t =>L (σ t)) :=L.continuous_of_finiteDimensional.measurable.comp hσ
havehi : Integrable (fun t => (trace (L (σ t))).re) μ :=by simpa only [htr] using hσi
have hc (a : Bool) :
(∫ t, traceNorm (L (τ.block a a t) - (1/2 : ℝ) • L (σ t)) ∂μ) ≤∫ t, traceNorm (τ.block a a t - (1/2 : ℝ) • σ t) ∂μ :=byhave hleft := traceNorm_sub_integrable
(L.continuous_of_finiteDimensional.measurable.comp (τ.measurable a a))
(showMeasurable (fun t => (1/2 : ℝ) • L (σ t)) from hm.const_smul (1/2 : ℝ)) (fun t => hpos _ (τ.positive a a t))
(fun t => (hpos _ (hσp t)).smul (show (0:ℝ)≤1/2by norm_num))
(showIntegrable (fun t => (trace (L (τ.block a a t))).re) μ by simpa only [htr] using τ.integrable a a)
(by simpa only [Matrix.trace_smul,Complex.smul_re,smul_eq_mul] using hi.const_mul (1/2))
have hright := traceNorm_sub_integrable (τ.measurable a a) (showMeasurable (fun t => (1/2 : ℝ) • σ t) from hσ.const_smul (1/2 : ℝ))
(τ.positive a a) (fun t => (hσp t).smul (show (0:ℝ)≤1/2by norm_num))
(τ.integrable a a)
(by simpa only [Matrix.trace_smul,Complex.smul_re,smul_eq_mul] using hσi.const_mul (1/2))
apply integral_mono hleft hright
intro t
change traceNorm (L (τ.block a a t) - (1/2 : ℝ) • L (σ t)) ≤ _
rw [←L.map_smul_of_tower (1/2 : ℝ) (σ t)]
exact traceNorm_channel_sub L hpos htr (τ.positive a a t)
((hσp t).smul (show (0:ℝ)≤1/2by norm_num))
have hf := hc falsehave ht := hc true
unfold BitDensity.idealBitError BitDensity.mass
simp only [BitDensity.mapReference,htr]
linarith
lemmapurifiedDensity_recovery (ν : Measure (ℕ→M)) [SigmaFinite ν]
(hμν : d.transcriptLaw ≪ ν)
(L : Matrix κ κ ℂ→ₗ[ℂ] Matrix (ι × η) (ι × η) ℂ)
(he : ∀ i j S, L ((p.purifiedOutput P i j).value S) = (p.canonicalOutput R i j).value S)
(i j : Bool) :
(p.outputDensity R hR ν hμν).block i j =ᵐ[ν]
fun t =>L ((p.purifiedDensity R hR P hP ν hμν).block i j t) :=by
proof · 9
lines
have hAC (S : Set (ℕ→M)) (hS : MeasurableSetS) (hz : ν S = 0) :
(p.purifiedOutput P i j).value S = 0:= p.purifiedOutput_ac P i j S hS (hμν hz)
letLC:=L.toContinuousLinearMap
apply (p.canonicalOutput R i j).positiveDensity_eq_ae ν
(LC.integrable_comp ((p.purifiedOutput P i j).positiveDensity_integrable ν hAC))
intro S hS
rw [LC.integral_comp_comm ((p.purifiedOutput P i j).positiveDensity_integrable ν hAC).integrableOn,
(p.purifiedOutput P i j).positiveDensity_integral ν hAC S hS]
exact (he i j S).symm
lemmacanonicalOutput_ac (R : Matrix (ι × η) (ι × η) ℂ) (i j : K)
(S : Set (ℕ→M)) (hS : MeasurableSetS) (hz : d.transcriptLaw S = 0) :
(p.canonicalOutput R i j).value S = 0:=by
proof · 3
lines
havehp : d.probeLaw (d.sampler.publicRecord ⁻¹' S) = 0:=by
simpa only [Discussion.transcriptLaw,Measure.map_apply d.sampler.measurable_publicRecord hS] using hz
rw [p.canonicalOutput_event R i j S hS,Measure.restrict_eq_zero.mpr hp,integral_zero_measure]
lemmafirstBit_outputDensity (R : Matrix (ι × η) (ι × η) ℂ) (hR : DensityR)
(ν : Measure (ℕ→M)) [SigmaFinite ν] (hμν : d.transcriptLaw ≪ ν) (i j : Bool) :
(p.firstBit.outputDensity R hR ν hμν).block i j =ᵐ[ν]
fun t =>∑a : Λ, ∑b : Λ, p.outputDensity R ν (i,a) (j,b) t :=by
proof · 15
lines
have hAC (a b : Bool× Λ) (S : Set (ℕ→M)) (hS : MeasurableSetS) (hz : ν S = 0) :
(p.canonicalOutput R a b).value S = 0:= p.canonicalOutput_ac R a b S hS (hμν hz)
have hi (a b : Bool× Λ) : Integrable (p.outputDensity R ν a b) ν :=
(p.canonicalOutput R a b).positiveDensity_integrable ν (hAC a b)
apply (p.firstBit.canonicalOutput R i j).positiveDensity_eq_ae ν
(integrable_finsetSum _ (fun a _ => integrable_finsetSum _ (fun b _ => hi (i,a) (j,b))))
intro S hS
rw [p.firstBit_output_event R i j S hS]
rw [integral_finsetSum _ (fun a _ => integrable_finsetSum _ (fun b _ => (hi (i,a) (j,b)).integrableOn))]
apply Finset.sum_congr rfl
intro a _
rw [integral_finsetSum _ (fun b _ => (hi (i,a) (j,b)).integrableOn)]
apply Finset.sum_congr rfl
intro b _
exact ((p.canonicalOutput R (i,a) (j,b)).positiveDensity_integral ν (hAC (i,a) (j,b)) S hS).symm
let ν := d.transcriptLaw + sigma.traceMeasure
havehμν : d.transcriptLaw ≪ ν :=Measure.AbsolutelyContinuous.rfl.add_right _
havehsν : sigma.traceMeasure ≪ ν :=Measure.AbsolutelyContinuous.rfl.add_right' _
have hsAC (S : Set (ℕ→M)) (hS : MeasurableSetS) (hz : ν S = 0) :
sigma.value S = 0:= sigma.value_zero_of_traceMeasure_zero S hS (hsν hz)
have hAC (a b : Bool× Λ) (S : Set (ℕ→M)) (hS : MeasurableSetS) (hz : ν S = 0) :
(p.canonicalOutput R a b).value S = 0:= p.canonicalOutput_ac R a b S hS (hμν hz)
have h := cqFirstBit_ideal_le (p.outputDensity R ν)
(fun a b => (p.canonicalOutput R a b).measurable_positiveDensity ν)
(fun a b => (p.canonicalOutput R a b).positiveDensity_pos ν)
(fun a b => (p.canonicalOutput R a b).integrable_positiveDensity_trace ν (hAC a b))
(sigma.positiveDensity ν) (sigma.measurable_positiveDensity ν)
(sigma.positiveDensity_pos ν) (sigma.integrable_positiveDensity_trace ν hsAC)
apply le_trans (le_of_eq ?_) h
change (p.firstBit.outputDensity R hR ν hμν).idealBitError (sigma.positiveDensity ν) = _
rw [BitDensity.idealBitError_eq_cq]
unfold cqBitError
apply Finset.sum_congr rfl
intro i _
apply Finset.sum_congr rfl
intro j _
apply integral_congr_ae
filter_upwards [p.firstBit_outputDensity R hR ν hμν i j] with t ht
rw [ht]
rfl
let ν := d.transcriptLaw + sigma.traceMeasure
cqDistance (p.purifiedOutputDensity P ν)
(fun a b t => idealFiniteBlocks (sigma.positiveDensity ν t) a b) ν
lemmafirstBit_purifiedOutputDensity (R : Matrix (ι × η) (ι × η) ℂ) (hR : DensityR)
(P : Matrix (ι × η) κ ℂ) (hP : P * Pᴴ = R)
(ν : Measure (ℕ→M)) [SigmaFinite ν] (hμν : d.transcriptLaw ≪ ν) (i j : Bool) :
(p.firstBit.purifiedDensity R hR P hP ν hμν).block i j =ᵐ[ν]
fun t =>∑a : Λ, ∑b : Λ, p.purifiedOutputDensity P ν (i,a) (j,b) t :=by
proof · 15
lines
have hAC (a b : Bool× Λ) (S : Set (ℕ→M)) (hS : MeasurableSetS) (hz : ν S = 0) :
(p.purifiedOutput P a b).value S = 0:= p.purifiedOutput_ac P a b S hS (hμν hz)
have hi (a b : Bool× Λ) : Integrable (p.purifiedOutputDensity P ν a b) ν :=
(p.purifiedOutput P a b).positiveDensity_integrable ν (hAC a b)
apply (p.firstBit.purifiedOutput P i j).positiveDensity_eq_ae ν
(integrable_finsetSum _ (fun a _ => integrable_finsetSum _ (fun b _ => hi (i,a) (j,b))))
intro S hS
rw [p.firstBit_purifiedOutput_event P i j S hS]
rw [integral_finsetSum _ (fun a _ => integrable_finsetSum _ (fun b _ => (hi (i,a) (j,b)).integrableOn))]
apply Finset.sum_congr rfl
intro a _
rw [integral_finsetSum _ (fun b _ => (hi (i,a) (j,b)).integrableOn)]
apply Finset.sum_congr rfl
intro b _
exact ((p.purifiedOutput P (i,a) (j,b)).positiveDensity_integral ν (hAC (i,a) (j,b)) S hS).symm
theoremfirstBit_purified_error_le (R : Matrix (ι × η) (ι × η) ℂ) (hR : DensityR)
(P : Matrix (ι × η) κ ℂ) (hP : P * Pᴴ = R)
(sigma : PositiveMatrixMeasure (ℕ→M) κ) :
p.firstBit.purifiedSecretBitError R hR P hP sigma ≤ p.purifiedSecretKeyError P sigma :=by
proof · 25
lines
let ν := d.transcriptLaw + sigma.traceMeasure
havehμν : d.transcriptLaw ≪ ν :=Measure.AbsolutelyContinuous.rfl.add_right _
havehsν : sigma.traceMeasure ≪ ν :=Measure.AbsolutelyContinuous.rfl.add_right' _
have hsAC (S : Set (ℕ→M)) (hS : MeasurableSetS) (hz : ν S = 0) :
sigma.value S = 0:= sigma.value_zero_of_traceMeasure_zero S hS (hsν hz)
have hAC (a b : Bool× Λ) (S : Set (ℕ→M)) (hS : MeasurableSetS) (hz : ν S = 0) :
(p.purifiedOutput P a b).value S = 0:= p.purifiedOutput_ac P a b S hS (hμν hz)
have h := cqFirstBit_ideal_le (p.purifiedOutputDensity P ν)
(fun a b => (p.purifiedOutput P a b).measurable_positiveDensity ν)
(fun a b => (p.purifiedOutput P a b).positiveDensity_pos ν)
(fun a b => (p.purifiedOutput P a b).integrable_positiveDensity_trace ν (hAC a b))
(sigma.positiveDensity ν) (sigma.measurable_positiveDensity ν)
(sigma.positiveDensity_pos ν) (sigma.integrable_positiveDensity_trace ν hsAC)
apply le_trans (le_of_eq ?_) h
change (p.firstBit.purifiedDensity R hR P hP ν hμν).idealBitError (sigma.positiveDensity ν) = _
rw [BitDensity.idealBitError_eq_cq]
unfold cqBitError
apply Finset.sum_congr rfl
intro i _
apply Finset.sum_congr rfl
intro j _
apply integral_congr_ae
filter_upwards [p.firstBit_purifiedOutputDensity R hR P hP ν hμν i j] with t ht
rw [ht]
rfl
cqDistance_triangle τ.block υ.block (fun a b t => idealFiniteBlocks (sigma.block t) a b)
τ.measurable υ.measurable (idealFinite_measurable sigma.block sigma.measurable)
τ.positive υ.positive (fun a b t => idealFinite_positive (sigma.block t) (sigma.positive t) a b)
τ.integrable υ.integrable (idealFinite_trace_integrable sigma.block sigma.integrable)
theoremBitProtocol.uniform_gap_purification_dominated
{a b : ℕ} [Nonempty (Fin a)] [Nonempty (Fin b)]
(p : BitProtocol (ι :=Fin a) (η :=Fin b) d ABTATBCACB)
(R : Matrix (Fin a ×Fin b) (Fin a ×Fin b) ℂ) (hR : InClassR)
(P : Matrix (Fin a ×Fin b) κ ℂ) (hP : P * Pᴴ = R)
(ν : Measure (ℕ→M)) [SigmaFinite ν] (hμν : d.transcriptLaw ≪ ν)
(sigma : EveDensity ν κ) :
1/5≤ (p.purifiedDensity R hR.1P hP ν hμν).idealBitError sigma.block :=by
proof · 16
lines
obtain ⟨L,hpos,htr,hrec⟩ := p.purifiedOutput_recovery R hR.1P hP
let tp := p.purifiedDensity R hR.1P hP ν hμν
let tc := p.outputDensity R hR.1 ν hμν
have hg := p.uniform_gap_dominated R hR ν hμν
(fun t =>L (sigma.block t)) (L.continuous_of_finiteDimensional.measurable.comp sigma.measurable)
(fun t => hpos _ (sigma.positive t))
(showIntegrable (fun t => (trace (L (sigma.block t))).re) ν by simpa only [htr] using sigma.integrable)
(show (∫ t, (trace (L (sigma.block t))).re ∂ν) = 1by simpa only [htr] using sigma.normalized)
have hrc :=BitDensity.idealBitError_congr tc (tp.mapReference L hpos htr)
(fun t =>L (sigma.block t)) (fun t =>L (sigma.block t))
(p.purifiedDensity_recovery R hR.1P hP ν hμν L hrec) Filter.EventuallyEq.rfl
have hc := tp.idealBitError_mapReference_le L hpos htr sigma.block
sigma.measurable sigma.positive sigma.integrable
change 1/5≤ tp.idealBitError sigma.block
rw [hrc] at hg
exact hg.trans hc
theoremFiniteProtocol.uniform_purified_key_gap_dominated
{a b : ℕ} [Nonempty (Fin a)] [Nonempty (Fin b)]
(p : FiniteProtocol (ι :=Fin a) (η :=Fin b) (K:=Bool× Λ) d ABTATBCACB)
(R : Matrix (Fin a ×Fin b) (Fin a ×Fin b) ℂ) (hR : InClassR)
(P : Matrix (Fin a ×Fin b) κ ℂ) (hP : P * Pᴴ = R)
(ν : Measure (ℕ→M)) [SigmaFinite ν] (hμν : d.transcriptLaw ≪ ν)
(sigma : EveDensity ν κ) :
1/5≤ (p.purifiedKeyDensity R hR.1P hP ν hμν).idealError sigma :=by
proof · 18
lines
let τ := p.purifiedKeyDensity R hR.1P hP ν hμν
have hc := cqFirstBit_ideal_le τ.block τ.measurable τ.positive τ.integrable
sigma.block sigma.measurable sigma.positive sigma.integrable
havehe : (p.firstBit.purifiedDensity R hR.1P hP ν hμν).idealBitError sigma.block =
cqBitError (fun i j t => firstBitBlocks (fun a b => τ.block a b t) i j) sigma.block ν :=by
rw [BitDensity.idealBitError_eq_cq]
unfold cqBitError
apply Finset.sum_congr rfl
intro i _
apply Finset.sum_congr rfl
intro j _
apply integral_congr_ae
filter_upwards [p.firstBit_purifiedOutputDensity R hR.1P hP ν hμν i j] with t ht
rw [ht]
rfl
have hg := p.firstBit.uniform_gap_purification_dominated R hR P hP ν hμν sigma
rw [he] at hg
exact hg.trans hc