Offline · exact source
Exact Lean source

PCTPurityFidelityBoundAlgebra

formalization/Cloning/PCTPurityFidelityBoundAlgebra.lean

Source hash: 29c0cccb28c31458031e93acbc067ccd2a44f7217bde9ee4fb30b982dcb30079

Full source copied without mathematical changes from the snapshot whose input hash matches the passing audit. Select a line number for a stable source pointer.

The declarations belong to the compiled inventory covered by the project’s shared axiom audit. That audit records an aggregate union, without attributing axioms to individual declarations.

Declarations in this module
1import Cloning.PCTGaussianCovariance
2import Mathlib.Analysis.Matrix.Normed
3import Mathlib.Tactic.Module
4 
5/-! Uniform rational-curve norm estimates used for physical projector PCT
6purity domination. The norm on matrices is explicitly Frobenius. -/
7noncomputable section
8open scoped BigOperators Matrix InnerProductSpace ComplexOrder NNReal Matrix.Norms.Frobenius
9namespace Cloning.PCTPurity
10open Cloning.PCT Cloning.PCTReducedGaussian Cloning.PCTGaussianCovariance
11set_option backward.isDefEq.respectTransparency true
12set_option maxHeartbeats 500000
13 
14lemma rational_curve_difference {E : Type*} [AddCommGroup E] [Module ℝ E]
15    (B A C : E) (t a : ℝ) (hd : 1+t^2*a^2≠0) :
16    (1+t^2*a^2)⁻¹ • (B+t • A+t^2 • C)-B=
17      (1+t^2*a^2)⁻¹ • (t • A+t^2 • (C-a^2 • B)) := by
18  have hc : (1+t^2*a^2)⁻¹-1= -((1+t^2*a^2)⁻¹*t^2*a^2) := by
19    field_simp [hd]
20    ring
21  have hB : (1+t^2*a^2)⁻¹ • B-B= -((1+t^2*a^2)⁻¹*t^2*a^2) • B := by
22    calc
23      _ = ((1+t^2*a^2)⁻¹-1) • B := by rw [sub_smul,one_smul]
24      _ = _ := by rw [hc]
25  calc
26    _ = ((1+t^2*a^2)⁻¹ • B-B)+
27        ((1+t^2*a^2)⁻¹*t) • A+((1+t^2*a^2)⁻¹*t^2) • C := by module
28    _ = _ := by rw [hB]; module
29 
30set_option backward.isDefEq.respectTransparency false in
31lemma rational_curve_norm_le {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
32    (B A C : E) (t a c : ℝ) (ht : 0≤t) (ha : 0≤a) (hc : c≤3/4)
33    (hA : ‖A‖≤2*c*a) (hC : ‖C-a^2 • B‖≤2*a^2) :
34    ‖(1+t^2*a^2)⁻¹ • (B+t • A+t^2 • C)-B‖≤2*t*a := by
35  have hd : 0<1+t^2*a^2 := by positivity
36  rw [rational_curve_difference B A C t a hd.ne']
37  calc
38    _ = (1+t^2*a^2)⁻¹*‖t • A+t^2 • (C-a^2 • B)‖ := by
39      rw [norm_smul,Real.norm_eq_abs,abs_of_pos (inv_pos.2 hd)]
40    _ ≤ (1+t^2*a^2)⁻¹*(t*‖A‖+t^2*‖C-a^2 • B‖) := by
41      apply mul_le_mul_of_nonneg_left _ (inv_nonneg.2 hd.le)
42      have htn : ‖t‖=t := Real.norm_of_nonneg ht
43      have hsn : ‖(t^(2:ℕ):ℝ)‖=t^(2:ℕ) := Real.norm_of_nonneg (sq_nonneg t)
44      simpa only [norm_smul,htn,hsn] using
45        norm_add_le (t • A) ((t^(2:ℕ)) • (C-a^2 • B))
46    _ ≤ (1+t^2*a^2)⁻¹*(t*(2*c*a)+t^2*(2*a^2)) := by
47      exact mul_le_mul_of_nonneg_left
48        (add_le_add (mul_le_mul_of_nonneg_left hA ht)
49          (mul_le_mul_of_nonneg_left hC (sq_nonneg t))) (inv_nonneg.2 hd.le)
50    _ ≤ 2*t*a := by
51      apply (inv_mul_le_iff₀ hd).2
52      have hx : 0≤t*a := mul_nonneg ht ha
53      have hq : c+t*a≤1+(t*a)^2 := by nlinarith [sq_nonneg (t*a-1/2)]
54      have hh := mul_le_mul_of_nonneg_left hq (show 0≤2*(t*a) by positivity)
55      nlinarith
56 
57lemma frobenius_norm_eq_coefficientVector {A B : Type*} [Fintype A] [Fintype B]
58    [DecidableEq A] [DecidableEq B] (Z : Matrix A B ℂ) :
59    ‖Z‖=‖coefficientVector Z‖ := by
60  rw [Matrix.frobenius_norm_def]
61  simp_rw [Real.rpow_two]
62  rw [←coefficientVector_norm_sq,←Real.sqrt_eq_rpow,Real.sqrt_sq (norm_nonneg _)]
63 
64lemma frobenius_norm_one {r : ℕ} : ‖(1 : Matrix (Fin r) (Fin r) ℂ)‖=Real.sqrt r := by
65  have h := Matrix.frobenius_nnnorm_one (n := Fin r) (α := ℂ)
66  simpa only [Fintype.card_fin,nnnorm_one,mul_one,Real.coe_sqrt,NNReal.coe_natCast] using
67    congrArg (fun q : ℝ≥0 => (q : ℝ)) h
68 
69lemma inverse_sqrt_le_three_quarters {r : ℕ} (hr : 2≤r) : (Real.sqrt r)⁻¹≤3/4 := by
70  have hrR : (2:ℝ)≤r := by exact_mod_cast hr
71  have hs := Real.sq_sqrt (show (0:ℝ)≤r by positivity)
72  have hs0 : 0<Real.sqrt r := Real.sqrt_pos.2 (by positivity)
73  have hlow : (4/3:ℝ)≤Real.sqrt r := Real.le_sqrt_of_sq_le (by nlinarith)
74  rw [←one_div]
75  apply (div_le_iff₀ hs0).2
76  linarith
77 
78set_option backward.isDefEq.respectTransparency false in
79lemma flat_rational_frobenius_le {r : ℕ} (hr : 2≤r)
80    (Z : Matrix (Fin r) (Fin r) ℂ) (t : ℝ) (ht : 0≤t) :
81    ‖(1+t^2*‖Z‖^2)⁻¹ •
82      (((r:ℝ)⁻¹ • (1 : Matrix (Fin r) (Fin r) ℂ))+
83        t • ((Real.sqrt r)⁻¹ • (Z+Zᴴ))+t^2 • (Z*Zᴴ))-
84        (r:ℝ)⁻¹ • (1 : Matrix (Fin r) (Fin r) ℂ)‖≤2*t*‖Z‖ := by
85  have hr0 : (0:ℝ)<r := by exact_mod_cast (show 0<r by omega)
86  have hc0 : 0≤(Real.sqrt r)⁻¹ := inv_nonneg.2 (Real.sqrt_nonneg _)
87  have hc := inverse_sqrt_le_three_quarters hr
88  have hB : ‖(r:ℝ)⁻¹ • (1 : Matrix (Fin r) (Fin r) ℂ)‖≤1 := by
89    rw [norm_smul,Real.norm_eq_abs,abs_of_pos (inv_pos.2 hr0),frobenius_norm_one]
90    have hsq := Real.sq_sqrt hr0.le
91    have hs0 : 0<Real.sqrt r := Real.sqrt_pos.2 hr0
92    have he : (r:ℝ)⁻¹*Real.sqrt r=(Real.sqrt r)⁻¹ := by
93      field_simp
94      nlinarith
95    rw [he]
96    linarith
97  apply rational_curve_norm_le _ _ _ t ‖Z‖ (Real.sqrt r)⁻¹ ht (norm_nonneg _) hc
98  · rw [norm_smul,Real.norm_eq_abs,abs_of_nonneg hc0]
99    have hZ := norm_add_le Z Zᴴ
100    rw [Matrix.frobenius_norm_conjTranspose] at hZ
101    calc
102      _ ≤ (Real.sqrt r)⁻¹*(‖Z‖+‖Z‖) := mul_le_mul_of_nonneg_left hZ hc0
103      _ = _ := by ring
104  · calc
105      _ ≤ ‖Z*Zᴴ‖+‖‖Z‖^2 • ((r:ℝ)⁻¹ • (1 : Matrix (Fin r) (Fin r) ℂ))‖ := norm_sub_le _ _
106      _ ≤ ‖Z‖*‖Zᴴ‖+‖Z‖^2*1 := by
107        apply add_le_add (Matrix.frobenius_norm_mul Z Zᴴ)
108        rw [norm_smul,Real.norm_eq_abs,abs_of_nonneg (sq_nonneg _)]
109        exact mul_le_mul_of_nonneg_left hB (sq_nonneg _)
110      _ = _ := by rw [Matrix.frobenius_norm_conjTranspose]; ring
111 
112end Cloning.PCTPurity