Re: [sage-devel] Re: Allow quotient modules for PIDs

2017-10-12 Thread William Stein
Hi,

I'm really happy to hear people are giving this code some attention!

I wrote the original FGP package.  At the time, there was no support for
computing HNF or anything else except for ZZ, so I couldn't even test or
try the algorithms there.  I **might** have made some assumptions about the
base ring being ZZ for simplicity due to this, but I hope I didn't.  I
don't remember -- it was a long time ago.

The only reason this hasn't moved forward after more support for HNF was
added for other PIDs is that I'm busy with other things these days.   I
hope somebody else will take over.If I was working on this code, I
would go through the module and add a ton of doctests analogous to the
existing tests over ZZ, but over some other PID's.   I definitely,
definitely would NOT even consider just enabling this functionality with a
warning message, and crossing my fingers like Simon seems to be suggestion
below.  I strongly object to that.   I endorse:

 - enable the functionality
 - write a bunch of new doctests showing how (and that) it works.
 - then release it publicly.

If it does work, doing the above is maybe 1 day of work.  If it doesn't
work, so the above is much harder than 1 day of work, then we shouldn't
have released it in the first place.

Again, Simon, I'm really happy you're looking into this and making this
more general functionality available.  I was pretty happy with my original
FGP implementation, which was a lot of work one summer years ago...

 -- William

On Thu, Oct 12, 2017 at 8:48 AM Simon Brandhorst  wrote:

> O.K. I will do that. Even if we do not have enough tests. Maybe we can
> allow it and print some
> "This code is still experimental" warning. After all it will only get
> really stable is people use it a lot.
>
> On Thursday, October 12, 2017 at 5:06:20 PM UTC+2, Simon Brandhorst wrote:
>
>> sage: L. = NumberField(x^2 - x + 2)
>> sage: OL = L.ring_of_integers()
>> sage: V = OL**3; W = V.span([[0,w,0], [1,0,1-w]], OL)
>> sage: FGP_Module(V,W)
>> This works
>>
>> sage: V.quotient(W)
>> NotImplementedError: quotients of modules over rings other than fields or
>> ZZ is not fully implemented
>>
>>
>> Well FGP looks pretty implemented to me.
>>
>> Objections?
>>
> --
> 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.
>
-- 
-- William Stein

-- 
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: Allow quotient modules for PIDs

2017-10-12 Thread Simon Brandhorst
O.K. I will do that. Even if we do not have enough tests. Maybe we can 
allow it and print some
"This code is still experimental" warning. After all it will only get 
really stable is people use it a lot. 

On Thursday, October 12, 2017 at 5:06:20 PM UTC+2, Simon Brandhorst wrote:
>
> sage: L. = NumberField(x^2 - x + 2)
> sage: OL = L.ring_of_integers()
> sage: V = OL**3; W = V.span([[0,w,0], [1,0,1-w]], OL)
> sage: FGP_Module(V,W)
> This works
>
> sage: V.quotient(W)
> NotImplementedError: quotients of modules over rings other than fields or 
> ZZ is not fully implemented
>
>
> Well FGP looks pretty implemented to me. 
>
> Objections?
>

-- 
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: Allow quotient modules for PIDs

2017-10-12 Thread David Roe
I would try
sage: X = V.quotient(W)
sage: TestSuite(X).run()

and see if there are failures.  I know the implementation of FGP_Module was
eventually intended for other PIDs as well, so I think it's a good idea as
long as we have enough tests.
David

On Thu, Oct 12, 2017 at 11:07 AM, Simon Brandhorst 
wrote:

