someone wrote:
>
> > > -- A single term is of the form alpha * a * v
> > > Term == Record(coe:R, sca:scaPart, vec:vecPart)
> > >
> > > -- A normal form is a sum of terms
> > > Rep := List Term
> > >
> > > but I'm not sure about the String there. Should we use Symbol,
> > > Variable or is String fine or what would you suggest?
> >
> > I quickly browsed through the paper (actually only the implementation
> > part). I somehow got the impression that the instead of String one can
> > that any domain that represents the name of a variable.
>
> It seems to me too. Names are strings, so I assume
> String does the job here.
In FriCAS normaly symbols are used as names.
> The zero vector get a "0" by
> this method. I'm not sure if this is nice.
Other parts of FriCAS which represent mathematical quantities
as lists of terms use empty list to represent 0.
> > But that is FriCAS-internal, you have only minor influence on this.
>
> I hoped that we could use bold letters in latex printing.
> And a special symbol for the wedge product. We do really
> not want to get a^b written as $a^{b}$.
OutputForm is deliberatly limited to allow different output
formats. And ATM wedge has no special handling in TeX
formatter, so we get wrong output (due to unescaped
backslash):
(5) a/\b
$$
a/\b
\leqno(5)
$$
> But how do I need to implement the coerce? I have this
> code (just a special case to try):
>
> coerce(x : %) : OutputForm ==
> xx := rep x
> t1 := first xx
> t1.vec :: OutputForm
>
> I would think that for a simple expressions consisting of
> only one vector of name "u" I should get back the name printed,
> which is not the case:
>
> (8) -> vector(u)$VA(INT)
>
> LISP output:
> (UNPRINTABLE)
> Type: VectorAlgebra(Integer)
>
> There must be a missing bit somewhere.
>
Make sure that you domain belongs to 'CoercibleTo(OutputForm)' category.
That is write:
VectorSpaceCategory(R : Ring) : Category == CoercibleTo(OutputForm) with
......
Merely exporting 'coerce' to 'OutputForm' is not enough.
> BTW: How can I look at the Rep of some object?
The idea is that Rep is invisible from outside of your domain.
If you want to see Lisp representation for debugging purpose
you may use PRETTYPRINT like:
(6) -> PRETTYPRINT(ao)$Lisp
|a|
--
Waldek Hebisch
[email protected]
--
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.