Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revise check_parent for ResElem and ResFieldElem (#1741)
Also remove check_parent_type. Previously, we allowed binary operations involving two ResElem instances of *different type*, with the type of the result depending on the argument order. For example, this: julia> using Nemo julia> R = quo(ZZ, 2)[1] Integers modulo 2 julia> S = Nemo.AbstractAlgebra.EuclideanRingResidueRing{UInt}(UInt(2)) Residue ring of integers modulo 2 julia> typeof(R) zzModRing julia> typeof(S) EuclideanRingResidueRing{UInt64} julia> S(1) + R(1) 0 julia> typeof(S(1) + R(1)) EuclideanRingResidueRingElem{UInt64} julia> typeof(R(1) + S(1)) zzModRingElem But this seems questionable at best. I think we are better of forbidding this -- which this PR effectively does.
- Loading branch information