Download data/lean/OAI/Analysis/HyperbolicCones/ComplexPositive.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.68 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/HyperbolicCones/ComplexPositive.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/HyperbolicCones/ComplexPositive.lean
-
curl -L -o ComplexPositive.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/HyperbolicCones/ComplexPositive.lean
3.68 kB
| import OAI.Analysis.HyperbolicCones.MatrixComplex | |
| import OAI.Analysis.HyperbolicCones.FormPositive | |
| namespace OAI | |
| noncomputable section | |
| open scoped BigOperators Matrix.Norms.L2Operator MatrixOrder ComplexOrder | |
| open Matrix | |
| universe u | |
| namespace Paper256 | |
| theorem qMatrix_transpose {R : Type u} [CommRing R] (y : Fin 3 β R) : | |
| (qMatrix y)α΅ = qMatrix y := by | |
| ext i j | |
| by_cases h : i = j | |
| Β· subst j; rfl | |
| Β· simp [qMatrix, h, Ne.symm h, mul_comm] | |
| theorem phi_transpose {R : Type u} [CommRing R] (y : Fin 3 β R) (X : Mat 4 R) : | |
| phi y Xα΅ = (phi y X)α΅ := by | |
| have hQ (i j : Fin 3) : qMatrix y j i = qMatrix y i j := | |
| congrFun (congrFun (qMatrix_transpose y) i) j | |
| ext i j | |
| refine Fin.cases ?_ (fun i => ?_) i <;> | |
| refine Fin.cases ?_ (fun j => ?_) j | |
| Β· change Matrix.trace (qMatrix y * (X.submatrix Fin.succ Fin.succ)α΅) = | |
| Matrix.trace (qMatrix y * X.submatrix Fin.succ Fin.succ) | |
| conv_lhs => rw [β qMatrix_transpose y] | |
| rw [β Matrix.transpose_mul, Matrix.trace_transpose, Matrix.trace_mul_comm] | |
| Β· simp only [phi, Fin.cases_zero, Fin.cases_succ, Matrix.transpose_apply] | |
| congr 1 | |
| apply Finset.sum_congr rfl | |
| intro k _ | |
| rw [hQ] | |
| ring | |
| Β· simp only [phi, Fin.cases_zero, Fin.cases_succ, Matrix.transpose_apply] | |
| congr 1 | |
| apply Finset.sum_congr rfl | |
| intro k _ | |
| rw [hQ] | |
| ring | |
| Β· simp only [phi, Fin.cases_succ, Matrix.transpose_apply] | |
| rw [hQ] | |
| theorem phi_conjTranspose (y : Fin 3 β β) (X : Mat 4 β) : | |
| (phi (fun i => (y i : β)) X)α΄΄ = phi (fun i => (y i : β)) Xα΄΄ := by | |
| change ((phi (fun i => (y i : β)) X)α΅).map (starRingEnd β) = _ | |
| rw [β phi_transpose, phi_map] | |
| have hy : (fun i => (starRingEnd β) (y i : β)) = (fun i => (y i : β)) := | |
| funext fun i => Complex.conj_ofReal (y i) | |
| rw [hy] | |
| rfl | |
| theorem phi_complex_rank_one (y : Fin 3 β β) (u v : Fin 4 β β) : | |
| dotProduct (star u) | |
| (phi (fun i => (y i : β)) (vecMulVec v (star v)) *α΅₯ u) = | |
| dotProduct (star (fun i : Fin 3 => v 0 * u i.succ - u 0 * v i.succ)) | |
| (qMatrix (fun i => (y i : β)) *α΅₯ | |
| (fun i : Fin 3 => v 0 * u i.succ - u 0 * v i.succ)) := by | |
| simp [dotProduct, mulVec, phi, qMatrix, Matrix.trace, Matrix.mul_apply, | |
| Matrix.submatrix, vecMulVec, Fin.sum_univ_succ] | |
| ring | |
| theorem phi_complex_outer_posSemidef (y : Fin 3 β β) (v : Fin 4 β β) : | |
| (phi (fun i => (y i : β)) (vecMulVec v (star v))).PosSemidef := by | |
| have hq : (qMatrix (fun i => (y i : β))).PosSemidef := by | |
| have h := posSemidef_complexify (qMatrix y) (qMatrix_posSemidef y) | |
| change ((qMatrix y).map (algebraMap β β)).PosSemidef at h | |
| rw [qMatrix_map] at h | |
| exact h | |
| apply Matrix.PosSemidef.of_dotProduct_mulVec_nonneg | |
| Β· show (phi (fun i => (y i : β)) (vecMulVec v (star v)))α΄΄ = _ | |
| rw [phi_conjTranspose, (posSemidef_vecMulVec_self_star v).isHermitian.eq] | |
| Β· intro u | |
| rw [phi_complex_rank_one] | |
| exact hq.dotProduct_mulVec_nonneg _ | |
| theorem phi_complex_posSemidef (y : Fin 3 β β) (X : Mat 4 β) (hX : X.PosSemidef) : | |
| (phi (fun i => (y i : β)) X).PosSemidef := by | |
| obtain β¨B, hBβ© := CStarAlgebra.nonneg_iff_eq_star_mul_self.mp hX.nonneg | |
| have hx : X = β i, vecMulVec (star (B i)) (B i) := by | |
| rw [hB] | |
| ext i j | |
| simp [Matrix.mul_apply, Matrix.sum_apply, vecMulVec] | |
| rw [hx] | |
| change ((phiLinear (fun i => (y i : β))) (β i, vecMulVec (star (B i)) (B i))).PosSemidef | |
| rw [map_sum] | |
| apply Matrix.posSemidef_sum | |
| intro i _ | |
| change (phi (fun i => (y i : β)) (vecMulVec (star (B i)) (B i))).PosSemidef | |
| simpa only [star_star] using phi_complex_outer_posSemidef y (star (B i)) | |
| end Paper256 | |
| end | |
| end OAI | |