Download data/lean/OAI/Algebra/AuslanderReiten/Tensor/BalancedTensor.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.38 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Algebra/AuslanderReiten/Tensor/BalancedTensor.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Algebra/AuslanderReiten/Tensor/BalancedTensor.lean
-
curl -L -o BalancedTensor.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Algebra/AuslanderReiten/Tensor/BalancedTensor.lean
3.38 kB
| import Mathlib.LinearAlgebra.TensorProduct.Basic | |
| import Mathlib.LinearAlgebra.Quotient.Basic | |
| import Mathlib.RingTheory.TensorProduct.Finite | |
| import Mathlib.Algebra.Algebra.Opposite | |
| namespace OAI | |
| namespace ArExplicit | |
| open TensorProduct | |
| variable (k R F M : Type*) [CommRing k] [Ring R] | |
| variable [AddCommGroup F] [AddCommGroup M] [Module k F] [Module k M] | |
| variable [Module Rα΅α΅α΅ F] [Module R M] | |
| def balancingRelations : Submodule k (F β[k] M) := | |
| Submodule.span k {z | β (f : F) (r : R) (m : M), | |
| z = (MulOpposite.op r β’ f) ββ[k] m - f ββ[k] (r β’ m)} | |
| abbrev BalancedTensor := (F β[k] M) β§Έ balancingRelations k R F M | |
| namespace BalancedTensor | |
| variable {k R F M} | |
| def tmul (f : F) (m : M) : BalancedTensor k R F M := | |
| (balancingRelations k R F M).mkQ (f ββ[k] m) | |
| @[simp] theorem zero_tmul (m : M) : tmul (k := k) (R := R) (0 : F) m = 0 := by | |
| simp [tmul] | |
| @[simp] theorem tmul_zero (f : F) : tmul (k := k) (R := R) f (0 : M) = 0 := by | |
| simp [tmul] | |
| theorem add_tmul (f g : F) (m : M) : | |
| tmul (k := k) (R := R) (f + g) m = tmul f m + tmul g m := by simp [tmul, TensorProduct.add_tmul] | |
| theorem tmul_add (f : F) (m n : M) : | |
| tmul (k := k) (R := R) f (m + n) = tmul f m + tmul f n := by simp [tmul, TensorProduct.tmul_add] | |
| theorem scalar_tmul (c : k) (f : F) (m : M) : | |
| tmul (k := k) (R := R) (c β’ f) m = c β’ tmul f m := by | |
| exact (balancingRelations k R F M).mkQ.map_smul c (f ββ[k] m) | |
| theorem tmul_scalar (c : k) (f : F) (m : M) : | |
| tmul (k := k) (R := R) f (c β’ m) = c β’ tmul f m := by simp [tmul] | |
| theorem balance (f : F) (r : R) (m : M) : | |
| tmul (k := k) (R := R) (MulOpposite.op r β’ f) m = tmul f (r β’ m) := by | |
| apply (Submodule.Quotient.eq (balancingRelations k R F M)).mpr | |
| exact Submodule.subset_span β¨f, r, m, rflβ© | |
| def mk : F ββ[k] M ββ[k] BalancedTensor k R F M where | |
| toFun f := | |
| { toFun := tmul f | |
| map_add' := tmul_add f | |
| map_smul' := fun c m => tmul_scalar c f m } | |
| map_add' f g := by ext m; exact add_tmul f g m | |
| map_smul' c f := by ext m; exact scalar_tmul c f m | |
| variable {N : Type*} [AddCommGroup N] [Module k N] | |
| def lift (b : F ββ[k] M ββ[k] N) | |
| (hb : β (f : F) (r : R) (m : M), b (MulOpposite.op r β’ f) m = b f (r β’ m)) : | |
| BalancedTensor k R F M ββ[k] N := | |
| (balancingRelations k R F M).liftQ (TensorProduct.lift b) (by | |
| apply Submodule.span_le.mpr | |
| rintro z β¨f, r, m, rflβ© | |
| change TensorProduct.lift b ((MulOpposite.op r β’ f) ββ[k] m - f ββ[k] (r β’ m)) = 0 | |
| simp only [map_sub, TensorProduct.lift.tmul, hb, sub_self]) | |
| @[simp] theorem lift_tmul (b : F ββ[k] M ββ[k] N) | |
| (hb : β (f : F) (r : R) (m : M), b (MulOpposite.op r β’ f) m = b f (r β’ m)) (f : F) (m : M) : | |
| lift b hb (tmul f m) = b f m := rfl | |
| @[ext] theorem hom_ext (f g : BalancedTensor k R F M ββ[k] N) | |
| (h : β x y, f (tmul x y) = g (tmul x y)) : f = g := by | |
| apply LinearMap.ext | |
| intro z | |
| induction z using Submodule.Quotient.induction_on with | |
| | H z => | |
| induction z using TensorProduct.inductionOn with | |
| | tmul x y => exact h x y | |
| | add z z' hz hz' => | |
| change f ((balancingRelations k R F M).mkQ (z + z')) = | |
| g ((balancingRelations k R F M).mkQ (z + z')) | |
| simp only [map_add] | |
| exact congrArgβ (Β· + Β·) hz hz' | |
| end BalancedTensor | |
| end ArExplicit | |
| end OAI | |