login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Test species in axiom/FriCAS.

The species project is written in Aldor. Thus we need to load the libraries explicitly:

fricas
)version
Value = "FriCAS 1.3.7 compiled at Wed Jun 30 16:44:06 UTC 2021"
fricas
)cd /var/lib/zope/combinat/src
The current FriCAS default directory is /var/aw/var/LatexWiki
fricas
)re ../lib/combinat.input
The file ../lib/combinat.input is needed but does not exist.

We took the decision not to rely on the Axiom algebra. Unfortunately, this means that integration in Axiom is a little unsatisfactory. Eg., instead of Integer and List, we need to use ACInteger and ACList. Often explicit coercions are necessary.

This should give the set partitions of {1,2,3,4}

fricas
l: SetSpecies ACINT := set [i::ACINT for i in 1..4]
There are no library operations named SetSpecies Use HyperDoc Browse or issue )what op SetSpecies to learn if there is any operation containing " SetSpecies " in its name.
Cannot find a definition or applicable library operation named SetSpecies with argument type(s) Variable(ACINT)
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.

aldor
#includeDir "/var/lib/zope/combinat/include"
#libraryDir "/var/lib/zope/combinat/lib"
#include "combinat"
macro { E == EmptySetSpecies; X == SingletonSpecies; + == Plus; * == Times; }
A(L: LabelType): CombinatorialSpecies L == (E + X*A*A)(L) add;
aldor
   Compiling FriCAS source code from file 
      /var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/5200085684951427974-25px003.as
      using Aldor compiler and options 
-O -Fasy -Fao -Flsp -lfricas -Mno-ALDOR_W_WillObsolete -DFriCAS -Y $FRICAS/algebra -I $FRICAS/algebra
      Use the system command )set compiler args to change these 
      options.
   The )library system command was not called after compilation.

Due to types not being first class objects in the Axiom interpreter, we had to write a little interpreter to allow for user specified species:

fricas
T := Interpret([parse "Plus(SingletonSpecies, Times(Self, Self))"], ACInteger);
There are no exposed library operations named parse but there is one unexposed operation with that name. Use HyperDoc Browse or issue )display op parse to learn more about the available operation.
Cannot find a definition or applicable library operation named parse with argument type(s) String
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.

We are still not 100% sure how to represent isomorphism types. So far, we had two ideas: in the iso-experiment branch, we have separate (but tightly connected) representation:

fricas
m: MultiSet ACINT := multiset([1$ACINT for i in 1..3]::ACList ACINT)
There are no library operations named MultiSet Use HyperDoc Browse or issue )what op MultiSet to learn if there is any operation containing " MultiSet " in its name.
Cannot find a definition or applicable library operation named MultiSet with argument type(s) Variable(ACINT)
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.

fricas
IsoT := ACIsomorphismType(ACINT, T)
There are no library operations named ACIsomorphismType Use HyperDoc Browse or issue )what op ACIsomorphismType to learn if there is any operation containing " ACIsomorphismType " in its name.
Cannot find a definition or applicable library operation named ACIsomorphismType with argument type(s) Variable(ACINT) Variable(T)
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.

debugging needed here... On my computer, the last statement yields

On my computer, the last statement yields:

  (13)  [r([1], ([1], [1])),r(([1], [1]), [1])]

Very likely, the bug is due to the broken aldor interface. Ralf is working hard on that.

fricas
)cl all
All user variables and function definitions have been cleared. G := Interpret([parse "FunctorialCompose(Subset, Combination(2)))"], ACINT)
There are no exposed library operations named parse but there is one unexposed operation with that name. Use HyperDoc Browse or issue )display op parse to learn more about the available operation.
Cannot find a definition or applicable library operation named parse with argument type(s) String
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.

fricas
)lisp  (use-fast-links nil)
>> System error: The function BOOT::USE-FAST-LINKS is undefined.

Martin's experiment --Bill Page, Tue, 11 Nov 2008 19:34:52 -0800 reply
SandBoxSpeciesCategory




  Subject: (replying)   Be Bold !!
  ( 14 subscribers )  
Please rate this page: