Download data/lean/OAI/Algebra/Finitistic/Rectification/ExternalTensor.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 9.18 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Algebra/Finitistic/Rectification/ExternalTensor.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Algebra/Finitistic/Rectification/ExternalTensor.lean
-
curl -L -o ExternalTensor.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Algebra/Finitistic/Rectification/ExternalTensor.lean
9.18 kB
| import Mathlib.RingTheory.TensorProduct.Maps | |
| import Mathlib.LinearAlgebra.TensorProduct.Basis | |
| import Mathlib.Algebra.Module.Projective | |
| import Mathlib.LinearAlgebra.FiniteDimensional.Basic | |
| namespace OAI | |
| open scoped TensorProduct | |
| noncomputable section | |
| namespace ExternalTensor | |
| variable (k B M N : Type*) [Field k] [Ring B] [Algebra k B] | |
| [AddCommGroup M] [Module k M] [Module B M] [IsScalarTower k B M] | |
| [AddCommGroup N] [Module k N] [Module Bα΅α΅α΅ N] [IsScalarTower k Bα΅α΅α΅ N] | |
| def leftAction : B ββ[k] Module.End k (M β[k] N) := | |
| (Module.End.rTensorAlgHom k M N).comp (Algebra.lsmul k k M) | |
| def rightAction : Bα΅α΅α΅ ββ[k] Module.End k (M β[k] N) := | |
| (Module.End.lTensorAlgHom k N M).comp (Algebra.lsmul k k N) | |
| omit [Module Bα΅α΅α΅ N] [IsScalarTower k Bα΅α΅α΅ N] in | |
| @[simp] theorem leftAction_tmul (b : B) (m : M) (n : N) : | |
| leftAction k B M N b (m ββ[k] n) = (b β’ m) ββ[k] n := rfl | |
| omit [Module B M] [IsScalarTower k B M] in | |
| @[simp] theorem rightAction_tmul (b : Bα΅α΅α΅) (m : M) (n : N) : | |
| rightAction k B M N b (m ββ[k] n) = m ββ[k] (b β’ n) := rfl | |
| theorem actions_commute (b : B) (c : Bα΅α΅α΅) : | |
| Commute (leftAction k B M N b) (rightAction k B M N c) := by | |
| apply TensorProduct.ext | |
| ext m n | |
| rfl | |
| /-- The genuine enveloping algebra representation; the right action is encoded by Bα΅α΅α΅. -/ | |
| def action : (B β[k] Bα΅α΅α΅) ββ[k] Module.End k (M β[k] N) := | |
| Algebra.TensorProduct.lift (leftAction k B M N) (rightAction k B M N) | |
| (actions_commute k B M N) | |
| @[instance_reducible] def bimodule : Module (B β[k] Bα΅α΅α΅) (M β[k] N) := | |
| Module.compHom (M β[k] N) (action k B M N).toRingHom | |
| @[instance_reducible] def rightModule : Module Bα΅α΅α΅ (M β[k] N) := | |
| Module.compHom (M β[k] N) (rightAction k B M N).toRingHom | |
| attribute [local instance] bimodule rightModule | |
| @[simp] theorem smul_tmul (b : B) (c : Bα΅α΅α΅) (m : M) (n : N) : | |
| (b ββ[k] c) β’ (m ββ[k] n) = (b β’ m) ββ[k] (c β’ n) := rfl | |
| omit [Module B M] [IsScalarTower k B M] in | |
| @[simp] theorem right_smul_tmul (c : Bα΅α΅α΅) (m : M) (n : N) : | |
| c β’ (m ββ[k] n) = m ββ[k] (c β’ n) := rfl | |
| /-- Factor swap, with the external right action on the source. -/ | |
| def rightSwap : (M β[k] N) ββ[Bα΅α΅α΅] (N β[k] M) where | |
| __ := (TensorProduct.comm k M N).toAddEquiv | |
| map_smul' c x := by | |
| induction x using TensorProduct.inductionOn with | |
| | tmul m n => simp [right_smul_tmul, TensorProduct.smul_tmul'] | |
| | add x y hx hy => simp_all [smul_add] | |
| omit [Module B M] [IsScalarTower k B M] in | |
| /-- In fact no dimension restriction on M is needed for right projectivity. -/ | |
| theorem projective_right [Module.Projective Bα΅α΅α΅ N] : | |
| Module.Projective Bα΅α΅α΅ (M β[k] N) := | |
| Module.Projective.of_equiv (rightSwap k B M N).symm | |
| theorem finiteDimensional [FiniteDimensional k M] [FiniteDimensional k N] : | |
| FiniteDimensional k (M β[k] N) := | |
| Module.Finite.equiv | |
| (TensorProduct.equivFinsuppOfBasisLeft (Module.finBasis k M)).symm | |
| /-- A k-basis of the left factor gives an actual right-module direct-sum decomposition. -/ | |
| def rightBasisEquiv {ΞΉ : Type*} [DecidableEq ΞΉ] (v : Module.Basis ΞΉ k M) : | |
| (M β[k] N) ββ[Bα΅α΅α΅] (ΞΉ ββ N) where | |
| __ := (TensorProduct.equivFinsuppOfBasisLeft v).toAddEquiv | |
| map_smul' c x := by | |
| induction x using TensorProduct.inductionOn with | |
| | tmul m n => | |
| ext i | |
| change (TensorProduct.equivFinsuppOfBasisLeft v) | |
| (c β’ (m ββ[k] n)) i = c β’ (TensorProduct.equivFinsuppOfBasisLeft v) (m ββ[k] n) i | |
| rw [right_smul_tmul, TensorProduct.equivFinsuppOfBasisLeft_apply_tmul_apply, | |
| TensorProduct.equivFinsuppOfBasisLeft_apply_tmul_apply] | |
| exact smul_comm (v.repr m i) c n | |
| | add x y hx hy => simp_all [smul_add] | |
| omit [Module B M] [IsScalarTower k B M] in | |
| @[simp] theorem rightBasisEquiv_tmul {ΞΉ : Type*} [DecidableEq ΞΉ] | |
| (v : Module.Basis ΞΉ k M) (m : M) (n : N) (i : ΞΉ) : | |
| rightBasisEquiv k B M N v (m ββ[k] n) i = v.repr m i β’ n := | |
| TensorProduct.equivFinsuppOfBasisLeft_apply_tmul_apply v m n i | |
| omit [Module B M] [IsScalarTower k B M] in | |
| theorem finite_right [FiniteDimensional k M] [Module.Finite Bα΅α΅α΅ N] : | |
| Module.Finite Bα΅α΅α΅ (M β[k] N) := | |
| Module.Finite.equiv (rightBasisEquiv k B M N (Module.finBasis k M)).symm | |
| /-- The chosen right action is the restriction of the enveloping action. -/ | |
| theorem right_eq_enveloping (c : Bα΅α΅α΅) (x : M β[k] N) : | |
| c β’ x = (1 ββ[k] c : B β[k] Bα΅α΅α΅) β’ x := by | |
| induction x using TensorProduct.inductionOn with | |
| | tmul m n => simp | |
| | add x y hx hy => simp_all [smul_add] | |
| /-- The usual left action on the first tensor factor is the other restriction. -/ | |
| theorem left_eq_enveloping (b : B) (x : M β[k] N) : | |
| b β’ x = (b ββ[k] (1 : Bα΅α΅α΅)) β’ x := by | |
| induction x using TensorProduct.inductionOn with | |
| | tmul m n => simp [TensorProduct.smul_tmul'] | |
| | add x y hx hy => simp_all [smul_add] | |
| instance commutingActions : SMulCommClass B Bα΅α΅α΅ (M β[k] N) where | |
| smul_comm b c x := by | |
| induction x using TensorProduct.inductionOn with | |
| | tmul m n => simp [TensorProduct.smul_tmul'] | |
| | add x y hx hy => simp_all [smul_add] | |
| instance rightScalarTower : IsScalarTower k Bα΅α΅α΅ (M β[k] N) where | |
| smul_assoc r c x := by | |
| change rightAction k B M N (r β’ c) x = r β’ rightAction k B M N c x | |
| rw [map_smul] | |
| rfl | |
| instance envelopingScalarTower : IsScalarTower k (B β[k] Bα΅α΅α΅) (M β[k] N) where | |
| smul_assoc r a x := by | |
| change action k B M N (r β’ a) x = r β’ action k B M N a x | |
| rw [map_smul] | |
| rfl | |
| variable {k B M N} | |
| variable {M' N' : Type*} | |
| [AddCommGroup M'] [Module k M'] [Module B M'] [IsScalarTower k B M'] | |
| [AddCommGroup N'] [Module k N'] [Module Bα΅α΅α΅ N'] [IsScalarTower k Bα΅α΅α΅ N'] | |
| /-- Tensor of a left-module map and a right-module map is enveloping-linear. -/ | |
| def map (f : M ββ[B] M') (g : N ββ[Bα΅α΅α΅] N') : | |
| (M β[k] N) ββ[B β[k] Bα΅α΅α΅] (M' β[k] N') where | |
| __ := (TensorProduct.map (f.restrictScalars k) (g.restrictScalars k)).toAddMonoidHom | |
| map_smul' a x := by | |
| induction a using TensorProduct.inductionOn with | |
| | tmul b c => | |
| induction x using TensorProduct.inductionOn with | |
| | tmul m n => simp [smul_tmul] | |
| | add x y hx hy => simp_all [smul_add] | |
| | add a b ha hb => simp_all [add_smul] | |
| @[simp] theorem map_tmul (f : M ββ[B] M') (g : N ββ[Bα΅α΅α΅] N') (m : M) (n : N) : | |
| map (k := k) f g (m ββ[k] n) = f m ββ[k] g n := rfl | |
| @[simp] theorem map_id : | |
| map (k := k) (LinearMap.id : M ββ[B] M) (LinearMap.id : N ββ[Bα΅α΅α΅] N) = | |
| LinearMap.id := by | |
| ext x | |
| induction x using TensorProduct.inductionOn with | |
| | tmul m n => rfl | |
| | add x y hx hy => simp_all | |
| variable {M'' N'' : Type*} | |
| [AddCommGroup M''] [Module k M''] [Module B M''] [IsScalarTower k B M''] | |
| [AddCommGroup N''] [Module k N''] [Module Bα΅α΅α΅ N''] [IsScalarTower k Bα΅α΅α΅ N''] | |
| theorem map_comp (f : M ββ[B] M') (f' : M' ββ[B] M'') | |
| (g : N ββ[Bα΅α΅α΅] N') (g' : N' ββ[Bα΅α΅α΅] N'') : | |
| map (k := k) (f'.comp f) (g'.comp g) = (map (k := k) f' g').comp (map (k := k) f g) := by | |
| ext x | |
| induction x using TensorProduct.inductionOn with | |
| | tmul m n => rfl | |
| | add x y hx hy => simp_all | |
| theorem map_add_left (f f' : M ββ[B] M') (g : N ββ[Bα΅α΅α΅] N') : | |
| map (k := k) (f + f') g = map (k := k) f g + map (k := k) f' g := by | |
| ext x | |
| induction x using TensorProduct.inductionOn with | |
| | tmul m n => simp [TensorProduct.add_tmul] | |
| | add x y hx hy => simp_all [add_add_add_comm] | |
| theorem map_add_right (f : M ββ[B] M') (g g' : N ββ[Bα΅α΅α΅] N') : | |
| map (k := k) f (g + g') = map (k := k) f g + map (k := k) f g' := by | |
| ext x | |
| induction x using TensorProduct.inductionOn with | |
| | tmul m n => simp [TensorProduct.tmul_add] | |
| | add x y hx hy => simp_all [add_add_add_comm] | |
| theorem map_smul_left (r : k) (f : M ββ[B] M') (g : N ββ[Bα΅α΅α΅] N') : | |
| map (k := k) (r β’ f) g = r β’ map (k := k) f g := by | |
| ext x | |
| induction x using TensorProduct.inductionOn with | |
| | tmul m n => simp [TensorProduct.smul_tmul'] | |
| | add x y hx hy => simp_all [smul_add] | |
| theorem map_smul_right (r : k) (f : M ββ[B] M') (g : N ββ[Bα΅α΅α΅] N') : | |
| map (k := k) f (r β’ g) = r β’ map (k := k) f g := by | |
| ext x | |
| induction x using TensorProduct.inductionOn with | |
| | tmul m n => simp [TensorProduct.tmul_smul] | |
| | add x y hx hy => simp_all [smul_add] | |
| /-- The same tensor map as a map of right B-modules. -/ | |
| def rightMap (f : M ββ[B] M') (g : N ββ[Bα΅α΅α΅] N') : | |
| (M β[k] N) ββ[Bα΅α΅α΅] (M' β[k] N') where | |
| __ := (map (k := k) f g).toAddMonoidHom | |
| map_smul' c x := by | |
| change map (k := k) f g (c β’ x) = c β’ map (k := k) f g x | |
| rw [right_eq_enveloping, right_eq_enveloping, LinearMap.map_smul] | |
| @[simp] theorem rightMap_tmul (f : M ββ[B] M') (g : N ββ[Bα΅α΅α΅] N') (m : M) (n : N) : | |
| rightMap (k := k) f g (m ββ[k] n) = f m ββ[k] g n := rfl | |
| end ExternalTensor | |
| end | |
| end OAI | |