Offline · exact source
Exact Lean source

TensorFlatProjectorProduct

formalization/Cloning/TensorFlatProjectorProduct.lean

Source hash: 8daf7a30f2d06ac2e2565cd0a08f83ca673a58191643b8fa12e43df9154e13fe

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.TensorFlatProjectorRestriction
2 
3/-! Tensor products of actual sector isometries on the literal product subspaces. -/
4noncomputable section
5open scoped BigOperators InnerProductSpace
6namespace Cloning.TensorLie
7open Cloning.PCT
8set_option maxHeartbeats 1200000
9set_option synthInstance.maxHeartbeats 200000
10set_option backward.isDefEq.respectTransparency false
11local instance (n d : ℕ) : FiniteDimensional ℂ (TensorRegister n (Fin d)) :=
12  (registerBasis (Fin n → Fin d)).toOrthonormalBasis.toBasis.finiteDimensional_of_finite
13variable {n m n' m' d d' : ℕ}
14variable {I J : Type*} [Fintype I] [Fintype J] [DecidableEq I] [DecidableEq J]
15variable (P : Submodule ℂ (TensorRegister n (Fin d))) (Q : Submodule ℂ (TensorRegister m (Fin d)))
16    (P' : Submodule ℂ (TensorRegister n' (Fin d'))) (Q' : Submodule ℂ (TensorRegister m' (Fin d')))
17    (bP : OrthonormalBasis I ℂ P) (bQ : OrthonormalBasis J ℂ Q)
18    (f : P →ₗᵢ[ℂ] P') (g : Q →ₗᵢ[ℂ] Q')
19 
20def productIsometryFrame (ij : I × J) : tensorProductSector P' Q' :=
21  ⟨tensorJoin (f (bP ij.1)) (g (bQ ij.2)),
22    tensorJoin_mem_tensorProductSector P' Q' (f (bP ij.1)).property (g (bQ ij.2)).property⟩
23 
24theorem productIsometryFrame_orthonormal :
25    Orthonormal ℂ (productIsometryFrame P Q P' Q' bP bQ f g) := by
26  rw [orthonormal_iff_ite]
27  intro i j
28  change ⟪tensorJoin (f (bP i.1) : TensorRegister n' (Fin d')) (g (bQ i.2) : TensorRegister m' (Fin d')),
29    tensorJoin (f (bP j.1) : TensorRegister n' (Fin d')) (g (bQ j.2) : TensorRegister m' (Fin d'))⟫_ℂ = _
30  rw [tensorJoin_inner]
31  change ⟪f (bP i.1), f (bP j.1)⟫_ℂ * ⟪g (bQ i.2), g (bQ j.2)⟫_ℂ = _
32  rw [f.inner_map_map, g.inner_map_map,
33    orthonormal_iff_ite.mp bP.orthonormal, orthonormal_iff_ite.mp bQ.orthonormal]
34  by_cases hi : i.1 = j.1 <;> by_cases hj : i.2 = j.2 <;> simp [hi,hj,Prod.ext_iff]
35 
36/-- The Hilbert tensor product of two supplied genuine sector isometries. -/
37def productSectorIsometry : tensorProductSector P Q →ₗᵢ[ℂ] tensorProductSector P' Q' :=
38  (productIsometryFrame_orthonormal P Q P' Q' bP bQ f g).orthogonalFamily.linearIsometry.comp
39    (((productSectorBasis P Q bP bQ).repr.trans
40      (registerBasis (I×J)).toOrthonormalBasis.repr.symm).toLinearIsometry)
41 
42@[simp] theorem productSectorIsometry_basis (ij : I × J) :
43    productSectorIsometry P Q P' Q' bP bQ f g (productSectorBasis P Q bP bQ ij) =
44      productIsometryFrame P Q P' Q' bP bQ f g ij := by
45  have he : ((productSectorBasis P Q bP bQ).repr.trans
46      (registerBasis (I×J)).toOrthonormalBasis.repr.symm) (productSectorBasis P Q bP bQ ij) =
47        registerBasis (I×J) ij := by
48    apply (registerBasis (I×J)).toOrthonormalBasis.repr.injective
49    simp only [LinearIsometryEquiv.trans_apply, LinearIsometryEquiv.apply_symm_apply]
50    rw [OrthonormalBasis.repr_self, ← HilbertBasis.coe_toOrthonormalBasis,
51      OrthonormalBasis.repr_self]
52  change (productIsometryFrame_orthonormal P Q P' Q' bP bQ f g).orthogonalFamily.linearIsometry
53    (((productSectorBasis P Q bP bQ).repr.trans
54      (registerBasis (I×J)).toOrthonormalBasis.repr.symm) (productSectorBasis P Q bP bQ ij)) = _
55  rw [he, registerBasis_apply, OrthogonalFamily.linearIsometry_apply_single]
56  exact one_smul ℂ _
57 
58/-- Its action on literal product vectors is exactly the product of the maps. -/
59theorem productSectorIsometry_tensorJoin (x : P) (y : Q) :
60    (productSectorIsometry P Q P' Q' bP bQ f g
61      ⟨tensorJoin x y,tensorJoin_mem_tensorProductSector P Q x.property y.property⟩ :
62        TensorRegister (n'+m') (Fin d')) = tensorJoin (f x) (g y) := by
63  have hs : (⟨tensorJoin x y,tensorJoin_mem_tensorProductSector P Q x.property y.property⟩ :
64      tensorProductSector P Q) =
65      ∑ i : I, ∑ j : J, (bP.repr x i * bQ.repr y j) • productSectorBasis P Q bP bQ (i,j) := by
66    apply Subtype.ext
67    simpa only [Submodule.coe_sum, Submodule.coe_smul, productSectorBasis_apply,
68      productSectorFrame_coe] using tensorJoin_basis_expansion P Q bP bQ x y
69  have ht : tensorJoin (f x : TensorRegister n' (Fin d')) (g y : TensorRegister m' (Fin d')) =
70      ∑ i : I, ∑ j : J, (bP.repr x i * bQ.repr y j) •
71        tensorJoin (f (bP i) : TensorRegister n' (Fin d')) (g (bQ j) : TensorRegister m' (Fin d')) := by
72    have hx := congrArg (fun z : P' => (z : TensorRegister n' (Fin d')))
73      (congrArg f (bP.sum_repr x))
74    have hy := congrArg (fun z : Q' => (z : TensorRegister m' (Fin d')))
75      (congrArg g (bQ.sum_repr y))
76    simp only [map_sum, map_smul, Submodule.coe_sum, Submodule.coe_smul] at hx hy
77    conv_lhs => rw [← hx, ← hy]
78    simp only [tensorJoin_sum_left, tensorJoin_sum_right, tensorJoin_smul_left,
79      tensorJoin_smul_right, Finset.smul_sum, smul_smul]
80    rw [Finset.sum_comm]
81    simp only [mul_comm]
82  rw [hs, ht]
83  simp only [map_sum, map_smul, productSectorIsometry_basis, Submodule.coe_sum,
84    Submodule.coe_smul, productIsometryFrame]
85 
86end Cloning.TensorLie