Discussion:
AC on mathaction
Ralf Hemmecke
2008-06-12 20:24:22 UTC
Permalink
Dear Thomas,

See the examples on Mathaction:

http://axiom-wiki.newsynthesis.org/SandBoxSpecies
http://axiom-wiki.newsynthesis.org/SandBoxSpeciesAldor

If you want to experiment, just open up a new page, for example,

http://axiom-wiki.newsynthesis.org/SandBoxSpeciesFeulner

copy the interesting parts from one of the pages above (click on the
"edit" link in the top right corner), and adapt to whatever you want.

Specific questions are always welcome.

Ralf

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
Thomas Feulner
2008-06-16 07:23:38 UTC
Permalink
Dear Ralf,
Post by Ralf Hemmecke
http://axiom-wiki.newsynthesis.org/SandBoxSpecies
http://axiom-wiki.newsynthesis.org/SandBoxSpeciesAldor
If you want to experiment, just open up a new page, for example,
http://axiom-wiki.newsynthesis.org/SandBoxSpeciesFeulner
I created this page as you proposed and followed your examples above.
Now, I tried to build some other species. In some cases I succeeded in others
I failed. May you take a look at
http://axiom-wiki.newsynthesis.org/SandBoxSpeciesBayreuth
and tell me how to proceed.

Thomas

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
Martin Rubey
2008-06-16 11:54:52 UTC
Permalink
Post by Thomas Feulner
Dear Ralf,
Post by Ralf Hemmecke
http://axiom-wiki.newsynthesis.org/SandBoxSpecies
http://axiom-wiki.newsynthesis.org/SandBoxSpeciesAldor
If you want to experiment, just open up a new page, for example,
http://axiom-wiki.newsynthesis.org/SandBoxSpeciesFeulner
I created this page as you proposed and followed your examples above.
Now, I tried to build some other species. In some cases I succeeded in others
I failed. May you take a look at
http://axiom-wiki.newsynthesis.org/SandBoxSpeciesBayreuth
and tell me how to proceed.
Well, I think LinearOrder you could easily define yourself as

LinearOrder := Interpret([parse "Plus(EmptySetSpecies,Times(SingletonSpecies,Self))"], ACInteger);

