Ralf Hemmecke <[email protected]> writes: > This comment in catdef.spad says it all... > > -- Q-algebra is a lie, should be conditional on characteristic 0, > -- but knownInfo cannot handle the following commented > -- if % has CharacteristicZero then Algebra Fraction Integer > > Would have been a surprise to me if the original programmers wouldn't > have known. So the problem is the compiler? But somehow, I wouldn't > want to have the above if-statement in the category, because it's a > kind of "I am also of type X if I am of type Y". But type Y can live > far far away and becomes only apparent in an actual implementation of > a concrete domain. > > 1) Better would be to declare Algebra(Fraction Integer) at the time > of implementation of the domain. > 2) Or have additional categories DivisionRingCharacteristicZero and > DivisionRingCharacteristicNonZero. > > I'd prefer (1).
I think you are right. I just remember a similar "problem" I had some time ago, described in the thread: exports of INTDOM, Ring, was: Nested functions in algebra Quoting: > Originally, I also wanted to have Ring export Algebra Integer. > However this is not possible, since it introduces a circular > dependency on the category level: Algebra exports Ring. However, as > (if I recall correctly) Ralf pointed out, we could/should simply > replace every occurrence where a domain or category exports "Ring" by > "Algebra Integer", and this would cure the problem without tricks. Of > course, it would make Ring almost synonymous with Algebra Integer, but > on the other hand, it is. (I'm not sure anymore whether I really want to get rid of Ring.) curiously, sage doesn't assert that the category of Algebras over the Integers is a subcategory of the category of Rings either: sage: Rings().is_subcategory(Algebras(ZZ)) False Not sure what's correct here. Martin -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/fricas-devel?hl=en.
