On Mon, Mar 16, 2026 at 06:33:21AM -0700, 'Martin R' via FriCAS - computer algebra system wrote:
> Would you be in favour of such a signature to POLYCAT? I am not entirely
> sure how to do it, would something like
>
> variables: () -> List VarSet
>
> provided that "VarSet has Finite" work?
>
Simple way would be to add type-returning functions to PolynomialCategory.
Something like:
PolynomialCategory(R : Join(SemiRng, AbelianMonoid),
E : OrderedAbelianMonoidSup, VarSet : OrderedSet):
Category ==
Join(...) with
baseRing : () -> Join(SemiRng, AbelianMonoid)
exponentMonoid : () -> OrderedAbelianMonoidSup
variableSet : () -> OrderedSet
...
add
baseRing() == R
exponentMonoid() == E
variableSet() == VarSet
There are some usability issues: either we add such "accessor" functions
to all domains/categories or we need a way to guard their use.
The first case requires coordination between domains/categories
and it takes time to settle on good design. In the second case we may
want categories like 'PolynomialCategoryCategory', so that we can check
if something is 'PolynomialCategory' with unknown parameters.
In principle one could also test for presence of apropritate
signatures, this is more tedious but maybe is enough.
--
Waldek Hebisch