Re: [sage-devel] Problems with posets

2018-01-14 Thread Jori Mäntysalo

On Mon, 15 Jan 2018, Victor Porton wrote:


So I have no tool to enumerate not up-to-isomorphism :-(


At least you can re-compute OEIS serie A001035 by

[sum(sum(factorial(i)/P.hasse_diagram().automorphism_group(return_group=False, 
order=True)) for P in Posets(i)) for i in range(6)]


so I guess the right direction is to use automorphism group of the Hasse 
diagram. A digraph d can be translated to poset just by Poset(d).



Another issue: I need only posets greater than a certain fixed poset


Please give an example. What would be a poset "greater" than, say, 
posets.DiamondPoset(5)?



By the way, can anyone give me CPU power of a supercomputer for free?


Try to make a paper together with someone in Finland... 1000 CPU hours is 
automatically available here for any researcher in any university, more by 
asking.


--
Jori Mäntysalo

[sage-devel] Re: Result of coefficients depends on names

2018-01-14 Thread Ralf Stephan
expr.poly(x) does not really make expr a polynomial in x, it's a quite 
useless method.
If you give no parameter to ex.coefficients() it takes the 
lexicographically first variable.
So instead of ex.poly(x).coefficients do ex.coefficients(x), and you get:

sage: (zeta*diff(f(tau), tau)).coefficients(tau)
[[zeta*diff(f(tau), tau), 0]]
sage: (zeta*diff(f(tau), tau)).coefficients(zeta)
[[diff(f(tau), tau), 1]]
sage: (a*diff(f(b), b)).coefficients(a)
[[diff(f(b), b), 1]]
sage: (a*diff(f(b), b)).coefficients(b)
[[a*diff(f(b), b), 0]]

Regards,

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Bug report: Could not import nbconvert: No module named base

2018-01-14 Thread Victor Porton
http://localhost:/nbconvert/script/home/porton/math/namespaces/Comp
arison%20of%20counter-example%20algorithms.ipynb?download=true

500 : Internal Server Error
The error was:

Could not import nbconvert: No module named base

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Problems with posets

2018-01-14 Thread Victor Porton
I want to check a graph theoretic conjecture appeared during an applied
software research.

I am going to conduct a numeric experiment involving three posets of
the size N (for small N). (I hope N=4 or 5 will suffice, but it is
entirely unknown for me.)

I can take one of the three up-to-isomorphism, but the other two cannot
be taken up-to-isomorphism, because this way its relations with the
other two posets would be "erased".

So I have three posets: one up-to-isomorphism and the other two not up-
to-isomorphism.

To my frustration I found that we have
sage.combinat.posets.posets.FinitePosets_n(n)
but not sage.combinat.posets.posets.FinitePosets(n).

So I have no tool to enumerate not up-to-isomorphism :-(

Could you help me to solve this problem? I am not strong in graph
theory. If somebody provides an algorithm to enumerate all posets on a
set, this may help considerably.

Another issue: I need only posets greater than a certain fixed poset
(one of the three posets mentioned above, actually). Filtering out
posets which are not greater than the given one would rule out many
variants and speed up the search. So I wish that they would be ruled
out on the stage of enumeration, rather than enumerating all of them
and filtering out these which are not greater than it.

By the way, can anyone give me CPU power of a supercomputer for free?
My problem may be important for development of XML technologies in the
World. Don't hesitate to write me.

Well, my actual problem:

https://math.stackexchange.com/q/2601651/4876

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Feature requests: Composition of binary relations

2018-01-14 Thread 'Martin R' via sage-devel
DiagramAlgebra is the abstract class, so BinaryRelationAlgebra would 
inherit from DiagramAlgebra.

The base_ring argument is necessary, because to make the diagrams into an 
algebra, you want to be able to add them - of course, this is just a formal 
sum.

In general, the composition of two diagrams is obtained by stacking one 
diagram above the other, times q^(connected components in the "middle 
row").  More precisely, it may happen that after stacking some elements in 
the "middle row" are not connected to any elements in the top or bottom 
row.  The additional parameter "q" then records how many connected 
components this "middle row" has.

The basis elements are simply the diagrams - in your case, the binary 
relations.

But again, if you want to consider binary relations between different sets, 
you would need a slightly more general gadget, usually called diagram 
category.

Martin

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Feature requests: Composition of binary relations

2018-01-14 Thread Victor Porton
Dear Martin,

I do not understand DiagramAlgebra:

- it has base_ring argument. My work is unrelated to rings. What is
this?

- It says something about "basis elements". What is this?

- What is set_partitions() for a diagram?

In short: I do not understand DiagramAlgebra and whether it is what I
need.

Meanwhile, I implemented my BinaryRelation and am waiting for a trac
account which I requested.

On Sun, 2018-01-14 at 00:39 -0800, 'Martin R' via sage-devel wrote:
> Dear Victor,
> 
> let me be more explicit: using
> sage.combinat.diagram_algebras.DiagramAlgebra
> you would be able to implement the algebra of binary relations on a
> fixed set X.  The diagrams are the relations, that is, subsets of X x
> X.
> 
> I am not sure whether this is already available for easy use, it
> might be.
> 
> If you want binary relations between pairs of sets X and Y, you would
> need to generalise DiagramAlgebra to DiagramCategory: the objects are
> finite sets and the morphisms are the diagrams.
> 
> I think this would be very worthwhile to do, because one would obtain
> very many important constructions all at once.
> 
> Martin
> 
> Am Samstag, 13. Januar 2018 16:44:14 UTC+1 schrieb Victor Porton:
> > On Friday, January 12, 2018 at 10:55:29 AM UTC+2, Martin R wrote:
> > > Maybe this can be done using http://doc.sagemath.org/html/en/refe
> > > rence/algebras/sage/combinat/diagram_algebras.html
> > 
> > It seems unrelated. 
> 
> 
> 
> -- 
> 
> You received this message because you are subscribed to a topic in
> the Google Groups "sage-devel" group.
> 
> To unsubscribe from this topic, visit https://groups.google.com/d/top
> ic/sage-devel/Z6b--shtx-I/unsubscribe.
> 
> To unsubscribe from this group and all its topics, send an email to s
> age-devel+unsubscr...@googlegroups.com.
> 
> To post to this group, send email to sage-devel@googlegroups.com.
> 
> Visit this group at https://groups.google.com/group/sage-devel.
> 
> For more options, visit https://groups.google.com/d/optout.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Result of coefficients depends on names

2018-01-14 Thread Clemens Heuberger
I get different results depending on the names on the variables.

sage: function('P')
P
sage: var('zeta tau')
(zeta, tau)
sage: expr = zeta*diff(P(tau), tau)^2
sage: expr.poly(zeta).coefficients()
[[zeta*diff(P(tau), tau)^2, 0]]

in this first version, it is erroneously reported
as a constant polynomial

If we rename everything:

sage: function('f')
f
sage: var('a b')
(a, b)
sage: expr = a * diff(f(b), b)^2
sage: expr.poly(a).coefficients()
[[diff(f(b), b)^2, 1]]

we get the correct result.

(Both in 8.2.beta2; in 8.1, the first version simply crashes).

Is that expected behaviour, i.e., am I not supposed to use poly().coefficients()
in that way?

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: Feature requests: Composition of binary relations

2018-01-14 Thread 'Martin R' via sage-devel
Dear Victor,

let me be more explicit: using

sage.combinat.diagram_algebras.DiagramAlgebra

you would be able to implement the algebra of binary relations on a fixed 
set X.  The diagrams are the relations, that is, subsets of X x X.

I am not sure whether this is already available for easy use, it might be.

If you want binary relations between pairs of sets X and Y, you would need 
to generalise DiagramAlgebra to DiagramCategory: the objects are finite 
sets and the morphisms are the diagrams.

I think this would be very worthwhile to do, because one would obtain very 
many important constructions all at once.

Martin

Am Samstag, 13. Januar 2018 16:44:14 UTC+1 schrieb Victor Porton:
>
> On Friday, January 12, 2018 at 10:55:29 AM UTC+2, Martin R wrote:
>>
>> Maybe this can be done using 
>> http://doc.sagemath.org/html/en/reference/algebras/sage/combinat/diagram_algebras.html
>>
>
> It seems unrelated. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.