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

Commit 8d0673e

Browse files
author
Antoine Chambert-Loir
committed
further S-linearization
1 parent 61b1f4e commit 8d0673e

1 file changed

Lines changed: 47 additions & 28 deletions

File tree

src/ring_theory/tensor_product.lean

Lines changed: 47 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -422,17 +422,19 @@ begin
422422
simp [H],
423423
end
424424

425-
-- TODO: with `smul_comm_class R S A` we can have this as an `S`-algebra morphism
426-
/-- The `R`-algebra morphism `A →ₐ[R] A ⊗[R] B` sending `a` to `a ⊗ₜ 1`. -/
427-
def include_left : A →ₐ[R] A ⊗[R] B :=
425+
/-- The `R`-algebra morphism `A →ₐ[S] A ⊗[R] B` sending `a` to `a ⊗ₜ 1`. -/
426+
def include_left [smul_comm_class R S A] : A →ₐ[S] A ⊗[R] B :=
428427
{ commutes' := by simp,
429428
..include_left_ring_hom }
430429

431430
@[simp]
432-
lemma include_left_apply (a : A) : (include_left : A →ₐ[R] A ⊗[R] B) a = a ⊗ₜ 1 := rfl
431+
lemma include_left_apply [smul_comm_class R S A ] (a : A) : (include_left : A →ₐ[S] A ⊗[R] B) a = a ⊗ₜ 1 := rfl
432+
433+
variables [algebra S B] [smul_comm_class R S A]
434+
[tensor_product.compatible_smul R S A B]
433435

434436
/-- The algebra morphism `B →ₐ[R] A ⊗[R] B` sending `b` to `1 ⊗ₜ b`. -/
435-
def include_right : B →ₐ[R] A ⊗[R] B :=
437+
def include_right : B →ₐ[S] A ⊗[R] B :=
436438
{ to_fun := λ b, 1 ⊗ₜ b,
437439
map_zero' := by simp,
438440
map_add' := by simp [tmul_add],
@@ -447,14 +449,18 @@ def include_right : B →ₐ[R] A ⊗[R] B :=
447449
end, }
448450

449451
@[simp]
450-
lemma include_right_apply (b : B) : (include_right : B →ₐ[R] A ⊗[R] B) b = 1 ⊗ₜ b := rfl
452+
lemma include_right_apply (b : B) : (include_right : B →ₐ[S] A ⊗[R] B) b = 1 ⊗ₜ b := rfl
453+
454+
lemma include_left_comp_algebra_map :
455+
((include_left : A →ₐ[S] A ⊗[R] B).to_ring_hom.comp (algebra_map R A)) =
456+
(include_right : B →ₐ[S] A ⊗[R] B).to_ring_hom.comp (algebra_map R B) :=
457+
by { ext, simp [algebra.algebra_map_eq_smul_one, smul_tmul] }
451458

452-
lemma include_left_comp_algebra_map {R S T : Type*} [comm_ring R] [comm_ring S] [comm_ring T]
459+
lemma include_left_comp_algebra_map' {R S T : Type*} [comm_ring R] [comm_ring S] [comm_ring T]
453460
[algebra R S] [algebra R T] :
454-
(include_left.to_ring_hom.comp (algebra_map R S) : R →+* S ⊗[R] T) =
455-
include_right.to_ring_hom.comp (algebra_map R T) :=
461+
((include_left : S →ₐ[R] S ⊗[R] T).to_ring_hom.comp (algebra_map R S) : R →+* S ⊗[R] T) =
462+
(include_right : T →ₐ[R] S ⊗[R] T).to_ring_hom.comp (algebra_map R T) :=
456463
by { ext, simp }
457-
458464
end semiring
459465

460466
section ring
@@ -494,10 +500,10 @@ instance : comm_ring (A ⊗[R] B) :=
494500

495501
section right_algebra
496502

