Dear all,
I am just adding and correcting feature to basic algebraic domains, e.g.
SAE, LocalAlgebra and Fraction, as for example simplification
is not implemented yet for certain non standard situations, (already
fixed):
(1) -> x : UTS(FRAC INT, 'x, 0)
Type: Void
(2) -> u := 1+x
(2) 1 + x
Type:
UnivariateTaylorSeries(Fraction(Integer),x,0)
(3) -> v := x+x^2
2
(3) x + x
Type:
UnivariateTaylorSeries(Fraction(Integer),x,0)
(4) -> u/v
1 + x
(4) ------
2
x + x
Type:
Fraction(UnivariateTaylorSeries(Fraction(Integer),x,0))
(5) -> uInv := recip u
2 3 4 5 6 7 8 9 10 11
(5) 1 - x + x - x + x - x + x - x + x - x + x + O(x )
Type:
Union(UnivariateTaylorSeries(Fraction(Integer),x,0),...)
To this end I came to change the output of SAE - and for that I invented
a Category, which easily
allows the user to change the coercion to OutputForm. I suggest to
include that into the system
to be able to use that on several places, e.g. different form of
permutation representations as
Lehmer code (e.g.).
Here is an example:
(101) -> x
+-+
(101) \|2
Type:
SimpleAlgebraicExtension(Integer,UnivariatePolynomial(x,Integer),x^2+(-2))
(102) -> x+3
+-+
(102) \|2 + 3
Type:
SimpleAlgebraicExtension(Integer,UnivariatePolynomial(x,Integer),x^2+(-2))
(103) -> (x+3)^2
+-+
(103) 6 \|2 + 11
Type:
SimpleAlgebraicExtension(Integer,UnivariatePolynomial(x,Integer),x^2+(-2))
(104) -> setOutputType("rel")$S
(104) "rel"
Type: String
(105) -> (x+3)^2
2
(105) 6 ζ + 11 | ζ - 2 = 0
Type:
SimpleAlgebraicExtension(Integer,UnivariatePolynomial(x,Integer),x^2+(-2))
(106) -> setOutputType("poly")$S
(106) "poly"
Type: String
(107) -> (x+3)^2
(107) 6 x + 11
Type:
SimpleAlgebraicExtension(Integer,UnivariatePolynomial(x,Integer),x^2+(-2))
Actually, I even suggest to use the nice "rel" variant as the standard.
Can we in general rely on
UTF greek symbols?
Here is the code of the Category.
-- Copyright (c) 2019 J. Grabmeier
-- All rights reserved.
-- version 1 25.03.2019
)abbrev category OUTTYPE OutputType
++ Author: J. Grabmeier
++ Date Created:
++ Date Last Updated:
++ Basic Functions:
++ Related Constructors:
++ Also See:
++ AMS Classifications:
++ Keywords:
++ References:
++ Description:
++ provides environment for user choosable output types of the objects.
OutputType(opT: List String): Category == with
--operations
outputType: () -> String
++ setOutputType changes the output type.
setOutputType: String -> String
++ setOutputType changes the output type.
add
--if empty? opT then error "OutputType: Argument must be a non empty
list of strings."
msg: OutputForm := commaSeparate [message(op) for op in opT]
msg := blankSeparate [message "OutputType: Improper value, correct
values are", msg]
referenceOutputType: Reference String := ref first opT
outputType(): String == deref referenceOutputType
setOutputType(st: String): String ==
correctType? : Boolean := false
lb : List Boolean := [st = tp for tp in opT]
correctType? := correctType? or reduce(_or, lb)
if correctType?
then referenceOutputType := ref st
else print msg
st
--
Mit freundlichen Grüßen
Johannes Grabmeier
Prof. Dr. Johannes Grabmeier
Köckstraße 1, D-94469 Deggendorf
Tel. +49-(0)-991-2979584, Tel. +49-(0)-151-681-70756
Tel. +49-(0)-991-3615-141 (d), Fax: +49-(0)-32224-192688
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/23bd0789-4cac-c86d-e1bf-1d55f37f3ffb%40grabmeier.net.
For more options, visit https://groups.google.com/d/optout.