This should also create the isomorphismtypes, which, however, do not work on
MathAction since the Aldor Interface is broken :-(

Cycle cannot be defined using Times, Plus, Compose, so I guess I'll have to
implement it. I'll let you know.

Given Cycle, you can then define Permutation as

Perm := Interpret([parse "Compose(SetSpecies,Cycle)"], ACInteger);

(you should not use "Permutation" as name, because that conflicts with a name
in axiom...)

Martin



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
Martin Rubey
2008-06-16 12:32:15 UTC
Permalink
I have copy pasted the necessary definitions onto

SandBoxSpeciesAldor

Unfortunately, it seems that the definition of structures$Cycle is not
correct.

structures[1,2,3]$Cycle gives [1,2,3],[1,2,2]

Ralf, could you check whether it's correct when you compile trunk?

How are things with FriCAS - aldor?

Martin


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
Thomas Feulner
2008-06-23 11:31:35 UTC
Permalink
Dear Martin,

thank you for giving me the definition of cycles and linear order, this
enabled me to do some more tests.
I tried to generate the isomorphism type series of permutation and an error
occured. May you take a look on
http://axiom-wiki.newsynthesis.org/SandBoxSpeciesBayreuth2

Also
[structures(labels3)LatexWiki ImageACLIST(Graph(Z))
leads to an error.

Thomas

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
Ralf Hemmecke
2008-06-23 13:08:21 UTC
Permalink
Dear Thomas,

the error

Error: Can't pretty-print.
Fast links are on: do (si::use-fast-links nil) for debugging
Error signalled by RETURN.
Broken at APPLY. Type :H for Help.
BOOT>>

Also appeared in my example at

http://axiom-wiki.newsynthesis.org/SandBoxSpeciesAldorSage

And I don't know why that happens. I somehow guess, it is a problem with
the translation from TextWriter to OutputForm.

That is very unfortunate.

Ralf
Post by Thomas Feulner
Dear Martin,
thank you for giving me the definition of cycles and linear order, this
enabled me to do some more tests.
I tried to generate the isomorphism type series of permutation and an error
occured. May you take a look on
http://axiom-wiki.newsynthesis.org/SandBoxSpeciesBayreuth2
Also
[structures(labels3)LatexWiki ImageACLIST(Graph(Z))
leads to an error.
Thomas
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
Ralf Hemmecke
2008-06-23 16:06:06 UTC
Permalink
Hi Thomas,

what about just using Aldor?

Put the following file into the combinat directory, just where you
called "make". I assume that you use trunk and not iso-experiments.
However, of course, you can do similar things with Martin's branch, too.

Say

make VARIANTSTOBUILD=debug cs

and execute with

csd

As for interpretation of the output of graphs...

Graphs: 8 [1,2,3]
1s Subset([], [([1,2], [3]),([1,3], [2]),([2,3], [1])])
2s Subset([([1,2], [3])], [([1,3], [2]),([2,3], [1])])
3s Subset([([1,3], [2])], [([1,2], [3]),([2,3], [1])])
4s Subset([([1,2], [3]),([1,3], [2])], [([2,3], [1])])
5s Subset([([2,3], [1])], [([1,2], [3]),([1,3], [2])])
6s Subset([([1,2], [3]),([2,3], [1])], [([1,3], [2])])
7s Subset([([1,3], [2]),([2,3], [1])], [([1,2], [3])])
8s Subset([([1,2], [3]),([1,3], [2]),([2,3], [1])], [])

There are 8 graphs with labels 1, 2, 3.
Line 6s corresponds to the (labelled) graph having edges (1,2) and (2,3).

The output needs improvement, I know.

Hopefully, this helps you to go on.

Ralf

---BEGIN cs.as.nw
%------------------------------------------------------------------
%---
%--- Combinat
%--- Copyright (C) Ralf Hemmecke (ralf-***@public.gmane.org)
%--- http://www.hemmecke.de/aldor
%---
%------------------------------------------------------------------

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{The Main Executable}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

This is the executable file that lives outside the library
\libraryname{}.

%CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
<<*>>=
-------------------------------------------------------------------
----
---- Combinat
---- Copyright (C) Ralf Hemmecke (ralf-***@public.gmane.org)
---- http://www.hemmecke.de/aldor
----
-------------------------------------------------------------------

#include "combinat"
#include "aldorio"

<<definitions>>

-- The call to the commands below.
combinat(arguments$CommandLine);
@
%$
%TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT



%CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
<<definitions>>=
macro {
CS == CombinatorialSpecies;
E == SetSpecies;
E2 == RestrictedSpecies(E, 2);
WP == Subset;
P2 == Times(E2, E);
}

import from Z;

KSubset(L: LabelType, k: Integer): CS L == RestrictedSpecies(Subset,
k)(L) add;
SimpleGraph(L: LabelType): CS L == FunctorialCompose(WP, P2)(L) add;


struc(text: String, S: CS Z, labels: SetSpecies Z): () == {
import from S;
egs: ExponentialGeneratingSeries := generatingSeries$S;
stdout << text << ": " << count(egs, #labels);
stdout << " " << labels << newline;
g: Generator S := structures labels;
for i in 1.. for s in g repeat stdout << i << "s " << s << newline;
}

types(text: String, S: CS Z, labels: SetSpecies Z): () == {
import from S;
ogs: OrdinaryGeneratingSeries := isomorphismTypeGeneratingSeries$S;
stdout << text << ": " << count(ogs, #labels);
stdout << " " << labels << newline;
g: Generator S := isomorphismTypes labels;
for i in 1.. for s in g repeat stdout << i << "i " << s << newline;
}

out(text: String, S: CS Z, labels: SetSpecies Z): () == {
struc(text, S, labels);
types(text, S, labels);
}

xseries(text: String, S: with {count: (%, I) -> Z}, s: S, n: I == 10):
() == {
import from I, List Z;
stdout << "n = " << n << newline;
stdout << [count(s, i) for i: I in 0..n] << newline;
}

macro {
EGS == ExponentialGeneratingSeries;
OGS == OrdinaryGeneratingSeries;
}

eseries(text: String, F: CS Z, n: I == 10): () == {
stdout << "generating series:" << text << newline;
xseries(text, EGS, generatingSeries$F, n);
}
oseries(text: String, F: CS Z, n: I == 10): () == {
stdout << "isomorphismtype generating series: " << text << newline;
xseries(text, OGS, isomorphismTypeGeneratingSeries$F, n);
}

series(text: String, F: CS Z, ne: I == 10, no: I == 10): () == {
eseries(text, F, ne);
oseries(text, F, no);
}

combinat(args: Array String): () == {
import from List Z;
stdout << "I am here" << newline;
labels: SetSpecies Z := set [i for i in 1..5];
out("2-set", E2 Z, labels);
out("2-set", E2 Z, set [1, 2]);
out("2-subsets", KSubset(Z, 2), set [1, 2]);
out("2-subsets", KSubset(Z, 2), labels);
out("5-subsets", KSubset(Z, 5), labels);
-- trunc cannot yet compute isotypes
struc("Graphs", SimpleGraph Z, set [1, 2]);
struc("Graphs", SimpleGraph Z, set [1, 2, 3]);
struc("Graphs", SimpleGraph Z, labels);

series("Permutation", Permutation Z);
series("2-Subset", KSubset(Z, 2));
series("4-Subset", KSubset(Z, 4));
series("Graph", SimpleGraph Z, no==machine(9));
}

@
%$
%TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT

---END cs.as.nw

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

Loading...