Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit b373dae

Browse files
Oliver Nashjcommelinmergify[bot]
authored
feat(linear_algebra/contraction): define contraction maps between a module and its dual (#1973)
* feat(linear_algebra/contraction): define contraction maps between a module and its dual * Implicit carrier types for smul_comm * Add comment with license and file description * Build on top of extant linear_map.smul_right * Feedback from code review Co-authored-by: Johan Commelin <johan@commelin.net> Co-authored-by: Johan Commelin <johan@commelin.net> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent 4299a80 commit b373dae

File tree

3 files changed

+72
-0
lines changed

3 files changed

+72
-0
lines changed

src/group_theory/group_action.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ theorem mul_smul (a₁ a₂ : α) (b : β) : (a₁ * a₂) • b = a₁ • a₂
2828

2929
lemma smul_smul (a₁ a₂ : α) (b : β) : a₁ • a₂ • b = (a₁ * a₂) • b := (mul_smul _ _ _).symm
3030

31+
lemma smul_comm {α : Type u} {β : Type v} [comm_monoid α] [mul_action α β] (a₁ a₂ : α) (b : β) :
32+
a₁ • a₂ • b = a₂ • a₁ • b := by rw [←mul_smul, ←mul_smul, mul_comm]
33+
3134
variable (α)
3235
@[simp] theorem one_smul (b : β) : (1 : α) • b = b := mul_action.one_smul α _
3336

src/linear_algebra/basic.lean

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,20 @@ rfl
302302
theorem comp_smul (g : M₂ →ₗ[R] M₃) (a : R) : g.comp (a • f) = a • (g.comp f) :=
303303
ext $ assume b, by rw [comp_apply, smul_apply, g.map_smul]; refl
304304

305+
/--
306+
The family of linear maps `M₂ → M` parameterised by `f ∈ M₂ → R`, `x ∈ M`, is linear in `f`, `x`.
307+
-/
308+
def smul_rightₗ : (M₂ →ₗ[R] R) →ₗ[R] M →ₗ[R] M₂ →ₗ[R] M :=
309+
{ to_fun := λ f, {
310+
to_fun := linear_map.smul_right f,
311+
add := λ m m', by { ext, apply smul_add, },
312+
smul := λ c m, by { ext, apply smul_comm, } },
313+
add := λ f f', by { ext, apply add_smul, },
314+
smul := λ c f, by { ext, apply mul_smul, } }
315+
316+
@[simp] lemma smul_rightₗ_apply (f : M₂ →ₗ[R] R) (x : M) (c : M₂) :
317+
(smul_rightₗ : (M₂ →ₗ R) →ₗ M →ₗ M₂ →ₗ M) f x c = (f c) • x := rfl
318+
305319
end comm_ring
306320
end linear_map
307321

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/-
2+
Copyright (c) 2020 Oliver Nash. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Oliver Nash
5+
-/
6+
import linear_algebra.tensor_product
7+
import linear_algebra.dual
8+
9+
/-!
10+
# Contractions
11+
12+
Given modules $M, N$ over a commutative ring $R$, this file defines the natural linear maps:
13+
$M^* \otimes M \to R$, $M \otimes M^* \to R$, and $M^* \otimes N → Hom(M, N)$, as well as proving
14+
some basic properties of these maps.
15+
16+
## Tags
17+
18+
contraction, dual module, tensor product
19+
-/
20+
21+
universes u v
22+
23+
set_option class.instance_max_depth 42
24+
25+
section contraction
26+
open tensor_product
27+
open_locale tensor_product
28+
29+
variables (R : Type u) (M N : Type v)
30+
variables [comm_ring R] [add_comm_group M] [add_comm_group N] [module R M] [module R N]
31+
32+
/-- The natural left-handed pairing between a module and its dual. -/
33+
def contract_left : (module.dual R M) ⊗ M →ₗ[R] R := (uncurry _ _ _ _).to_fun linear_map.id
34+
35+
/-- The natural right-handed pairing between a module and its dual. -/
36+
def contract_right : M ⊗ (module.dual R M) →ₗ[R] R := (uncurry _ _ _ _).to_fun linear_map.id.flip
37+
38+
/-- The natural map associating a linear map to the tensor product of two modules. -/
39+
def dual_tensor_hom : (module.dual R M) ⊗ N →ₗ M →ₗ N :=
40+
let M' := module.dual R M in
41+
(uncurry R M' N (M →ₗ[R] N) : _ → M' ⊗ N →ₗ M →ₗ N) linear_map.smul_rightₗ
42+
43+
variables {R M N}
44+
45+
@[simp] lemma contract_left_apply (f : module.dual R M) (m : M) :
46+
contract_left R M (f ⊗ₜ m) = f m := by apply uncurry_apply
47+
48+
@[simp] lemma contract_right_apply (f : module.dual R M) (m : M) :
49+
contract_right R M (m ⊗ₜ f) = f m := by apply uncurry_apply
50+
51+
@[simp] lemma dual_tensor_hom_apply (f : module.dual R M) (m : M) (n : N) :
52+
dual_tensor_hom R M N (f ⊗ₜ n) m = (f m) • n :=
53+
by { dunfold dual_tensor_hom, rw uncurry_apply, refl, }
54+
55+
end contraction

0 commit comments

Comments
 (0)