theoremembedLinear_orthonormal (b : HilbertBasis (I ⊕ J) ℂE) :
Orthonormalℂ (embedLinear b ∘ (EuclideanSpace.basisFun Iℂ).toBasis) :=by
proof · 5
lines
havehe : embedLinear b ∘ (EuclideanSpace.basisFun Iℂ).toBasis = (fun i => b (Sum.inl i)) :=by
funext i
exact embedLinear_basis b i
rw [he]
exact b.orthonormal.comp Sum.inl Sum.inl_injective
theorembasisMoment_smul_coeff (b : HilbertBasisIℂE) (w : I→ℝ≥0∞) (z : ℂ) (x : E) :
basisMoment b w (z • x) = ENNReal.ofReal (‖z‖^2)*basisMoment b w x :=by
proof · 6
lines
simp only [basisMoment, inner_smul_right, norm_mul, mul_pow,
ENNReal.ofReal_mul (sq_nonneg _)]
rw [←ENNReal.tsum_mul_left]
congr 1
funext i
exact mul_left_comm _ _ _
defmomentDomain (b : HilbertBasisIℂE) (w : I→ℝ≥0∞) : SubmoduleℂEwhere
body · 11
lines
carrier := {x | basisMoment b w x < ⊤}
zero_mem' :=by simp [basisMoment]
add_mem' :=by
intro x y hx hy
exact (basisMoment_add_le b w x y).trans_lt (ENNReal.add_lt_top.mpr
⟨ENNReal.mul_lt_top (by norm_num) hx, ENNReal.mul_lt_top (by norm_num) hy⟩)
smul_mem' :=by
intro z x hx
change basisMoment b w (z • x) < ⊤
rw [basisMoment_smul_coeff]
exact ENNReal.mul_lt_top ENNReal.ofReal_lt_top hx
theorembasisExpectation_diagonal (b : HilbertBasisIℂE) (w : I→ℝ≥0∞)
(c : HilbertBasisJℂE) (p : J→ℝ) (hp : ∀ j, 0≤ p j) (hs : Summable p) :
basisExpectation b w (TraceEnsemble.operator (TraceEnsemble.diagonalVector c p)) =
∑' j, ENNReal.ofReal (p j)*basisMoment b w (c j) :=by
proof · 6
lines
rw [basisExpectation_ensemble b w (by simpa only [TraceEnsemble.diagonalVector_norm_sq c p hp] using hs)]
congr 1
funext j
rw [TraceEnsemble.diagonalVector, basisMoment_smul_coeff]
simp only [Complex.norm_real, Real.norm_eq_abs, abs_of_nonneg (Real.sqrt_nonneg _),
Real.sq_sqrt (hp _)]
theoremeigenvector_moment_finite (b : HilbertBasisIℂE) (w : I→ℝ≥0∞)
(c : HilbertBasisJℂE) (p : J→ℝ) (hp : ∀ j, 0 < p j) (hs : Summable p)
(hm : basisExpectation b w (TraceEnsemble.operator (TraceEnsemble.diagonalVector c p)) < ⊤)
(j : J) : basisMoment b w (c j) < ⊤ :=by
proof · 6
lines
rw [basisExpectation_diagonal b w c p (fun j => (hp j).le) hs] at hm
have hj := (ENNReal.le_tsum j).trans_lt hm
by_contra hn
havehe : basisMoment b w (c j) = ⊤ := top_le_iff.mp (not_lt.mp hn)
rw [he] at hj
simp [ENNReal.ofReal_pos.mpr (hp j) |>.ne'] at hj
rw [summable_prod_of_nonneg (fun _ => sq_nonneg _)]
exact ⟨fun i => (basis_hasSum_norm_sq b (v i)).summable,
by simpa only [(basis_hasSum_norm_sq b _).tsum_eq] using hv⟩
theoremhasSum_expectation_basis (b : HilbertBasisJℂE) {v : I→E}
(hv : Summable (fun i => ‖v i‖^2)) (Z : E→L[ℂ] E) :
HasSum (fun j => inner ℂ (b j) (Z (operator v (b j)))) (expectation v Z) :=by
proof · 15
lines
have hd := summable_trace_pair b hv Zhave hrow (i : I) : HasSum (fun j => inner ℂ (v i) (b j)*inner ℂ (b j) (Z (v i)))
(inner ℂ (v i) (Z (v i))) := b.hasSum_inner_mul_inner (v i) (Z (v i))
have hcol (j : J) : HasSum (fun i => inner ℂ (v i) (b j)*inner ℂ (b j) (Z (v i)))
(inner ℂ (b j) (Z (operator v (b j)))) :=byhave hh := (((ContinuousLinearMap.apply ℂE (b j)).hasSum (hasSum_rankOne hv)).mapL Z).mapL
(innerSL ℂ (b j))
simpa only [ContinuousLinearMap.apply_apply, InnerProductSpace.rankOne_apply,
map_smul, innerSL_apply_apply, inner_smul_right, smul_eq_mul] using hh
havehe : (∑' ij : I×J, inner ℂ (v ij.1) (b ij.2)*inner ℂ (b ij.2) (Z (v ij.1))) =
expectation v Z:=by
rw [hd.tsum_prod]
simp only [(hrow _).tsum_eq, expectation]
rw [← he]
exact ((Equiv.prodComm JI).hasSum_iff.2 hd.hasSum).prod_fiberwise hcol
theoremexpectation_smul {n : ℕ} (ρ : State n) (a : ℂ) (Z : Fock n →L[ℂ] Fock n) :
expectation ρ (a • Z) = a*expectation ρ Z:=by
proof · 3
lines
exact (hasSum_expectation_basis (channelNumberBasis n) ρ (a • Z)).unique (by
simpa only [smul_apply, inner_smul_right] using
(hasSum_expectation_basis (channelNumberBasis n) ρ Z).mul_left a)
defspectralState {n : ℕ} {J : Type*} (b : HilbertBasisJℂ (Fock n))
(p : J→ℝ) (hp : ∀ j, 0≤ p j) (hs : HasSum p 1) : State n where
body · 6
lines
op :=TraceEnsemble.operator (diagonalVector b p)
positive :=TraceEnsemble.positive (by simpa only [diagonalVector_norm_sq b p hp] using hs.summable)
trace_one :=by
simpa only [numberBasis_apply, entry] usingTraceEnsemble.trace
(by simpa only [diagonalVector_norm_sq b p hp] usinghs :
HasSum (fun j => ‖diagonalVector b p j‖^2) 1) (numberBasis n)
defblockState {n : ℕ} {IJ : Type*} [FintypeI] [DecidableEqI]
(b : HilbertBasis (I ⊕ J) ℂ (Fock n)) (p : I ⊕ J→ℝ)
(hp : ∀ j, 0 < p j) (hs : HasSum p 1) (M : MatrixIIℂ) (hM : M.IsHermitian) : State n :=
body · 2
lines
spectralState (FiniteBlock.basis b hM.eigenvectorBasis) (FiniteBlock.weights p M hM)
(fun j => (FiniteBlock.weights_pos p hp hs M hM j).le) (FiniteBlock.weights_hasSum p hp hs M hM)
theorembasis_domain (a : HilbertBasisKℂE) (w : K→ℝ≥0∞)
(b : HilbertBasis (I ⊕ J) ℂE) (p : I ⊕ J→ℝ) (hp : ∀ j, 0 < p j)
(hs : HasSum p 1)
(hm : basisExpectation a w (TraceEnsemble.operator (TraceEnsemble.diagonalVector b p)) < ⊤)
(c : OrthonormalBasisIℂ (EuclideanSpaceℂI)) (j : I ⊕ J) :
basisMoment a w (basis b c j) < ⊤ :=by
proof · 8
lines
have hv (j : I ⊕ J) : b j ∈ momentDomain a w :=
eigenvector_moment_finite a w b p hp hs.summable hm j
change basis b c j ∈ momentDomain a w
cases j with
| inr j => simpa only [basis_inr] using hv (Sum.inr j)
| inl i =>
rw [basis_inl, embed_apply]
exact Submodule.sum_mem _ (fun j _ =>Submodule.smul_mem _ _ (hv (Sum.inl j)))
theoremtilted_moment_finite (a : HilbertBasisKℂE) (w : K→ℝ≥0∞)
(b : HilbertBasis (I ⊕ J) ℂE) (p : I ⊕ J→ℝ) (hp : ∀ j, 0 < p j)
(hs : HasSum p 1)
(hm : basisExpectation a w (TraceEnsemble.operator (TraceEnsemble.diagonalVector b p)) < ⊤)
(M : MatrixIIℂ) (hM : M.IsHermitian) :
basisExpectation a w (TraceEnsemble.operator
(TraceEnsemble.diagonalVector (basis b hM.eigenvectorBasis) (weights p M hM))) < ⊤ :=by
proof · 30
lines
rw [basisExpectation_diagonal a w _ _ (fun j => (weights_pos p hp hs M hM j).le)
(weights_hasSum p hp hs M hM).summable]
letP:= (ENNReal.ofReal (partition p M hM))⁻¹havehP : P < ⊤ :=by
exact ENNReal.inv_lt_top.mpr (ENNReal.ofReal_pos.mpr (partition_pos p hp hs M hM))
havehtail : (∑' j, ENNReal.ofReal (p (Sum.inr j))*basisMoment a w (b (Sum.inr j))) < ⊤ :=by
rw [basisExpectation_diagonal a w b p (fun j => (hp j).le) hs.summable] at hm
exact (ENNReal.tsum_comp_le_tsum_of_injective Sum.inr_injective _).trans_lt hm
havehh : HasSum (funj : I ⊕ J=>ENNReal.ofReal (weights p M hM j)*
basisMoment a w (basis b hM.eigenvectorBasis j))
((∑ i, ENNReal.ofReal (weights p M hM (Sum.inl i))*
basisMoment a w (basis b hM.eigenvectorBasis (Sum.inl i)))+
∑' j, ENNReal.ofReal (weights p M hM (Sum.inr j))*
basisMoment a w (basis b hM.eigenvectorBasis (Sum.inr j))) :=HasSum.sum (hasSum_fintype _) ENNReal.summable.hasSum
rw [hh.tsum_eq]
apply ENNReal.add_lt_top.mpr
constructor
· exact ENNReal.sum_lt_top.mpr (fun i _ =>ENNReal.mul_lt_top ENNReal.ofReal_lt_top
(basis_domain a w b p hp hs hm hM.eigenvectorBasis (Sum.inl i)))
· have he (j : J) : ENNReal.ofReal (weights p M hM (Sum.inr j))*
basisMoment a w (basis b hM.eigenvectorBasis (Sum.inr j)) =
P*(ENNReal.ofReal (p (Sum.inr j))*basisMoment a w (b (Sum.inr j))) :=by
rw [basis_inr]
change ENNReal.ofReal (p (Sum.inr j)/partition p M hM)*_ = _
rw [ENNReal.ofReal_div_of_pos (partition_pos p hp hs M hM), div_eq_mul_inv]
dsimp only [P]
ac_rfl
simp only [he, ENNReal.tsum_mul_left]
exact ENNReal.mul_lt_top hP htail
theoremexpectation_block_eigen (σ : State n) (b : HilbertBasis (I ⊕ J) ℂ (Fock n))
(M : MatrixIIℂ) (hM : M.IsHermitian) :
(expectation σ (FiniteBlock.block b M)).re = ∑ i, hM.eigenvalues i*
(inner ℂ (FiniteBlock.basis b hM.eigenvectorBasis (Sum.inl i))
(σ.op (FiniteBlock.basis b hM.eigenvectorBasis (Sum.inl i)))).re :=by
proof · 19
lines
let a :=FiniteBlock.basis b hM.eigenvectorBasis
have hh := (hasSum_expectation_basis a σ (FiniteBlock.block b M)).mapL Complex.reCLM
have he (j : I ⊕ J) :
(inner ℂ (a j) (FiniteBlock.block b M (σ.op (a j)))).re =
Sum.elim (fun i => hM.eigenvalues i*(inner ℂ (a (Sum.inl i)) (σ.op (a (Sum.inl i)))).re)
(fun _ =>0) j :=by
erw [←FiniteBlock.block_symmetric b M hM (a j) (σ.op (a j))]
cases j with
| inl i =>
change (inner ℂ (FiniteBlock.block b M (FiniteBlock.basis b hM.eigenvectorBasis (Sum.inl i))) (σ.op (a (Sum.inl i)))).re = _
rw [FiniteBlock.block_eigen b M hM i, inner_smul_left]
simp [a]
| inr j => simp [a, FiniteBlock.block_tail]
havehz : HasSum (Sum.elim
(fun i => hM.eigenvalues i*(inner ℂ (a (Sum.inl i)) (σ.op (a (Sum.inl i)))).re)
(fun_ : J=> (0:ℝ)))
(∑ i, hM.eigenvalues i*(inner ℂ (a (Sum.inl i)) (σ.op (a (Sum.inl i)))).re) :=by
simpa only [Function.comp_def, Sum.elim_inl, add_zero] usingHasSum.sum (f :=Sum.elim (fun i => hM.eigenvalues i*(inner ℂ (a (Sum.inl i)) (σ.op (a (Sum.inl i)))).re) (fun_ : J=> (0:ℝ))) (hasSum_fintype _) (hasSum_zero : HasSum (fun_ : J=> (0:ℝ)) 0)
exact (by simpa only [Complex.reCLM_apply, he] usinghh : HasSum _ _).unique hz
theoremexpectation_block_matrix (σ : State n) (b : HilbertBasis (I ⊕ J) ℂ (Fock n))
(M : MatrixIIℂ) :
expectation σ (FiniteBlock.block b M) =
∑ i, ∑ j, M i j*inner ℂ (b (Sum.inl j)) (σ.op (b (Sum.inl i))) :=by
proof · 13
lines
have he (j : I ⊕ J) : inner ℂ (b j) (FiniteBlock.block b M (σ.op (b j))) =
Sum.elim (fun i =>∑ k, M i k*inner ℂ (b (Sum.inl k)) (σ.op (b (Sum.inl i))))
(fun _ =>0) j :=by
cases j with
| inl i => exact FiniteBlock.inner_block b M _ i
| inr j => exact FiniteBlock.inner_tail_block b M _ j
have hh := hasSum_expectation_basis b σ (FiniteBlock.block b M)
simp only [he] at hh
haveht : HasSum (Sum.elim
(fun i =>∑ k, M i k*inner ℂ (b (Sum.inl k)) (σ.op (b (Sum.inl i)))) (fun_ : J=> (0:ℂ)))
((∑ i, ∑ k, M i k*inner ℂ (b (Sum.inl k)) (σ.op (b (Sum.inl i))))+0) :=HasSum.sum (hasSum_fintype _) hasSum_zero
simpa only [add_zero] using hh.unique ht
theoremblockState_operator (ρ : State n) (b : HilbertBasis (I ⊕ J) ℂ (Fock n))
(p : I ⊕ J→ℝ) (hp : ∀ j, 0 < p j) (hs : HasSum p 1)
(he : ∀ j, ρ.op (b j) = (p j : ℂ) • b j) (M : MatrixIIℂ) (hM : M.IsHermitian) :
(blockState b p hp hs M hM).op = ((FiniteBlock.partition p MhM : ℂ)⁻¹) •
(ρ.op+FiniteBlock.block b (exp M)-FiniteBlock.block b (Matrix.diagonal (fun i => (p (Sum.inl i) : ℂ)))) :=by
proof · 24
lines
let a :=FiniteBlock.basis b hM.eigenvectorBasis
apply ContinuousLinearMap.ext_on (Submodule.dense_iff_topologicalClosure_eq_top.mpr a.dense_span)
rintro _ ⟨j,rfl⟩
change (spectralState a _ _ _).op (a j) = _
rw [spectralState_eigen]
simp only [smul_apply, sub_apply, add_apply]
cases j with
| inl i =>haveht : ρ.op (a (Sum.inl i)) =
FiniteBlock.block b (Matrix.diagonal (fun i => (p (Sum.inl i) : ℂ))) (a (Sum.inl i)) :=by
simpa only [a, FiniteBlock.basis_inl] usingFiniteBlock.reference_on_block b p ρ.op he (hM.eigenvectorBasis i)
rw [ht, add_sub_cancel_left]
rw [FiniteBlock.block_exp_eigen b M hM i, smul_smul]
congr 1
simp only [FiniteBlock.weights, Sum.elim_inl]
push_cast
ring
| inr j =>
simp only [a, FiniteBlock.basis_inr, he, FiniteBlock.block_tail, add_zero, sub_zero,
smul_smul, FiniteBlock.weights, Sum.elim_inr]
push_cast
congr 1
ring
theoremblock_relativeEntropy_lower (σ : State n) (hσ : FiniteEnergy σ)
(b : HilbertBasis (I ⊕ J) ℂ (Fock n)) (p : I ⊕ J→ℝ)
(hp : ∀ j, 0 < p j) (hs : HasSum p 1)
(hc : Summable (fun j => (-Real.log (p j))*(inner ℂ (b j) (σ.op (b j))).re))
(M : MatrixIIℂ) (hM : M.IsHermitian) :
(expectation σ (FiniteBlock.block b M)).re-
(expectation σ (FiniteBlock.block b (Matrix.diagonal (fun i => (Real.log (p (Sum.inl i)) : ℂ))))).re-
Real.log (FiniteBlock.partition p M hM) ≤ relativeEntropy b p σ :=by
proof · 8
lines
have ht := block_crossEntropy σ b p hp hs hc M hM
have hK := (entropy_le_crossEntropy (blockState b p hp hs M hM) σ hσ _ _
(FiniteBlock.weights_pos p hp hs M hM) (FiniteBlock.weights_hasSum p hp hs M hM)
(spectralState_eigen _ _ _ _) ht.summable).1
change entropy σ ≤∑' j, _ at hK
rw [ht.tsum_eq] at hK
dsimp only [relativeEntropy]
linarith
theoremblockState_finiteMoment (ρ : State n) {m : ℕ} (hm : FiniteMoment m ρ)
(b : HilbertBasis (I ⊕ J) ℂ (Fock n)) (p : I ⊕ J→ℝ)
(hp : ∀ j, 0 < p j) (hs : HasSum p 1)
(he : ∀ j, ρ.op (b j) = (p j : ℂ) • b j) (M : MatrixIIℂ) (hM : M.IsHermitian) :
FiniteMoment m (blockState b p hp hs M hM) :=by
proof · 8
lines
rw [finiteMoment_iff] at hm ⊢have ht :=FiniteBlock.tilted_moment_finite (numberBasis n)
(fun k => (1+(totalNumber k : ℝ≥0∞))^m) b p hp hs ?_ M hM
· simpa only [powerMoment, TensorLp.matrixMoment, basisExpectation,
numberBasis_apply, numberKet, blockState, spectralState] using ht
· rw [diagonalVector_operator b p (fun j => (hp j).le) hs.summable ρ.op he]
simpa only [powerMoment, TensorLp.matrixMoment, basisExpectation,
numberBasis_apply, numberKet] using hm
have h := hasSum_entropy_eigenvalues (numberBasis n) b ρ.positive
(trace_one_numberBasis ρ) p he (entropy_hasSum ρ hρ)
convert h.summable using1
funext j
rw [he, inner_smul_right, inner_self_eq_norm_sq_to_K, b.orthonormal.norm_eq_one]
simp [Real.negMulLog]
ring
theoremblockState_crossEntropy_finite (ρ : State n) (hρ : FiniteEnergy ρ)
(b : HilbertBasis (I ⊕ J) ℂ (Fock n)) (p : I ⊕ J→ℝ)
(hp : ∀ j, 0 < p j) (hs : HasSum p 1)
(he : ∀ j, ρ.op (b j) = (p j : ℂ) • b j) (M : MatrixIIℂ) (hM : M.IsHermitian) :
Summable (fun j => (-Real.log (p j))*
(inner ℂ (b j) ((blockState b p hp hs M hM).op (b j))).re) :=by
proof · 10
lines
have hc := (crossEntropy_self_summable ρ hρ b p he).comp_injective Sum.inr_injective
apply Summable.sum _ (hasSum_fintype _).summable
apply (hc.div_const (FiniteBlock.partition p M hM)).congr
intro j
dsimp only [Function.comp_def]
rw [blockState_operator ρ b p hp hs he M hM]
simp only [smul_apply, sub_apply, add_apply, FiniteBlock.block_tail, add_zero, sub_zero,
inner_smul_right, ←Complex.ofReal_inv, Complex.mul_re, Complex.ofReal_re,
Complex.ofReal_im, zero_mul, sub_zero]
ring
theoremblockState_relativeEntropy (ρ : State n) (hρ : FiniteEnergy ρ)
(b : HilbertBasis (I ⊕ J) ℂ (Fock n)) (p : I ⊕ J→ℝ)
(hp : ∀ j, 0 < p j) (hs : HasSum p 1)
(he : ∀ j, ρ.op (b j) = (p j : ℂ) • b j) (M : MatrixIIℂ) (hM : M.IsHermitian)
(hσ : FiniteEnergy (blockState b p hp hs M hM)) :
relativeEntropy b p (blockState b p hp hs M hM) =
(expectation (blockState b p hp hs M hM) (FiniteBlock.block b M)).re-
(expectation (blockState b p hp hs M hM)
(FiniteBlock.block b (Matrix.diagonal (fun i => (Real.log (p (Sum.inl i)) : ℂ))))).re-
Real.log (FiniteBlock.partition p M hM) :=by
proof · 9
lines
have hc := block_crossEntropy (blockState b p hp hs M hM) b p hp hs
(blockState_crossEntropy_finite ρ hρ b p hp hs he M hM) M hM
have hh := crossEntropy_self (blockState b p hp hs M hM) hσ
(FiniteBlock.basis b hM.eigenvectorBasis) (FiniteBlock.weights p M hM)
(spectralState_eigen _ _ _ _)
change (∑' j, _) = _ at hh
rw [hc.tsum_eq] at hh
dsimp only [relativeEntropy]
linarith
theoremblockState_block_entry (ρ : State n)
(b : HilbertBasis (I ⊕ J) ℂ (Fock n)) (p : I ⊕ J→ℝ)
(hp : ∀ j, 0 < p j) (hs : HasSum p 1)
(he : ∀ j, ρ.op (b j) = (p j : ℂ) • b j) (M : MatrixIIℂ) (hM : M.IsHermitian)
(i j : I) :
inner ℂ (b (Sum.inl i)) ((blockState b p hp hs M hM).op (b (Sum.inl j))) =
exp M i j/(FiniteBlock.partition p MhM : ℂ) :=by
proof · 6
lines
rw [blockState_operator ρ b p hp hs he M hM]
simp only [smul_apply, sub_apply, add_apply, inner_smul_right, inner_sub_right, inner_add_right,
he, inner_smul_right, FiniteBlock.inner_block]
simp [orthonormal_iff_ite.mp b.orthonormal, Matrix.diagonal_apply,
mul_ite, div_eq_mul_inv, mul_comm]
by_cases h : i = j <;> simp [h]
theoremblockState_block_expectation (ρ : State n)
(b : HilbertBasis (I ⊕ J) ℂ (Fock n)) (p : I ⊕ J→ℝ)
(hp : ∀ j, 0 < p j) (hs : HasSum p 1)
(he : ∀ j, ρ.op (b j) = (p j : ℂ) • b j) (M : MatrixIIℂ) (hM : M.IsHermitian)
(Z : MatrixIIℂ) :
expectation (blockState b p hp hs M hM) (FiniteBlock.block b Z) =
Matrix.trace (Z*exp M)/(FiniteBlock.partition p MhM : ℂ) :=by
proof · 3
lines
rw [expectation_block_matrix]
simp only [blockState_block_entry ρ b p hp hs he M hM, Matrix.trace, Matrix.diag,
Matrix.mul_apply, Finset.sum_div, mul_div_assoc]
theoremexp_sub_eq_integral (a b : A) :
exp b - exp a = ∫ s in (0 : ℝ)..1, exp ((1-s) • a) * (b-a) * exp (s • b) :=by
proof · 16
lines
have hd (s : ℝ) : HasDerivAt (funt : ℝ=> exp ((1-t) • a) * exp (t • b))
(exp ((1-s) • a) * (b-a) * exp (s • b)) s :=byhavehleft : HasDerivAt (funt : ℝ=> exp ((1-t) • a))
(-(exp ((1-s) • a) * a)) s :=by
simpa [Function.comp_def] using (hasDerivAt_exp_smul_const a (1-s)).scomp s
((hasDerivAt_const s (1 : ℝ)).sub (hasDerivAt_id s))
have hright := hasDerivAt_exp_smul_const' b s
haveheq : exp ((1-s) • a) * (b-a) * exp (s • b) =
-(exp ((1-s) • a) * a) * exp (s • b) +
exp ((1-s) • a) * (b * exp (s • b)) :=by noncomm_ring
rw [heq]
exact hleft.mul hright
havehc : Continuous (funs : ℝ=> exp ((1-s) • a) * (b-a) * exp (s • b)) :=by fun_prop
have h := intervalIntegral.integral_eq_sub_of_hasDerivAt (fun s _ => hd s)
(hc.intervalIntegrable 01)
simpa using h.symm
theoremhasDerivAt_exp_add_smul (a z : A) (t : ℝ) :
HasDerivAt (funu : ℝ=> exp (a+u • z))
(∫ s in (0 : ℝ)..1, exp ((1-s) • (a+t • z)) * z * exp (s • (a+t • z))) t :=by
proof · 6
lines
have hh := (hasDerivAt_exp_add_smul_zero (a+t • z) z).scomp_of_eq t
((hasDerivAt_id t).sub_const t) (by simp)
convert! hh using1
· funext u
simp [sub_smul]
· simp
theoremtrace_duhamel (τ : A→L[ℝ] ℝ) (hτ : ∀ x y, τ (x*y) = τ (y*x))
(a z : A) :
τ (∫ s in (0 : ℝ)..1, exp ((1-s) • a) * z * exp (s • a)) = τ (exp a * z) :=by
proof · 8
lines
havehc : Continuous (funs : ℝ=> exp ((1-s) • a) * z * exp (s • a)) :=by fun_prop
rw [← τ.intervalIntegral_comp_comm (hc.intervalIntegrable 01)]
have heq (s : ℝ) : τ (exp ((1-s) • a) * z * exp (s • a)) = τ (exp a * z) :=by
rw [hτ, ← mul_assoc, ← exp_add_of_commute
(((Commute.refl a).smul_left s).smul_right (1-s)), ← add_smul]
simp
simp_rw [heq]
simp
theoremmatrix_duhamel_integrand (v : I→ℝ) (Z : MatrixIIℂ)
(hZ : Z.IsHermitian) (s : ℝ) :
matrixReTrace (exp ((1-s) • Matrix.diagonal (fun i => (v i : ℂ))) * Z *
exp (s • Matrix.diagonal (fun i => (v i : ℂ))) * Z) =
∑ i, ∑ j, Real.exp ((1-s)*v i+s*v j) * Complex.normSq (Z i j) :=by
proof · 23
lines
rw [exp_real_diagonal, exp_real_diagonal, matrixReTrace_apply]
haveheq :
(Matrix.diagonal (fun i => (↑(Real.exp ((1-s)*v i)) : ℂ)) * Z *
Matrix.diagonal (fun i => (↑(Real.exp (s*v i)) : ℂ)) * Z).trace =
∑ i, ∑ j, (↑(Real.exp ((1-s)*v i)) : ℂ) * Z i j *
↑(Real.exp (s*v j)) * Z j i :=by
unfold Matrix.trace
apply Finset.sum_congr rfl
intro i _
rw [Matrix.diag_apply, Matrix.mul_apply]
apply Finset.sum_congr rfl
intro j _
rw [Matrix.mul_diagonal, Matrix.diagonal_mul]
rw [heq]
simp only [Complex.re_sum]
apply Finset.sum_congr rfl
intro i _
apply Finset.sum_congr rfl
intro j _
rw [← hZ.apply j i, Real.exp_add]
simp only [Complex.mul_re, Complex.mul_im, Complex.ofReal_re, Complex.ofReal_im,
Complex.star_def, Complex.conj_re, Complex.conj_im, Complex.normSq_apply]
ring
theoremquadratic_expansion {f f' : ℝ→ℝ} {d : ℝ}
(hff' : ∀ᶠ t in 𝓝 (0:ℝ), HasDerivAt f (f' t) t)
(hd : HasDerivAt f' d 0) :
(fun t => f t-f 0-f' 0*t-d/2*t^2) =o[𝓝 (0:ℝ)] (fun t => t^2) :=by
proof · 20
lines
obtain ⟨δ, hδ, hh⟩ :=Metric.eventually_nhds_iff.mp hff'
letR : ℝ→ℝ:=fun t => f t-f 0-f' 0*t-d/2*t^2letR' : ℝ→ℝ:=fun t => f' t-f' 0-d*t
havehe : R' =o[𝓝 (0:ℝ)] (fun t => t) :=by
simpa only [R', sub_zero, smul_eq_mul, mul_comm d] using hd.isLittleO
have hs := (convex_ball (0:ℝ) δ).isLittleO_pow_succ_real
(Metric.mem_ball_self hδ) (n :=1) (f :=R) (f' :=R') ?_ ?_
· havehn : 𝓝[Metric.ball (0:ℝ) δ] (0:ℝ) = 𝓝 0:=
nhdsWithin_eq_nhds.mpr (Metric.ball_mem_nhds 0 hδ)
simpa [R, hn] using hs
· intro t ht
have hf := hh ht
have hpoly := ((hasDerivAt_const t (f' 0)).mul (hasDerivAt_id t))
have hquad := ((hasDerivAt_id t).pow 2).const_mul (d/2)
convert (((hf.sub_const (f 0)).sub hpoly).sub hquad).hasDerivWithinAt using1
· funext u
dsimp [R]
· dsimp [R']
ring
· simpa only [sub_zero, pow_one] using he.mono nhdsWithin_le_nhds
theoremlog_partition_expansion (τ : A→L[ℝ] ℝ)
(hτ : ∀ x y, τ (x*y) = τ (y*x)) (a z : A) (c : ℝ)
(hn : c+τ (exp a) = 1) :
(funt : ℝ=>Real.log (c+τ (exp (a+t • z))) -
τ (exp a*z)*t -
(τ ((∫ s in (0:ℝ)..1, exp ((1-s) • a)*z*exp (s • a))*z) -
(τ (exp a*z))^2)/2*t^2) =o[𝓝 (0:ℝ)] (fun t => t^2) :=by
proof · 18
lines
letP : ℝ→ℝ:=fun t => c+τ (exp (a+t • z))
letM : ℝ→ℝ:=fun t => τ (exp (a+t • z)*z)
have hP (t : ℝ) : HasDerivAtP (M t) t := (hasDerivAt_trace_exp τ hτ a z t).const_add c
havehP0 : P0 = 1:=by simpa [P] using hn
havehnz : ∀ᶠ t in 𝓝 (0:ℝ), P t ≠0:=
(hP 0).continuousAt.eventually_ne (by simp [hP0])
havehlog : ∀ᶠ t in 𝓝 (0:ℝ),
HasDerivAt (fun t =>Real.log (P t)) (M t/P t) t :=by
filter_upwards [hnz] with t ht using (hP t).log ht
have hd := (hasDerivAt_trace_exp_mul τ a z 0).div (hP 0) (by simp [hP0])
havehd' : HasDerivAt (fun t =>M t/P t)
(τ ((∫ s in (0:ℝ)..1, exp ((1-s) • a)*z*exp (s • a))*z) -
(τ (exp a*z))^2) 0:=by
convert hd using1
first | rfl |
simp only [M, zero_smul, add_zero, hP0, mul_one, div_one, pow_two]
have hh := quadratic_expansion hlog hd'
simpa only [P, M, zero_smul, add_zero, hn, Real.log_one, sub_zero, div_one] using hh
theoremfinite_block_partition_expansion (p : I→ℝ) (hp : ∀ i, 0 < p i)
(Z : MatrixIIℂ) (hZ : Z.IsHermitian) (c : ℝ)
(hn : c + ∑ i, p i = 1) :
(funt : ℝ=>Real.log (c + matrixReTrace
(exp (Matrix.diagonal (fun i => (Real.log (p i) : ℂ)) + t • Z))) -
(∑ i, p i*(Z i i).re)*t -
((∑ i, ∑ j, DiagonalForms.System.logMean (p i) (p j) * Complex.normSq (Z i j)) -
(∑ i, p i*(Z i i).re)^2)/2*t^2) =o[𝓝 (0:ℝ)] (fun t => t^2) :=by
proof · 14
lines
let a :=Matrix.diagonal (fun i => (Real.log (p i) : ℂ))
havehea : exp a = Matrix.diagonal (fun i => (p i : ℂ)) :=by
simpa only [one_smul, one_mul, Real.exp_log (hp _)] using
exp_real_diagonal (fun i =>Real.log (p i)) 1havehtr : matrixReTrace (exp a) = ∑ i, p i :=by
rw [hea, matrixReTrace_apply, Matrix.trace_diagonal]
simp
havehm : matrixReTrace (exp a*Z) = ∑ i, p i*(Z i i).re :=by
rw [hea, matrixReTrace_apply]
simp [Matrix.trace, Matrix.diag_apply, Matrix.diagonal_mul]
have hh := log_partition_expansion (matrixReTrace (I:=I)) matrixReTrace_cyclic a Z c
(by erw [htr]; exact hn)
erw [hm, matrix_duhamel_hessian p hp Z hZ] at hh
exact hh
theoremrelative_partition_expansion (τ : A→L[ℝ] ℝ)
(hτ : ∀ x y, τ (x*y) = τ (y*x)) (a z : A) (c : ℝ)
(hn : c+τ (exp a) = 1) :
(funt : ℝ=> t*(τ (exp (a+t • z)*z)/(c+τ (exp (a+t • z))))-
Real.log (c+τ (exp (a+t • z)))-
(τ ((∫ s in (0:ℝ)..1, exp ((1-s) • a)*z*exp (s • a))*z)-
(τ (exp a*z))^2)/2*t^2) =o[𝓝 (0:ℝ)] (fun t => t^2) :=by
proof · 22
lines
letP : ℝ→ℝ:=fun t => c+τ (exp (a+t • z))
letM : ℝ→ℝ:=fun t => τ (exp (a+t • z)*z)
letd : ℝ:= τ ((∫ s in (0:ℝ)..1, exp ((1-s) • a)*z*exp (s • a))*z)-
(τ (exp a*z))^2have hP (t : ℝ) : HasDerivAtP (M t) t := (hasDerivAt_trace_exp τ hτ a z t).const_add c
havehP0 : P0 = 1:=by simpa [P] using hn
have hd := (hasDerivAt_trace_exp_mul τ a z 0).div (hP 0) (by simp [hP0])
havehd' : HasDerivAt (fun t =>M t/P t) d 0:=by
convert hd using1
first | rfl |
simp only [d, M, zero_smul, add_zero, hP0, mul_one, div_one, pow_two]
havehe : (fun t =>M t/P t-M0-d*t) =o[𝓝 (0:ℝ)] (fun t => t) :=by
simpa only [hP0, div_one, sub_zero, smul_eq_mul, mul_comm d] using hd'.isLittleO
havehe2 : (fun t => (M t/P t-M0-d*t)*t) =o[𝓝 (0:ℝ)] (fun t => t^2) :=by
simpa only [pow_two] using he.mul_isBigO (isBigO_refl (funt : ℝ=> t) (𝓝 0))
have hq := log_partition_expansion τ hτ a z c hn
have hh := he2.sub hq
convert! hh using1
· funext t
dsimp only [P, M, d]
simp only [zero_smul, add_zero]
ring
theoremfinite_block_relative_expansion (p : I→ℝ) (hp : ∀ i, 0 < p i)
(Z : MatrixIIℂ) (hZ : Z.IsHermitian) (c : ℝ)
(hn : c + ∑ i, p i = 1) :
(funt : ℝ=> t*(matrixReTrace
(exp (Matrix.diagonal (fun i => (Real.log (p i) : ℂ))+t • Z)*Z)/
(c+matrixReTrace (exp (Matrix.diagonal (fun i => (Real.log (p i) : ℂ))+t • Z))))-
Real.log (c+matrixReTrace (exp (Matrix.diagonal (fun i => (Real.log (p i) : ℂ))+t • Z)))-
((∑ i, ∑ j, DiagonalForms.System.logMean (p i) (p j) * Complex.normSq (Z i j)) -
(∑ i, p i*(Z i i).re)^2)/2*t^2) =o[𝓝 (0:ℝ)] (fun t => t^2) :=by
proof · 14
lines
let a :=Matrix.diagonal (fun i => (Real.log (p i) : ℂ))
havehea : exp a = Matrix.diagonal (fun i => (p i : ℂ)) :=by
simpa only [one_smul, one_mul, Real.exp_log (hp _)] using
exp_real_diagonal (fun i =>Real.log (p i)) 1havehtr : matrixReTrace (exp a) = ∑ i, p i :=by
rw [hea, matrixReTrace_apply, Matrix.trace_diagonal]
simp
havehm : matrixReTrace (exp a*Z) = ∑ i, p i*(Z i i).re :=by
rw [hea, matrixReTrace_apply]
simp [Matrix.trace, Matrix.diag_apply, Matrix.diagonal_mul]
have hh := relative_partition_expansion (matrixReTrace (I:=I)) matrixReTrace_cyclic a Z c
(by erw [htr]; exact hn)
erw [hm, matrix_duhamel_hessian p hp Z hZ] at hh
exact hh
theoremblockTilt_relativeEntropy (ρ : State n) (hρ : FiniteEnergy ρ)
(b : HilbertBasis (I ⊕ J) ℂ (Fock n)) (p : I ⊕ J→ℝ)
(hp : ∀ j, 0 < p j) (hs : HasSum p 1)
(he : ∀ j, ρ.op (b j) = (p j : ℂ) • b j)
(Z : MatrixIIℂ) (hZ : Z.IsHermitian) (t : ℝ)
(ht : FiniteEnergy (blockTilt b p hp hs Z hZ t)) :
relativeEntropy b p (blockTilt b p hp hs Z hZ t) =
t*(matrixReTrace (exp (FiniteBlock.tiltMatrix p Z t)*Z)/
((∑' j, p (Sum.inr j))+matrixReTrace (exp (FiniteBlock.tiltMatrix p Z t))))-
Real.log ((∑' j, p (Sum.inr j))+matrixReTrace (exp (FiniteBlock.tiltMatrix p Z t))) :=by
proof · 13
lines
rw [blockTilt, blockState_relativeEntropy ρ hρ b p hp hs he _ _ ht]
havehsZ : t • Z = (t : ℂ) • Z:=by ext i j; simp
rw [showFiniteBlock.block b (FiniteBlock.tiltMatrix p Z t) =
FiniteBlock.block b (Matrix.diagonal (fun i => (Real.log (p (Sum.inl i)) : ℂ)))+
(t:ℂ) • FiniteBlock.block b Zby
rw [FiniteBlock.tiltMatrix, FiniteBlock.block_add, hsZ, FiniteBlock.block_smul]]
rw [expectation_add, expectation_smul]
simp only [Complex.add_re, Complex.mul_re, Complex.ofReal_re, Complex.ofReal_im, zero_mul, sub_zero]
rw [blockState_block_expectation ρ b p hp hs he _ _ Z]
rw [Matrix.trace_mul_comm Z, Complex.div_ofReal_re,
FiniteBlock.partition_trace]
simp only [matrixReTrace_apply]
ring
theoremblockTilt_relativeEntropy_expansion (ρ : State n) (hρ : FiniteEnergy ρ)
(b : HilbertBasis (I ⊕ J) ℂ (Fock n)) (p : I ⊕ J→ℝ)
(hp : ∀ j, 0 < p j) (hs : HasSum p 1)
(he : ∀ j, ρ.op (b j) = (p j : ℂ) • b j)
(Z : MatrixIIℂ) (hZ : Z.IsHermitian)
(ht : ∀ t, FiniteEnergy (blockTilt b p hp hs Z hZ t)) :
(funt : ℝ=> relativeEntropy b p (blockTilt b p hp hs Z hZ t)-
((∑ i, ∑ j, DiagonalForms.System.logMean (p (Sum.inl i)) (p (Sum.inl j)) * Complex.normSq (Z i j)) -
(∑ i, p (Sum.inl i)*(Z i i).re)^2)/2*t^2) =o[𝓝 (0:ℝ)] (fun t => t^2) :=by
proof · 3
lines
simp_rw [blockTilt_relativeEntropy ρ hρ b p hp hs he Z hZ _ (ht _), FiniteBlock.tiltMatrix]
exact finite_block_relative_expansion _ (fun i => hp (Sum.inl i)) Z hZ _
(FiniteBlock.tail_normalization p hs)
theoremblockTilt_relativeEntropy_expansion_of_moment (ρ : State n) (hm : FiniteMoment4 ρ)
(b : HilbertBasis (I ⊕ J) ℂ (Fock n)) (p : I ⊕ J→ℝ)
(hp : ∀ j, 0 < p j) (hs : HasSum p 1)
(he : ∀ j, ρ.op (b j) = (p j : ℂ) • b j)
(Z : MatrixIIℂ) (hZ : Z.IsHermitian) :
(funt : ℝ=> relativeEntropy b p (blockTilt b p hp hs Z hZ t)-
((∑ i, ∑ j, DiagonalForms.System.logMean (p (Sum.inl i)) (p (Sum.inl j)) * Complex.normSq (Z i j)) -
(∑ i, p (Sum.inl i)*(Z i i).re)^2)/2*t^2) =o[𝓝 (0:ℝ)] (fun t => t^2) :=
proof · 3
lines
blockTilt_relativeEntropy_expansion ρ (finiteMoment_finiteEnergy (by norm_num) hm)
b p hp hs he Z hZ (fun t => finiteMoment_finiteEnergy (by norm_num)
(blockTilt_finiteMoment ρ hm b p hp hs he Z hZ t))
theoremblock_relativeEntropy_tilt_lower (σ : State n) (hσ : FiniteEnergy σ)
(b : HilbertBasis (I ⊕ J) ℂ (Fock n)) (p : I ⊕ J→ℝ)
(hp : ∀ j, 0 < p j) (hs : HasSum p 1)
(hc : Summable (fun j => (-Real.log (p j))*(inner ℂ (b j) (σ.op (b j))).re))
(Z : MatrixIIℂ) (hZ : Z.IsHermitian) (t : ℝ) :
t*(expectation σ (FiniteBlock.block b Z)).re-
Real.log ((∑' j, p (Sum.inr j))+matrixReTrace (exp (FiniteBlock.tiltMatrix p Z t))) ≤
relativeEntropy b p σ :=by
proof · 12
lines
have hh := block_relativeEntropy_lower σ hσ b p hp hs hc
(FiniteBlock.tiltMatrix p Z t) (FiniteBlock.tiltMatrix_hermitian p Z hZ t)
havehsZ : t • Z = (t : ℂ) • Z:=by ext i j; simp
rw [showFiniteBlock.block b (FiniteBlock.tiltMatrix p Z t) =
FiniteBlock.block b (Matrix.diagonal (fun i => (Real.log (p (Sum.inl i)) : ℂ)))+
(t:ℂ) • FiniteBlock.block b Zby
rw [FiniteBlock.tiltMatrix, FiniteBlock.block_add, hsZ, FiniteBlock.block_smul],
expectation_add, expectation_smul] at hh
simp only [Complex.add_re, Complex.mul_re, Complex.ofReal_re,
Complex.ofReal_im, zero_mul, sub_zero] at hh
rw [FiniteBlock.partition_trace] at hh
linarith
theoremtrace_block_bounded (b : HilbertBasis (I ⊕ J) ℂE) (A : MatrixIIℂ)
(Z : E→L[ℂ] E) :
HasSum (fun j => inner ℂ (b j) (Z (block b A (b j))))
(Matrix.trace (A * entries b Z)) :=by
proof · 14
lines
classical
have he (j : I ⊕ J) : inner ℂ (b j) (Z (block b A (b j))) =
Sum.elim (fun j =>∑ i, A i j*inner ℂ (b (Sum.inl j)) (Z (b (Sum.inl i)))) (fun _ =>0) j :=by
cases j with
| inl j => simp [block_basis]
| inr j => simp only [block_tail, map_zero, inner_zero_right, Sum.elim_inr]
simp_rw [he]
have h :=HasSum.sum (f :=Sum.elim (fun j =>∑ i, A i j*inner ℂ (b (Sum.inl j)) (Z (b (Sum.inl i)))) (fun_ : J=> (0:ℂ)))
(hasSum_fintype _) (hasSum_zero : HasSum (fun_ : J=> (0:ℂ)) 0)
haveheq : (∑ j, ∑ i, A i j * inner ℂ (b (Sum.inl j)) (Z (b (Sum.inl i)))) =
Matrix.trace (A * entries b Z) :=by
simp only [Matrix.trace, Matrix.diag, Matrix.mul_apply, entries]
exact Finset.sum_comm
simpa only [Function.comp_def, Sum.elim_inl, add_zero, heq] using h
theoremblockState_expectation (ρ : State n)
(b : HilbertBasis (I ⊕ J) ℂ (Fock n)) (p : I ⊕ J→ℝ)
(hp : ∀ j, 0 < p j) (hs : HasSum p 1)
(he : ∀ j, ρ.op (b j) = (p j : ℂ) • b j) (M : MatrixIIℂ) (hM : M.IsHermitian)
(Z : Fock n →L[ℂ] Fock n) :
expectation (blockState b p hp hs M hM) Z =
(expectation ρ Z + Matrix.trace ((exp M-Matrix.diagonal (fun i => (p (Sum.inl i) : ℂ)))*
FiniteBlock.entries b Z))/(FiniteBlock.partition p MhM : ℂ) :=by
proof · 14
lines
have hρ := hasSum_expectation_basis b ρ Zhave hA :=FiniteBlock.trace_block_bounded b
(exp M-Matrix.diagonal (fun i => (p (Sum.inl i) : ℂ))) Zhave hσ := hasSum_expectation_basis b (blockState b p hp hs M hM) Z
rw [blockState_operator ρ b p hp hs he M hM] at hσ
simp only [smul_apply, sub_apply, add_apply, map_smul, map_sub, map_add,
inner_smul_right, inner_sub_right, inner_add_right] at hσ
have hh := (hρ.add hA).mul_left ((FiniteBlock.partition p MhM : ℂ)⁻¹)
simp only [FiniteBlock.block_sub, sub_apply, map_sub, inner_sub_right] at hh
apply hσ.unique
rw [div_eq_mul_inv, mul_comm]
convert! hh using1
funext j
ring
theoremmatrix_duhamel_mixed_integrand (v : I→ℝ) (XY : MatrixIIℂ) (s : ℝ) :
matrixReTrace (exp ((1-s) • Matrix.diagonal (fun i => (v i : ℂ)))*X*
exp (s • Matrix.diagonal (fun i => (v i : ℂ)))*Y) =
∑ i, ∑ j, Real.exp ((1-s)*v i+s*v j)*(X i j*Y j i).re :=by
proof · 20
lines
rw [exp_real_diagonal, exp_real_diagonal, matrixReTrace_apply]
havehe : (Matrix.diagonal (fun i => (Real.exp ((1-s)*v i) : ℂ))*X*
Matrix.diagonal (fun i => (Real.exp (s*v i) : ℂ))*Y).trace =
∑ i, ∑ j, (Real.exp ((1-s)*v i) : ℂ)*X i j*(Real.exp (s*v j) : ℂ)*Y j i :=by
unfold Matrix.trace
apply Finset.sum_congr rfl
intro i _
rw [Matrix.diag_apply, Matrix.mul_apply]
apply Finset.sum_congr rfl
intro j _
rw [Matrix.mul_diagonal, Matrix.diagonal_mul]
rw [he]
simp only [Complex.re_sum]
apply Finset.sum_congr rfl
intro i _
apply Finset.sum_congr rfl
intro j _
rw [Real.exp_add]
simp only [Complex.mul_re, Complex.mul_im, Complex.ofReal_re, Complex.ofReal_im]
ring
theoremnormalized_expectation_deriv (p : I→ℝ) (hp : ∀ i, 0 < p i)
(XY : MatrixIIℂ) (c μ : ℝ) (hn : c+∑ i, p i = 1) :
HasDerivAt (funt : ℝ=>
(μ+matrixReTrace ((exp (Matrix.diagonal (fun i => (Real.log (p i) : ℂ))+t • X)-
Matrix.diagonal (fun i => (p i : ℂ)))*Y))/
(c+matrixReTrace (exp (Matrix.diagonal (fun i => (Real.log (p i) : ℂ))+t • X))))
((∑ i, ∑ j, DiagonalForms.System.logMean (p i) (p j)*(X i j*Y j i).re)-
μ*(∑ i, p i*(X i i).re)) 0:=by
proof · 24
lines
leta : MatrixIIℂ:=Matrix.diagonal (fun i => (Real.log (p i) : ℂ))
havehea : exp a = Matrix.diagonal (fun i => (p i : ℂ)) :=by
simpa only [one_smul, one_mul, Real.exp_log (hp _)] using
exp_real_diagonal (fun i =>Real.log (p i)) 1havehtr : matrixReTrace (exp a) = ∑ i, p i :=by
rw [hea, matrixReTrace_apply, Matrix.trace_diagonal]
simp
havehm : matrixReTrace (exp a*X) = ∑ i, p i*(X i i).re :=by
rw [hea, matrixReTrace_apply]
simp [Matrix.trace, Matrix.diag_apply, Matrix.diagonal_mul]
have hd := (hasDerivAt_trace_exp matrixReTrace matrixReTrace_cyclic a X0).const_add c
have hv := matrixReTrace.hasFDerivAt.comp_hasDerivAt 0
(((hasDerivAt_exp_add_smul a X0).sub_const (Matrix.diagonal (fun i => (p i : ℂ)))).mul_const Y)
simp only [zero_smul, add_zero] at hd hv
havehnorm : c+matrixReTrace (exp a) = 1:= htr ▸ hn
havehbase : exp a-Matrix.diagonal (fun i => (p i : ℂ)) = 0:=by rw [hea, sub_self]
have hh := (hv.const_add μ).div hd (by
change c+matrixReTrace (exp (a+(0:ℝ) • X)) ≠0
rw [zero_smul, add_zero, hnorm]
exact one_ne_zero)
simp only [Function.comp_def, zero_smul, add_zero] at hh
erw [hbase, zero_mul, map_zero, hnorm, hm, matrix_duhamel_mixed p hp XY] at hh
simp only [add_zero, mul_one, one_pow, div_one] at hh
convert! hh using1
theoremquadratic_coefficient_nonneg {f : ℝ→ℝ} {a : ℝ}
(he : (fun t => f t-a*t^2) =o[𝓝 (0:ℝ)] (fun t => t^2))
(hf : ∀ᶠ t in 𝓝 (0:ℝ), 0≤ f t) : 0≤ a :=by
theoremKrausFlow.dual_entry (F : KrausFlow n) (Z : Fock n →L[ℂ] Fock n) (x y : Fock n) :
HasSum (fun i => inner ℂ (F.V i x) (Z (F.V i y))) (inner ℂ x (F.dual Z y)) :=
theoremblockTilt_expectation_deriv (ρ : State n)
(b : HilbertBasis (I ⊕ J) ℂ (Fock n)) (p : I ⊕ J→ℝ)
(hp : ∀ j, 0 < p j) (hs : HasSum p 1)
(he : ∀ j, ρ.op (b j) = (p j : ℂ) • b j)
(X : MatrixIIℂ) (hX : X.IsHermitian) (Z : Fock n →L[ℂ] Fock n) :
HasDerivAt (funt : ℝ=> (expectation (blockTilt b p hp hs X hX t) Z).re)
((∑ i, ∑ j, DiagonalForms.System.logMean (p (Sum.inl i)) (p (Sum.inl j))*
(X i j*inner ℂ (b (Sum.inl j)) (Z (b (Sum.inl i)))).re)-
(expectation ρ Z).re*(∑ i, p (Sum.inl i)*(X i i).re)) 0:=by
proof · 3
lines
simp_rw [blockTilt_expectation_formula ρ b p hp hs he X hX Z]
exact normalized_expectation_deriv (fun i => p (Sum.inl i)) (fun i => hp (Sum.inl i))
X (FiniteBlock.entries b Z) _ _ (FiniteBlock.tail_normalization p hs)
lethκ' : 1-κ ∈Set.Icc01:= ⟨sub_nonneg.mpr hκ.2, sub_le_self _ hκ.1⟩
let σ :=fun t => blockTilt b p hp hs X hX t
let ω :=fun t => mixture (1-κ) hκ' (F.map (σ t)) τ
letY:=FiniteBlock.block d Zhave hm (t : ℝ) : FiniteMoment4 (σ t) := blockTilt_finiteMoment ρ hmρ b p hp hs he X hX t
have hf (t : ℝ) : FiniteEnergy (ω t) := mixture_finiteEnergy _ _
(F.finiteEnergy _ (finiteMoment_finiteEnergy (by norm_num) (hm t))) hτ
have hcro (t : ℝ) : Summable (fun j => (-Real.log (q j))*(inner ℂ (d j) ((ω t).op (d j))).re) :=
crossEntropy_mixture_summable d q (1-κ) hκ' (F.map (σ t)) τ (hcross _ (hm t)) hcτ
have hD := blockTilt_relativeEntropy_expansion_of_moment ρ hmρ b p hp hs he X hX
have hP := finite_block_partition_expansion (fun i => q (Sum.inl i)) (fun i => hq (Sum.inl i)) Z hZ
(∑' j, q (Sum.inr j)) (FiniteBlock.tail_normalization q ht)
have hd := blockTilt_expectation_deriv ρ b p hp hs he X hX (F.dual Y)
havehE : HasDerivAt (fun t => (expectation (ω t) Y).re)
((1-κ)*FiniteBlock.covariance p X (FiniteBlock.entries b (F.dual Y)) (expectation ρ (F.dual Y)).re) 0:=by
convert! (hd.const_mul (1-κ)).add_const (κ*(expectation τ Y).re) using1
funext t
dsimp only [ω]
rw [expectation_mixture, F.expectation_dual]
simp only [Complex.add_re, Complex.mul_re, Complex.ofReal_re, Complex.ofReal_im,
Complex.sub_re, Complex.sub_im, Complex.one_re, Complex.one_im, zero_mul, sub_self, sub_zero]
ring
havehE0 : (expectation (ω 0) Y).re = FiniteBlock.mean q Z:=by
trans (expectation (mixture (1-κ) hκ' (F.map ρ) τ) Y).re
· dsimp only [ω]
rw [expectation_mixture, expectation_mixture, F.expectation_dual, F.expectation_dual]
simp only [Complex.add_re, Complex.mul_re, Complex.ofReal_re, Complex.ofReal_im,
Complex.sub_re, Complex.sub_im, Complex.one_re, Complex.one_im, zero_mul, sub_self, sub_zero]
rw [show (expectation (σ 0) (F.dual Y)).re = (expectation ρ (F.dual Y)).re from
blockTilt_expectation_zero ρ b p hp hs he X hX (F.dual Y)]
· exact expectation_block_of_eigen_re _ d q he0 Zhave hi (t : ℝ) : t*(expectation (ω t) Y).re-
Real.log ((∑' j, q (Sum.inr j))+matrixReTrace (exp (FiniteBlock.tiltMatrix q Z t))) ≤
(a/c)*relativeEntropy b p (σ t) :=byhave hlo := block_relativeEntropy_tilt_lower (ω t) (hf t) d q hq ht (hcro t) Z hZ t
exact hlo.trans (one_port_relative_entropy_bound F τ κ hκ c a β ζ C hc ha ρ hmρ b p d q
he he0 hτ hcross hcτ hlog hmin (σ t) (hm t))
exact hessian_comparison hD hP hE hE0 (Filter.Eventually.of_forall hi)
theoremcompression_hessian_to_variance (b : HilbertBasisJℂE) (p : J→ℝ)
(hp : ∀ j, 0 < p j) (hs : Summable p) (Y : E→L[ℂ] E) (μ α γ W : ℝ)
(hm : HasSum (fun j => p j*(entry b Y j j).re) μ) (hα : 0 < α)
(hY : IsSelfAdjointY)
(h : ∀ (s : FinsetJ) (t : ℝ),
let b' := reindexBasis b (Equiv.sumCompl (fun j => j ∈ s))
let p' := p ∘Equiv.sumCompl (fun j => j ∈ s)
letX:=FiniteBlock.entries b' Y2*(γ*FiniteBlock.covariance p' ((t:ℂ) • X) X μ) ≤
α*FiniteBlock.variance p' ((t:ℂ) • X)+W) :
γ^2*((∑' ij : J×J, logMean (p ij.1) (p ij.2)*Complex.normSq (entry b Y ij.1 ij.2))-μ^2) ≤ α*W:=by
proof · 15
lines
classical
apply finite_hessian_to_variance _ _ μ _ α γ W (logMean_summable b p hp hs Y).hasSum hm hα
intro s t
have hh := h s t
dsimp only at hh
havehX : (FiniteBlock.entries (reindexBasis b (Equiv.sumCompl (fun j => j ∈ s))) Y).IsHermitian:=by
ext i j
change conj (inner ℂ (reindexBasis b _ (Sum.inl j)) (Y (reindexBasis b _ (Sum.inl i)))) =
inner ℂ (reindexBasis b _ (Sum.inl i)) (Y (reindexBasis b _ (Sum.inl j)))
rw [inner_conj_symm]
exact (ContinuousLinearMap.isSelfAdjoint_iff_isSymmetric.mp hY) _ _
rw [FiniteBlock.covariance_scale_self _ _ hX, FiniteBlock.variance_scale,
FiniteBlock.variance, compression_mean] at hh
simp only [Function.comp_apply, Equiv.sumCompl_apply_inl, compression_quadratic] at hh
nlinarith
theoremexpectation_eigen_hasSum (ρ : State n) (b : HilbertBasisJℂ (Fock n)) (p : J→ℝ)
(he : ∀ j, ρ.op (b j) = (p j : ℂ) • b j) (Z : Fock n →L[ℂ] Fock n) :
HasSum (fun j => p j*(BKM.entry b Z j j).re) (expectation ρ Z).re :=by
proof · 3
lines
have h := (hasSum_expectation_basis b ρ Z).mapL Complex.reCLM
simpa only [he, map_smul, inner_smul_right, Complex.reCLM_apply, Complex.mul_re,
Complex.ofReal_re, Complex.ofReal_im, zero_mul, sub_zero, BKM.entry] using h
classical
letY:=F.dual (FiniteBlock.block d Z)
let μ := (expectation ρ Y).re
havehY : IsSelfAdjointY:=F.dual_selfAdjoint (ContinuousLinearMap.isSelfAdjoint_iff_isSymmetric.mpr (FiniteBlock.block_symmetric d Z hZ))
apply BKM.compression_hessian_to_variance b p hp hs.summable Y μ (a/c) (1-κ)
(FiniteBlock.variance q Z) (expectation_eigen_hasSum ρ b p he Y) (div_pos ha hc) hY
intro s t
let e :=Equiv.sumCompl (fun j => j ∈ s)
let b' :=BKM.reindexBasis b e
let p' := p ∘ e
letX:=FiniteBlock.entries b' Yhave hX := finite_entries_selfAdjoint b' Y hY
have hl' (σ : State n) (hh : FiniteMoment4 σ) : crossEntropy b' p' σ =
(ζ/a)*numberMoment 4 σ+(c*(1-κ)/a)*crossEntropy d q (F.map σ)+(β/a)*energy σ+C:=by
rw [crossEntropy_reindex]
exact hlog σ hh
have he' (j) : ρ.op (b' j) = (p' j : ℂ) • b' j :=by
simpa only [b', p', BKM.reindexBasis_apply, Function.comp_apply] using he (e j)
havehtself : IsSelfAdjoint (t : ℂ) :=by
change conj (t : ℂ) = (t : ℂ)
exact Complex.conj_ofReal t
have hh := flow_finite_hessian F τ κ hκ c a β ζ C hc ha ρ hmρ b' p'
(fun j => hp (e j)) (e.hasSum_iff.mpr hs) d q hq ht he' he0 hτ hcross hcτ hl'
hmin ((t:ℂ) • X) (hX.smul htself) Z hZ
exact hh
theorementry_imaginaryPart (b : HilbertBasisJℂE) (Z : E→L[ℂ] E) (i j : J) :
entry b (imaginaryPart Z : E→L[ℂ] E) i j=-Complex.I*(entry b Z i j-conj (entry b Z j i))/2:=by
proof · 4
lines
rw [imaginaryPart_apply_coe, entry_smul, entry_real_smul, entry_sub,
ContinuousLinearMap.star_eq_adjoint, entry_adjoint]
push_cast
ring
theoremquadratic_adjoint (b : HilbertBasisJℂE) (p : J→ℝ) (Z : E→L[ℂ] E) :
quadratic b p Z.adjoint=quadratic b p Z:=by
proof · 6
lines
simp only [quadratic, entry_adjoint, Complex.normSq_conj]
have h := (Equiv.prodComm JJ).tsum_eq (funij : J×J=> logMean (p ij.1) (p ij.2)*Complex.normSq (entry b Z ij.1 ij.2))
convert! h using1
congr 1
ext ij
exact congrArg (fun x => x*Complex.normSq (entry b Z ij.2 ij.1)) (logMean_symm _ _)
theoremquadratic_parts (b : HilbertBasisJℂE) (p : J→ℝ) (hp : ∀ j,0 < p j) (hs : Summable p)
(Z : E→L[ℂ] E) :
quadratic b p (realPart Z : E→L[ℂ] E)+quadratic b p (imaginaryPart Z : E→L[ℂ] E)=quadratic b p Z:=by
proof · 19
lines
have hr := logMean_summable b p hp hs (realPart Z : E→L[ℂ] E)
have hi := logMean_summable b p hp hs (imaginaryPart Z : E→L[ℂ] E)
have hz := logMean_summable b p hp hs Zhave ha := logMean_summable b p hp hs Z.adjoint
have he (ij : J×J) :
logMean (p ij.1) (p ij.2)*Complex.normSq (entry b (realPart Z : E→L[ℂ] E) ij.1 ij.2)+
logMean (p ij.1) (p ij.2)*Complex.normSq (entry b (imaginaryPart Z : E→L[ℂ] E) ij.1 ij.2)=
(logMean (p ij.1) (p ij.2)*Complex.normSq (entry b Z ij.1 ij.2)+
logMean (p ij.1) (p ij.2)*Complex.normSq (entry b Z.adjoint ij.1 ij.2))/2:=by
rw [← mul_add, entry_realPart, entry_imaginaryPart, Complex.normSq_polar_parts, entry_adjoint, Complex.normSq_conj]
ring
have hh := hr.hasSum.add hi.hasSum
simp_rw [he] at hh
have ht := (hz.hasSum.add ha.hasSum).div_const 2have heq := hh.unique ht
change quadratic b p (realPart Z : E→L[ℂ] E)+quadratic b p (imaginaryPart Z : E→L[ℂ] E)=
(quadratic b p Z+quadratic b p Z.adjoint)/2 at heq
rw [quadratic_adjoint] at heq
linarith
theoremmean_parts (b : HilbertBasisJℂE) (p : J→ℝ) (hp : ∀j,0≤ p j) (hs : Summable p)
(Z : E→L[ℂ] E) :
mean b p (realPart Z : E→L[ℂ] E)=(mean b p Z).re ∧
mean b p (imaginaryPart Z : E→L[ℂ] E)=(mean b p Z).im :=by
proof · 33
lines
have hr (j : J) :
(p j : ℂ)*entry b (realPart Z : E→L[ℂ] E) j j =
(p j : ℂ)*(entry b Z j j + conj (entry b Z j j))/2:=by rw [entry_realPart]; ring
have hi (j : J) :
(p j : ℂ)*entry b (imaginaryPart Z : E→L[ℂ] E) j j =
-Complex.I*((p j : ℂ)*entry b Z j j-conj ((p j : ℂ)*entry b Z j j))/2:=by
rw [entry_imaginaryPart]
simp only [map_mul, Complex.conj_ofReal]
ring
have h := mean_summable b p hp hs Zhave hc := (h.hasSum.mapL Complex.conjCLE.toContinuousLinearMap)
change HasSum (fun j => conj ((p j : ℂ)*entry b Z j j)) (conj (mean b p Z)) at hc
constructor
· have hh := (h.hasSum.add hc).div_const 2have he (j : J) :
((p j : ℂ)*entry b Z j j+conj ((p j : ℂ)*entry b Z j j))/2=
(p j : ℂ)*entry b (realPart Z : E→L[ℂ] E) j j :=by
rw [hr, map_mul, Complex.conj_ofReal]; ring
simp_rw [he] at hh
rw [mean, hh.tsum_eq]
change (mean b p Z+conj (mean b p Z))/2=((mean b p Z).re:ℂ)
rw [Complex.add_conj]
push_cast
ring
· have hh := ((h.hasSum.sub hc).mul_left (-Complex.I)).div_const 2
simp_rw [← hi] at hh
rw [mean, hh.tsum_eq]
change -Complex.I*(mean b p Z-conj (mean b p Z))/2=((mean b p Z).im:ℂ)
rw [Complex.sub_conj]
push_cast
ring_nf
simp only [Complex.I_sq]
ring
theoremvariance_parts (b : HilbertBasisJℂE) (p : J→ℝ) (hp : ∀j,0 < p j) (hs : Summable p)
(Z : E→L[ℂ] E) :
variance b p (realPart Z : E→L[ℂ] E)+variance b p (imaginaryPart Z : E→L[ℂ] E)=variance b p Z:=by
proof · 4
lines
obtain ⟨hr,hi⟩ := mean_parts b p (fun j => (hp j).le) hs Z
simp only [variance, hr, hi, Complex.normSq_apply, Complex.ofReal_re, Complex.ofReal_im, zero_mul, add_zero]
have h := quadratic_parts b p hp hs Z
linarith
theoremmean_block (b : HilbertBasis (I ⊕ J) ℂE) (p : I ⊕ J→ℝ) (X : MatrixIIℂ) :
mean b p (FiniteBlock.block b X)=∑ i, (p (Sum.inl i):ℂ)*X i i :=by
proof · 4
lines
have hh :=HasSum.sum (f :=funj : I ⊕ J=> (p j:ℂ)*entry b (FiniteBlock.block b X) j j)
(by simpa only [Function.comp_def, entry_block] using hasSum_fintype (funi : I=> (p (Sum.inl i):ℂ)*X i i))
(by simpa only [Function.comp_def, entry_block, mul_zero] using (hasSum_zero : HasSum (fun_ : J=> (0:ℂ)) 0))
simpa only [add_zero, mean] using hh.tsum_eq
theoremnormSq_mean_selfAdjoint (b : HilbertBasisJℂE) (p : J→ℝ)
(Z : E→L[ℂ] E) (hZ : IsSelfAdjointZ) : Complex.normSq (mean b p Z)=(mean b p Z).re^2:=by
proof · 6
lines
have hh := mean_adjoint b p Z
rw [showZ.adjoint=Zfrom hZ] at hh
have hi := congrArg Complex.im hh
simp only [Complex.conj_im] at hi
rw [Complex.normSq_apply]
nlinarith
theoremvariance_block (b : HilbertBasis (I ⊕ J) ℂE) (p : I ⊕ J→ℝ)
(hp : ∀ j, 0<p j) (hs : Summable p) (X : MatrixIIℂ) (hX : X.IsHermitian) :
variance b p (FiniteBlock.block b X)=FiniteBlock.variance p X:=by
proof · 4
lines
rw [variance, quadratic_block b p hp hs, normSq_mean_selfAdjoint b p _
(ContinuousLinearMap.isSelfAdjoint_iff_isSymmetric.mpr (FiniteBlock.block_symmetric b X hX)), mean_block]
simp only [Complex.re_sum, Complex.mul_re, Complex.ofReal_re, Complex.ofReal_im,
zero_mul, sub_zero, FiniteBlock.variance, FiniteBlock.mean]
theoremcomplex_component_hessian (F : KrausFlow n) (c a κ : ℝ)
(b : HilbertBasisJℂ (Fock n)) (p : J→ℝ) (hp : ∀j,0 < p j) (hs : Summable p)
(d : HilbertBasis (K ⊕ L) ℂ (Fock n)) (q : K ⊕ L→ℝ)
(hq : ∀j,0 < q j) (ht : Summable q)
(h : ∀ (Z : MatrixKKℂ), Z.IsHermitian→
(1-κ)^2*BKM.variance b p (F.dual (FiniteBlock.block d Z)) ≤ (a/c)*FiniteBlock.variance q Z)
(Z : MatrixKKℂ) :
(1-κ)^2*BKM.variance b p (F.dual (FiniteBlock.block d Z)) ≤
(a/c)*BKM.variance d q (FiniteBlock.block d Z) :=by
proof · 11
lines
havehr : (realPart Z : MatrixKKℂ).IsHermitian:=Matrix.isHermitian_iff_isSelfAdjoint.mpr selfAdjoint.isSelfAdjoint
havehi : (imaginaryPart Z : MatrixKKℂ).IsHermitian:=Matrix.isHermitian_iff_isSelfAdjoint.mpr selfAdjoint.isSelfAdjoint
have h1 := h (realPart Z) hr
have h2 := h (imaginaryPart Z) hi
rw [←BKM.variance_block d q hq ht _ hr, BKM.block_realPart, F.dual_realPart] at h1
rw [←BKM.variance_block d q hq ht _ hi, BKM.block_imaginaryPart, F.dual_imaginaryPart] at h2
have hh := add_le_add h1 h2
rw [← mul_add, ← mul_add, BKM.variance_parts b p hp hs, BKM.variance_parts d q hq ht] at hh
exact hh
obtain ⟨G,hG⟩ := minimum_component_hessian F τ hr hτ κ hκ hκ0 c a β ζ hc ha hβ hζ ρ hmρ
d q hq ht he0 hmin
let _ :=G.nonempty
refine ⟨G,?_⟩
apply complex_component_hessian F c a κ G.basis (gibbsWeight G.eigenval)
(gibbsWeight_pos G.eigenval G.heat) (gibbsWeight_hasSum G.eigenval G.heat).summable d q hq ht.summable
intro Z hZ
have hh := hG Z hZ
rw [BKM.variance, BKM.normSq_mean_selfAdjoint G.basis _ _
(F.dual_selfAdjoint (ContinuousLinearMap.isSelfAdjoint_iff_isSymmetric.mpr
(FiniteBlock.block_symmetric d Z hZ))), mean_expectation ρ G.basis (gibbsWeight G.eigenval) G.eigen]
exact hh
apply complex_component_hessian F c a κ b p hp hs.summable d q hq ht.summable
intro T hT
rw [BKM.variance, BKM.normSq_mean_selfAdjoint b p _
(F.dual_selfAdjoint (ContinuousLinearMap.isSelfAdjoint_iff_isSymmetric.mpr
(FiniteBlock.block_symmetric d T hT))), mean_expectation ρ b p he]
exact flow_full_hessian F τ κ hκ c a β ζ C hc ha ρ hmρ b p hp hs d q hq ht
he he0 hτ hcross hcτ hlog hmin T hT
EnsembleL2.vector (fun ij => (Real.sqrt (logMean (p ij.1) (p ij.2)):ℂ)*entry b Z ij.1 ij.2) (by
convert! logMean_summable b p hp hs Zusing1
ext ij
rw [←Complex.normSq_eq_norm_sq, Complex.normSq_mul, Complex.normSq_ofReal,
Real.mul_self_sqrt (logMean_pos (hp _) (hp _)).le])
theoremvector_add (b : HilbertBasisJℂE) (p : J→ℝ) (hp : ∀j,0 < p j) (hs : Summable p)
(ZT : E→L[ℂ] E) : vector b p hp hs (Z+T)=vector b p hp hs Z+vector b p hp hs T:=by
theoremvector_sub (b : HilbertBasisJℂE) (p : J→ℝ) (hp : ∀j,0 < p j) (hs : Summable p)
(ZT : E→L[ℂ] E) : vector b p hp hs (Z-T)=vector b p hp hs Z-vector b p hp hs T:=by
theoremvector_smul (b : HilbertBasisJℂE) (p : J→ℝ) (hp : ∀j,0 < p j) (hs : Summable p)
(c : ℂ) (Z : E→L[ℂ] E) : vector b p hp hs (c • Z)=c • vector b p hp hs Z:=by
proof · 3
lines
apply lp.ext
ext ij
simp [entry_smul, mul_left_comm]
theoremvector_id_inner (b : HilbertBasisJℂE) (p : J→ℝ) (hp : ∀j,0 < p j) (hs : Summable p)
(Z : E→L[ℂ] E) :
inner ℂ (vector b p hp hs (ContinuousLinearMap.id ℂE)) (vector b p hp hs Z)=mean b p Z:=by
proof · 16
lines
classical
have hh := lp.hasSum_inner (𝕜:=ℂ) (vector b p hp hs (ContinuousLinearMap.id ℂE)) (vector b p hp hs Z)
rw [← hh.tsum_eq, hh.summable.tsum_prod]
unfold mean
congr 1
ext i
calc
_ = (p i:ℂ)*entry b Z i i :=by
rw [tsum_eq_single i]
· simp only [vector_apply, entry_id, ite_true, mul_one, logMean_self,
RCLike.inner_apply, Complex.conj_ofReal]
rw [show (Real.sqrt (p i):ℂ)*entry b Z i i*(Real.sqrt (p i):ℂ)=
((Real.sqrt (p i)*Real.sqrt (p i):ℝ):ℂ)*entry b Z i i by push_cast; ring]
rw [Real.mul_self_sqrt (hp i).le]
· intro j hj
simp [Ne.symm hj, entry_id]
theoremvector_id_norm (b : HilbertBasisJℂE) (p : J→ℝ) (hp : ∀j,0 < p j) (hs : HasSum p 1) :
‖vector b p hp hs.summable (ContinuousLinearMap.id ℂE)‖^2=1:=by
proof · 6
lines
have hh := vector_id_inner b p hp hs.summable (ContinuousLinearMap.id ℂE)
rw [mean_id b p hs, inner_self_eq_norm_sq_to_K] at hh
have hh' := congrArg Complex.re hh
change ((‖vector b p hp hs.summable (ContinuousLinearMap.id ℂE)‖ : ℂ)^2).re=1 at hh'
rw [←Complex.ofReal_pow, Complex.ofReal_re] at hh'
exact hh'
theoremquadratic_center (b : HilbertBasisJℂE) (p : J→ℝ) (hp : ∀j,0 < p j) (hs : HasSum p 1)
(Z : E→L[ℂ] E) : quadratic b p (center b p Z)=variance b p Z:=by
proof · 9
lines
rw [← vector_norm b p hp hs.summable, center, vector_sub, vector_smul, norm_sub_sq (𝕜:=ℂ)]
havehi : inner ℂ (vector b p hp hs.summable Z) (vector b p hp hs.summable (ContinuousLinearMap.id ℂE))=
conj (mean b p Z) :=by
rw [← inner_conj_symm, vector_id_inner]
rw [vector_norm, inner_smul_right, hi, norm_smul, mul_pow, vector_id_norm b p hp hs, mul_one]
simp only [←Complex.normSq_eq_norm_sq, Complex.mul_conj]
change quadratic b p Z-2*Complex.normSq (mean b p Z)+Complex.normSq (mean b p Z)=variance b p Z
unfold variance
ring
theoremcenter_sub_scalar (b : HilbertBasisJℂE) (p : J→ℝ) (hp : ∀j,0≤ p j) (hs : HasSum p 1)
(Z : E→L[ℂ] E) (c : ℂ) :
center b p (Z-c • ContinuousLinearMap.id ℂE)=center b p Z:=by
proof · 2
lines
change centerLM b p hp hs.summable (Z-c • ContinuousLinearMap.id ℂE)=_
simp only [map_sub, map_smul, centerLM_apply, center_id b p hs, smul_zero, sub_zero]
theoremexists_block [DecidableEqJ] (b : HilbertBasisJℂE) (p : J→ℝ) (hp : ∀j,0≤ p j) (hs : Summable p)
{Z : E→L[ℂ] E} (hZ : Z∈ operatorSpace b p) :
∃ (s : FinsetJ) (M : Matrix s s ℂ),
Z=BKM.center b p (FiniteBlock.block (BKM.reindexBasis b (Equiv.sumCompl (· ∈ s))) M) :=by
proof · 19
lines
classical
obtain ⟨c,rfl⟩ :=Finsupp.mem_span_range_iff_exists_finsupp.mp hZ
let s := c.support.biUnion (fun ij => {ij.1,ij.2})
havehsub : c.support ⊆ s ×ˢ s :=by
intro ij hij
simp only [Finset.mem_product]
constructor
· exact Finset.mem_biUnion.mpr ⟨ij,hij,by simp⟩
· exact Finset.mem_biUnion.mpr ⟨ij,hij,by simp⟩
refine ⟨s, (fun i j => c (i.val,j.val)), ?_⟩
havehc : (c.sum fun ij a => a • generator b p ij)=
BKM.centerLM b p hp hs (c.sum fun ij a => a • InnerProductSpace.rankOne ℂ (b ij.1) (b ij.2)) :=by
simp only [Finsupp.sum, map_sum, map_smul, BKM.centerLM_apply, ← generator_eq_center]
rw [hc, BKM.centerLM_apply]
congr 1
rw [c.sum_of_support_subset hsub _ (by intro ij; simp)]
simp only [FiniteBlock.block, BKM.reindexBasis_apply, Equiv.sumCompl_apply_inl]
rw [Finset.sum_product]
simp only [←Finset.sum_coe_sort s]
theoremblocks_to_centered_hessian
(F : KrausFlow n) (b : HilbertBasisIℂ (Fock n)) (p : I→ℝ)
(hp : ∀ i, 0 < p i) (hs : HasSum p 1)
(d : HilbertBasisJℂ (Fock n)) (q : J→ℝ) (hq : ∀ j, 0 < q j) (ht : HasSum q 1)
(a κ : ℝ)
(hh : ∀ (s : FinsetJ) (M : Matrix s s ℂ),
(1-κ)^2*BKM.variance b p (F.dual (FiniteBlock.block (BKM.reindexBasis d (Equiv.sumCompl (· ∈ s))) M)) ≤
a*BKM.variance d q (FiniteBlock.block (BKM.reindexBasis d (Equiv.sumCompl (· ∈ s))) M))
(Z : Fock n →L[ℂ] Fock n) (hZ : Z∈CenteredTests.operatorSpace d q) :
(1-κ)^2*BKM.quadratic b p (BKM.center b p (F.dual Z)) ≤ a*BKM.quadratic d q Z:=by
proof · 9
lines
rw [BKM.quadratic_center b p hp hs]
havehz : BKM.variance d q Z=BKM.quadratic d q Z:=by
rw [BKM.variance, CenteredTests.mean_eq_zero d q (fun j => (hq j).le) ht hZ]
simp
rw [← hz]
obtain ⟨s,M,rfl⟩ :=CenteredTests.exists_block d q (fun j => (hq j).le) ht.summable hZ
simp only [BKM.center, F.dual_sub, F.dual_smul, F.dual_id,
BKM.variance_sub_scalar b p hp hs, BKM.variance_sub_scalar d q hq ht]
exact hh s M