On 10/29/23 00:00, Waldek Hebisch wrote:
Well, is the following "mapping of values"?
(1) -> iO := IDPO(Integer, Symbol)
(1) IndexedDirectProductObject(Integer,Symbol)
Type: Type
(2) -> monomial(1, x)$iO
(2) [x -> 1]
Type: IndexedDirectProductObject(Integer,Symbol)
(3) -> monomial(1, x)$iO + monomial(2, y)$iO
(3) [y -> 2, x -> 1]
Type: IndexedDirectProductObject(Integer,Symbol)
Ah, now I see, what you mean. I agree, that the output looks reasonable,
however, I somehow think, it is similar to
AL ==> AssociationList(Symbol,Integer)
RSZ ==> Record(key: Symbol, entry: Integer)
al := construct([['x1,1]$RSZ,['x2,4]$RSZ,['x3,9]$RSZ])$AL
(11) table(x3 = 9,x2 = 4,x1 = 1)
Type:
AssociationList(Symbol,Integer)
Since IDPO represents a finite combination, I still think it should be
called "...Sum..." instead of "...Product...", but that is another matter.
For IDPO it would also make sense to have
2*y + 1*x
as output, similar to how divisors are denoted.
Currently in my test version 'tex.spad' outputs '\rightarrow' and '\to'
respectively, which seem to be reasonable.
This is where I do not agree. Why is this reasonable, when TAG actually
denotes the mapping of values? When I denote a function, then I write
\begin{gather}
f : Z \to Z,\qquad x \mapsto x^2
\end{gather}
See above: we give map for each value separately, not a formula
for a function. Also "reasonable" does not mean very good,
but '\rightarrow' is different symbol than both '\to' and '\mapsto'.
I cannot confirm this on my computer. There
/usr/share/texlive/texmf-dist/tex/latex/base/fontmath.ltx
says
\DeclareMathSymbol{\rightarrow}{\mathrel}{symbols}{"21}
\DeclareMathSymbol{\to}{\mathrel}{symbols}{"21}
\DeclareMathSymbol{\mapstochar}{\mathrel}{symbols}{"37}
\DeclareRobustCommand\mapsto{\mapstochar\rightarrow}
There is trouble that '\rightarrow' looks identical to '\to',
I thought that they look different. So '\rightarrow' probably
should be replaced by differently looking arrow.
Yes. I could live with showing the arrow for IDPO as something
different, perhaps ":>". Then I would prefer to also show the same
notation for all the Table domains and ALIST.
On the other hand, I would not be very happy with ":>", since I would
like to be able to cut&paste FriCAS output back into FriCAS (at least
for Format1D). Of course, the latter cannot work by design of OutputForm
(information is lost). Nevertheless, adding new output arrows that
prevent cut&paste would be somehow bad. So a better symbol would be
good. And we should also specify, how it should look in LaTeX and MathML
etc.
Using '\rightarrow' (or rather some different arrow) is reasonable in
sense of preserving distinction. You somewhat argue that TAG and
'+->' are the same thing, and I think that they are not the same.
Yes, I seem to understand your point now.
The current usage of rarrow in MoebiusTransform(F) is clearly in the
meaning of denoting the mapping of values.
I.e. moebius: F^4 -> (F -> F),
(a,b,c,d) +-> (x +-> (a*x+b)/(c*x+d))
For moebius "+->" could be reasonable, but I have some doubts
about "clearly": arguably we give value of mapping at single
(generic) point.
The generic point is (a,b,c,d). And the value for this generic point is
a (value) mapping x +-> (a*x+b)/(c*x+d) with a formula on the right hand
side. Maybe I still don't understand your concern against +->.
What's your wish?
I would like to have 3 different OutputForm-s.
Yes, ":>", "->", and "+->" (names not fixed). But maybe we can also do
without introducing an extra ":>" operator into OutputForm, see above.
Are there opinions of other users/developers?
Ralf
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/152079a5-b735-45e1-a275-a11e84c0206b%40hemmecke.org.