Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
syur2 committed Oct 15, 2024
1 parent 74f1458 commit 7cd3394
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
7 changes: 6 additions & 1 deletion ModuleLocalProperties/MissingLemmas/LocalizedModule.lean
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ lemma LocalizedMapLift_mk (f : M →ₗ[R] N) (m : M) (s t : S) :

end LocalizedMapLift

--to make a algebraequiv between Localzation S and LocalzedModule S R

section Localization_is_LocalizedModule

namespace Localization
Expand Down Expand Up @@ -384,6 +386,9 @@ lemma Map_inj : Function.Injective (Map S) := by
noncomputable def Equiv : Localization S ≃ₐ[R] LocalizedModule S R :=
AlgEquiv.ofBijective (Map S) ⟨Map_inj _,Map_surj _⟩

lemma Equiv_mk (r : R) (s : S) : Map S (Localization.mk r s) = mk r s := rfl
lemma Equiv_mk (r : R) (s : S) : Equiv S (Localization.mk r s) = mk r s := rfl

lemma Equiv_symm_mk (r : R) (s : S) : (Equiv S).symm (mk r s) = Localization.mk r s :=
(AlgEquiv.symm_apply_eq (Equiv S)).mpr rfl

end Localization
27 changes: 15 additions & 12 deletions ModuleLocalProperties/MissingLemmas/TensorProduct.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Song Yi
-/
import Mathlib.Algebra.Module.LocalizedModule
import Mathlib.RingTheory.Flat.Basic
import Mathlib.RingTheory.IsTensorProduct

import ModuleLocalProperties.MissingLemmas.LocalizedModule

open TensorProduct LocalizedModule
Expand Down Expand Up @@ -33,8 +32,8 @@ section LocalizedModule_TensorProduct_Exchange

namespace LocalizedModule

variable {R : Type*} [CommSemiring R] (S : Submonoid R) (M N : Type*) [AddCommMonoid M] [Module R M] [AddCommMonoid N]
[Module R N]
variable {R : Type*} [CommSemiring R] (S : Submonoid R) (M N : Type*) [AddCommMonoid M] [Module R M]
[AddCommMonoid N] [Module R N]

noncomputable def TensorProductBilinearMap : (LocalizedModule S M) →ₗ[Localization S]
(LocalizedModule S N) →ₗ[Localization S] LocalizedModule S (M ⊗[R] N) :=
Expand Down Expand Up @@ -84,7 +83,7 @@ lemma InvTensorProductMap_apply' (m : M) (n : N) (s t : S) :
InvTensorProductMap S M N (mk (m ⊗ₜ n) (s * t)) = ((mk m s) ⊗ₜ (mk n t)) := by
rw [InvTensorProductMap_apply]
symm
rw [← mk_right_smul_mk_den_one, ← mk_right_smul_mk_den_one (s := t), TensorProduct.smul_tmul_smul,
rw [← mk_right_smul_mk_left, ← mk_right_smul_mk_left (s := t), TensorProduct.smul_tmul_smul,
Localization.mk_mul, one_mul]

lemma TensorProductMap_rightInv :
Expand All @@ -93,18 +92,22 @@ lemma TensorProductMap_rightInv :
induction' x with y s
dsimp
induction' y with m n m n hm hn
· simp only [zero_mk, map_zero]
· rw [zero_mk, map_zero, map_zero]
· rw [InvTensorProductMap_apply, map_smul, TensorProductMap_mk,
one_mul, mk_right_smul_mk_den_one]
one_mul, mk_right_smul_mk_left]
· rw [mk_add_mk_right, map_add, map_add, hm, hn]

lemma TensorProductMap_leftInv :
InvTensorProductMap S M N ∘ₗ (TensorProductMap S M N) = LinearMap.id := by
ext x y
dsimp
induction' x with m s
induction' y with n t
rw [TensorProductMap_mk, InvTensorProductMap_apply']
ext u
induction' u with x y a b ha hb
· rw [map_zero, map_zero]
· dsimp
induction' x with m s
induction' y with n t
rw [TensorProductMap_mk, InvTensorProductMap_apply']
· rw [LinearMap.id_coe, id_eq, map_add] at *
rw[ha, hb]

noncomputable def TensorProductEquiv : (LocalizedModule S M) ⊗[Localization S] (LocalizedModule S N)
≃ₗ[Localization S] LocalizedModule S (M ⊗[R] N) :=
Expand Down

0 comments on commit 7cd3394

Please sign in to comment.