> If forgot to add
>
> sage: from sage.modules.fg_pid.fgp_module import FGP_Module
>
>
>
> On Thursday, October 12, 2017 at 5:06:20 PM UTC+2, Simon Brandhorst wrote:
>>
>> sage: L. = NumberField(x^2 - x + 2)
>> sage: OL = L.ring_of_integers()
>> sage: V = OL**3; W = V.span([[0,w,0], [1,0,1-w]], OL)
>> sage: FGP_Module(V,W)
>> This works
>>
>> sage: V.quotient(W)
>> NotImplementedError: quotients of modules over rings other than fields or
>> ZZ is not fully implemented
>>
>>
>> Well FGP looks pretty implemented to me.
>>
>> Objections?
>>
> --
> 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.
>

-- 
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] Is the empty graph cograph

2017-10-12 Thread Jori Mäntysalo

Should the empty graph be defined as cograph?

It can not be made from 1-vertex graphs by disjoint union and 
complementation, so it is not. OTOH it has no induced subgraph isomorphic 
to 4-vertex path, and it is the comparibility graph of the empty poset, so 
it kind of is.


--
Jori Mäntysalo


[sage-devel] Re: Allow quotient modules for PIDs

2017-10-12 Thread Simon Brandhorst
If forgot to add

sage: from sage.modules.fg_pid.fgp_module import FGP_Module


On Thursday, October 12, 2017 at 5:06:20 PM UTC+2, Simon Brandhorst wrote:
>
> sage: L. = NumberField(x^2 - x + 2)
> sage: OL = L.ring_of_integers()
> sage: V = OL**3; W = V.span([[0,w,0], [1,0,1-w]], OL)
> sage: FGP_Module(V,W)
> This works
>
> sage: V.quotient(W)
> NotImplementedError: quotients of modules over rings other than fields or 
> ZZ is not fully implemented
>
>
> Well FGP looks pretty implemented to me. 
>
> Objections?
>

-- 
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] Allow quotient modules for PIDs

2017-10-12 Thread Simon Brandhorst
sage: L. = NumberField(x^2 - x + 2)
sage: OL = L.ring_of_integers()
sage: V = OL**3; W = V.span([[0,w,0], [1,0,1-w]], OL)
sage: FGP_Module(V,W)
This works

sage: V.quotient(W)
NotImplementedError: quotients of modules over rings other than fields or 
ZZ is not fully implemented


Well FGP looks pretty implemented to me. 

Objections?

-- 
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] Issues installing the optional "libhomfly" package

2017-10-12 Thread Dima Pasechnik
Now it's down to doing something with fmemopen call there, that is not 
portable to OSX (there is no fmemopen on OSX!)

How did this package get into Sage, it surely never ever worked on OSX...

On Wednesday, October 11, 2017 at 11:27:07 PM UTC+1, Dima Pasechnik wrote:
>
> I can reproduce this linking error on OSX; I've opened #24015 
>  to track this error.
>
>
> On Wednesday, October 11, 2017 at 10:31:16 AM UTC+1, Erik Bray wrote:
>>
>> On Tue, Oct 10, 2017 at 7:51 PM, Jesse H  wrote: 
>> > Greetings, 
>> > 
>> > I have been trying to use the function "homfly_polynomial()" from the 
>> Link 
>> > package in Sage, but it requires an optional package "libhomfly": 
>> > http://files.sagemath.org/spkg/upstream/libhomfly/index.html. 
>> > 
>> > Unfortunately, when I try to install libhomfly ("sage -i libhomfly") 
>> the 
>> > build always fails (see attached log file). 
>> > 
>> > One of the dependencies for libhomfly is Boehm GC, but when I try to 
>> install 
>> > this package ("sage -i boehm_gc"), it is not even found on Sage's list 
>> of 
>> > optional packages (even though it's displayed on the 
>> > website:
>> http://mirrors-usa.go-parts.com/sage/sagemath/spkg/upstream/boehm_gc/index.html).
>>  
>>
>> > I'm not sure if this is indeed the issue, but it's just something I 
>> came 
>> > across. 
>> > 
>> > For what it's worth, I'm running SageMath 8.0 and MacOS 10.12.6 on a 
>> mid 
>> > 2012 MacBook Pro with a 2.3 GHz i7 processor and 8GB RAM. 
>> > 
>> > Any help is much appreciated. 
>>
>> This looks like a bug in libhomfly.  Just looking at the sources it 
>> has some messy handling of extern variable declarations vs. 
>> definitions, and many global variables are actually being defined in 
>> multiple modules.  I haven't run into this problem myself building 
>> libhomfly but maybe my compiler is more forgiving.  Regardless it 
>> definitely looks wrong to me.  I could see if I can reproduce on OSX 
>> now that I have shiny new access to a big OSX machine :) 
>>
>> Erik 
>>
>

