Skip to content

Commit

Permalink
Enable matrix algebras over noncommutative rings (#1127)
Browse files Browse the repository at this point in the history
  • Loading branch information
wbhart authored May 4, 2022
1 parent 4803548 commit 9f288ac
Show file tree
Hide file tree
Showing 12 changed files with 984 additions and 453 deletions.
52 changes: 26 additions & 26 deletions docs/src/matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ end
# Matrix functionality

AbstractAlgebra.jl provides a module, implemented in `src/Matrix.jl` for
matrices over any commutative ring belonging to the AbstractAlgebra abstract type
matrices over any ring belonging to the AbstractAlgebra abstract type
hierarchy. This functionality will work for any matrix type which
follows the Matrix interface.

Similarly, AbstractAlgebra.jl provides a module in `src/MatrixAlgebra.jl` for
matrix algebras over a commutative ring.
matrix algebras over a ring.

## Generic matrix types

AbstractAlgebra.jl allows the creation of dense matrices over any computable commutative
ring $R$. Generic matrices over a commutative ring are implemented in
AbstractAlgebra.jl allows the creation of dense matrices over any computable
ring $R$. Generic matrices over a ring are implemented in
`src/generic/Matrix.jl`.

Generic matrix algebras of $m\times m$ matrices are implemented in
Expand Down Expand Up @@ -291,8 +291,8 @@ and an `Array` constructors taking an `AbstractAlgebra` matrix as input
are provided:

```@docs
Matrix(::MatrixElem)
Array(::MatrixElem)
Matrix(::MatrixElem{T}) where T <: RingElement
Array(::MatrixElem{T}) where T <: RingElement
```

Matrices also support iteration, and therefore functions accepting an iterator
Expand Down Expand Up @@ -374,16 +374,16 @@ ncols(::MatSpace)
```

```@docs
nrows(::MatrixElem)
ncols(::MatrixElem)
nrows(::MatrixElem{T}) where T <: RingElement
ncols(::MatrixElem{T}) where T <: RingElement
```

```@docs
length(::MatElem)
length(::MatrixElem{T}) where T <: RingElement
```

```@docs
isempty(::MatElem)
isempty(::MatrixElem{T}) where T <: RingElement
```

```@docs
Expand All @@ -400,28 +400,28 @@ diagonal_matrix(::RingElement, ::Int, ::Int)

```@docs
zero(::MatSpace)
zero(::MatrixElem, ::Ring)
zero(::MatrixElem{T}, ::Ring) where T <: RingElement
```

```@docs
one(::MatSpace)
one(::MatElem)
one(::MatElem{T}) where T <: RingElement
```

```@docs
istriu(::MatrixElem{T}) where T <: RingElement
```

```@docs
change_base_ring(::Ring, ::MatElem)
change_base_ring(::Ring, ::MatElem{T}) where T <: RingElement
```

```@docs
Base.map(f, ::MatrixElem)
Base.map(f, ::MatrixElem{T}) where T <: RingElement
```

```@docs
Base.map!(f, ::MatrixElem, ::MatrixElem)
Base.map!(f, ::MatrixElem{S}, ::MatrixElem{T}) where {S <: RingElement, T <: RingElement}
```

**Examples**
Expand Down Expand Up @@ -570,14 +570,14 @@ julia> N3 = M[2:3, 2:3]
### Elementary row and column operations

```@docs
add_column(::MatElem, ::Int, ::Int, ::Int)
add_column!(::MatElem, ::Int, ::Int, ::Int)
add_row(::MatElem, ::Int, ::Int, ::Int)
add_row!(::MatElem, ::Int, ::Int, ::Int)
multiply_column(::MatElem, ::Int, ::Int)
multiply_column!(::MatElem, ::Int, ::Int)
multiply_row(::MatElem, ::Int, ::Int)
multiply_row!(::MatElem, ::Int, ::Int)
add_column(::MatElem{T}, ::Int, ::Int, ::Int) where T <: RingElement
add_column!(::MatElem{T}, ::Int, ::Int, ::Int) where T <: RingElement
add_row(::MatElem{T}, ::Int, ::Int, ::Int) where T <: RingElement
add_row!(::MatElem{T}, ::Int, ::Int, ::Int) where T <: RingElement
multiply_column(::MatElem{T}, ::Int, ::Int) where T <: RingElement
multiply_column!(::MatElem{T}, ::Int, ::Int) where T <: RingElement
multiply_row(::MatElem{T}, ::Int, ::Int) where T <: RingElement
multiply_row!(::MatElem{T}, ::Int, ::Int) where T <: RingElement
```

Expand Down Expand Up @@ -834,7 +834,7 @@ julia> B = gram(A)
### Trace

```@docs
tr(::MatElem)
tr(::MatElem{T}) where T <: RingElement
```

**Examples**
Expand All @@ -859,7 +859,7 @@ t^2 + 3*t + 2
### Content

```@docs
content(::MatElem)
content(::MatElem{T}) where T <: RingElement
```

**Examples**
Expand All @@ -884,7 +884,7 @@ julia> b = content(A)
### Permutation

```@docs
*(::Perm, ::MatElem)
*(::Perm, ::MatElem{T}) where T <: RingElement
```

**Examples**
Expand Down
2 changes: 1 addition & 1 deletion docs/src/matrix_introduction.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Introduction

AbstractAlgebra provides matrix spaces (mxn matrices) and matrix algebras
(nxn matrices) over a commutative ring. Whilst both types of matrix provide
(nxn matrices) over a ring. Whilst both types of matrix provide
matrix multiplication for matrices whose dimensions are compatible for
multiplication, only the latter kind of matrices form rings in the system.

Expand Down
Loading

0 comments on commit 9f288ac

Please sign in to comment.