/- Copyright 2024 The Formal Conjectures Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -/ module public import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup.Defs@[expose] public sectionopen Matrixopen scoped MatrixGroupsvariable (n : Type*) [DecidableEq n] [Fintype n] (R : Type*) [CommRing R]

The multiplicative group homomorphism (Rˣ)ⁿ →* GL(n, R) given by mapping a vector x to Matrix.diagonal x.

def Matrix.GeneralLinearGroup.diagonalHom : (n Rˣ) →* GeneralLinearGroup n R where toFun := fun d Matrix.diagonal (fun i d i), Matrix.diagonal (fun i (d i).inv), n:Type u_1inst✝²:DecidableEq ninst✝¹:Fintype nR:Type u_2inst✝:CommRing Rd:n Rˣ((diagonal fun i (d i)) * diagonal fun i (d i).inv) = 1 All goals completed! 🐙, n:Type u_1inst✝²:DecidableEq ninst✝¹:Fintype nR:Type u_2inst✝:CommRing Rd:n Rˣ((diagonal fun i (d i).inv) * diagonal fun i (d i)) = 1 All goals completed! 🐙 map_mul' x y := n:Type u_1inst✝²:DecidableEq ninst✝¹:Fintype nR:Type u_2inst✝:CommRing Rx:n Rˣy:n Rˣ{ val := diagonal fun i ((x * y) i), inv := diagonal fun i ((x * y) i).inv, val_inv := , inv_val := } = { val := diagonal fun i (x i), inv := diagonal fun i (x i).inv, val_inv := , inv_val := } * { val := diagonal fun i (y i), inv := diagonal fun i (y i).inv, val_inv := , inv_val := } n:Type u_1inst✝²:DecidableEq ninst✝¹:Fintype nR:Type u_2inst✝:CommRing Rx:n Rˣy:n Rˣi✝:nj✝:n{ val := diagonal fun i ((x * y) i), inv := diagonal fun i ((x * y) i).inv, val_inv := , inv_val := } i✝ j✝ = ({ val := diagonal fun i (x i), inv := diagonal fun i (x i).inv, val_inv := , inv_val := } * { val := diagonal fun i (y i), inv := diagonal fun i (y i).inv, val_inv := , inv_val := }) i✝ j✝; All goals completed! 🐙 map_one' := n:Type u_1inst✝²:DecidableEq ninst✝¹:Fintype nR:Type u_2inst✝:CommRing R{ val := diagonal fun i (1 i), inv := diagonal fun i (1 i).inv, val_inv := , inv_val := } = 1 n:Type u_1inst✝²:DecidableEq ninst✝¹:Fintype nR:Type u_2inst✝:CommRing Ri✝:nj✝:n{ val := diagonal fun i (1 i), inv := diagonal fun i (1 i).inv, val_inv := , inv_val := } i✝ j✝ = 1 i✝ j✝; All goals completed! 🐙

The group of invertible diagonal matrices.

def Matrix.GeneralLinearGroup.diagonalSubgroup : Subgroup (GeneralLinearGroup n R) := Subgroup.map (Matrix.GeneralLinearGroup.diagonalHom n R)