Command ")display operation" shows some exposed operations as being from package/domain "D"

1 view
Skip to first unread message

Neven Sajko

unread,
Aug 7, 2021, 11:04:58 AM8/7/21
to fricas-devel
Hello,

I just used the command
)display operation integrate
and among the 20 exposed functions, last in the listing, are quite a
few functions with type signatures like:
D -> D from D

My goal was to find in which packages or domains can the operation
integrate be found, so it is annoying that it says "from D", because
there is no package or domain called "D" AFAIK.

Could someone clarify?


Thanks,
Neven

Ralf Hemmecke

unread,
Aug 7, 2021, 11:16:43 AM8/7/21
to fricas...@googlegroups.com
You should read everything. It says:

[20] D -> D from D
if D has UTSCAT(D1) and D1 has RING and D1 has ALGEBRA(FRAC
(INT))

There is a condition on the domain D. Namely, the domain D should export
UTSCAT(D1) for some domain D1 that exports Join(RING,ALGEBRA(FRAC INT)).

Now you would have to look through all FriCAS domains that export
UTSCAT(D1). But exporting UTSCAT(D1) means that the domain exports
integrate:%->%. For
example,UnivariateTaylorSeries(Fraction(Integer),'x,0) is such a domain
(see at the end of the following page:
http://fricas.github.io/api/UnivariateTaylorSeries.html?highlight=integrate
).

Admittedly, it would be fine to have a command that lists all those
domains. Hoever, given that FriCAS has paremetrized domains, you would
get an infinite list that wouldn't help you much.

Ralf

Waldek Hebisch

unread,
Aug 7, 2021, 3:23:30 PM8/7/21
to fricas...@googlegroups.com
As Ralf explained, there is condition which is crucial here. I make
almost no use of ')display' so it is hard for me give you advise on
use of ')display'. But one can extract information that you say
you want from HyperDoc. Type 'integrate' into browse box and
click 'operations'. You will get selection window, for most
detailed information click 'descriptions'. You will see list
of available declarations of 'integrate'. First position is
like what you have above with info:

Origin: UnivariteTaylorSeriesCategory(Coef)

Origin means that 'integrate' is defined in UnivariteTaylorSeriesCategory
so every domain D of category UnivariteTaylorSeriesCategory
is supposed to export 'integrate'. Of course, it is
natural to ask which domains are of category
UnivariteTaylorSeriesCategory?

If you clicki on UnivariteTaylorSeriesCategory you will get
window with information about UnivariteTaylorSeriesCategory.
At teh bottom there are choices, relevant is 'Domains'.
When you clik on it you will see list of domain constructors
which are of category UnivariteTaylorSeriesCategory.
I wrote "list of constructors" because domain constructors
take parameters and in principle single constructor may
produce infinite list of domains. But (currently) there are
only few hundreds of domain constructors.

If you are interested in all variants of 'integrate', then
you need to look at other descriotions. You will see that
one variant of integrate is only defined for
UnivariteTaylorSeries. Another only for
UnivariteLaurentSeries. That is somewhat unusual, normally
FriCAS operations are much more general, but sometimes
happens.

You will see that also domains of category
UnivariteLaurentSeriesCategory and
UnivaritePuiseausSeriesCategory export 'integrate'.
And domains of category 'UnivaritePolynomialCategory'.

Going down the description list you will find bunch of
other domains and categories.

In priciple one could autiomate this investigation via
categories and for each case of category produce list
of domains. ATM it is not done. One reason is that
nobody did this. Related possible reason is that
usually you are interested in specific variant of
'integrate' and want to prune irrelevant variants
as soon as possible. For example, if you are interested
in expressions, than clearly 'Series' in name shows that
given variant is irrelevant and you are led to
'FunctionSpaceIntegration'.

--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages