Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions experimental/ActionPolyRing/src/Types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ mutable struct DifferencePolyRingElem{T} <: ActionPolyRingElem{T}

function DifferencePolyRingElem{T}(dpr::DifferencePolyRing{T}, mpre::MPolyRingElem{T}) where {T}
upr = dpr.upoly_ring
@req upr.mpoly_ring === parent(mpre) "The parent does not match"
@req base_ring(upr) === parent(mpre) "The parent does not match"
new{T}(upr(collect(coefficients(mpre)), collect(exponents(mpre))), dpr, false, zeros(Int, length(mpre)))
end
Comment on lines 109 to 113
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
function DifferencePolyRingElem{T}(dpr::DifferencePolyRing{T}, mpre::MPolyRingElem{T}) where {T}
upr = dpr.upoly_ring
@req upr.mpoly_ring === parent(mpre) "The parent does not match"
@req base_ring(upr) === parent(mpre) "The parent does not match"
new{T}(upr(collect(coefficients(mpre)), collect(exponents(mpre))), dpr, false, zeros(Int, length(mpre)))
end

It seemed consequent at some point to also have this constructor, but I never use it nor is it realistic to expect a user to try this. From my PoV it can be removed completely.

Note that the corresponding tests in lines 649, 650, 655, 656 of experimental/ActionPolyRing/test/ActionPolyRing.jl need to be removed as well

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK then it's probably easiest to delete this for now, and we can add it back if and when it is needed, by that time we may have the new UniversalRing in place

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I can take care of that. I'll make a new PR which removes both constructors and their tests.


Expand Down Expand Up @@ -161,7 +161,7 @@ mutable struct DifferentialPolyRingElem{T} <: ActionPolyRingElem{T}

function DifferentialPolyRingElem{T}(dpr::DifferentialPolyRing{T}, mpre::MPolyRingElem{T}) where {T}
upr = dpr.upoly_ring
@req upr.mpoly_ring === parent(mpre) "The parent does not match"
@req base_ring(upr) === parent(mpre) "The parent does not match"
new{T}(upr(collect(coefficients(mpre)), collect(exponents(mpre))), dpr, false, zeros(Int, length(mpre)))
end

Expand Down
Loading