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

Commit 9c34e80

Browse files
committed
chore(linear_algebra/basic): generalize add_monoid_hom_lequiv_{nat,int} (#9233)
1 parent 5625ec0 commit 9c34e80

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/linear_algebra/basic.lean

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Johannes Hölzl, Mario Carneiro, Kevin Buzzard, Yury Kudryashov
55
-/
66
import algebra.big_operators.pi
7+
import algebra.module.hom
78
import algebra.module.prod
89
import algebra.module.submodule_lattice
910
import data.dfinsupp
@@ -635,11 +636,12 @@ end comm_ring
635636
end linear_map
636637

637638
/--
638-
The ``-linear equivalence between additive morphisms `A →+ B` and `ℕ`-linear morphisms `A →ₗ[ℕ] B`.
639+
The `R`-linear equivalence between additive morphisms `A →+ B` and `ℕ`-linear morphisms `A →ₗ[ℕ] B`.
639640
-/
640641
@[simps]
641-
def add_monoid_hom_lequiv_nat {A B : Type*} [add_comm_monoid A] [add_comm_monoid B] :
642-
(A →+ B) ≃ₗ[ℕ] (A →ₗ[ℕ] B) :=
642+
def add_monoid_hom_lequiv_nat {A B : Type*} (R : Type*)
643+
[semiring R] [add_comm_monoid A] [add_comm_monoid B] [module R B] :
644+
(A →+ B) ≃ₗ[R] (A →ₗ[ℕ] B) :=
643645
{ to_fun := add_monoid_hom.to_nat_linear_map,
644646
inv_fun := linear_map.to_add_monoid_hom,
645647
map_add' := by { intros, ext, refl },
@@ -648,11 +650,12 @@ def add_monoid_hom_lequiv_nat {A B : Type*} [add_comm_monoid A] [add_comm_monoid
648650
right_inv := by { intros f, ext, refl } }
649651

650652
/--
651-
The ``-linear equivalence between additive morphisms `A →+ B` and `ℤ`-linear morphisms `A →ₗ[ℤ] B`.
653+
The `R`-linear equivalence between additive morphisms `A →+ B` and `ℤ`-linear morphisms `A →ₗ[ℤ] B`.
652654
-/
653655
@[simps]
654-
def add_monoid_hom_lequiv_int {A B : Type*} [add_comm_group A] [add_comm_group B] :
655-
(A →+ B) ≃ₗ[ℤ] (A →ₗ[ℤ] B) :=
656+
def add_monoid_hom_lequiv_int {A B : Type*} (R : Type*)
657+
[semiring R] [add_comm_group A] [add_comm_group B] [module R B] :
658+
(A →+ B) ≃ₗ[R] (A →ₗ[ℤ] B) :=
656659
{ to_fun := add_monoid_hom.to_int_linear_map,
657660
inv_fun := linear_map.to_add_monoid_hom,
658661
map_add' := by { intros, ext, refl },

0 commit comments

Comments
 (0)