Download lean/OAI/InformationTheory/SecretKey/ChoiTransfer.lean from roseking/openAI-math-dataset: direct link, hf CLI and curl.
- Browser
- Download file 3.11 kB
-
https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/InformationTheory/SecretKey/ChoiTransfer.lean
- Command line
-
hf download hf://datasets/roseking/openAI-math-dataset/lean/OAI/InformationTheory/SecretKey/ChoiTransfer.lean
-
curl -L -o ChoiTransfer.lean https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/InformationTheory/SecretKey/ChoiTransfer.lean
3.11 kB
Lean 4 · 10
declarations statementsfull
def sharp {a b : ℕ} (F : ChannelCompletion.Map (Fin a) (Fin b)) :
Mat b →ₗ[ℂ] Mat a := body · 2 lines
ChannelCompletion.transposeMap.comp
((TensorCriterion.hsAdjoint F).comp ChannelCompletion.transposeMap)def omega (b : ℕ) : Fin b × Fin b → ℂ := body · 1 line
fun i => if i.1 = i.2 then 1 else 0def PublishedTransfer {a b c : ℕ}
(F : ChannelCompletion.Map (Fin a) (Fin b))
(G : ChannelCompletion.Map (Fin b) (Fin c)) : Prop := body · 2 lines
ChannelCompletion.choi (G.comp F) =
tensorMap (sharp F) G (outer (omega b) (omega b))def PublishedPPT {a b c : ℕ}
(F : ChannelCompletion.Map (Fin a) (Fin b))
(G : ChannelCompletion.Map (Fin b) (Fin c)) : Prop := body · 1 line
PPTType (sharp F) ∧ PPTType Glemma cp_smul {a b : ℕ} {F : Mat a →ₗ[ℂ] Mat b}
(hF : CompletelyPositive F) {s : ℂ} (hs : 0 ≤ s) :
CompletelyPositive (s • F) := by proof · 2 lines
intro k X hX
exact (hF k X hX).smul hslemma ppt_smul {a b : ℕ} {F : Mat a →ₗ[ℂ] Mat b}
(hF : PPTType F) {s : ℂ} (hs : 0 ≤ s) : PPTType (s • F) := by proof · 5 lines
refine ⟨cp_smul hF.1 hs, ?_⟩
have he : (s • F).comp (transposeLinear a) =
s • (F.comp (transposeLinear a)) := rfl
rw [he]
exact cp_smul hF.2 hslemma tensorMap_smul_left {a b c d : ℕ} (F : Mat a →ₗ[ℂ] Mat b)
(G : Mat c →ₗ[ℂ] Mat d) (s : ℂ)
(X : Matrix (Fin a × Fin c) (Fin a × Fin c) ℂ) :
tensorMap (s • F) G X = s • tensorMap F G X := by proof · 12 lines
ext i j
simp only [tensorMap, LinearMap.smul_apply, Matrix.smul_apply, smul_eq_mul,
Finset.mul_sum]
apply Finset.sum_congr rfl
intro x _
apply Finset.sum_congr rfl
intro y _
apply Finset.sum_congr rfl
intro z _
apply Finset.sum_congr rfl
intro w _
ringdef normalize {a b : ℕ} (Z : Matrix (Fin a × Fin b) (Fin a × Fin b) ℂ) := body · 1 line
(trace Z)⁻¹ • Zlemma normalize_density {a b : ℕ}
{Z : Matrix (Fin a × Fin b) (Fin a × Fin b) ℂ}
(hZ : Z.PosSemidef) (hne : Z ≠ 0) : Density (normalize Z) := by proof · 3 lines
have ht : trace Z ≠ 0 := fun h => hne (hZ.trace_eq_zero_iff.mp h)
refine ⟨hZ.smul (inv_nonneg.mpr hZ.trace_nonneg), ?_⟩
simp only [normalize, Matrix.trace_smul, smul_eq_mul, inv_mul_cancel₀ ht]theorem normalized_inClass_conditional {a b c : ℕ}
(F : ChannelCompletion.Map (Fin a) (Fin b))
(G : ChannelCompletion.Map (Fin b) (Fin c))
(hPPT : PublishedPPT F G) (htransfer : PublishedTransfer F G)
(hZ : (ChannelCompletion.choi (G.comp F)).PosSemidef)
(hne : ChannelCompletion.choi (G.comp F) ≠ 0) :
InClass (normalize (ChannelCompletion.choi (G.comp F))) := by proof · 5 lines
let Z := ChannelCompletion.choi (G.comp F)
refine ⟨normalize_density hZ hne, b, b, (trace Z)⁻¹ • sharp F, G,
omega b, ppt_smul hPPT.1 (inv_nonneg.mpr hZ.trace_nonneg), hPPT.2, ?_⟩
rw [tensorMap_smul_left, ← htransfer]
rflOutline