497-
/-- `S ⊗[R] T` has a `T`-algebra structure. This is not a global instance or else the action of
498-
`S` on `S ⊗[R] S` would be ambiguous. -/
503+
/-- `A ⊗[R] B` has a `B`-algebra structure. This is not a global instance or else the action of
504+
`A` on `A ⊗[R] A` would be ambiguous. -/
499505
@[reducible] def right_algebra : algebra B (A ⊗[R] B) :=
500-
(algebra.tensor_product.include_right.to_ring_hom : B →+* A ⊗[R] B).to_algebra
506+
((algebra.tensor_product.include_right : B →ₐ[R] A ⊗[R]B).to_ring_hom : B →+* A ⊗[R] B).to_algebra
501507

502508
local attribute [instance] tensor_product.right_algebra
503509

@@ -528,22 +534,27 @@ We now build the structure maps for the symmetric monoidal category of `R`-algeb
528534
section monoidal
529535

530536
section
537+
universe v
538+
531539
variables {R : Type u} [comm_semiring R]
532-
variables {A : Type v₁} [semiring A] [algebra R A]
540+
variables {S : Type v} [comm_semiring S] [algebra R S]
541+
variables {A : Type v₁} [semiring A] [algebra R A] [algebra S A] [smul_comm_class R S A]
533542
variables {B : Type v₂} [semiring B] [algebra R B]
534543
variables {C : Type v₃} [semiring C] [algebra R C]
544+
[algebra S C]
535545
variables {D : Type v₄} [semiring D] [algebra R D]
536546

547+
537548
/--
538549
Build an algebra morphism from a linear map out of a tensor product,
539550
and evidence of multiplicativity on pure tensors.
540551
-/
541552
def alg_hom_of_linear_map_tensor_product
542-
(f : A ⊗[R] B →ₗ[R] C)
553+
(f : A ⊗[R] B →ₗ[S] C)
543554
(w₁ : ∀ (a₁ a₂ : A) (b₁ b₂ : B), f ((a₁ * a₂) ⊗ₜ (b₁ * b₂)) = f (a₁ ⊗ₜ b₁) * f (a₂ ⊗ₜ b₂))
544-
(w₂ : ∀ r, f ((algebra_map R A) r ⊗ₜ[R] 1) = (algebra_map R C) r):
545-
A ⊗[R] B →ₐ[R] C :=
546-
{ map_one' := by rw [←(algebra_map R C).map_one, ←w₂, (algebra_map R A).map_one]; refl,
555+
(w₂ : ∀ s, f ((algebra_map S A) s ⊗ₜ[R] 1) = (algebra_map S C) s):
556+
A ⊗[R] B →ₐ[S] C :=
557+
{ map_one' := by rw [← (algebra_map S C).map_one, ← w₂, linear_map.to_fun_eq_coe, (algebra_map S A).map_one]; refl,
547558
map_zero' := by rw [linear_map.to_fun_eq_coe, map_zero],
548559
map_mul' := λ x y, by
549560
{ rw linear_map.to_fun_eq_coe,
@@ -563,23 +574,27 @@ def alg_hom_of_linear_map_tensor_product
563574

564575
@[simp]
565576
lemma alg_hom_of_linear_map_tensor_product_apply (f w₁ w₂ x) :
566-
(alg_hom_of_linear_map_tensor_product f w₁ w₂ : A ⊗[R] B →ₐ[R] C) x = f x := rfl
577+
(alg_hom_of_linear_map_tensor_product f w₁ w₂ : A ⊗[R] B →ₐ[S] C) x = f x := rfl
567578

568579
/--
569580
Build an algebra equivalence from a linear equivalence out of a tensor product,
570581
and evidence of multiplicativity on pure tensors.
571582
-/
572583
def alg_equiv_of_linear_equiv_tensor_product
573-
(f : A ⊗[R] B ≃ₗ[R] C)
584+
(f : A ⊗[R] B ≃ₗ[S] C)
574585
(w₁ : ∀ (a₁ a₂ : A) (b₁ b₂ : B), f ((a₁ * a₂) ⊗ₜ (b₁ * b₂)) = f (a₁ ⊗ₜ b₁) * f (a₂ ⊗ₜ b₂))
575-
(w₂ : ∀ r, f ((algebra_map R A) r ⊗ₜ[R] 1) = (algebra_map R C) r):
576-
A ⊗[R] B ≃ₐ[R] C :=
577-
{ .. alg_hom_of_linear_map_tensor_product (f : A ⊗[R] B →ₗ[R] C) w₁ w₂,
586+
(w₂ : ∀ s, f ((algebra_map S A) s ⊗ₜ[R] 1) = (algebra_map S C) s):
587+
A ⊗[R] B ≃ₐ[S] C :=
588+
{ .. alg_hom_of_linear_map_tensor_product (f : A ⊗[R] B →ₗ[S] C) w₁ w₂,
578589
.. f }
579590

580591
@[simp]
581592
lemma alg_equiv_of_linear_equiv_tensor_product_apply (f w₁ w₂ x) :
582-
(alg_equiv_of_linear_equiv_tensor_product f w₁ w₂ : A ⊗[R] B ≃ₐ[R] C) x = f x := rfl
593+
(alg_equiv_of_linear_equiv_tensor_product f w₁ w₂ : A ⊗[R] B ≃ₐ[S] C) x = f x := rfl
594+
595+
-- TODO : S-linearize this
596+
-- The problem is that Lean doesn't view A⊗[R]B as an S-module automatically
597+
-- To me, this suggests that something has to be done on linear_map.tensor_product as well
583598

584599
/--
585600
Build an algebra equivalence from a linear equivalence out of a triple tensor product,
@@ -660,6 +675,9 @@ by simp [tensor_product.rid]
660675
section
661676
variables (R A B)
662677

678+
-- TODO : S-linearize (if possible)
679+
-- variables (S : Type*) [comm_semiring S] [algebra R S] [algebra S A] [algebra S B] [is_scalar_tower R S A] [is_scalar_tower R S B] [tensor_product.compatible_smul R S A B]
680+
663681
/--
664682
The tensor product of R-algebras is commutative, up to algebra isomorphism.
665683
-/
@@ -786,13 +804,14 @@ lemma lmul'_to_linear_map : (lmul' R : _ →ₐ[R] S).to_linear_map = linear_map
786804
@[simp] lemma lmul'_apply_tmul (a b : S) : lmul' R (a ⊗ₜ[R] b) = a * b := rfl
787805

788806
@[simp]
789-
lemma lmul'_comp_include_left : (lmul' R : _ →ₐ[R] S).comp include_left = alg_hom.id R S :=
807+
lemma lmul'_comp_include_left : (lmul' R : _ →ₐ[R] S).comp (include_left : _ →ₐ[R] _) = alg_hom.id R S :=
790808
alg_hom.ext $ _root_.mul_one
791809

792810
@[simp]
793-
lemma lmul'_comp_include_right : (lmul' R : _ →ₐ[R] S).comp include_right = alg_hom.id R S :=
811+
lemma lmul'_comp_include_right : (lmul' R : _ →ₐ[R] S).comp (include_right : _ →ₐ[R] _) = alg_hom.id R S :=
794812
alg_hom.ext $ _root_.one_mul
795813

