Exact Lean source
TensorFlatProjectorNaturality
formalization/Cloning/TensorFlatProjectorNaturality.lean
Source hash: 53cd96a33fec8f6322ffee8322041d3dba200b204aaf9a4b9af49c2785aab2d3
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
theorem
Cloning.TensorLie.coordinateWordEmbedding_updatetheorem Cloning.TensorLie.coordinateTensorEmbedding_slottheorem Cloning.TensorLie.coordinateTensorEmbedding_collectivetheorem Cloning.TensorLie.coordinateTensorEmbedding_slot_outsidetheorem Cloning.TensorLie.coordinateTensorEmbedding_collective_outsidetheorem Cloning.TensorLie.coordinateTensorEmbedding_highest1import Cloning.TensorFlatProjectorEmbedding
2import Cloning.TensorFlatProjectorDimensions
3
4/-! Exact Lie naturality and padded highest tensors under coordinate inclusion. -/
5noncomputable section
6open scoped BigOperators InnerProductSpace
7namespace Cloning.TensorLie
8open Cloning.PCT
9set_option maxHeartbeats 1000000
10set_option backward.isDefEq.respectTransparency false
11variable {n r k : ℕ}
12
13theorem coordinateWordEmbedding_update (v : Fin n → Fin r) (t : Fin n) (a : Fin r) :
14 coordinateWordEmbedding n r k (Function.update v t a) =
15 Function.update (coordinateWordEmbedding n r k v) t (Fin.castAdd k a) := by
16 funext s
17 by_cases h : s = t
18 · subst s; simp [coordinateWordEmbedding]
19 · simp [coordinateWordEmbedding, Function.update_of_ne h]
20
21/-- Coordinate tensor inclusion intertwines every supported matrix unit. -/
22theorem coordinateTensorEmbedding_slot (x : TensorRegister n (Fin r)) (t : Fin n)
23 (a b : Fin r) :
24 coordinateTensorEmbedding n r k (slotGenerator t a b x) =
25 slotGenerator t (Fin.castAdd k a) (Fin.castAdd k b) (coordinateTensorEmbedding n r k x) := by
26 let I := coordinateTensorEmbedding n r k
27 have he : I.toLinearMap.comp (slotGenerator t a b).toLinearMap =
28 (slotGenerator t (Fin.castAdd k a) (Fin.castAdd k b)).toLinearMap.comp I.toLinearMap := by
29 apply (registerBasis (Fin n → Fin r)).toOrthonormalBasis.toBasis.ext
30 intro v
31 simp only [OrthonormalBasis.coe_toBasis, HilbertBasis.coe_toOrthonormalBasis]
32 change I (slotGenerator t a b (registerBasis _ v)) =
33 slotGenerator t (Fin.castAdd k a) (Fin.castAdd k b) (I (registerBasis _ v))
34 dsimp only [I]
35 rw [coordinateTensorEmbedding_basis, slotGenerator_basis, slotGenerator_basis]
36 by_cases hv : v t = b
37 · simp only [hv, if_true, Fin.castAdd_inj, coordinateTensorEmbedding_basis]
38 congr 1
39 exact coordinateWordEmbedding_update v t a
40 · simp only [hv, if_false, Fin.castAdd_inj, map_zero]
41 exact LinearMap.congr_fun he x
42
43theorem coordinateTensorEmbedding_collective (x : TensorRegister n (Fin r)) (a b : Fin r) :
44 coordinateTensorEmbedding n r k (collectiveGenerator n a b x) =
45 collectiveGenerator n (Fin.castAdd k a) (Fin.castAdd k b) (coordinateTensorEmbedding n r k x) := by
46 simp only [collectiveGenerator, ContinuousLinearMap.sum_apply, map_sum]
47 exact Finset.sum_congr rfl (fun t _ => coordinateTensorEmbedding_slot x t a b)
48
49/-- An unsupported input column of a matrix unit kills every embedded tensor. -/
50theorem coordinateTensorEmbedding_slot_outside (x : TensorRegister n (Fin r)) (t : Fin n)
51 (a : Fin (r+k)) (b : Fin k) :
52 slotGenerator t a (Fin.natAdd r b) (coordinateTensorEmbedding n r k x) = 0 := by
53 let I := coordinateTensorEmbedding n r k
54 have he : (slotGenerator t a (Fin.natAdd r b)).toLinearMap.comp I.toLinearMap = 0 := by
55 apply (registerBasis (Fin n → Fin r)).toOrthonormalBasis.toBasis.ext
56 intro v
57 simp only [OrthonormalBasis.coe_toBasis, HilbertBasis.coe_toOrthonormalBasis]
58 change slotGenerator t a (Fin.natAdd r b) (I (registerBasis _ v)) = 0
59 dsimp only [I]
60 rw [coordinateTensorEmbedding_basis, slotGenerator_basis]
61 have hne : Fin.castAdd k (v t) ≠ Fin.natAdd r b := by
62 intro h
63 have hv := (v t).isLt
64 have hh := congrArg Fin.val h
65 change (v t).val = r+b.val at hh
66 omega
67 simp [hne]
68 exact LinearMap.congr_fun he x
69
70theorem coordinateTensorEmbedding_collective_outside (x : TensorRegister n (Fin r))
71 (a : Fin (r+k)) (b : Fin k) :
72 collectiveGenerator n a (Fin.natAdd r b) (coordinateTensorEmbedding n r k x) = 0 := by
73 simp only [collectiveGenerator, ContinuousLinearMap.sum_apply,
74 coordinateTensorEmbedding_slot_outside, Finset.sum_const_zero]
75
76/-- Every actual highest tensor embeds as a highest tensor of the padded weight. -/
77theorem coordinateTensorEmbedding_highest
78 (Ω : TensorRegister n (Fin r)) (mu : Fin r → ℕ)
79 (hweight : ∀ a, collectiveGenerator n a a Ω = (mu a : ℂ) • Ω)
80 (hraise : ∀ a b, a < b → collectiveGenerator n a b Ω = 0) :
81 (∀ a, collectiveGenerator n a a (coordinateTensorEmbedding n r k Ω) =
82 (padPartition mu k a : ℂ) • coordinateTensorEmbedding n r k Ω) ∧
83 (∀ a b, a < b → collectiveGenerator n a b (coordinateTensorEmbedding n r k Ω) = 0) := by
84 constructor
85 · intro a
86 induction a using Fin.addCases with
87 | left a => rw [← coordinateTensorEmbedding_collective, hweight, map_smul, padPartition_left]
88 | right a => simp [coordinateTensorEmbedding_collective_outside]
89 · intro a b
90 induction b using Fin.addCases with
91 | right b => intro _; exact coordinateTensorEmbedding_collective_outside Ω a b
92 | left b =>
93 induction a using Fin.addCases with
94 | left a =>
95 intro hab
96 rw [← coordinateTensorEmbedding_collective, hraise a b (show a < b from hab), map_zero]
97 | right a =>
98 intro hab
99 have hh : r+a.val < b.val := hab
100 omega
101
102end Cloning.TensorLie