Expression problem assesment
I have gathered plenty of information from many sources and I think there is an answer to this question in the material I have found. To not confuse myself off from the goal, I'm putting some thoughts into a buffer.
What does A + B mean? Or what does A * B mean? How about sin(B)?
Assume that A and B are not of the same type, but there is a meaningful interpretetation for addition, multiplication and sine on these values.
We have described a problem that shares similarity with the expression problem. People solving that problem usually intend to find out how to add new methods and types without modifying the old ones.
People solving our problem are concerned with how to obtain expressivity of mathematics while remaining correct?
Several ways to think about mathematics have been invented. Category theory reveals that it is easy to come up with more ways to think about mathematics.
Sources of inspiration & answers
I believe that the problem has been already solved. The only task left for me is to find it and understand the content.
To improve upon what I will find, I have plenty of inspiration from many sources:
- Pattern matching / search
- Axiom and Aldor
- Mlsub and ML-family of languages
- Category theory
- Hagino's categorical programming language
The study of Axiom computer algebra system has ended up being the most useful. The type system appears to be exactly what I am looking for, but I do not understand it well-enough to conclude that it is what I need.
Axiom's documentation and code has been divided into books. The Volume 10 and 10.1 have ended up giving most cues on the internals of that system. I am soon going to read upon:
- "Type systems for computer algebra" by Andreas Weber
- "Order Sorted Computer Algebra and Coercions" by Nicolas Doye
- Details of the implementation of risch algorithm in Axiom may be interesting as well.