         return Self( a.matrix * b.matrix )
     }
     
-    public static func *(a: CoeffField, b: Self) -> Self {
+    public static func *(a: CoeffRing, b: Self) -> Self {
         assert(a.isInvertible)
         return Self( a * b.matrix )
     }
     
-    public static func *(a: Self, b: CoeffField) -> Self {
+    public static func *(a: Self, b: CoeffRing) -> Self {
         assert(b.isInvertible)
         return Self( a.matrix * b )
     }


public protocol MatrixGroup: Group {
    associatedtype Size: _Int
    associatedtype CoeffField: Field
    init(_ g: SquareMatrix<Size, CoeffField>)
    
    var size: Int { get }
    var matrix: SquareMatrix<Size, CoeffField> { get }
    var asGL: GeneralLinearGroup<Size, CoeffField> { get }
    
    var determinant: CoeffField { get }
    var trace: CoeffField { get }
    
    static func contains(_ g: GeneralLinearGroup<Size, CoeffField>) -> Bool
    static func *(a: CoeffField, b: Self) -> Self
    static func *(a: Self, b: CoeffField) -> Self
}

public extension MatrixGroup {
    public init(grid: [CoeffField]) {
        self.init(Matrix(grid: grid))
    }
    
    public init(generator g: (Int, Int) -> CoeffField) {
        self.init(Matrix(generator: g))
    }
    

        return Self(matrix.inverse!)
    }
    
    public var determinant: CoeffRing {
        return matrix.determinant
    }
    
    public var trace: CoeffRing {
        return matrix.trace
    }
    
