Skip to content

Commit 3f4dc90

Browse files
committed
Merge or remove some docstrings
1 parent cd8f210 commit 3f4dc90

File tree

10 files changed

+15
-202
lines changed

10 files changed

+15
-202
lines changed

src/AbsSeries.jl

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -563,34 +563,20 @@ end
563563
###############################################################################
564564

565565
@doc raw"""
566-
==(x::AbsPowerSeriesRingElem{T}, y::T) where {T <: RingElem}
566+
==(x::AbsPowerSeriesRingElem{<:RingElem}, y::RingElement)
567+
==(x::RingElement, y::AbsPowerSeriesRingElem{<:RingElem})
567568
568569
Return `true` if $x == y$ arithmetically, otherwise return `false`.
569570
"""
570571
==(x::AbsPowerSeriesRingElem{T}, y::T) where {T <: RingElem} = precision(x) == 0 ||
571572
((length(x) == 0 && iszero(y)) || (length(x) == 1 && coeff(x, 0) == y))
572573

573-
@doc raw"""
574-
==(x::T, y::AbsPowerSeriesRingElem{T}) where {T <: RingElem}
575-
576-
Return `true` if $x == y$ arithmetically, otherwise return `false`.
577-
"""
578574
==(x::T, y::AbsPowerSeriesRingElem{T}) where {T <: RingElem} = y == x
579575

580-
@doc raw"""
581-
==(x::AbsPowerSeriesRingElem, y::JuliaRingElement)
582-
583-
Return `true` if $x == y$ arithmetically, otherwise return `false`.
584-
"""
585576
==(x::AbsPowerSeriesRingElem, y::JuliaRingElement) = precision(x) == 0 ||
586577
((length(x) == 0 && iszero(base_ring(x)(y))) ||
587578
(length(x) == 1 && coeff(x, 0) == y))
588579

589-
@doc raw"""
590-
==(x::JuliaRingElement, y::AbsPowerSeriesRingElem)
591-
592-
Return `true` if $x == y$ arithmetically, otherwise return `false`.
593-
"""
594580
==(x::JuliaRingElement, y::AbsPowerSeriesRingElem) = y == x
595581

596582
###############################################################################

src/Fraction.jl

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -451,11 +451,6 @@ end
451451
#
452452
###############################################################################
453453

454-
@doc raw"""
455-
==(x::FracElem, y::JuliaRingElement)
456-
457-
Return `true` if $x == y$ arithmetically, otherwise return `false`.
458-
"""
459454
function ==(x::FracElem, y::Union{Integer, AbstractFloat})
460455
return (isone(denominator(x, false)) && numerator(x, false) == y) ||
461456
(isone(denominator(x, true)) && numerator(x, true) == y) ||
@@ -469,15 +464,11 @@ function ==(x::FracElem, y::Rational)
469464
denominator(x, false)*numerator(y, false))
470465
end
471466

472-
@doc raw"""
473-
==(x::JuliaRingElement, y::FracElem)
474-
475-
Return `true` if $x == y$ arithmetically, otherwise return `false`.
476-
"""
477467
==(x::JuliaRingElement, y::FracElem) = y == x
478468

479469
@doc raw"""
480-
==(x::FracElem{T}, y::T) where {T <: RingElem}
470+
==(x::FracElem{<:RingElem}, y::RingElement)
471+
==(x::RingElement, y::FracElem{<:RingElem})
481472
482473
Return `true` if $x == y$ arithmetically, otherwise return `false`.
483474
"""
@@ -487,11 +478,6 @@ function ==(x::FracElem{T}, y::T) where {T <: RingElem}
487478
(numerator(x, false) == denominator(x, false)*y)
488479
end
489480

490-
@doc raw"""
491-
==(x::T, y::FracElem{T}) where {T <: RingElem}
492-
493-
Return `true` if $x == y$ arithmetically, otherwise return `false`.
494-
"""
495481
==(x::T, y::FracElem{T}) where {T <: RingElem} = y == x
496482

497483
###############################################################################

src/Matrix.jl

Lines changed: 7 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -959,11 +959,6 @@ function *(x::MatrixElem{T}, y::T) where {T <: NCRingElem}
959959
return z
960960
end
961961

