> Of course, I can construct
> such a list with setrest!, but using a destructive function for me means
> that I can potentially fall out of the domain.

> Yeah, that's where my problem is. I would count that as infinite even
> though I know that internaly there are just finitely many elements stored.

Here are some things that may make you more clear:

Aggregate is the root of all aggregates.  There are 2 attributes/dimensions:
finiteAggregate/not finiteAggregate, shallowlyMutable/ not shallowlyMutable,
That means possibly 4 variants of a data structure category:
Take Stream as an example:
1. finite mutable stream: a lazy version of List, can have cycle.
2. finite immutable stream: a lazy pure functional list, no cycle
3. infinite mutable stream: a lazy stream, members generated by a
function, can have cycle
4. infinite immutable stream: a lazy pure functional stream, no cycle

In Spad, finite mutable are the most common case, so cycle is in lots
of domains.

> Lists with a cycle should not live in List(X), but in Stream(X).

See previous section, what you think is List is actually ImmutableList.

> Yes and OK, but define the meaning of finiteAggregate in your own words.
> It you come up with something "can be represented by finitely many
> objects", then also "[f x for x in 1..]" is finite. There are only
> finitely many letters between the quotes.

Maybe the key for finiteAggregate is equality:
you can tell if [f x for x in 1..] is equal to [g x for x in 1..],
because you can't tell if (f-g) is zero.

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to