Feature #113
Introduce PartialHom
Description
Currently CoCoALib does not distinguish between proper homs and partial homs.
Thus we can create a (partial) RingHom from QQ to ZZ which is valid only for integers in QQ. We can create a RingHom from ZZ to QQ -- a genuine RingHom.
Composing them produces the identity RingHom from QQ to QQ; but this does not have the same behaviour as applying first the partial hom and then the proper hom!
We should introduce separate types for full and partial homs. If this proves to be problematic, a lesser solution would be to add a mem fn saying whether it is full or partial.
Related issues
History
#1 Updated by John Abbott almost 12 years ago
- Status changed from New to In Progress
- Assignee set to John Abbott
JAA has made a first (incomplete) implementation.
Currently the names chosen are RingHom
and PartialRingHom
. It seems sensible to retain the name RingHom
for true homomorphisms. Other ideas for partial ring homs are SubringHom
and RingMap
. Any suggestions regarding naming are welcome.
- an abstract base class
RingHomBase
; all implementation classes (incl partial homs) are derived from this class - added a virtual member fn
IamPartial
toRingHomBase
PartialRingHom
is a (smart) pointer to an instance of typeRingHomBase
RingHom
is derived fromPartialRingHom
[note that it satisfies the "is-a" relationship] so that the compiler can easily convert fromRingHom
toPartialRingHom
; aRingHom
guarantees that its impl givesfalse
as the result a call toIamPartial
- assignment to
RingHom
fromPartialRingHom
is allowed but checks at run-time that the impl givesfalse
as the result of a call toIamPartial
This design was chosen because it was the first that came mind. JAA is not entirely happy because the distinction between RingHom
and PartialRingHom
does seem somewhat artificial.
#2 Updated by Anna Maria Bigatti over 11 years ago
- Category set to New Function
#3 Updated by Anna Maria Bigatti over 10 years ago
- Target version set to CoCoALib-0.99533 Easter14
#4 Updated by John Abbott about 10 years ago
- Target version changed from CoCoALib-0.99533 Easter14 to CoCoALib-0.99534 Seoul14
- % Done changed from 0 to 10
My impl attempt failed; static typing in C++ did not help.
Now considering defining notion of subring (certain limited families!)
#5 Updated by John Abbott almost 10 years ago
- Target version changed from CoCoALib-0.99534 Seoul14 to CoCoALib-1.0