There is one exposed function called log :
    [1] D ->  D from D if D has ELEMFUN

It's actually not that easy.

log actually can appear in several ways. Just think about what log actually is. It's not a function, right? What is log(0)? But if you want to take the function view, you can have

  log: P -> R
  log: X -> C

where P denotes the positive real numbers, C is the complex numbers, X is complex numbers without non-positive real numbers. If you look at this from a categorial point of view then the above "function" are different because source and target are different. (I have not even yet said how one would represent that in FriCAS. -- You couldn't with ELEMFUN, because it says D->D for the same source and target. You cannot for another reason. Real numbers are in no CAS. There are only things like Float (arbitrarily precise floating point numbers (finite precision, however)), but no computer can represent all real numbers.

Basically it seems ELEMFUN to be just all types where log functions
was defined. Unfortunately firefox couldn't find anything with "elem"
in http://www.axiom-developer.org/axiom-website/bookvol10.2full.svg
How do I figure out what types are contained in
ElementaryFunctionCategory?

That's hard if you don't use HyperDoc. Usually if you start fricas, there should be a window poping up that has "HyperDoc" in its title.
Click on "Browse".
Enter "ELEMFUN" and click on "Constructors".
Click on "Domains".

You should now see a list of all domains that export ElementaryFunctionCategory.

Maybe that's also possible with the command line, but I don't know.

> (well, its a constructor, not a category
itself, but I hope you'll understand what I need).

Ehm, what do you mean by that. In my understanding the union of all domains and categories is called "constructors". I usually use "constructor" in the context of FriCAS without caring whether or not there are any arguments. It "constructs" a "type" instead of an "element". I hope, I don't confuse you now.

> As soon as log has
indeed type of D ->  D, how can I prescribe (manually) something
meaningful to D? I mean something used in everyday/applied math ---
algebra structures, various mappings, real numbers etc, but not
expressions:

(13) ->  log f

  Function Selection for log
       Arguments: VARIABLE(f)

  [1]  signature:   EXPR(INT) ->  EXPR(INT)
       implemented: slot $$ from EXPR(INT)


    (13)  log(f)
                                                  Type:
Expression(Integer)

I know that must be confusing, but now this log here is an expression (i.e. an element of the Expression(Integer) domain. Expression(Integer) itself belongs to the category ElementaryFunctionCategory. So it exports a signature "log: %->%" where the % here is basically the same as the D above and for this concrete instance means "Expression(Integer)". In fact, it just means THIS-DOMAIN, but your domain is Expression(Integer).

To make it a bit clearer. log can be used in FriCAS like an actual function, but then it is always applied and you have no handle on the function object itself, because then it is not an expression.

(4) -> CC:=Complex Float

   (4)  Complex(Float)

Type: Type
(5) -> cc:CC:=2.0

   (5)  2.0
                Type: Complex(Float)
(6) -> log cc

   (6)  0.6931471805 5994530942
                Type: Complex(Float)

However, what you still can do, is to assign log to a variable.

(7) -> foo: CC->CC := log

   (7)  theMap(COMPCAT-;log;2S;81,303)
                Type: (Complex(Float) -> Complex(Float))
(8) -> foo 1.0

   (8)  0.0
Type: Complex(Float)

You can even do operations with that function.

(9) -> bar := foo*foo

   (9)  theMap(MAPPKG3;*;MMM;6!0,303)
                Type: (Complex(Float) -> Complex(Float))
(10) -> bar cc

   (10)  - 0.3665129205 8166432701
Type: Complex(Float)
(11) -> log log cc

   (11)  - 0.3665129205 8166432701
                Type: Complex(Float)

I hope that all helps you to get more into FriCAS.

Best regards
Ralf

--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en.

Reply via email to