Does the attached file help you? It compiles here.
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.
)abb domain COMP Composition
Composition(): Join(Monoid, RetractableTo List PositiveInteger) with
-- nearSelfConcatenation: (%, PositiveInteger) -> %
nearConcatenation: (%, %) -> %
== add
Rep := List PositiveInteger
per(a: Rep): % == a pretend %
rep(a: %): Rep == a pretend Rep
coerce(l: List PositiveInteger): % == per l
coerce(a: %): OutputForm == a::OutputForm
nearConcatenation(a: %, b: %): % ==
c := reverse rep a
per concat [reverse! rest c, cons(first c + first rep b, rest rep
b)]
nearSelfConcatenation(a: %, n: PositiveInteger): % ==
one? n => a
b := nearSelfConcatenation(nearConcatenation(a, a),
shift(n, -1) pretend PositiveInteger)
odd? n => nearConcatenation(a, b)
b
a * b ==
per concat [nearSelfConcatenation(b, alpha) for alpha in rep a]
1: % == per []