Exact Lean source
Nonadditivity.NoncommutativeCSCrossing
Download original .lean · View on GitHub · Jump to source
Direct imports
Imported by project modules
1 direct reverse imports
Relationships above come from literal import commands. The declarations below link to types and references extracted from Lean’s environment. Source text is complete and unchanged.
Declarations in this module
16 project constants, including generated, internal and private declarations.
16 declarations
Nonadditivity.NoncommutativeCS.crossing_pair_norm_leNonadditivity.NoncommutativeCS.crossing_sum_norm_leNonadditivity.NoncommutativeCS.swapNonadditivity.NoncommutativeCS.swap._proof_1internal/detail/privateNonadditivity.NoncommutativeCS.swap._proof_10internal/detail/privateNonadditivity.NoncommutativeCS.swap._proof_11internal/detail/privateNonadditivity.NoncommutativeCS.swap._proof_2internal/detail/privateNonadditivity.NoncommutativeCS.swap._proof_3internal/detail/privateNonadditivity.NoncommutativeCS.swap._proof_4internal/detail/privateNonadditivity.NoncommutativeCS.swap._proof_5internal/detail/privateNonadditivity.NoncommutativeCS.swap._proof_6internal/detail/privateNonadditivity.NoncommutativeCS.swap._proof_7internal/detail/privateNonadditivity.NoncommutativeCS.swap._proof_8internal/detail/privateNonadditivity.NoncommutativeCS.swap._proof_9internal/detail/privateNonadditivity.NoncommutativeCS.swap.eq_1internal/detail/privateNonadditivity.NoncommutativeCS.swap_apply
Full module
1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.NoncommutativeCS78/-! # Crossing pair contractions910The two paired indices in `Aᵢ Bⱼ Cᵢ Dⱼ` cross. Applying ordinary11Cauchy--Schwarz separately to the two sums loses a cardinal factor. An actual12isometric permutation of the two memory registers avoids that loss.13-/1415noncomputable section1617namespace Nonadditivity.NoncommutativeCS1819open scoped BigOperators InnerProduct2021variable {𝕜 E : Type*} [RCLike 𝕜]22variable [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [CompleteSpace E]23variable {I J : Type*} [Fintype I] [Fintype J]2425/-- Swapping two finite Hilbert direct sums preserves the Hilbert norm. -/26def swap : DirectSum I (DirectSum J E) ≃ₗᵢ[𝕜] DirectSum J (DirectSum I E) where27toFun x := WithLp.toLp 2 (fun j => WithLp.toLp 2 (fun i => x i j))28invFun x := WithLp.toLp 2 (fun i => WithLp.toLp 2 (fun j => x j i))29left_inv := by intro x; rfl30right_inv := by intro x; rfl31map_add' := by intros; rfl32map_smul' := by intros; rfl33norm_map' := by34intro x35apply (sq_eq_sq₀ (norm_nonneg _) (norm_nonneg _)).mp36simp only [PiLp.norm_sq_eq_of_L2]37exact Finset.sum_comm3839omit [CompleteSpace E] in40@[simp] theorem swap_apply (x : DirectSum I (DirectSum J E)) (j : J) (i : I) :41swap (𝕜 := 𝕜) x j i = x i j := rfl4243/-- Both indices may remain open across a uniformly bounded middle factor. -/44theorem crossing_sum_norm_le45(A C : I → E →L[𝕜] E) (B D : J → E →L[𝕜] E)46(X : I → J → E →L[𝕜] E) (q : ℝ) (hq : 0 ≤ q)47(hX : ∀ i j, ‖X i j‖ ≤ q) :48‖∑ i, ∑ j, A i ∘L B j ∘L X i j ∘L C i ∘L D j‖ ≤49Real.sqrt ‖rowGram A‖ * Real.sqrt ‖rowGram B‖ * q *50Real.sqrt ‖columnGram C‖ * Real.sqrt ‖columnGram D‖ := by51let M : DirectSum I (DirectSum J E) →L[𝕜] DirectSum I (DirectSum J E) :=52diagonal (fun i => diagonal (X i))53have hM : ‖M‖ ≤ q := diagonal_norm_le _ q hq54(fun i => diagonal_norm_le _ q hq (hX i))55let S : DirectSum J (DirectSum I E) →L[𝕜] DirectSum I (DirectSum J E) :=56(swap (𝕜 := 𝕜) (E := E) (I := J) (J := I)).toLinearIsometry.toContinuousLinearMap57have hS : ‖S‖ ≤ 1 := LinearIsometry.norm_toContinuousLinearMap_le _58let V := (amplify (I := J) (column C)) ∘L column D59have hV : ‖V‖ ≤ Real.sqrt ‖columnGram C‖ * Real.sqrt ‖columnGram D‖ := by60exact (ContinuousLinearMap.opNorm_comp_le _ _).trans61(mul_le_mul ((amplify_norm_le _).trans (column_norm_le C)) (column_norm_le D)62(norm_nonneg _) (Real.sqrt_nonneg _))63let W := row A ∘L amplify (I := I) (row B)64have hW : ‖W‖ ≤ Real.sqrt ‖rowGram A‖ * Real.sqrt ‖rowGram B‖ := by65exact (ContinuousLinearMap.opNorm_comp_le _ _).trans66(mul_le_mul (row_norm_le A) ((amplify_norm_le _).trans (row_norm_le B))67(norm_nonneg _) (Real.sqrt_nonneg _))68have hid : ∑ i, ∑ j, A i ∘L B j ∘L X i j ∘L C i ∘L D j = W ∘L M ∘L S ∘L V := by69ext x70simp [W, M, S, V, swap, map_sum]71rw [hid]72calc73_ ≤ ‖W‖ * (‖M‖ * (‖S‖ * ‖V‖)) := by74apply (ContinuousLinearMap.opNorm_comp_le _ _).trans75apply mul_le_mul_of_nonneg_left _ (norm_nonneg _)76apply (ContinuousLinearMap.opNorm_comp_le _ _).trans77exact mul_le_mul_of_nonneg_left (ContinuousLinearMap.opNorm_comp_le _ _) (norm_nonneg _)78_ ≤ (Real.sqrt ‖rowGram A‖ * Real.sqrt ‖rowGram B‖) *79(q * (1 * (Real.sqrt ‖columnGram C‖ * Real.sqrt ‖columnGram D‖))) :=80mul_le_mul hW (mul_le_mul hM (mul_le_mul hS hV (norm_nonneg _) (by norm_num))81(by positivity) hq) (by positivity) (by positivity)82_ = _ := by ring8384/-- A crossing pair partition, with the exact four Gram factors. -/85theorem crossing_pair_norm_le86(A C : I → E →L[𝕜] E) (B D : J → E →L[𝕜] E) :87‖∑ i, ∑ j, A i ∘L B j ∘L C i ∘L D j‖ ≤88Real.sqrt ‖rowGram A‖ * Real.sqrt ‖rowGram B‖ *89Real.sqrt ‖columnGram C‖ * Real.sqrt ‖columnGram D‖ := by90simpa only [ContinuousLinearMap.id_comp, mul_one] using91crossing_sum_norm_le A C B D (fun _ _ => ContinuousLinearMap.id 𝕜 E) 1 (by norm_num)92(fun _ _ => ContinuousLinearMap.norm_id_le)9394end Nonadditivity.NoncommutativeCS