-- 
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] On (di)graph generation

2017-10-12 Thread Jori Mäntysalo

On Thu, 12 Oct 2017, David Coudert wrote:

Many authors avoid the empty graph (see e.g., the excellent book "Graph 
Theory with Applications" by Bondy and Murty) as there are no consensus 
on its properties. Should it be considered connected ? biconnected ? 
hamiltonian ? minor-free ? transitively reduced ?


True, and there has been a discussion about is_tree in this list.

Anyways, different parts of Sage should use same definitions.

--
Jori Mäntysalo

Re: [sage-devel] On (di)graph generation

2017-10-12 Thread David Coudert


Le mercredi 11 octobre 2017 16:36:07 UTC+2, Dima Pasechnik a écrit :
>
>
>
> On Wednesday, October 11, 2017 at 10:20:02 AM UTC+1, Jori Mäntysalo wrote:
>>
>> On Wed, 11 Oct 2017, David Joyner wrote: 
>>
>> >> 1) list(graphs.nauty_geng(0)) gives empty list, whereas Sage knows a 
>> >> graph of 0 vertices. Can someone ask McKay to handle this special case 
>> >> too? 
>>
>> > Wouldn't it be easier to simply catch that case in the nauty_geng 
>> method? 
>>
>> Could be done, but needs some string processing, as the argument is given 
>> as a string to nauty. And anyways, isn't this a corner-case bug? 
>>
>
> it depends upon the definition of an empty graph, I guess...
>

Many authors avoid the empty graph (see e.g., the excellent book "Graph 
Theory with Applications" by Bondy and Murty) as there are no consensus on 
its properties. Should it be considered connected ? biconnected ? 
hamiltonian ? minor-free ? transitively reduced ?

 

-- 
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] On (di)graph generation

2017-10-12 Thread Jori Mäntysalo
(There is #24004 with positive_review, so I code changes should be thinked 
after next beta.)


On Wed, 11 Oct 2017, Robert Miller wrote:


  4) When is augment='edges' usefull? Is

One reason it is useful:

You can use the argument "property" to restrict to a subclass of graphs. This 
argument takes a function and
filters the output by testing against this property. If this property is 
preserved under vertex deletion, then
using augment='vertices' will give you all graphs satisfying the property. 
Similarly for edges. If the property
is not preserved as described, then you may be missing some.


Yes, that's why I asked about properties like that.

But I already found an example where augment='edges' could be used: 
property=lambda g: g.size() < n, where n is small number; it will work 
with augment='vertices', but is slower.


Also, if you use augment="edges" you get graphs on exactly N vertices, 
and if you use augment="vertices" you get graphs on ≤ N vertices.


Yes, just as I wrote in message starting this thread. And it seems quite 
unlogical.


For any particular family of graphs it is likely there are faster ways 
to do it - for example we have a method of generating iso-classes of 
trees in constant time per tree. This is meant to be a useful 
general-purpose generator.


True.

--
Jori Mäntysalo

Re: [sage-devel] Re: optional package mpfrcx not on the mirror

2017-10-12 Thread Vincent Delecroix

Thanks Volker.

On 11/10/2017 20:05, Volker Braun wrote:

fixed!

On Tuesday, October 10, 2017 at 10:17:12 AM UTC+2, Maarten Derickx wrote:


This is probably because it is still in beta. The tarbal can be found at
https://trac.sagemath.org/ticket/11806




--
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.