@@ -959,11 +959,6 @@ function *(x::MatrixElem{T}, y::T) where {T <: NCRingElem}
959959 return z
960960end
961961
962- @doc raw """
963- +(x::JuliaRingElement, y::MatrixElem)
964-
965- Return $S(x) + y$ where $S$ is the parent of $y$.
966- """
967962function + (x:: JuliaRingElement , y:: MatrixElem{T} ) where T <: NCRingElement
968963 z = similar (y)
969964 R = base_ring (y)
@@ -979,15 +974,10 @@ function +(x::JuliaRingElement, y::MatrixElem{T}) where T <: NCRingElement
979974 return z
980975end
981976
982- @doc raw """
983- +(x::MatrixElem{T}, y::JuliaRingElement) where T <: NCRingElement
984-
985- Return $x + S(y)$ where $S$ is the parent of $x$.
986- """
987977+ (x:: MatrixElem{T} , y:: JuliaRingElement ) where T <: NCRingElement = y + x
988978
989979@doc raw """
990- +(x::T , y::MatrixElem{T}) where {T <: NCRingElem}
980+ +(x::NCRingElement , y::MatrixElem{<:NCRingElement})
991981
992982Return $S(x) + y$ where $S$ is the parent of $y$.
993983"""
@@ -1006,17 +996,12 @@ function +(x::T, y::MatrixElem{T}) where {T <: NCRingElem}
1006996end
1007997
1008998@doc raw """
1009- +(x::MatrixElem{T }, y::T) where {T <: RingElem}
999+ +(x::MatrixElem{<:NCRingElement }, y::NCRingElement)
10101000
1011- Return $x + S(y)$ where $S$ is the parent of $x $.
1001+ Return $x + S(y)$, where $S$ is the parent of $a $.
10121002"""
10131003+ (x:: MatrixElem{T} , y:: T ) where {T <: NCRingElem } = y + x
10141004
1015- @doc raw """
1016- -(x::JuliaRingElement, y::MatrixElem{T}) where T <: NCRingElement
1017-
1018- Return $S(x) - y$ where $S$ is the parent of $y$.
1019- """
10201005function - (x:: JuliaRingElement , y:: MatrixElem{T} ) where T <: NCRingElement
10211006 z = similar (y)
10221007 R = base_ring (y)
@@ -1032,11 +1017,6 @@ function -(x::JuliaRingElement, y::MatrixElem{T}) where T <: NCRingElement
10321017 return z
10331018end
10341019
1035- @doc raw """
1036- -(x::MatrixElem{T}, y::JuliaRingElement) where T <: NCRingElement
1037-
1038- Return $x - S(y)$, where $S$ is the parent of $x$.
1039- """
10401020function - (x:: MatrixElem{T} , y:: JuliaRingElement ) where T <: NCRingElement
10411021 z = similar (x)
10421022 R = base_ring (x)
@@ -1053,7 +1033,7 @@ function -(x::MatrixElem{T}, y::JuliaRingElement) where T <: NCRingElement
10531033end
10541034
10551035@doc raw """
1056- -(x::T , y::MatrixElem{T}) where {T <: NCRingElem}
1036+ -(x::NCRingElement , y::MatrixElem{<:NCRingElement})
10571037
10581038Return $S(x) - y$ where $S$ is the parent of $y$.
10591039"""
@@ -1073,7 +1053,7 @@ function -(x::T, y::MatrixElem{T}) where {T <: NCRingElem}
10731053end
10741054
10751055@doc raw """
1076- -(x::MatrixElem{T }, y::T) where {T <: NCRingElem}
1056+ -(x::MatrixElem{<:NCRingElem }, y::NCRingElement)
10771057
10781058Return $x - S(y)$, where $S$ is the parent of $a$.
10791059"""
@@ -1338,12 +1318,6 @@ end
13381318#
13391319# ##############################################################################
13401320
1341- @doc raw """
1342- ==(x::MatrixElem{T}, y::JuliaRingElement) where T <: NCRingElement
1343-
1344- Return `true` if $x == S(y)$ arithmetically, where $S$ is the parent of $x$,
1345- otherwise return `false`.
1346- """
13471321function == (x:: MatrixElem{T} , y:: JuliaRingElement ) where T <: NCRingElement
13481322 for i = 1 : min (nrows (x), ncols (x))
13491323 if x[i, i] != y
@@ -1360,16 +1334,10 @@ function ==(x::MatrixElem{T}, y::JuliaRingElement) where T <: NCRingElement
13601334 return true
13611335end
13621336
1363- @doc raw """
1364- ==(x::JuliaRingElement, y::MatrixElem{T}) where T <: NCRingElement
1365-
1366- Return `true` if $S(x) == y$ arithmetically, where $S$ is the parent of $y$,
1367- otherwise return `false`.
1368- """
13691337== (x:: JuliaRingElement , y:: MatrixElem{T} ) where T <: NCRingElement = y == x
13701338
13711339@doc raw """
1372- ==(x::MatrixElem{T }, y::T) where {T <: NCRingElem}
1340+ ==(x::MatrixElem{<:NCRingElement }, y::NCRingElement)
13731341
13741342Return `true` if $x == S(y)$ arithmetically, where $S$ is the parent of $x$,
13751343otherwise return `false`.
@@ -1391,7 +1359,7 @@ function ==(x::MatrixElem{T}, y::T) where {T <: NCRingElem}
13911359end
13921360
13931361@doc raw """
1394- ==(x::T , y::MatrixElem{T}) where {T <: NCRingElem}
1362+ ==(x::NCRingElement , y::MatrixElem{<:NCRingElement})
13951363
13961364Return `true` if $S(x) == y$ arithmetically, where $S$ is the parent of $y$,
13971365otherwise return `false`.
0 commit comments