awk '/^)abbrev domain EXPR Expression/,/^@/ {print}' expr.spad.pamphlet |grep '^[ \t]*Rep'
            Rep := Fraction MP
            Rep := MP
          Rep := FreeAbelianGroup K
            Rep := K

Expression(R) does not just have ONE representation, but the representation depends on the parameter R.

As you can see from the nesting of this line
https://github.com/hemmecke/fricas-svn/blob/master/src/algebra/expr.spad.pamphlet#L112
,,, in case R is Integer, FriCAS will use Fraction(MP) where
  MP  ==> SparseMultivariatePolynomial(R, K)
  K   ==> Kernel %

Looks like the documentation is not lying. It's "Kernel over Expression" (% here stands for Expression(R)).

Then look into
https://github.com/hemmecke/fricas-svn/blob/master/src/algebra/kl.spad.pamphlet#L226
to find out what Kernel(S) can do with the parameter S.
It's only
    argument: % -> List S
    kernel  : (OP, List S, N) -> %
that are important.

So unless you construct an infinite kernel that refers from one of its arguments back to itself (which is impossible without tricks, since the arguments must be existing before you can give them to the "kernel" function), there must be a base case (basically a symbol or nullary operator) that does not involve any expression.

So yes, the Expression/Kernel data structures are recursive. But there is no problem with the actual representation.

For a developer one can consider an Expression as a multivariate polynomial where the variables might have a quite complicated structure. But if you go down this complicated structure, you remove one complexity level after the other.

Ralf

--
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.

Reply via email to