> Of course using 'Product' in this manner is also applicable in the compiler.
Would that mean you want Product or Cross be more intelligent by lifting operations from their input domains? > It is easy in principle to implement the categorical dual of 'Product' > that we might call 'Sum'. See for example some initial coding effort > here: > > http://axiom-wiki.newsynthesis.org/SandBoxSum > > 'Sum' then is a type of 'Union' that lifts operations from it's > component domains in the manner as 'Product'. Yes, both Product and your Sum is an approximation of the categorial concept. But look more closely at both implementations. They explicitly state something like if A has Finite and B has Finite then Finite if A has Monoid and B has Monoid then Monoid if A has AbelianMonoid and B has AbelianMonoid then AbelianMonoid if A has CancellationAbelianMonoid and B has CancellationAbelianMonoid then CancellationAbelianMonoid if A has Group and B has Group then Group etc. It is so easy for a programmer to forget something important in that list. And if later somebody comes and introduces a new category that should also be lifted via Sum, one would have to modify the sources or use "extend". That is somehow unsatisfactory. However, I also don't see, how that lifting could be done in a generic fashion, i.e. categorically, since some categories lift and others don't. Still, the conditional exports are nice, but if this leads to such a list as in Sum or Product, it doesn't seem to be the last word. Let me dream. For example, there appears if A has Monoid and B has Monoid then Monoid in the category part of Product. So there is a function *: (%,%)->% in A and B. We all know how the pattern for the lifted function is. So it would be nice if "Product" or Cross is language defined (and thus the representation is given) and one only would give such a "pattern" that would apply for any bivariate function of the same signature. So giving the pattern for (%,%)->% in the Ring case would suffice to lift + and *, i.e., there would no need to give identical implementations (except for the names of the operation) for + and *. Of course, that is just made up and there are certainly problems how to lift not only signatures, but also axioms. Ralf ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ open-axiom-devel mailing list open-axiom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open-axiom-devel