On Thu, Oct 26, 2023 at 01:14:50PM +0200, Ralf Hemmecke wrote: > On 10/25/23 14:05, Waldek Hebisch wrote: > > > Can you change in Mapping_to_OutputForm(argl) the respective lines to > > > > > > ['TAG, nargs, rt] > > > > > > (I haven't tested it.) > > > > I am not sure if this is proper thing. Namely '->' is special, > > it applies _only_ to types. TAG is for ordinary values. > > So semantic difference would be lost. AFAICS Latex have > > different arrows for both uses, so it makes sense to have > > different OutputForm-s for the two cases. > > But we have this already. > > %%% (3) -> ((x +-> x^3)::OutputForm) pretend SExpression > > (3) (+-> x (^ x 3)) > > The "+->" arrow corresponds to \mapsto (not to \to) in LaTeX. > Unfortunately, that we use "+->" is actually not listed in outform.spad, > i.e. a user cannot easily know that the formatters handle it. > I have no idea, which part of code is responsible for the output of (3).
"+->" is part of representation of _code_ and OutputForm simply repeats internal representation. And formatters know how to handle it. > We could treat (or rename TAG to ->) in the same way, but that is only a > cosmetic change. BTW, I am not exactly sure why the name "TAG" was chosen to > represent "->". > > And yes, you are right, FriCAS is using "rarrow". However, it is only in > moebius.spad, and it is not according to "usual" mathematical notation of > mapping of elements. > > %%% (1) -> moebius(5,4,1,1)$MoebiusTransform(Fraction Integer) > > 5 %x + 4 > (1) %x -> -------- > 1 %x + 1 > > I would definitely like to see "+->" in the output of (1). moebius.spad > should be corrected. It is debatable what we should output for Moebius transform. And it is not only Moebius transform, we also have IDPO. Default OutputForm for this uses TAG. Logically, this is different than '+->', as it gives value of mapping only at single point. Actually, also for Moebius transform we have value of mapping at single point, but this uniquely determines whole mapping. Anyway, regardless of relation of "+->" with "TAG" both are different than "->". -- Waldek Hebisch -- 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 fricas-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/ZTrcJh31GIT%2B39b7%40fricas.org.