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

Commit 2705404

Browse files
committed
refactor(linear_algebra/basic): extract content about linear_map.general_linear_group (#18345)
1 parent 8a035e9 commit 2705404

9 files changed

Lines changed: 80 additions & 53 deletions

File tree

src/linear_algebra/affine_space/affine_equiv.lean

Lines changed: 1 addition & 0 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: Yury G. Kudryashov
55
-/
66
import linear_algebra.affine_space.affine_map
7+
import linear_algebra.general_linear_group
78
import algebra.invertible
89

910
/-!

src/linear_algebra/basic.lean

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ Many of the relevant definitions, including `module`, `submodule`, and `linear_m
2525
* Many constructors for (semi)linear maps
2626
* The kernel `ker` and range `range` of a linear map are submodules of the domain and codomain
2727
respectively.
28-
* The general linear group is defined to be the group of invertible linear maps from `M` to itself.
2928
3029
See `linear_algebra.span` for the span of a set (as a submodule),
3130
and `linear_algebra.quotient` for quotients by submodules.
@@ -2161,55 +2160,3 @@ rfl
21612160
end linear_equiv
21622161

21632162
end fun_left
2164-
2165-
namespace linear_map
2166-
2167-
variables [semiring R] [add_comm_monoid M] [module R M]
2168-
variables (R M)
2169-
2170-
/-- The group of invertible linear maps from `M` to itself -/
2171-
@[reducible] def general_linear_group := (M →ₗ[R] M)ˣ
2172-
2173-
namespace general_linear_group
2174-
variables {R M}
2175-
2176-
instance : has_coe_to_fun (general_linear_group R M) (λ _, M → M) := by apply_instance
2177-
2178-
/-- An invertible linear map `f` determines an equivalence from `M` to itself. -/
2179-
def to_linear_equiv (f : general_linear_group R M) : (M ≃ₗ[R] M) :=
2180-
{ inv_fun := f.inv.to_fun,
2181-
left_inv := λ m, show (f.inv * f.val) m = m,
2182-
by erw f.inv_val; simp,
2183-
right_inv := λ m, show (f.val * f.inv) m = m,
2184-
by erw f.val_inv; simp,
2185-
..f.val }
2186-
2187-
/-- An equivalence from `M` to itself determines an invertible linear map. -/
2188-
def of_linear_equiv (f : (M ≃ₗ[R] M)) : general_linear_group R M :=
2189-
{ val := f,
2190-
inv := (f.symm : M →ₗ[R] M),
2191-
val_inv := linear_map.ext $ λ _, f.apply_symm_apply _,
2192-
inv_val := linear_map.ext $ λ _, f.symm_apply_apply _ }
2193-
2194-
variables (R M)
2195-
2196-
/-- The general linear group on `R` and `M` is multiplicatively equivalent to the type of linear
2197-
equivalences between `M` and itself. -/
2198-
def general_linear_equiv : general_linear_group R M ≃* (M ≃ₗ[R] M) :=
2199-
{ to_fun := to_linear_equiv,
2200-
inv_fun := of_linear_equiv,
2201-
left_inv := λ f, by { ext, refl },
2202-
right_inv := λ f, by { ext, refl },
2203-
map_mul' := λ x y, by {ext, refl} }
2204-
2205-
@[simp] lemma general_linear_equiv_to_linear_map (f : general_linear_group R M) :
2206-
(general_linear_equiv R M f : M →ₗ[R] M) = f :=
2207-
by {ext, refl}
2208-
2209-
@[simp] lemma coe_fn_general_linear_equiv (f : general_linear_group R M) :
2210-
⇑(general_linear_equiv R M f) = (f : M → M) :=
2211-
rfl
2212-
2213-
end general_linear_group
2214-
2215-
end linear_map

src/linear_algebra/determinant.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Copyright (c) 2019 Johannes Hölzl. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Johannes Hölzl, Patrick Massot, Casper Putz, Anne Baanen
55
-/
6+
import linear_algebra.general_linear_group
67
import linear_algebra.matrix.reindex
78
import tactic.field_simp
89
import linear_algebra.matrix.nonsingular_inverse

src/linear_algebra/eigenspace.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Authors: Alexander Bentkamp
77
import algebra.algebra.spectrum
88
import order.hom.basic
99
import linear_algebra.free_module.finite.basic
10+
import linear_algebra.general_linear_group
1011

1112
/-!
1213
# Eigenvectors and eigenvalues
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
/-
2+
Copyright (c) 2019 Johan Commelin. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Johan Commelin
5+
-/
6+
import algebra.module.equiv
7+
8+
/-!
9+
# The general linear group of linear maps
10+
11+
The general linear group is defined to be the group of invertible linear maps from `M` to itself.
12+
13+
See also `matrix.general_linear_group`
14+
15+
## Main definitions
16+
17+
* `linear_map.general_linear_group`
18+
19+
-/
20+
21+
variables (R M : Type*)
22+
23+
namespace linear_map
24+
25+
variables [semiring R] [add_comm_monoid M] [module R M]
26+
variables (R M)
27+
28+
/-- The group of invertible linear maps from `M` to itself -/
29+
@[reducible] def general_linear_group := (M →ₗ[R] M)ˣ
30+
31+
namespace general_linear_group
32+
variables {R M}
33+
34+
instance : has_coe_to_fun (general_linear_group R M) (λ _, M → M) := by apply_instance
35+
36+
/-- An invertible linear map `f` determines an equivalence from `M` to itself. -/
37+
def to_linear_equiv (f : general_linear_group R M) : (M ≃ₗ[R] M) :=
38+
{ inv_fun := f.inv.to_fun,
39+
left_inv := λ m, show (f.inv * f.val) m = m,
40+
by erw f.inv_val; simp,
41+
right_inv := λ m, show (f.val * f.inv) m = m,
42+
by erw f.val_inv; simp,
43+
..f.val }
44+
45+
/-- An equivalence from `M` to itself determines an invertible linear map. -/
46+
def of_linear_equiv (f : (M ≃ₗ[R] M)) : general_linear_group R M :=
47+
{ val := f,
48+
inv := (f.symm : M →ₗ[R] M),
49+
val_inv := linear_map.ext $ λ _, f.apply_symm_apply _,
50+
inv_val := linear_map.ext $ λ _, f.symm_apply_apply _ }
51+
52+
variables (R M)
53+
54+
/-- The general linear group on `R` and `M` is multiplicatively equivalent to the type of linear
55+
equivalences between `M` and itself. -/
56+
def general_linear_equiv : general_linear_group R M ≃* (M ≃ₗ[R] M) :=
57+
{ to_fun := to_linear_equiv,
58+
inv_fun := of_linear_equiv,
59+
left_inv := λ f, by { ext, refl },
60+
right_inv := λ f, by { ext, refl },
61+
map_mul' := λ x y, by {ext, refl} }
62+
63+
@[simp] lemma general_linear_equiv_to_linear_map (f : general_linear_group R M) :
64+
(general_linear_equiv R M f : M →ₗ[R] M) = f :=
65+
by {ext, refl}
66+
67+
@[simp] lemma coe_fn_general_linear_equiv (f : general_linear_group R M) :
68+
⇑(general_linear_equiv R M f) = (f : M → M) :=
69+
rfl
70+
71+
end general_linear_group
72+
73+
end linear_map

src/linear_algebra/matrix/general_linear_group.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Copyright (c) 2021 Chris Birkbeck. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Chris Birkbeck
55
-/
6+
import linear_algebra.general_linear_group
67
import linear_algebra.matrix.nonsingular_inverse
78
import linear_algebra.matrix.special_linear_group
89

src/linear_algebra/matrix/special_linear_group.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Copyright (c) 2020 Anne Baanen. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Anne Baanen
55
-/
6+
import linear_algebra.general_linear_group
67
import linear_algebra.matrix.adjugate
78
import linear_algebra.matrix.to_lin
89

src/linear_algebra/unitary_group.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Copyright (c) 2021 Shing Tak Lam. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Shing Tak Lam
55
-/
6+
import linear_algebra.general_linear_group
67
import linear_algebra.matrix.to_lin
78
import linear_algebra.matrix.nonsingular_inverse
89
import algebra.star.unitary

src/number_theory/modular.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Authors: Alex Kontorovich, Heather Macbeth, Marc Masdeu
66

77
import analysis.complex.upper_half_plane.basic
88
import analysis.normed_space.finite_dimension
9+
import linear_algebra.general_linear_group
910
import linear_algebra.matrix.general_linear_group
1011

1112
/-!

0 commit comments

Comments
 (0)