962-
@doc raw"""
963-
+(x::JuliaRingElement, y::MatrixElem)
964-
965-
Return $S(x) + y$ where $S$ is the parent of $y$.
966-
"""
967962
function +(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
980975
end
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
992982
Return $S(x) + y$ where $S$ is the parent of $y$.
993983
"""
@@ -1006,17 +996,12 @@ function +(x::T, y::MatrixElem{T}) where {T <: NCRingElem}
1006996
end
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-
"""
10201005
function -(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
10331018
end
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-
"""
10401020
function -(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
10531033
end
10541034

10551035
@doc raw"""
1056-
-(x::T, y::MatrixElem{T}) where {T <: NCRingElem}
1036+
-(x::NCRingElement, y::MatrixElem{<:NCRingElement})
10571037
10581038
Return $S(x) - y$ where $S$ is the parent of $y$.
10591039
"""
@@ -1073,7 +1053,7 @@ function -(x::T, y::MatrixElem{T}) where {T <: NCRingElem}
10731053
end
10741054

10751055
@doc raw"""
1076-
-(x::MatrixElem{T}, y::T) where {T <: NCRingElem}
1056+
-(x::MatrixElem{<:NCRingElem}, y::NCRingElement)
10771057
10781058
Return $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-
"""
13471321
function ==(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
13611335
end
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
13741342
Return `true` if $x == S(y)$ arithmetically, where $S$ is the parent of $x$,
13751343
otherwise return `false`.
@@ -1391,7 +1359,7 @@ function ==(x::MatrixElem{T}, y::T) where {T <: NCRingElem}
13911359
end
13921360

13931361
@doc raw"""
1394-
==(x::T, y::MatrixElem{T}) where {T <: NCRingElem}
1362+
==(x::NCRingElement, y::MatrixElem{<:NCRingElement})
13951363
13961364
Return `true` if $S(x) == y$ arithmetically, where $S$ is the parent of $y$,
13971365
otherwise return `false`.

src/NCPoly.jl

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -401,11 +401,6 @@ Return `true` if $x = y$.
401401
"""
402402
==(x::T, y::NCPolyRingElem{T}) where T <: NCRingElem = y == x
403403

404-
@doc raw"""
405-
==(x::JuliaRingElement, y::NCPolyRingElem)
406-
407-
Return `true` if $x == y$ arithmetically, otherwise return `false`.
408-
"""
409404
==(x::JuliaRingElement, y::NCPolyRingElem) = y == x
410405

411406
###############################################################################
@@ -532,7 +527,7 @@ end
532527
###############################################################################
533528

534529
@doc raw"""
535-
divexact_right(a::NCPolyRingElem{T}, b::T; check::Bool=true) where T <: NCRingElem
530+
divexact_right(a::NCPolyRingElem{<:NCRingElem}, b::NCRingElement; check::Bool=true)
536531
537532
Assuming $a = qb$, return $q$. By default if the division is not exact an
538533
exception is raised. If `check=false` this test is omitted.
@@ -549,7 +544,7 @@ function divexact_right(a::NCPolyRingElem{T}, b::T; check::Bool=true) where T <:
549544
end
550545

551546
@doc raw"""
552-
divexact_left(a::NCPolyRingElem{T}, b::T; check::Bool=true) where T <: NCRingElem
547+
divexact_left(a::NCPolyRingElem{<:NCRingElem}, b::NCRingElement; check::Bool=true)
553548
554549
Assuming $a = bq$, return $q$. By default if the division is not exact an
555550
exception is raised. If `check=false` this test is omitted.
@@ -565,12 +560,6 @@ function divexact_left(a::NCPolyRingElem{T}, b::T; check::Bool=true) where T <:
565560
return z
566561
end
567562

568-
@doc raw"""
569-
divexact_right(a::NCPolyRingElem, b::JuliaRingElement; check::Bool=true)
570-
571-
Assuming $a = qb$, return $q$. By default if the division is not exact an
572-
exception is raised. If `check=false` this test is omitted.
573-
"""
574563
function divexact_right(a::NCPolyRingElem, b::JuliaRingElement; check::Bool=true)
575564
iszero(b) && throw(DivideError())
576565
z = parent(a)()
@@ -582,12 +571,6 @@ function divexact_right(a::NCPolyRingElem, b::JuliaRingElement; check::Bool=true
582571
return z
583572
end
584573

585-
@doc raw"""
586-
divexact_left(a::NCPolyRingElem, b::JuliaRingElement; check::Bool=true)
587-
588-
Assuming $a = bq$, return $q$. By default if the division is not exact an
589-
exception is raised. If `check=false` this test is omitted.
590-
"""
591574
function divexact_left(a::NCPolyRingElem, b::JuliaRingElement; check::Bool=true)
592575
return divexact_right(a, b; check=check)
593576
end
@@ -599,7 +582,7 @@ end
599582
###############################################################################
600583

601584
@doc raw"""
602-
evaluate(a::NCPolyRingElem, b::T) where T <: NCRingElem
585+
evaluate(a::NCPolyRingElem, b::NCRingElement)
603586
604587
Evaluate the polynomial $a$ at the value $b$ and return the result.
605588
"""
@@ -618,11 +601,6 @@ function evaluate(a::NCPolyRingElem, b::T) where T <: NCRingElem
618601
return z
619602
end
620603

621-
@doc raw"""
622-
evaluate(a::NCPolyRingElem, b::JuliaRingElement)
623-
624-
Evaluate the polynomial $a$ at the value $b$ and return the result.
625-
"""
626604
function evaluate(a::NCPolyRingElem, b::JuliaRingElement)
627605
i = length(a)
628606
R = base_ring(a)

src/Poly.jl

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -936,34 +936,14 @@ end
936936
#
937937
###############################################################################
938938

939-
@doc raw"""
940-
==(x::PolyRingElem{T}, y::T) where {T <: RingElem}
941-
942-
Return `true` if $x == y$.
943-
"""
944939
==(x::PolyRingElem{T}, y::T) where T <: RingElem = ((length(x) == 0 && iszero(y))
945940
|| (length(x) == 1 && coeff(x, 0) == y))
946941

947-
@doc raw"""
948-
==(x::PolynomialElem, y::JuliaRingElement)
949-
950-
Return `true` if $x == y$ arithmetically, otherwise return `false`.
951-
"""
952942
==(x::PolynomialElem, y::JuliaRingElement) = ((length(x) == 0 && iszero(base_ring(x)(y)))
953943
|| (length(x) == 1 && coeff(x, 0) == y))
954944

955-
@doc raw"""
956-
==(x::T, y::PolyRingElem{T}) where T <: RingElem = y == x
957-
958-
Return `true` if $x = y$.
959-
"""
960945
==(x::T, y::PolyRingElem{T}) where T <: RingElem = y == x
961946

962-
@doc raw"""
963-
==(x::JuliaRingElement, y::PolyRingElem)
964-
965-
Return `true` if $x == y$ arithmetically, otherwise return `false`.
966-
"""
967947
==(x::JuliaRingElement, y::PolyRingElem) = y == x
968948

969949
###############################################################################

src/RelSeries.jl

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -787,36 +787,16 @@ end
787787
#
788788
###############################################################################
789789

790-
@doc raw"""
791-
==(x::RelPowerSeriesRingElem{T}, y::T) where {T <: RingElem}
792-
793-
Return `true` if $x == y$ arithmetically, otherwise return `false`.
794-
"""
795790
==(x::RelPowerSeriesRingElem{T}, y::T) where {T <: RingElem} = precision(x) == 0 ||
796791
((pol_length(x) == 0 && iszero(y)) || (pol_length(x) == 1 &&
797792
valuation(x) == 0 && polcoeff(x, 0) == y))
798793

799-
@doc raw"""
800-
==(x::T, y::RelPowerSeriesRingElem{T}) where {T <: RingElem}
801-
802-
Return `true` if $x == y$ arithmetically, otherwise return `false`.
803-
"""
804794
==(x::T, y::RelPowerSeriesRingElem{T}) where {T <: RingElem} = y == x
805795

806-
@doc raw"""
807-
==(x::RelPowerSeriesRingElem, y::JuliaRingElement)
808-
809-
Return `true` if $x == y$ arithmetically, otherwise return `false`.
810-
"""
811796
==(x::RelPowerSeriesRingElem, y::JuliaRingElement) = precision(x) == 0 ||
812797
((pol_length(x) == 0 && iszero(base_ring(x)(y))) ||
813798
(pol_length(x) == 1 && valuation(x) == 0 && polcoeff(x, 0) == y))
814799

815-
@doc raw"""
816-
==(x::JuliaRingElement, y::RelPowerSeriesRingElem)
817-
818-
Return `true` if $x == y$ arithmetically, otherwise return `false`.
819-
"""
820800
==(x::JuliaRingElement, y::RelPowerSeriesRingElem) = y == x
821801

822802
###############################################################################

src/Residue.jl

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -283,41 +283,21 @@ end
283283
#
284284
###############################################################################
285285

286-
@doc raw"""
287-
==(a::ResElem, b::JuliaRingElement)
288-
289-
Return `true` if $a == b$ arithmetically, otherwise return `false`.
290-
"""
291286
function ==(a::ResElem, b::JuliaRingElement)
292287
z = base_ring(a)(b)
293288
return data(a) == mod(z, modulus(a))
294289
end
295290

296-
@doc raw"""
297-
==(a::JuliaRingElement, b::ResElem)
298-
299-
Return `true` if $a == b$ arithmetically, otherwise return `false`.
300-
"""
301291
function ==(a::JuliaRingElement, b::ResElem)
302292
z = base_ring(b)(a)
303293
return data(b) == mod(z, modulus(b))
304294
end
305295

306-
@doc raw"""
307-
==(a::ResElem{T}, b::T) where {T <: RingElem}
308-
309-
Return `true` if $a == b$ arithmetically, otherwise return `false`.
310-
"""
311296
function ==(a::ResElem{T}, b::T) where {T <: RingElem}
312297
z = base_ring(a)(b)
313298
return data(a) == mod(z, modulus(a))
314299
end
315300

316-
@doc raw"""
317-
==(a::T, b::ResElem{T}) where {T <: RingElem}
318-
319-
Return `true` if $a == b$ arithmetically, otherwise return `false`.
320-
"""
321301
function ==(a::T, b::ResElem{T}) where {T <: RingElem}
322302
z = base_ring(b)(a)
323303
return data(b) == mod(z, modulus(b))

0 commit comments

Comments
 (0)