> > Hi,
> >
> > Is there an accessible algebra in Axiom that holds the
> > internal representation of Axiom object?
> >
> > Assume, I have
> >
> > (x:% - %:y):% == reduc(x -$Rep y, commonk(x, y))
> >
> > Who to I get hold on the internal representation of "-"?
> >
> > (SEX an EXPR do not see, to give me what I want).
>
> I'm a little worried: what do you really want to do? This doesn't
> look like the way things should be done in Axiom or Aldor. Could you
> give an example, i.e., input plus desired output that explains *why*
> you want access to the internal representation?
Actually, introspection would be quite useful when trying to develop
a general purpose routine for line-wrapping or equation formating.
The line wrapping problem could take two paths.
Path 1 is to hierarchically organize the expression and ask each
subexpression to format itself into a multi-line buffer. If the
subexpression exceeds the linelength and indentation depth requirements
you can recurse into the expression, split it on operators, and retry.
Path 2 is to create a "WHERE" package. The WHERE package would extract
subexpressions from an expression and print is as:
f(x) = a op b
where a = expr1
b = expr2
etc.
t
_______________________________________________
Axiom-mail mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/axiom-mail