Skip to content

Commit

Permalink
chore(RingTheory/TensorProduct): extract a helper lemma (#7699)
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-wieser committed Oct 15, 2023
1 parent ed915e6 commit a24cd27
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Mathlib/RingTheory/TensorProduct.lean
Expand Up @@ -382,10 +382,14 @@ instance instAlgebra : Algebra R (A ⊗[R] B) :=

@[simp]
theorem algebraMap_apply [SMulCommClass R S A] (r : S) :
(algebraMap S (A ⊗[R] B)) r = (algebraMap S A) r ⊗ₜ 1 :=
algebraMap S (A ⊗[R] B) r = (algebraMap S A) r ⊗ₜ 1 :=
rfl
#align algebra.tensor_product.algebra_map_apply Algebra.TensorProduct.algebraMap_apply

theorem algebraMap_apply' (r : R) :
algebraMap R (A ⊗[R] B) r = 1 ⊗ₜ algebraMap R B r := by
rw [algebraMap_apply, Algebra.algebraMap_eq_smul_one, Algebra.algebraMap_eq_smul_one, smul_tmul]

/-- The `R`-algebra morphism `A →ₐ[R] A ⊗[R] B` sending `a` to `a ⊗ₜ 1`. -/
def includeLeft [SMulCommClass R S A] : A →ₐ[S] A ⊗[R] B :=
{ includeLeftRingHom with commutes' := by simp }
Expand All @@ -404,12 +408,7 @@ def includeRight : B →ₐ[R] A ⊗[R] B where
map_add' := by simp [tmul_add]
map_one' := rfl
map_mul' := by simp
commutes' r := by
simp only [algebraMap_apply]
trans r • (1 : A) ⊗ₜ[R] (1 : B)
· rw [← tmul_smul, Algebra.smul_def]
simp
· simp [Algebra.smul_def]
commutes' r := by simp only [algebraMap_apply']
#align algebra.tensor_product.include_right Algebra.TensorProduct.includeRight

@[simp]
Expand Down

0 comments on commit a24cd27

Please sign in to comment.