814+
-- TODO : the target should be C, and this be S-linearized
796815
/--
797816
If `S` is commutative, for a pair of morphisms `f : A →ₐ[R] S`, `g : B →ₐ[R] S`,
798817
We obtain a map `A ⊗[R] B →ₐ[R] S` that commutes with `f`, `g` via `a ⊗ b ↦ f(a) * g(b)`.
@@ -805,9 +824,9 @@ by { unfold product_map lmul', simp }
805824
lemma product_map_left_apply (a : A) :
806825
product_map f g ((include_left : A →ₐ[R] A ⊗ B) a) = f a := by simp
807826

808-
@[simp] lemma product_map_left : (product_map f g).comp include_left = f := alg_hom.ext $ by simp
827+
@[simp] lemma product_map_left : (product_map f g).comp (include_left : A →ₐ[R] A ⊗ B) = f := alg_hom.ext $ by simp
809828

810-
lemma product_map_right_apply (b : B) : product_map f g (include_right b) = g b := by simp
829+
lemma product_map_right_apply (b : B) : product_map f g ((include_right : B →ₐ[R] A ⊗ B) b) = g b := by simp
811830

812831
@[simp] lemma product_map_right : (product_map f g).comp include_right = g := alg_hom.ext $ by simp
813832

0 commit comments

Comments
 (0)