@@ -35,6 +35,7 @@ In this file, we use the convention that `M`, `N`, `P`, `Q` are all `R`-modules,
3535* `TensorProduct.AlgebraTensorModule.leftComm`
3636* `TensorProduct.AlgebraTensorModule.rightComm`
3737* `TensorProduct.AlgebraTensorModule.tensorTensorTensorComm`
38+ * `LinearMap.baseChange A f` is the `A`-linear map `A ⊗ f`, for an `R`-linear map `f`.
3839
3940 ## Implementation notes
4041
@@ -576,6 +577,116 @@ end AlgebraTensorModule
576577
577578end TensorProduct
578579
580+ namespace LinearMap
581+
582+ open TensorProduct
583+
584+ /-!
585+ ### The base-change of a linear map of `R`-modules to a linear map of `A`-modules
586+ -/
587+
588+
589+ section Semiring
590+
591+ variable {R A B M N P : Type *} [CommSemiring R]
592+ variable [Semiring A] [Algebra R A] [Semiring B] [Algebra R B]
593+ variable [AddCommMonoid M] [AddCommMonoid N] [AddCommMonoid P]
594+ variable [Module R M] [Module R N] [Module R P]
595+ variable (r : R) (f g : M →ₗ[R] N)
596+
597+ variable (A) in
598+ /-- `baseChange A f` for `f : M →ₗ[R] N` is the `A`-linear map `A ⊗[R] M →ₗ[A] A ⊗[R] N`.
599+
600+ This "base change" operation is also known as "extension of scalars". -/
601+ def baseChange (f : M →ₗ[R] N) : A ⊗[R] M →ₗ[A] A ⊗[R] N :=
602+ AlgebraTensorModule.map (LinearMap.id : A →ₗ[A] A) f
603+
604+ @[simp]
605+ theorem baseChange_tmul (a : A) (x : M) : f.baseChange A (a ⊗ₜ x) = a ⊗ₜ f x :=
606+ rfl
607+
608+ theorem baseChange_eq_ltensor : (f.baseChange A : A ⊗ M → A ⊗ N) = f.lTensor A :=
609+ rfl
610+
611+ @[simp]
612+ theorem baseChange_add : (f + g).baseChange A = f.baseChange A + g.baseChange A := by
613+ ext
614+ -- Porting note: added `-baseChange_tmul`
615+ simp [baseChange_eq_ltensor, -baseChange_tmul]
616+
617+ @[simp]
618+ theorem baseChange_zero : baseChange A (0 : M →ₗ[R] N) = 0 := by
619+ ext
620+ simp [baseChange_eq_ltensor]
621+
622+ @[simp]
623+ theorem baseChange_smul : (r • f).baseChange A = r • f.baseChange A := by
624+ ext
625+ simp [baseChange_tmul]
626+
627+ @[simp]
628+ lemma baseChange_id : (.id : M →ₗ[R] M).baseChange A = .id := by
629+ ext; simp
630+
631+ lemma baseChange_comp (g : N →ₗ[R] P) :
632+ (g ∘ₗ f).baseChange A = g.baseChange A ∘ₗ f.baseChange A := by
633+ ext; simp
634+
635+ variable (R M) in
636+ @[simp]
637+ lemma baseChange_one : (1 : Module.End R M).baseChange A = 1 := baseChange_id
638+
639+ lemma baseChange_mul (f g : Module.End R M) :
640+ (f * g).baseChange A = f.baseChange A * g.baseChange A := by
641+ ext; simp
642+
643+ variable (R A M N)
644+
645+ /-- `baseChange A e` for `e : M ≃ₗ[R] N` is the `A`-linear map `A ⊗[R] M ≃ₗ[A] A ⊗[R] N`. -/
646+ def _root_.LinearEquiv.baseChange (e : M ≃ₗ[R] N) : A ⊗[R] M ≃ₗ[A] A ⊗[R] N :=
647+ AlgebraTensorModule.congr (.refl _ _) e
648+
649+ /-- `baseChange` as a linear map.
650+
651+ When `M = N`, this is true more strongly as `Module.End.baseChangeHom`. -/
652+ @[simps]
653+ def baseChangeHom : (M →ₗ[R] N) →ₗ[R] A ⊗[R] M →ₗ[A] A ⊗[R] N where
654+ toFun := baseChange A
655+ map_add' := baseChange_add
656+ map_smul' := baseChange_smul
657+
658+ /-- `baseChange` as an `AlgHom`. -/
659+ @[simps!]
660+ def _root_.Module.End.baseChangeHom : Module.End R M →ₐ[R] Module.End A (A ⊗[R] M) :=
661+ .ofLinearMap (LinearMap.baseChangeHom _ _ _ _) (baseChange_one _ _) baseChange_mul
662+
663+ lemma baseChange_pow (f : Module.End R M) (n : ℕ) :
664+ (f ^ n).baseChange A = f.baseChange A ^ n :=
665+ map_pow (Module.End.baseChangeHom _ _ _) f n
666+
667+ end Semiring
668+
669+ section Ring
670+
671+ variable {R A B M N : Type *} [CommRing R]
672+ variable [Ring A] [Algebra R A] [Ring B] [Algebra R B]
673+ variable [AddCommGroup M] [Module R M] [AddCommGroup N] [Module R N]
674+ variable (f g : M →ₗ[R] N)
675+
676+ @[simp]
677+ theorem baseChange_sub : (f - g).baseChange A = f.baseChange A - g.baseChange A := by
678+ ext
679+ simp [baseChange_eq_ltensor, tmul_sub]
680+
681+ @[simp]
682+ theorem baseChange_neg : (-f).baseChange A = -f.baseChange A := by
683+ ext
684+ simp [baseChange_eq_ltensor, tmul_neg]
685+
686+ end Ring
687+
688+ end LinearMap
689+
579690namespace Submodule
580691
581692open TensorProduct
@@ -588,42 +699,34 @@ an `A`-submodule of `A ⊗ M`.
588699
589700This "base change" operation is also known as "extension of scalars". -/
590701def baseChange : Submodule A (A ⊗[R] M) :=
591- span A <| p.map (TensorProduct.mk R A M 1 )
702+ LinearMap.range (p.subtype.baseChange A)
703+
704+ variable {A p} in
705+ lemma tmul_mem_baseChange_of_mem (a : A) {m : M} (hm : m ∈ p) :
706+ a ⊗ₜ[R] m ∈ p.baseChange A :=
707+ ⟨a ⊗ₜ[R] ⟨m, hm⟩, rfl⟩
708+
709+ lemma baseChange_eq_span : p.baseChange A = span A (p.map (TensorProduct.mk R A M 1 )) := by
710+ refine le_antisymm ?_ ?_
711+ · rw [baseChange, LinearMap.range_le_iff_comap, eq_top_iff,
712+ ← span_eq_top_of_span_eq_top R A _ (span_tmul_eq_top R ..), span_le]
713+ refine fun _ ⟨a, m, h⟩ ↦ ?_
714+ rw [← h, SetLike.mem_coe, mem_comap, LinearMap.baseChange_tmul, ← mul_one a, ← smul_eq_mul,
715+ ← smul_tmul']
716+ exact smul_mem _ a (subset_span ⟨m, m.2 , rfl⟩)
717+ · refine span_le.2 fun _ ⟨m, hm, h⟩ ↦ h ▸ ⟨1 ⊗ₜ[R] ⟨m, hm⟩, rfl⟩
592718
593719@[simp]
594- lemma baseChange_bot : (⊥ : Submodule R M).baseChange A = ⊥ := by simp [baseChange ]
720+ lemma baseChange_bot : (⊥ : Submodule R M).baseChange A = ⊥ := by simp [baseChange_eq_span ]
595721
596722@[simp]
597723lemma baseChange_top : (⊤ : Submodule R M).baseChange A = ⊤ := by
598- rw [baseChange, map_top, eq_top_iff']
599- intro x
600- refine x.induction_on (by simp) (fun a y ↦ ?_) (fun _ _ ↦ Submodule.add_mem _)
601- rw [← mul_one a, ← smul_eq_mul, ← smul_tmul']
602- refine smul_mem _ _ (subset_span ?_)
603- simp
604-
605- variable {A p} in
606- lemma tmul_mem_baseChange_of_mem (a : A) {m : M} (hm : m ∈ p) :
607- a ⊗ₜ[R] m ∈ p.baseChange A := by
608- rw [← mul_one a, ← smul_eq_mul, ← smul_tmul']
609- exact smul_mem (baseChange A p) a (subset_span ⟨m, hm, rfl⟩)
724+ rw [eq_top_iff, ← span_eq_top_of_span_eq_top R A _ (span_tmul_eq_top R ..)]
725+ exact span_le.2 fun _ ⟨a, m, h⟩ ↦ h ▸ tmul_mem_baseChange_of_mem _ trivial
610726
611727@[simp]
612728lemma baseChange_span (s : Set M) :
613729 (span R s).baseChange A = span A (TensorProduct.mk R A M 1 '' s) := by
614- simp only [baseChange, map_coe]
615- refine le_antisymm (span_le.mpr ?_) (span_mono <| Set.image_subset _ subset_span)
616- rintro - ⟨m : M, hm : m ∈ span R s, rfl⟩
617- apply span_induction (p := fun m' _ ↦ (1 : A) ⊗ₜ[R] m' ∈ span A (TensorProduct.mk R A M 1 '' s))
618- (hx := hm)
619- · intro m hm
620- exact subset_span ⟨m, hm, rfl⟩
621- · simp
622- · intro m₁ m₂ _ _ hm₁ hm₂
623- rw [tmul_add]
624- exact Submodule.add_mem _ hm₁ hm₂
625- · intro r m' _ hm'
626- rw [tmul_smul, ← one_smul A ((1 : A) ⊗ₜ[R] m'), ← smul_assoc]
627- exact smul_mem _ (r • 1 ) hm'
730+ rw [baseChange_eq_span, map_span, span_span_of_tower]
628731
629732end Submodule
0 commit comments