Re: [sage-devel] Re: should "foo?" print TESTS: blocks or omit them?

2015-11-06 Thread Tom Boothby
A corollary to this is that relevant documentation should not exist in
the TESTS block.  And those edge cases should be documented.  If the
user wants to know more, foo?? will give them the Only True
Documentation, which happens to include the TESTS block.

[x]  'foo?' should NOT display TESTS blocks.


On Fri, Nov 6, 2015 at 6:11 PM, Travis Scrimshaw  wrote:
>
>>
>> [X] 'foo?' should display TESTS block.
>>
>
> I think Thierry's argument about corner cases is a good one. Plus some
> docstrings have different input formats in the TESTS block or only have
> tests in the TESTS blocks (granted, this is only likely to occur in hidden
> functions, but I believe it is currently in the library).
>
> Best,
> Travis
>
> --
> 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 http://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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Checker function for integer parameters

2015-09-26 Thread Tom Boothby
Hold on, why do you want to rule out zero?  It seems like a dumb thing
to do a search at depth zero, but raising an error rather than
returning a trivial result is infuriating to a user.

On Sat, Sep 26, 2015 at 11:06 AM, John H Palmieri
 wrote:
>
>
> On Saturday, September 26, 2015 at 10:55:57 AM UTC-7, Jori Mäntysalo wrote:
>>
>> On Sat, 26 Sep 2015, Travis Scrimshaw wrote:
>>
>> > I would use:
>> >
>> > if n not in ZZ:
>> >raise ValueError(...)
>>
>> Seems easy. But to make sure: does this work in all cases? I.e. raw Python
>> ints, Sage Integers, maybe something else too? At least QQ(3) in NN seems
>> to work.
>>
>> How about positive integers? "n-1 in NN" gives bad error message if n is
>> for example string. "n in NN and n>0"?
>
>
> try:
> NN(n)
> except ValueError:
> handle the error
>
> or since you want to rule out n=0:
>
> try:
> NN(n-1)
> except (ValueError, TypeError):
> handle the error...
>
>
> --
> John
>
> --
> 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 http://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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] About license of nauty and poset generator

2015-07-01 Thread Tom Boothby
On Tue, Jun 30, 2015 at 11:14 PM, Jori Mäntysalo jori.mantys...@uta.fi wrote:

 Maybe. But it would be quite nasty to interpret it that way, if we know that
 propably it is not what was meant.

You say nasty, I say that's the legal ramification of distributing his
code under GPLv3+.  We agree on this point, which is why I think we
need clarification before moving forward.

-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] About license of nauty and poset generator

2015-06-30 Thread Tom Boothby
I never said it'd hurt to ask again.  Heck, I'd even send the email.
As far as I know, Robert Miller and I are the only people who have
read the source of NICE, and we're both in industry now.  I need
faster isomorphism tests than Sage provides, and neither of us has
made any improvements to that code for years.  Inclusion of nauty
would be awesome.

To clarify: what I'm uncomfortable with is the statement you can
ignore it [for Sage].  If that means that we can _delete_ the
restriction from his license file, then that's great and a complete
raw email message might hold up in court.  If it means that we are
expected to ship code containing a GPL-incompatible license, that
sounds like pretty shaky ground from my lay-understanding: his
statement implies (to me) that he does not recognize that the GPL is
viral (or does not recognize that Sage is under the GPL).  Best to
make sure he knows what he's getting into.

On Tue, Jun 30, 2015 at 12:15 PM, William Stein wst...@gmail.com wrote:
 On Tue, Jun 30, 2015 at 11:28 AM, Tom Boothby tomas.boot...@gmail.com wrote:
 On Tue, Jun 30, 2015 at 11:12 AM, Jori Mäntysalo jori.mantys...@uta.fi 
 wrote:

 Duh. Then what he means when saying that we can ignore it for incorporation
 into Sage?


 Only he can clarify that.  If he releases the source under a
 GPL-compatible license, then we have evidence that he means what he
 says.  His verbal permission for us to include GPL-incompatible code
 into our source tree does not constitute sound legal advice.

 The trac ticket has a claim that there is an in writing email:

 XX Changed 29 hours ago by jdemeyer; Replying to jmantysalo:
 XX I asked from Brendan McKay? Nauty.h contains copyright
 XX with 'exception of sale for profit or application with nontrivial military
 XX significance.' Does this apply to whole package? and he
 XX answered: It applies to all of the nauty files, but for
 XX incorporation into Sage you can ignore it.
 XX  Can you give the complete contents of this email exchange with McKay?

 If we can get the complete raw email message (including headers), and
 maybe get him to further confirm it, with him confirming that he
 understands what including code with Sage means (namely that it is
 GPLv3+'d), then that would work.

  That's the whole point of this discussion -- the OP is asking for
 somebody to volunteer to write to McKay to *further* clarify his
 already-given permission.  The collective guess in this thread seems
 to be that when McKay realizes what incorporation into Sage implies
 (namely his code is then GPLv3+), he will change his mind.

 Despite what Tom says, I think it can't hurt to ask again.

 -- William


 --
 William (http://wstein.org)

 --
 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 http://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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] About license of nauty and poset generator

2015-06-30 Thread Tom Boothby
I spoke with Brendan McKay personally less than a month ago.  He is
fully aware about the restrictions, and utterly unmoved by the
difficulty his license creates.

On Mon, Jun 29, 2015 at 4:30 AM, Jori Mäntysalo jori.mantys...@uta.fi wrote:
 More about licenses, see http://trac.sagemath.org/ticket/14110 . This is a
 non-technical issue. Who wants to contact the makers of nauty (and poset
 generation program)? I do not want, as I don't know that much about licenses
 and copyright issues.

 I am quite sure that they have not really thinked about the restrictions. We
 don't have just programs anymore, but metaprograms like Sage containing
 other software.

 --
 Jori Mäntysalo

-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] About license of nauty and poset generator

2015-06-30 Thread Tom Boothby
On Tue, Jun 30, 2015 at 11:12 AM, Jori Mäntysalo jori.mantys...@uta.fi wrote:

 Duh. Then what he means when saying that we can ignore it for incorporation
 into Sage?


Only he can clarify that.  If he releases the source under a
GPL-compatible license, then we have evidence that he means what he
says.  His verbal permission for us to include GPL-incompatible code
into our source tree does not constitute sound legal advice.

The GPL is viral.  When we distribute Sage, any other GPL-compatible
software can incorporate any portion of Sage.  If he gives us
permission to distribute nauty under the GPL, then he's transitively
giving the Open Sniper Project (I just made that up... I hope)
permission to incorporate nauty as well.

If he gives us permission to distribute nauty, then we need to get
that permission in writing.

-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Completely remove in-place operations?

2015-06-23 Thread Tom Boothby
If a @cached_method accepts mutable objects, that's a bug.

On Tue, Jun 23, 2015 at 12:48 AM, Volker Braun vbraun.n...@gmail.com wrote:
 On Tuesday, June 23, 2015 at 3:40:24 AM UTC+2, William wrote:

 What about something explicit, e.g.,
A.add_inplace(B)
 which would mutate A and be very clear and explicit.


 A might be stored in a @cached_method without the user being aware of it.

 --
 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 http://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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-combinat-devel] Re: Test digraph for cycles containing a vertex?

2015-06-22 Thread Tom Boothby
This is a little silly,

sage: any(v == x for x in d.breadth_first_search(d.neighbors_out(v)))

as

sage: v in d.breadth_first_search(d.neighbors_out(v))

is equivalent, easier to read, and a tiny bit faster.

On Mon, Jun 22, 2015 at 4:32 AM, Nathann Cohen nathann.co...@gmail.com wrote:
 Probably that won't be needed. At some point I need to know if a vertex
 is part of an oriented cycle. That's all. I need to know it only once.

 Okay. Then try that:

 sage: any(v == x for x in d.breadth_first_search(d.neighbors_out(v)))

 Algorithmically it is optimal, but it is written at higher level than
 the strongly connected components routines (and may be slower as a
 result).

 Nathann

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

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


Re: (off topic) Re: [sage-devel] The future of polybori

2015-06-11 Thread Tom Boothby
Wow, is that some top-shelf navel lint.  Perhaps we should call the
language WolframWolframWolfram, or WWW for short.  Then, Stephen and
Al Gore can fight over who invented what.

On Thu, Jun 11, 2015 at 1:28 PM, Dr. David Kirkby (Kirkby Microwave
Ltd) drkir...@kirkbymicrowave.co.uk wrote:

 On 11 Jun 2015 20:10, William Stein wst...@gmail.com wrote:


 It's officially called The Wolfram Language [1] beating out [2] many

 It would never surprise me is it was renamed to the Stephen Wolfram
 Language.

 Dave.

 --
 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 http://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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] A database of interesting graphs

2015-05-18 Thread Tom Boothby
House of Graphs has a similar goal; perhaps it would be better to
implement an interface to HoG like we have for OEIS, rather than
reinvent the wheel.

http://hog.grinvin.org/

-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] cartesian_product

2015-03-06 Thread Tom Boothby
That's never worked.  You probably want

sage: cartesian_product([1,2,3], [1,2,3])

On Fri, Mar 6, 2015 at 10:59 AM, William Stein wst...@gmail.com wrote:
 Hi,

 I'm unhappy that this doesn't work:

 sage: cartesian_product([[1,2,3], [1,2,3]])
 BOOM!

 It seems clear from the docstring that this not working is
 intentional.Is anybody opposed to making the above work (again?  I
 think it did for years, but not sure).

 William



 --
 William (http://wstein.org)

 --
 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 http://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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] cartesian_product

2015-03-06 Thread Tom Boothby
d'oh, I misread that, and mentally converted cartesian_product to its
camelcase variant.

On Fri, Mar 6, 2015 at 11:32 AM, William Stein wst...@gmail.com wrote:
 On Fri, Mar 6, 2015 at 11:29 AM, Tom Boothby tomas.boot...@gmail.com wrote:
 That's never worked.  You probably want

 sage: cartesian_product([1,2,3], [1,2,3])

 The above fails even worse, and isn't what I want.  I actually want
 both the above and what I suggest to work.

 I was able to work around the problem in this case by using
 cartesian_product_iterator *and* list, which is pretty silly to have
 to do.

 william


 On Fri, Mar 6, 2015 at 10:59 AM, William Stein wst...@gmail.com wrote:
 Hi,

 I'm unhappy that this doesn't work:

 sage: cartesian_product([[1,2,3], [1,2,3]])
 BOOM!

 It seems clear from the docstring that this not working is
 intentional.Is anybody opposed to making the above work (again?  I
 think it did for years, but not sure).

 William



 --
 William (http://wstein.org)

 --
 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 http://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 http://groups.google.com/group/sage-devel.
 For more options, visit https://groups.google.com/d/optout.



 --
 William (http://wstein.org)

 --
 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 http://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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: The code of conduct is getting out of hand - please stop for 2 weeks.

2014-11-29 Thread Tom Boothby
The irony of this is staggering, if not surprising.  +1

-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] When/by who/how was the code of conduct initiated ?

2014-11-26 Thread Tom Boothby
Ya know... Nathann.  Buddy.  Calling out people who may have had
complaints that could trigger a discussion about a code of conduct is
a bully move.  Please avoid doing this in the future.  If you want to
vent your spleen, you're welcome to do it on sage-flame.

On Tue, Nov 25, 2014 at 6:37 PM, Nathann Cohen nathann.co...@gmail.com wrote:
 Hello everybody,

 I created this thread because this question was asked several times, that I
 am sure everybody saw it, and that it still did not get any answer.

 Thus I am asking again, and politely despite my finding very disrespectful
 to have a legitimate question ignored: who was on the short list to write
 what is now our code of conduct, when was it initiated and in which
 conditions ? (yes, there are three parts to the question)

 If, as it is very likely, the question is ignored again, I will simply have
 to point to this thread whenever I need in the future to give my opinion on
 what democracy has become here.

 Thanks,

 Nathann

 --
 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 http://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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: When/by who/how was the code of conduct initiated ?

2014-11-26 Thread Tom Boothby
Indeed, on a second reading, my post was an overreaction.  I apologize
for that.  I don't see where I broke it clearly and cleanly at [your]
expense.  If you'd like to tell me publicly or privately where I've
misstepped, I'm not going to put up a fight.

On Wed, Nov 26, 2014 at 8:44 AM, Nathann Cohen nathann.co...@gmail.com wrote:
 Volker, Tom:

 Please consider the tone of my first email, and the tone of your answers.
 Please consider the code of conduct that was just voted. Can you see why I
 may feel that you broke it clearly and cleanly at my expense ? If those
 rules are not only meant to apply to me, do you think the community should
 react to that ?

-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Code of Conduct

2014-11-19 Thread Tom Boothby
In my mind, moving a conversation to sage-flame is a constructive,
if imperfect way to handle conversations that are going off the deep
end.  It's a way that we can flag a conversation as being
inappropriate for the tone of sage-devel without pointing fingers.  If
somebody doesn't want to continue, they can just stop participating at
that point.  Badgering such a person, either through repeated posts to
sage-flame or through personal email, would be inappropriate.

For example: I'm happy to lob personal attacks at Richard Fateman on
sage-flame and have him respond in kind.  This is an established
tradition that we both enjoy, and as far as I can tell, neither of us
has ever had our feelings hurt there.  The origin of sage-flame was a
recognition that certain thick-skinned developers enjoy this peculiar
conversation style, and the fact that other developers are entertained
by the conversations.

Those of us who do participate in the flames recognize one another.
Looking back in time, I see that I (privately) requested that Richard
not be so brutal with another developer whose thread had been moved to
sage-flame, and he obliged (and as far as I know, that developer
didn't get their feelings hurt).  Generally, one should expect
responses in kind on sage-flame, so for the most part, it doesn't get
nasty except between people who are having a good time of it.

So, the above is good for 'no-fault' offenses where all parties are
simply being bullheaded about something and mutually pissing each
other off.  But I do see a distinct need for finger-pointing in some
cases.  If William goes Torvalds on some brand new developer, I don't
care where the communication occurs, that's simply inappropriate and
must be addressed.  If he found a bug in FLINT and gave Bill Hart the
same treatment, I'd go make popcorn.

In situations where it looks like real abuse has occurred, a committee
of arbiters should exist to rule on it.  Otherwise, we're left with
mob rule and the onlooker effect (where nobody speaks up to stop
abuse, assuming somebody else will take care of it).



On Wed, Nov 19, 2014 at 2:12 PM, Viviane Pons vivianep...@gmail.com wrote:
 Hi everyone,

 I have been following this for a while even if I didn't post. I am actually
 in favor of a code of conduct even so I understand its limitations.

 Anyway, what I think we really need is something to do when you feel
 insulted or offended in a thread. Something to take into account is that
 this usually takes place in tiresome, time consuming conversations and the
 offended person has usually very limited energy left. A bad scenario is if
 this person just stops talking for a while and a worst one is when this
 person just stops getting involved in sage-devel (or sage) altogether. This
 is what we want to avoid.

 Is moving to sage-flame enough? It seems ok but the fact that we're not
 actually moving the conversation might be a problem. Also the vote process
 that William proposed seemed quite heavy to me because it might lead to more
 debates and, as I said, the offended persons could already be on the edge of
 stopping the talking altogether.
 Some other questions: is posting on sage-flame a good enough reason to be
 allowed to insult people? (I don't feel it should be) What do we do if it's
 not a thread that's going out of line but comments on sage-tracks?

 I feel a code of conduct could just be a good shared base of good attitude
 to follow... Something to help you say to someone this is a personal
 attack, you're being out of line with a feeling that you're supported by
 the community doing so. I don't mind if we don't call it code, common
 sense recommendations would be enough for me.

 Cheers

 Viviane

 2014-11-19 22:43 GMT+01:00 Viviane Pons vivianep...@gmail.com:



 2014-11-19 20:56 GMT+01:00 Mike Zabrocki mike.zabro...@gmail.com:

 A bunch of 10~20 guys who can talk together for days about having or

 not a code of conduct, each expressing his own voice and mixing it
 with the others'... really have no communication problem :-P

 Am I misreading this or does this belong on sage-sexist-comments ?


 I honestly don't think it was...



 -Mike

 --
 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 http://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 http://groups.google.com/group/sage-devel.
 For more options, visit 

Re: [sage-devel] Re: Code of Conduct

2014-11-18 Thread Tom Boothby
On Tue, Nov 18, 2014 at 10:36 AM, William Stein wst...@gmail.com wrote:

 Given the potentially political nature of such a choice, one
 possibility is to do something apolitical, and select based on
 ownership. In particular, based on lines of code contributed to Sage,
 which is an (imperfect!) but non-politicial measure of how much
 ownership people have in Sage (with legal value, since people do not
 contribute their copyright).By this definition:


 https://github.com/sagemath/sage/graphs/contributors?from=2006-02-05to=2014-11-18type=a

 the top 12  all time list of contributors to Sage, in order, are:

 [a list of 12 dudes]


In the event of a gender-polarizing conflict, this committee will not
be seen as unbiased.  In order to increase minority representation, I
would suggest that a maximum of 2/3 of the committee should be
comprised of a particular gender.  Perhaps the top 8 contributors,
followed by the top 4 who do not identify as male.

-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Dropping Windows support (phew!!)

2014-03-31 Thread Tom Boothby
had me right until the point I saw as of today (1/4)

On Mon, Mar 31, 2014 at 4:56 PM, François Bissey
francois.bis...@canterbury.ac.nz wrote:
 On Mon, 31 Mar 2014 19:55:47 Stephen Kauffman wrote:
 On 3/31/2014 7:53 PM, François Bissey wrote:
  On Mon, 31 Mar 2014 19:50:30 Stephen Kauffman wrote:
  On 3/31/2014 7:29 PM, Bill Hart wrote:
  Hi all,
 
  By now everyone will have heard about Canonical's new product, called
  Youbetcha...
 
  I can't find this at ubuntu.com or with any combo of Youbetcha
  Canonical Linux on google. Is this for real?
 
  Have you checked your calendar? New Zealand is quiet on that tradition.
  It is almost 1pm and that's the first one of the day for me.
 
  Francois

 It's still the 31st here...
 Timezone fun. From when this was posted I'd say Bill is in London.

 Francois

 --
 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 http://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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: charpoly of sparse matrix

2014-03-26 Thread Tom Boothby
IIRC, the bottleneck to computing the spectra of large graphs is in
the construction of the adjacency matrix.  I don't know why.

On Wed, Mar 26, 2014 at 3:28 PM, Paul Mercat merc...@yahoo.fr wrote:
 Le mercredi 26 mars 2014 22:56:46 UTC+1, Dima Pasechnik a écrit :

 On 2014-03-26, Paul Mercat mer...@yahoo.fr wrote:
 
 
  Le mercredi 26 mars 2014 20:48:32 UTC+1, Dima Pasechnik a écrit :
 
  On 2014-03-26, Paul Mercat mer...@yahoo.fr javascript: wrote:
   I need to compute charpoly of big sparse matrices obtained in sage,
   but
   there is no efficient algorithm in sage for the moment.
   So I would like to implement it and add it to sage.
   I think it already exists in gp or in linbox, but I was not able to
   use
  it
   in sage.
   Maybe sage has no proper way to convert a sparse matrix to give it to
   gp
  or
   to linbox ?
   Does somebody knows how to do that ?
 
  what kind of field are your matrices defined over?
 
 
 
  I have matrices with non negative integers.
  Is there a efficient way to get the exact Perron-Frobenius spectral
  radius
  of these sparse matrices in sage ?

 Do I understand you right that you are talking about a generalisation of
 the usual Perron-Frobenius for matrices with positive entries?

 Do you really need to now the whole exact characteristic polynomial?
 This looks like an overkill, and won't possibly work for big matrices
 (if by big you mean something like 1000x1000 or more...)
 IMHO, at least in the case of irreducible matrices,
 one computes the dominant eigenvector by the power method, and from it
 one can find (an approximation of) the maximal eigenvalue.



 Thank you for your answer.
 I'm talking about usual Perron-Frobenius. In fact my matrices are adjacency
 matrices of graphs.
 By big, I mean that my matrices can be of size more than 1000x1000 and
 sometimes even more than 5x5 (I have even bigger matrices, but the
 more I can compute, the happier I will be !).
 It is not difficult to reduce the problem to the case of irreducible
 matrices.

 I don't think that it's a good idea to compute power of the matrix, because
 it will increase a lot the number of coefficients, and therefore it will
 consume too much memory.
 For example, I have a 65135 x 65135  matrix with 130207 coefficients equals
 to 1 and the others one are nulls.
 I remember that I was able to compute efficiently large determinants (and so
 characteristic polynomials) of large sparse matrices using pari/gp, but it
 don't work with sage, because when I try to execute a pari/gp function to my
 sage matrix, it take immediately too much memory (I think that sage convert
 the matrix to a dense one when it give it to pari/gp).
 I would like to have the exact value (i.e. its minimal polynomial) of the
 spectral radius.

 --
 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 http://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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: M4RI GPL → LGPL (?)

2014-03-16 Thread Tom Boothby
lol... IIRC, William has gotten a few libraries to change their
licenses.  It is a genuine request, and there is no blackmail here.

On Sun, Mar 16, 2014 at 11:23 AM, Volker Braun vbraun.n...@gmail.com wrote:
 As far as Sage is concerned, anything that is GPLv3 compatible is fine (this
 includes LGPL).

 I don't understand the thought process that leads to somebody trying to
 blackmail a library into changing their license to be more liberal with the
 implicit threat that, otherwise, some piece of code wouldn't be released.
 Where the whole point of the more liberal license is that one wouldn't have
 to release the source code using the library at all.

 --
 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 http://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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] wolfram language

2014-02-27 Thread Tom Boothby
On Thu, Feb 27, 2014 at 8:31 AM, Dr. David Kirkby drkir...@gmail.com wrote:

 I like the fact the picture on  his desktop is of him.

 Dave

Isn't yours?

-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [sage-devel] coding style: should foo.is_blah(...) be allowed to return nonboolean?

2014-02-27 Thread Tom Boothby
By default, I agree with you -- foo.is_blah() should be boolean.

However, I agree with Nathann.  When there are extra parameters, we
should be able to return other stuff.

On Thu, Feb 27, 2014 at 6:51 AM, Dima Pasechnik dimp...@gmail.com wrote:
 I am reviewing http://trac.sagemath.org/ticket/15864
 and it occurs to be that foo.is_blah() should not be
 allowed to return anything but True/False.

 Maybe I am being too rigid, am I not?

 It is true that there are places in Sage where one can find
 foo.is_blah(certificate=True)
 returning nonboolean. Today I find this rather weird, but perhaps
 I am having a bad day... :-)

 Thanks,
 Dima


 --
 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 http://groups.google.com/group/sage-devel.
 For more options, visit https://groups.google.com/groups/opt_out.

-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Re: [sage-devel] Sherlock

2014-01-05 Thread Tom Boothby
On Sun, Jan 5, 2014 at 2:47 PM, Martin Albrecht
martinralbre...@googlemail.com wrote:

 I remember that dinner... where I had license discussions with an
 intoxicated Germans...

 Makes sense: as far as I know the Sage rule is you're *only* allowed to 
 discuss licenses if you are intoxicated.

I'm going to have to disagree with that... we'd be discriminating
against several developers based on religious grounds.  Unless, like
me, they can intoxicate themselves on the very concept of software
licensing.

-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [sage-devel] Removing the Graph boundary parameter

2013-12-08 Thread Tom Boothby
The boundary code does get used... though it's fairly specialized --
it's for the UW Math REU.

On Sun, Dec 8, 2013 at 2:58 AM, Nathann Cohen nathann.co...@gmail.com wrote:
 Hell everybody !!

 While working on #15278, Simon rediscovered the boundary graph parameter.
 Turns out that there is a line is Graph.delete_vertex (one of the things we
 would like to be efficient in graphs) a line that does a linear-time
 operation :

 self._boundary = [v for v in self._boundary if v != vertex]

 Fortunately the boundary list is equal to [] for all the graphs I ever uses
 myself, and (I guess) anybody else's too. Thiss, because the documentation
 of this parameter amounts to the following :

 sage: Graph.get_boundary?
 ...
 Returns the boundary of the (di)graph.
 ...
 sage: Graph.set_boundary?
 ...
 Sets the boundary of the (di)graph.
 ...

 I personally don't know what this thing could be (especially if you are
 meant to enter it yourself and it is not automatically deduced from the
 graph), and changes the default behaviour of methods like .vertices() or
 .adjacency_matrix(), or the .graphplot() method.

 Soo unless anybody actually uses that and is willing to write some
 doc I think we would be better without it. And I created ticket #15494 which
 adds a deprecation warning to anything that uses this parameter if we
 proceed to remove it.

 Have fuuun !!!

 Nathann

 --
 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 http://groups.google.com/group/sage-devel.
 For more options, visit https://groups.google.com/groups/opt_out.

-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [sage-devel] Re: Gray code

2013-12-06 Thread Tom Boothby
On Thu, Dec 5, 2013 at 9:50 PM, Nils Bruin nbr...@sfu.ca wrote:

 It will be very hard to beat the simple closed formula

 ( (i1) ^^ i for i in xrange(2^n) )


Yes indeed -- with a formula like that, there's little reason not to
implement it ad-hoc every time.  Unless a user wants it, and doesn't
know this bit of information.  Though... what Nathann said was
that he wants to know which bit changes...

(i.valuation(2) for i in srange(1,2^n))

does the job -- though this can certainly be implemented better.

-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [sage-devel] Re: Gray code

2013-12-06 Thread Tom Boothby
Well too darned bad, 'cause I'm gonna share the magic formula I just
found anyway:

[((i-i)-1).popcount() for i in srange(1,2^n)]

from http://aggregate.org/MAGIC/


On Fri, Dec 6, 2013 at 6:42 AM, Nathann Cohen nathann.co...@gmail.com wrote:
 Yo !!

 Yes indeed -- with a formula like that, there's little reason not to
 implement it ad-hoc every time.  Unless a user wants it, and doesn't
 know this bit of information.  Though... what Nathann said was
 that he wants to know which bit changes...

 (i.valuation(2) for i in srange(1,2^n))

 does the job -- though this can certainly be implemented better.

 Well, it's true that the one-liner simplifies a lot of things :-D

 There are good implementations there if we need them in some fast C
 code though : www.jjj.de/fxt/fxtbook.pdf

 But my problem is solved ! Thanks :-D

 Nathann

 --
 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 http://groups.google.com/group/sage-devel.
 For more options, visit https://groups.google.com/groups/opt_out.

-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [sage-combinat-devel] Gray code

2013-12-04 Thread Tom Boothby
I implemented something similar for permutations 'cause I needed it:

http://hg.sagemath.org/sage-main/src/f0ee3538887fe739601babb54e177ec5e1133b7a/sage/combinat/permutation_cython.pyx?at=default

On Wed, Dec 4, 2013 at 1:52 PM, Nathann Cohen nathann.co...@gmail.com wrote:
 Helloo everybody !

 I got an email from a Sage user who wants to enumerate something, and I'd
 need to generate a Gray Code in order to make it faster. And it looks like
 Sage cannot do that from my google searches. I would like to list all the
 subsets of a Set in a Gray Ordering. Actually, I would like to know which
 bit changes at each step. Aand well. Is there anywhere ?

 If it is not in Sage yet 1) that is shameful for us 2) where would you like
 to see it if I implement it ?

 I warn you, there will be bitwise C operations somewhere and a Python class
 above to expose it :-P

 Thanks !

 Nathann

 P.S. : If you answer this message, *PLEASE* also answer on sage-devel.

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

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


[sage-devel] making tuples in cython

2013-10-21 Thread Tom Boothby
I'm working on overhauling a class (see [1]) that wraps some c++, and
I've got just about everything working how I want... but I have a
nagging doubt about performance.

Is the following fast?  Can it be made fast without a bunch of ugly
python c-api stuff?

cdef tupletuple(vector[vector[int]] M):
cdef int i, j

return tuple(tuple(M[j][i] for i in range(M[j].size()) for j in
range(M.size()))

Thanks!

[1] http://trac.sagemath.org/ticket/11814

-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [sage-devel] making tuples in cython

2013-10-21 Thread Tom Boothby
lol, really?  Can I then toss that back to python?

On Mon, Oct 21, 2013 at 10:19 AM, Robert Bradshaw
rober...@math.washington.edu wrote:
 How about

 cdef tupletuple(vector[vector[int]] M):
 return M

 On Mon, Oct 21, 2013 at 8:48 AM, Tom Boothby tomas.boot...@gmail.com wrote:
 I'm working on overhauling a class (see [1]) that wraps some c++, and
 I've got just about everything working how I want... but I have a
 nagging doubt about performance.

 Is the following fast?  Can it be made fast without a bunch of ugly
 python c-api stuff?

 cdef tupletuple(vector[vector[int]] M):
 cdef int i, j

 return tuple(tuple(M[j][i] for i in range(M[j].size()) for j in
 range(M.size()))

 Thanks!

 [1] http://trac.sagemath.org/ticket/11814

 --
 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 http://groups.google.com/group/sage-devel.
 For more options, visit https://groups.google.com/groups/opt_out.

 --
 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 http://groups.google.com/group/sage-devel.
 For more options, visit https://groups.google.com/groups/opt_out.

-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [sage-devel] making tuples in cython

2013-10-21 Thread Tom Boothby
Okay, that's almost okay... but I'm getting a list of lists from the
following code -- is it possible to get a tuple of tuples instead?  I
guess I can just avoid tossing the list back to the user if not.

%cython
#clang c++

from libcpp.vector cimport vector

def tupletuple(vector[vector[int]] M):
return M

def identity(tuple t):
return tupletuple(t)


On Mon, Oct 21, 2013 at 10:28 AM, Tom Boothby tomas.boot...@gmail.com wrote:
 lol, really?  Can I then toss that back to python?

 On Mon, Oct 21, 2013 at 10:19 AM, Robert Bradshaw
 rober...@math.washington.edu wrote:
 How about

 cdef tupletuple(vector[vector[int]] M):
 return M

 On Mon, Oct 21, 2013 at 8:48 AM, Tom Boothby tomas.boot...@gmail.com wrote:
 I'm working on overhauling a class (see [1]) that wraps some c++, and
 I've got just about everything working how I want... but I have a
 nagging doubt about performance.

 Is the following fast?  Can it be made fast without a bunch of ugly
 python c-api stuff?

 cdef tupletuple(vector[vector[int]] M):
 cdef int i, j

 return tuple(tuple(M[j][i] for i in range(M[j].size()) for j in
 range(M.size()))

 Thanks!

 [1] http://trac.sagemath.org/ticket/11814

 --
 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 http://groups.google.com/group/sage-devel.
 For more options, visit https://groups.google.com/groups/opt_out.

 --
 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 http://groups.google.com/group/sage-devel.
 For more options, visit https://groups.google.com/groups/opt_out.

-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [sage-devel] Re: We need a new color?

2013-09-30 Thread Tom Boothby
raise RuntimeError,Could not obtain comic data from %s . Maybe you
should enable time travel!%url

You gave up on this too early, IMO.  I'd from __future__ import *
and then try the url again.

For the more pragmatic, you can fairly accurately predict when that
url will come live, and just sleep 'til then.

On Sun, Sep 29, 2013 at 11:26 PM, Maarten Derickx
m.derickx.stud...@gmail.com wrote:
 Speaking of xkcd and easter eggs, I have always thought that since sage
 already has an xgcd function, we should also have an xkcd function. I
 already wrote a first version at:
 https://sage.math.leidenuniv.nl/home/pub/22/

 Le vendredi 27 septembre 2013 18:03:00 UTC+2, kcrisman a écrit :



 On Friday, September 27, 2013 4:57:51 AM UTC+2, kcrisman wrote:

 From a user.  I'm not sure how the matplotlib devels would feel about
 adding this.


 I would assume they welcome a patch, especially when you quote xkcd.
 The definitions are here, i think:

 https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/colors.py#L65


 I've submitted a pull request.
 https://github.com/matplotlib/matplotlib/pull/2468

 See also http://www.colourlovers.com/palette/492360/Sage

 --
 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 http://groups.google.com/group/sage-devel.
 For more options, visit https://groups.google.com/groups/opt_out.

-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [sage-devel] Inverse of discrete functions

2013-09-26 Thread Tom Boothby
1. I agree that discrete was a poor name choice
2. Would we want to add a package that implements a single (very
elementary) class? (no)
3. I, for one, would like to keep Sage's documentation apolitical --
I'd rather to see some mathematical examples than those provided.

On Thu, Sep 26, 2013 at 12:03 PM, Nils Bruin nbr...@sfu.ca wrote:
 On Wednesday, September 25, 2013 9:59:46 AM UTC-7, Tom wrote:

 For iso/automorphisms of graphs, I often wish that dictionaries were
 both callable and invertible.  In general, yes, I think
 DiscreteFunction and DiscreteBijection classes would be very useful.


 Does https://pypi.python.org/pypi/bidict scratch this itch?
 Incidentally, aren't these FiniteFunction and FiniteBijection? I'd say that
 the function
 x :- x^2 from Z to Z is discrete, but I don't think the approaches
 suggested here would apply.

 --
 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 http://groups.google.com/group/sage-devel.
 For more options, visit https://groups.google.com/groups/opt_out.

-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [sage-devel] Inverse of discrete functions

2013-09-25 Thread Tom Boothby
If the dictionary is a bijection, I use:
{v:k for k,v in d.iteritems()}

Otherwise, I use defaultdict:
d_inv=defaultdict(list)
map(lambda(k,v):d_inv[v].append(k), d.items())

For iso/automorphisms of graphs, I often wish that dictionaries were
both callable and invertible.  In general, yes, I think
DiscreteFunction and DiscreteBijection classes would be very useful.


On Wed, Sep 25, 2013 at 9:08 AM, Nathann Cohen nathann.co...@gmail.com wrote:
 Hell everybody !

 I was just messing with dictionaries and lists, and I wonder if we
 could solve the problem once and for all with an inefficient generic
 solution. Here's the thing :

 I often have to define both a function, and its inverse. Something like :

 d = {
  'a' : 1,
  'b' : 2,
  'c' : 1,
  'd' : 3
 }

 Then, I want to find the list of all elements whose image is a 1, or
 2, or 3, and end up defining the following dictionary :

 d_inv = {
  1 : ['a','c'],
  2 : ['b'],
  3 : ['d']
 }

 Aand it would be sooo nice if there was a way to write d**(-1)[2],
 or something of the kind ! Did you ever write a code like this, and
 would you be interested by a generic tool for that ?

 Otherwise I'll just keep on computing the inverse of my dictionaries
 with a couple of Python lines ;-)

 Have fn !

 Nathann

 --
 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 http://groups.google.com/group/sage-devel.
 For more options, visit https://groups.google.com/groups/opt_out.

-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [sage-devel] Re: Is the glass half-full or half-empty ? Pick a standard.

2013-08-22 Thread Tom Boothby
I will argue against False.  We've had the convention that
Graph().is_connected() is True for the last n years.  This was an
arbitrary (if heedless) choice at the boundary of several definitions.
 It doesn't seem to be an undue source of bugs, so the only impact of
changing this arbitrary choice to another arbitrary choice will be to
subtly break backwards-compatibility and add warning noise.

I just consulted NetworkX, and I am convinced that their solution is
the only reasonable change we could make:

if len(G)==0:
raise nx.NetworkXPointlessConcept(
Connectivity is undefined for the null graph.)

-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [sage-devel] Sage logic code

2013-07-11 Thread Tom Boothby
I have a script I use to convert a boolean function into an equivalent
CNF boolean function so I can use a SAT solver on arbitrary boolean
functions.  I hoped to use SymbolicLogic, but it was so lacking, I
rolled my own.  Off with its head!

On Thu, Jul 11, 2013 at 3:07 PM, William Stein wst...@gmail.com wrote:
 Hi,

 Does anybody (know of anybody that) actually uses the SymbolicLogic()
 object in Sage?  You know, this:

 sage: s = SymbolicLogic()
 sage: s.statement(A-B)
 [['OPAREN', 'A', 'IFTHEN', 'B', 'CPAREN'], {'A': 'False', 'B':
 'False'}, ['A', 'B']]

 I've had about 6 students (and myself) look at that code, and it is
 hard to imagine that it is used by anybody.

 In particular, would anybody object to possibly replacing it, possibly
 with something that has a (completely) different API, which is much
 better?

 I've never heard of anybody using this code, and think of people had,
 then they would have complained...   It's mainly aimed at a first
 course in writing proofs type teaching/educational applications.

  -- William




 --
 William Stein
 Professor of Mathematics
 University of Washington
 http://wstein.org

 --
 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 http://groups.google.com/group/sage-devel.
 For more options, visit https://groups.google.com/groups/opt_out.



-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-devel] cpdef (a little) harmful

2013-04-09 Thread Tom Boothby
This shouldn't really come as a surprise.  From the Cython documentation,

This is about 20 times slower, but still about 10 times faster than
the original Python-only integration code. This shows how large the
speed-ups can easily be when whole loops are moved from Python code
into a Cython module.

http://docs.cython.org/src/tutorial/cdef_classes.html


On Tue, Apr 9, 2013 at 12:58 PM, Nils Bruin nbr...@sfu.ca wrote:
 Sometimes one ends up with implementing really small access routines,
 just to do a lookup for something. In cython you might even want to do
 that with some cdef methods. For general accessibility, you might
 consider slapping a cpdef on rather than a cdef. That may come at
 a serious price, because cpdef methods also check if they have been
 overridden on the instance or via subclassing if they get called via
 their cdef interface:

 with the following code we get:

 cython(
 cdef class A(object):
 cpdef int a(self):
 return 0
 cdef int b(self):
 return 0
 cpdef int test_a(self, long N):
 cdef long i
 for i in xrange(N):
 self.a()
 return 0
 cpdef int test_b(self, long N):
 cdef long i
 for i in xrange(N):
 self.b()
 return 0
 )

 t=A()
 timeit('t.test_a(1000)')
 timeit('t.test_b(1000)')
 class B(A):
 pass

 s=B()
 timeit('s.test_a(1000)')
 timeit('s.test_b(1000)')

 25 loops, best of 3: 21.2 ms per loop
 25 loops, best of 3: 15.9 ms per loop
 5 loops, best of 3: 507 ms per loop
 25 loops, best of 3: 15.9 ms per loop

 As you can see for A it's not so bad, because there's no instance
 dict. However, for the subclassed s there is an instance dict. Now the
 cpdef method s.a (even inside the cython!) checks every time if it has
 been overridden with a full attribute lookup.

 Timings improve with attribute caching turned on (of course only for
 s.test_a, because the other tests hardly do any attribute lookup)

 25 loops, best of 3: 21.2 ms per loop
 25 loops, best of 3: 15.9 ms per loop
 5 loops, best of 3: 303 ms per loop
 25 loops, best of 3: 16 ms per loop

 but the penalty is still significant if your routine does very little
 by itself. This was certainly unexpected for me. I was expecting that,
 as far as cdef is concerned, the p in cpdef would have no effect.

 --
 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 http://groups.google.com/group/sage-devel?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.



-- 
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 http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-devel] Re: cpdef (a little) harmful

2013-04-09 Thread Tom Boothby
On Tue, Apr 9, 2013 at 1:44 PM, Nils Bruin nbr...@sfu.ca wrote:

 Since it is entirely unclear from that tutorial what the factor 20 (or
 the factor 10) refers to, I would not have understood that code to
 mean even the fastest path of a cpdef function is slower than a
 cdef. There is a lot of documentation around that states a cpdef
 function is essentially a cdef function that is also available and
 override-able as a python function without stating that the
 overriding can also take effect at cdef level and (naturally) causes
 overhead. I think this definitely deserves to be clarified in the
 cython documentation.


Fair enough, documentation can always be better.  I find it reasonable
behavior, for the very real possibility that a user overrides a
cpdef'd function with python, and passes that object into a cdef'd
function.  A user would expect that their new function would be
called, and weird things would happen if not.

-- 
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 http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-devel] Falso

2013-02-18 Thread Tom Boothby
No worries.  I just proved that Sage does not infringe Estatis Inc.'s
intellectual property.  We're cool.

On Mon, Feb 18, 2013 at 5:23 PM, kcrisman kcris...@gmail.com wrote:
 fun
 How did we ever get along trying to prove theorems with more than one axiom?

 http://www.eleves.ens.fr/home/amarilli/falso/

 Sage relevance: Open source and pirate programs are a threat to your
 computers and your mathematical activity.
 /fun

 --
 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 http://groups.google.com/group/sage-devel?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.



-- 
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 http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-devel] Graph theory roadmap

2013-01-23 Thread Tom Boothby
Jernej,

While somebody is at this, Maple has graphs, too.

On Wed, Jan 23, 2013 at 11:52 AM, Jernej Azarija azi.std...@gmail.com wrote:
 Hello!

 This question is related to the following page
 http://trac.sagemath.org/sage_trac/wiki/GraphTheoryRoadmap

 As one can see the last time it was modified was 3 years ago. Now in the
 meantime many new things appeared in Mathematica as well as in Sage.  So I
 am wondering if the page is obsolete now? Is there a new way we track the
 progress and feature list for the graph theory component?

 If not then I'd like to make a few updates to the page (and encourage others
 to do as well) so that we can get a better picture of what still needs
 to be done in the graph theory component and what is already implemented. Is
 anyone interested in checking what is present in the new version of
 Mathematica and is lacking in Sage?

 Best,

 Jernej




 --
 You received this message because you are subscribed to the Google Groups
 sage-devel group.
 To post to this group, send email to sage-devel@googlegroups.com.
 To unsubscribe from this group, send email to
 sage-devel+unsubscr...@googlegroups.com.
 Visit this group at http://groups.google.com/group/sage-devel?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
sage-devel group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.




Re: [sage-devel] A product() analogue to sum()

2012-12-04 Thread Tom Boothby
prod() does just what you want.

On Tue, Dec 4, 2012 at 5:53 PM, Michael Orlitzky mich...@orlitzky.com wrote:
 I've been carrying this around in my init.sage. Is there really nothing
 like it in the library? If not, any reason not to add it?

 ##

 from functools import reduce

 def product(factors):
 
 Returns the product of the elements in the list ``factors``. If
 the list is empty, we return 1.

 EXAMPLES:

 Normal integer multiplication::

 sage: product([1,2,3])
 6

 And with symbolic variables::

 sage: x,y,z = SR.var('x,y,z')
 sage: product([x,y,z])
 x*y*z

 TESTS:

 The empty product is the multiplicative identity (one)::

 sage: product([])
 1

 
 return reduce(operator.mul, factors, 1)

 --
 You received this message because you are subscribed to the Google Groups 
 sage-devel group.
 To post to this group, send email to sage-devel@googlegroups.com.
 To unsubscribe from this group, send email to 
 sage-devel+unsubscr...@googlegroups.com.
 Visit this group at http://groups.google.com/group/sage-devel?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
sage-devel group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.




Re: [sage-devel] Extra loop created in a graph

2012-11-28 Thread Tom Boothby
Hey Rob,

I ran into something similar a little while back in sage-5.0

sage: G = Graph([(0,1,0),(0,1,0)])
sage: G.num_edges()
4

but IIRC, it was fixed in 5.3.

On Wed, Nov 28, 2012 at 8:02 PM, Rob Beezer goo...@beezer.cotse.net wrote:
 Anybody recognise this bug?  I don't see anything in Trac.

 T=[(0, 2, '0'), (3, 3, '2'), (0, 2, '1')]
 Gt = Graph(T)
 Gt.loops()

 [(3, 3, '2')]

 versus

 S=[(0, 2, '0'), (0, 2, '1'), (3, 3, '2')]
 Gs = Graph(S)
 Gs.loops()

 [(3, 3, '2'), (3, 3, '2')]

 Thanks,
 Rob

 --
 You received this message because you are subscribed to the Google Groups
 sage-devel group.
 To post to this group, send email to sage-devel@googlegroups.com.
 To unsubscribe from this group, send email to
 sage-devel+unsubscr...@googlegroups.com.
 Visit this group at http://groups.google.com/group/sage-devel?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
sage-devel group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.




Re: [sage-devel] Re: Testing if a graph is edge-transitive

2012-11-18 Thread Tom Boothby
Nah, I'll pick up some review credit.

On Sun, Nov 18, 2012 at 10:16 PM, Jernej Azarija azi.std...@gmail.com wrote:
 Tom,

 I have created a patch implementing the edge/arc transitive tests. I
 mentioned on the wiki page that the main idea of the test was suggested by
 you, but in case you want to claim any extra credit or something, here is
 the track ticket:

 http://trac.sagemath.org/sage_trac/ticket/13721

 On Tuesday, 30 October 2012 18:19:26 UTC+1, Dima Pasechnik wrote:

 On 2012-10-30, Tom Boothby tomas@gmail.com wrote:
  Oops, didn't see your reply before I posted.  Not counting the empty
  graph is very very strange.  At the very least OEIS needs to be
  updated to have a proper definition to warn people that the empty
  graph is excluded.

 it's a tricky question whether groups can be allowed to act on the empty
 set.
 If they aren't, then the empty graphs must be excluded.
 I prefer to think of transitive actions having one orbit, while
 allowing empty sets needs a change here: 0 or 1 orbits...
 Allowing actions on empty sets loses you the 1-1 correspondence between
 the transitive actions and the actions on cosets of subgroups.
 So there is a lot to be lost here.

 Dima

 
 
 
  On Tue, Oct 30, 2012 at 4:23 AM, Dima Pasechnik dim...@gmail.com
  wrote:
  On 2012-10-30, Jernej Azarija azi.s...@gmail.com wrote:
  --=_Part_1698_7171753.1351582604933
  Content-Type: text/plain; charset=ISO-8859-1
 
  On Monday, 29 October 2012 22:49:03 UTC+1, Tom wrote:
 
  Here's a list of 21 edge-transitive graphs on 6 vertices.
 
  [...]
  They've all got 6 vertices.  They're all edge transitive.  That means
  Weisstein's list is wrong.
 
  no, not really. He just doesn't count empty graphs. Somewhere on
  http://mathworld.wolfram.com/Edge-TransitiveGraph.html
  you can read:
 
  Counting empty graphs as edge-transitive, the numbers of
  edge-transitive
  graphs on , 2, ... nodes are 1, 2, 4, 8, 12, 21, 27,  
 
  So it's a misunderstand related to definitions used, rather than
  a bug in someone's code, it seems.
 
  Dima

 --
 You received this message because you are subscribed to the Google Groups
 sage-devel group.
 To post to this group, send email to sage-devel@googlegroups.com.
 To unsubscribe from this group, send email to
 sage-devel+unsubscr...@googlegroups.com.
 Visit this group at http://groups.google.com/group/sage-devel?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
sage-devel group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.




Re: [sage-devel] Testing if a graph is edge-transitive

2012-10-30 Thread Tom Boothby
No, arc-transitivity is quite easy:
G.to_directed().line_graph().is_vertex_transitive()

Are you saying that the graph with 6 vertices and no edges is not a
graph?  What about the graphs on 1,2,..5 vertices and no edges?
Because those are all counted in OEIS.  Even on Mathworld, it says
Counting empty graphs as edge-transitive, the numbers of
edge-transitive graphs on n=1, 2, ... nodes are 1, 2, 4, 8, 12, 21,
27,...

Stranger yet, sage counts 39 edge-transitive graphs, where OEIS
currently lists 40.  So yes, I'll be getting independent verification
before submitting a correction to OEIS.



On Tue, Oct 30, 2012 at 12:36 AM, Jernej Azarija azi.std...@gmail.com wrote:


 On Monday, 29 October 2012 22:49:03 UTC+1, Tom wrote:

 Here's a list of 21 edge-transitive graphs on 6 vertices.

 E??? # 6 K_1
 E_?? # K_2 + 4
 Eo?? # S_2 + 3
 Ew?? # K_3 + 3
 Es?? # S_3 + 2
 Es_? # S_4 + 1
 Esa? # S_5
 E`?? # 2 K_2 + 2
 Er?? # C_4 + 2
 E~?? # K_4 + 2
 Elg? # K_{3,2} + 1
 Ehc? # C_5 + 1
 E~{? # K_5 + 1
 E`__ # 2 S_2
 Eli_ # K_{4,2}
 E`oo # 2 K_3
 E`?G # 3 K_2
 EpOW # C_6
 Ezuw # Octahedron
 E~~w # K_6
 ErYW # K_{3,3}

 K_n: complete graph on n vertices
 C_n: n-cycle
 S_n: n-star on n+1 verts
 K_{m,n}: complete bipartite graph between m and n vertices
 X + t: the graph X with t extra independent vertices
 tX: t disjoint copies of X

 They've all got 6 vertices.  They're all edge transitive.  That means
 Weisstein's list is wrong.


 Hello,

 thank you for your help Tom!

 I am not sure 6K_1 counts since it has no edges. Can we test the program in
 mathematica or some other program to be 100% sure before we warn oesis?



 Also, I tried to use your code to check if a random 100 vertex graph
 with 100 edges was edge-transitive.  It took more than a minute, and I
 killed it.  The already-implemented
 G.line_graph().is_vertex_transitive() finished in 26 ms.

 Indeed this version is very very slow compared to the testing of vertex
 transitive graphs. But nonetheless it is useful since at some point I will
 implement a test for arc-transitivity (symmetric graphs) and there is no
 useful way to convert the problem to vertex transitivity. So the question on
 why the code is not correct remains!



 On Mon, Oct 29, 2012 at 12:37 PM, Jernej Azarija azi.s...@gmail.com
 wrote:
  This works yes. However it still leaves open what is going on  with
  disconnected graphs and what is the problem with the proposed
  is_edge_transitive method!
 
  Do you (or anyone) happens to see a bug or a bizarre mistake in the
  implementation?
 
  On Monday, 29 October 2012 20:02:40 UTC+1, Tom wrote:
 
  Sorry, I meant n=8.
 
  sage: print [ec(n) for n in range(9)]
  [1, 1, 1, 2, 3, 4, 6, 5, 8]
 
  On Mon, Oct 29, 2012 at 11:41 AM, Tom Boothby tomas@gmail.com
  wrote:
   Wanna run that on connected graphs?  I get the correct sequence out
   to
   n=9 for
  
   def ec(n)
   c = 0
   for g in graphs(n):
   if g.is_connected() and
   g.line_graph().is_vertex_transitive():
   c+= 1
   return c
  
  
  
   On Mon, Oct 29, 2012 at 11:37 AM, Jernej Azarija azi.s...@gmail.com
   wrote:
   Hello!
  
   Yes but this appears to be even more bogus. Consider this:
  
   ==
   def ec(n):
   c = 0
   for el in graphs.nauty_geng(str(n)):
   if (el.line_graph()).is_vertex_transitive():
   c+=1
   return c
   ==
  
   sage: ec(7)
   27
   sage: ec(8)
   39
  
   But there are 26 and 40 edge-transitive graphs on 7 and 8 nodes
   respectively. It appears as if something is wrong with the
   computation
   of
   the automorphism group of a graph.
  
   Can someone comment on that?
  
  
  
  
  
  
  
  
   On Monday, 29 October 2012 19:29:56 UTC+1, Tom wrote:
  
   I use G.line_graph().is_vertex_transitive()
  
   On Mon, Oct 29, 2012 at 7:12 AM, Jernej Azarija
   azi.s...@gmail.com
   wrote:
Hello!
   
I am slowly implementing a patch that will provide some features
for
symmetry testing of graphs.
   
However I am already puzzled by the following attempt at testing
for
edge-transitive graphs. Here is a straightforward textbook
implementation
(the presented code omits the exceptional treatment of the
singleton
graph)
   
===
   def is_edge_transitive(self):
   
A,T = self.automorphism_group(translation=True)
for (x,y,_) in self.edges():
acts = set([])
for g in A:
a,b = g(T[x]),g(T[y])
acts.add((a,b) if a  b else (b,a))
if len(acts) == self.size():
return True
return False
===
   
Testing the code (Petersen, Gray and path graph) it appears as if
the
results are correct. But considering the following function
computing
the
number connected  edge transitive graphs of given order
   
===
def ecc(n):
c = 0
for el in graphs.nauty_geng(str(n)+  -c

Re: [sage-devel] Re: Testing if a graph is edge-transitive

2012-10-30 Thread Tom Boothby
Oops, didn't see your reply before I posted.  Not counting the empty
graph is very very strange.  At the very least OEIS needs to be
updated to have a proper definition to warn people that the empty
graph is excluded.



On Tue, Oct 30, 2012 at 4:23 AM, Dima Pasechnik dimp...@gmail.com wrote:
 On 2012-10-30, Jernej Azarija azi.std...@gmail.com wrote:
 --=_Part_1698_7171753.1351582604933
 Content-Type: text/plain; charset=ISO-8859-1

 On Monday, 29 October 2012 22:49:03 UTC+1, Tom wrote:

 Here's a list of 21 edge-transitive graphs on 6 vertices.

 [...]
 They've all got 6 vertices.  They're all edge transitive.  That means
 Weisstein's list is wrong.

 no, not really. He just doesn't count empty graphs. Somewhere on
 http://mathworld.wolfram.com/Edge-TransitiveGraph.html
 you can read:

 Counting empty graphs as edge-transitive, the numbers of edge-transitive
 graphs on , 2, ... nodes are 1, 2, 4, 8, 12, 21, 27,  

 So it's a misunderstand related to definitions used, rather than
 a bug in someone's code, it seems.

 Dima


 --
 You received this message because you are subscribed to the Google Groups 
 sage-devel group.
 To post to this group, send email to sage-devel@googlegroups.com.
 To unsubscribe from this group, send email to 
 sage-devel+unsubscr...@googlegroups.com.
 Visit this group at http://groups.google.com/group/sage-devel?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
sage-devel group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.




Re: [sage-devel] Re: Testing if a graph is edge-transitive

2012-10-30 Thread Tom Boothby
Thank you, Jernej, for bringing up this issue.  Turns out I've been
lazy, and hadn't carefully thought about degenerate cases.  The line
graph is a bad test because the claw and triangle have the same line
graph... the disconnected pair (claw + C_3) has a vertex-transitive
line graph!  The following counts 1,2,4,8,12,21,26,38 (subtract
wherever you think the empty graph doesn't belong)



def is_edge_transitive(G):
A,L = G.automorphism_group(translation=True)
G = G.relabel(L,inplace=False)
E = map(Set,G.edges(labels=False))
Ei= dict((e,i) for i,e in enumerate(E))
gens = []
for g in A.gens():
h = [Ei[Set([g(u),g(v)])]+1 for u,v in E]
gens.append(h)
return PermutationGroup(gens).is_transitive()

-- 
You received this message because you are subscribed to the Google Groups 
sage-devel group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.




Re: [sage-devel] Testing if a graph is edge-transitive

2012-10-29 Thread Tom Boothby
I use G.line_graph().is_vertex_transitive()

On Mon, Oct 29, 2012 at 7:12 AM, Jernej Azarija azi.std...@gmail.com wrote:
 Hello!

 I am slowly implementing a patch that will provide some features for
 symmetry testing of graphs.

 However I am already puzzled by the following attempt at testing for
 edge-transitive graphs. Here is a straightforward textbook implementation
 (the presented code omits the exceptional treatment of the singleton graph)

 ===
def is_edge_transitive(self):

 A,T = self.automorphism_group(translation=True)
 for (x,y,_) in self.edges():
 acts = set([])
 for g in A:
 a,b = g(T[x]),g(T[y])
 acts.add((a,b) if a  b else (b,a))
 if len(acts) == self.size():
 return True
 return False
 ===

 Testing the code (Petersen, Gray and path graph) it appears as if the
 results are correct. But considering the following function computing the
 number connected  edge transitive graphs of given order

 ===
 def ecc(n):
 c = 0
 for el in graphs.nauty_geng(str(n)+  -c ):
 if el.is_edge_transitive():
 c+=1
 return c
 ===

 we observe that

 sage: [ecc(i) for i in xrange(2,9)]
 [1, 2, 3, 4, 6, 5, 8]

 which does not coincide with the data provided at oeis:
 http://oeis.org/A095424/list . The difference gets even bigger if we count
 all edge-transitive graphs instead of just connected.

 Anyone happens to see the flaw in the is_edge_transitive method?

 Best,

 Jernej

 --
 You received this message because you are subscribed to the Google Groups
 sage-devel group.
 To post to this group, send email to sage-devel@googlegroups.com.
 To unsubscribe from this group, send email to
 sage-devel+unsubscr...@googlegroups.com.
 Visit this group at http://groups.google.com/group/sage-devel?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
sage-devel group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.




Re: [sage-devel] Testing if a graph is edge-transitive

2012-10-29 Thread Tom Boothby
Wanna run that on connected graphs?  I get the correct sequence out to n=9 for

def ec(n)
c = 0
for g in graphs(n):
if g.is_connected() and g.line_graph().is_vertex_transitive():
c+= 1
return c



On Mon, Oct 29, 2012 at 11:37 AM, Jernej Azarija azi.std...@gmail.com wrote:
 Hello!

 Yes but this appears to be even more bogus. Consider this:

 ==
 def ec(n):
 c = 0
 for el in graphs.nauty_geng(str(n)):
 if (el.line_graph()).is_vertex_transitive():
 c+=1
 return c
 ==

 sage: ec(7)
 27
 sage: ec(8)
 39

 But there are 26 and 40 edge-transitive graphs on 7 and 8 nodes
 respectively. It appears as if something is wrong with the computation of
 the automorphism group of a graph.

 Can someone comment on that?








 On Monday, 29 October 2012 19:29:56 UTC+1, Tom wrote:

 I use G.line_graph().is_vertex_transitive()

 On Mon, Oct 29, 2012 at 7:12 AM, Jernej Azarija azi.s...@gmail.com
 wrote:
  Hello!
 
  I am slowly implementing a patch that will provide some features for
  symmetry testing of graphs.
 
  However I am already puzzled by the following attempt at testing for
  edge-transitive graphs. Here is a straightforward textbook
  implementation
  (the presented code omits the exceptional treatment of the singleton
  graph)
 
  ===
 def is_edge_transitive(self):
 
  A,T = self.automorphism_group(translation=True)
  for (x,y,_) in self.edges():
  acts = set([])
  for g in A:
  a,b = g(T[x]),g(T[y])
  acts.add((a,b) if a  b else (b,a))
  if len(acts) == self.size():
  return True
  return False
  ===
 
  Testing the code (Petersen, Gray and path graph) it appears as if the
  results are correct. But considering the following function computing
  the
  number connected  edge transitive graphs of given order
 
  ===
  def ecc(n):
  c = 0
  for el in graphs.nauty_geng(str(n)+  -c ):
  if el.is_edge_transitive():
  c+=1
  return c
  ===
 
  we observe that
 
  sage: [ecc(i) for i in xrange(2,9)]
  [1, 2, 3, 4, 6, 5, 8]
 
  which does not coincide with the data provided at oeis:
  http://oeis.org/A095424/list . The difference gets even bigger if we
  count
  all edge-transitive graphs instead of just connected.
 
  Anyone happens to see the flaw in the is_edge_transitive method?
 
  Best,
 
  Jernej
 
  --
  You received this message because you are subscribed to the Google
  Groups
  sage-devel group.
  To post to this group, send email to sage-...@googlegroups.com.
  To unsubscribe from this group, send email to
  sage-devel+...@googlegroups.com.
  Visit this group at http://groups.google.com/group/sage-devel?hl=en.
 
 

 --
 You received this message because you are subscribed to the Google Groups
 sage-devel group.
 To post to this group, send email to sage-devel@googlegroups.com.
 To unsubscribe from this group, send email to
 sage-devel+unsubscr...@googlegroups.com.
 Visit this group at http://groups.google.com/group/sage-devel?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
sage-devel group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.




Re: [sage-devel] Testing if a graph is edge-transitive

2012-10-29 Thread Tom Boothby
Sorry, I meant n=8.

sage: print [ec(n) for n in range(9)]
[1, 1, 1, 2, 3, 4, 6, 5, 8]

On Mon, Oct 29, 2012 at 11:41 AM, Tom Boothby tomas.boot...@gmail.com wrote:
 Wanna run that on connected graphs?  I get the correct sequence out to n=9 for

 def ec(n)
 c = 0
 for g in graphs(n):
 if g.is_connected() and g.line_graph().is_vertex_transitive():
 c+= 1
 return c



 On Mon, Oct 29, 2012 at 11:37 AM, Jernej Azarija azi.std...@gmail.com wrote:
 Hello!

 Yes but this appears to be even more bogus. Consider this:

 ==
 def ec(n):
 c = 0
 for el in graphs.nauty_geng(str(n)):
 if (el.line_graph()).is_vertex_transitive():
 c+=1
 return c
 ==

 sage: ec(7)
 27
 sage: ec(8)
 39

 But there are 26 and 40 edge-transitive graphs on 7 and 8 nodes
 respectively. It appears as if something is wrong with the computation of
 the automorphism group of a graph.

 Can someone comment on that?








 On Monday, 29 October 2012 19:29:56 UTC+1, Tom wrote:

 I use G.line_graph().is_vertex_transitive()

 On Mon, Oct 29, 2012 at 7:12 AM, Jernej Azarija azi.s...@gmail.com
 wrote:
  Hello!
 
  I am slowly implementing a patch that will provide some features for
  symmetry testing of graphs.
 
  However I am already puzzled by the following attempt at testing for
  edge-transitive graphs. Here is a straightforward textbook
  implementation
  (the presented code omits the exceptional treatment of the singleton
  graph)
 
  ===
 def is_edge_transitive(self):
 
  A,T = self.automorphism_group(translation=True)
  for (x,y,_) in self.edges():
  acts = set([])
  for g in A:
  a,b = g(T[x]),g(T[y])
  acts.add((a,b) if a  b else (b,a))
  if len(acts) == self.size():
  return True
  return False
  ===
 
  Testing the code (Petersen, Gray and path graph) it appears as if the
  results are correct. But considering the following function computing
  the
  number connected  edge transitive graphs of given order
 
  ===
  def ecc(n):
  c = 0
  for el in graphs.nauty_geng(str(n)+  -c ):
  if el.is_edge_transitive():
  c+=1
  return c
  ===
 
  we observe that
 
  sage: [ecc(i) for i in xrange(2,9)]
  [1, 2, 3, 4, 6, 5, 8]
 
  which does not coincide with the data provided at oeis:
  http://oeis.org/A095424/list . The difference gets even bigger if we
  count
  all edge-transitive graphs instead of just connected.
 
  Anyone happens to see the flaw in the is_edge_transitive method?
 
  Best,
 
  Jernej
 
  --
  You received this message because you are subscribed to the Google
  Groups
  sage-devel group.
  To post to this group, send email to sage-...@googlegroups.com.
  To unsubscribe from this group, send email to
  sage-devel+...@googlegroups.com.
  Visit this group at http://groups.google.com/group/sage-devel?hl=en.
 
 

 --
 You received this message because you are subscribed to the Google Groups
 sage-devel group.
 To post to this group, send email to sage-devel@googlegroups.com.
 To unsubscribe from this group, send email to
 sage-devel+unsubscr...@googlegroups.com.
 Visit this group at http://groups.google.com/group/sage-devel?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
sage-devel group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.




Re: [sage-devel] Testing if a graph is edge-transitive

2012-10-29 Thread Tom Boothby
Here's a list of 21 edge-transitive graphs on 6 vertices.

E??? # 6 K_1
E_?? # K_2 + 4
Eo?? # S_2 + 3
Ew?? # K_3 + 3
Es?? # S_3 + 2
Es_? # S_4 + 1
Esa? # S_5
E`?? # 2 K_2 + 2
Er?? # C_4 + 2
E~?? # K_4 + 2
Elg? # K_{3,2} + 1
Ehc? # C_5 + 1
E~{? # K_5 + 1
E`__ # 2 S_2
Eli_ # K_{4,2}
E`oo # 2 K_3
E`?G # 3 K_2
EpOW # C_6
Ezuw # Octahedron
E~~w # K_6
ErYW # K_{3,3}

K_n: complete graph on n vertices
C_n: n-cycle
S_n: n-star on n+1 verts
K_{m,n}: complete bipartite graph between m and n vertices
X + t: the graph X with t extra independent vertices
tX: t disjoint copies of X

They've all got 6 vertices.  They're all edge transitive.  That means
Weisstein's list is wrong.

Also, I tried to use your code to check if a random 100 vertex graph
with 100 edges was edge-transitive.  It took more than a minute, and I
killed it.  The already-implemented
G.line_graph().is_vertex_transitive() finished in 26 ms.

On Mon, Oct 29, 2012 at 12:37 PM, Jernej Azarija azi.std...@gmail.com wrote:
 This works yes. However it still leaves open what is going on  with
 disconnected graphs and what is the problem with the proposed
 is_edge_transitive method!

 Do you (or anyone) happens to see a bug or a bizarre mistake in the
 implementation?

 On Monday, 29 October 2012 20:02:40 UTC+1, Tom wrote:

 Sorry, I meant n=8.

 sage: print [ec(n) for n in range(9)]
 [1, 1, 1, 2, 3, 4, 6, 5, 8]

 On Mon, Oct 29, 2012 at 11:41 AM, Tom Boothby tomas@gmail.com wrote:
  Wanna run that on connected graphs?  I get the correct sequence out to
  n=9 for
 
  def ec(n)
  c = 0
  for g in graphs(n):
  if g.is_connected() and g.line_graph().is_vertex_transitive():
  c+= 1
  return c
 
 
 
  On Mon, Oct 29, 2012 at 11:37 AM, Jernej Azarija azi.s...@gmail.com
  wrote:
  Hello!
 
  Yes but this appears to be even more bogus. Consider this:
 
  ==
  def ec(n):
  c = 0
  for el in graphs.nauty_geng(str(n)):
  if (el.line_graph()).is_vertex_transitive():
  c+=1
  return c
  ==
 
  sage: ec(7)
  27
  sage: ec(8)
  39
 
  But there are 26 and 40 edge-transitive graphs on 7 and 8 nodes
  respectively. It appears as if something is wrong with the computation
  of
  the automorphism group of a graph.
 
  Can someone comment on that?
 
 
 
 
 
 
 
 
  On Monday, 29 October 2012 19:29:56 UTC+1, Tom wrote:
 
  I use G.line_graph().is_vertex_transitive()
 
  On Mon, Oct 29, 2012 at 7:12 AM, Jernej Azarija azi.s...@gmail.com
  wrote:
   Hello!
  
   I am slowly implementing a patch that will provide some features for
   symmetry testing of graphs.
  
   However I am already puzzled by the following attempt at testing for
   edge-transitive graphs. Here is a straightforward textbook
   implementation
   (the presented code omits the exceptional treatment of the singleton
   graph)
  
   ===
  def is_edge_transitive(self):
  
   A,T = self.automorphism_group(translation=True)
   for (x,y,_) in self.edges():
   acts = set([])
   for g in A:
   a,b = g(T[x]),g(T[y])
   acts.add((a,b) if a  b else (b,a))
   if len(acts) == self.size():
   return True
   return False
   ===
  
   Testing the code (Petersen, Gray and path graph) it appears as if
   the
   results are correct. But considering the following function
   computing
   the
   number connected  edge transitive graphs of given order
  
   ===
   def ecc(n):
   c = 0
   for el in graphs.nauty_geng(str(n)+  -c ):
   if el.is_edge_transitive():
   c+=1
   return c
   ===
  
   we observe that
  
   sage: [ecc(i) for i in xrange(2,9)]
   [1, 2, 3, 4, 6, 5, 8]
  
   which does not coincide with the data provided at oeis:
   http://oeis.org/A095424/list . The difference gets even bigger if we
   count
   all edge-transitive graphs instead of just connected.
  
   Anyone happens to see the flaw in the is_edge_transitive method?
  
   Best,
  
   Jernej
  
   --
   You received this message because you are subscribed to the Google
   Groups
   sage-devel group.
   To post to this group, send email to sage-...@googlegroups.com.
   To unsubscribe from this group, send email to
   sage-devel+...@googlegroups.com.
   Visit this group at http://groups.google.com/group/sage-devel?hl=en.
  
  
 
  --
  You received this message because you are subscribed to the Google
  Groups
  sage-devel group.
  To post to this group, send email to sage-...@googlegroups.com.
  To unsubscribe from this group, send email to
  sage-devel+...@googlegroups.com.
  Visit this group at http://groups.google.com/group/sage-devel?hl=en.
 
 

 --
 You received this message because you are subscribed to the Google Groups
 sage-devel group.
 To post to this group, send email to sage-devel@googlegroups.com.
 To unsubscribe from this group, send email to
 sage-devel+unsubscr...@googlegroups.com.
 Visit this group at http://groups.google.com/group

Re: [sage-devel] Please review: new ANF2CNF converter (#13558)

2012-10-04 Thread Tom Boothby
Philipp,

The ticket already has some comments from Martin -- it needs doctests, etc.

When I looked at the code, I found the documentation about the various
substitution strategies.  The docstrings should list the strategies
and give an explanation for how they work.

Regards,
   Tom

On Thu, Oct 4, 2012 at 12:01 PM, Philipp Jovanovic p...@gmx.net wrote:
 Hi everybody,


 I've got a proposal for a new anf2cnf converter supporting various
 substitution strategies. As I'm pretty new to SAGE, Martin Albrecht did me a
 favour and already opened a ticket. Below you find the ticket needing review
 please:


 http://trac.sagemath.org/sage_trac/ticket/13558


 Thanks and all the best,

 Philipp Jovanovic

 --
 You received this message because you are subscribed to the Google Groups
 sage-devel group.
 To post to this group, send email to sage-devel@googlegroups.com.
 To unsubscribe from this group, send email to
 sage-devel+unsubscr...@googlegroups.com.
 Visit this group at http://groups.google.com/group/sage-devel?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
sage-devel group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.




Re: [sage-devel] Sage (tm)

2012-06-01 Thread Tom Boothby
Thanks, Martin, I hadn't thought about that -- Debian/IceWeasel is an
excellent example of things that can go wrong.  Trademarks are useless
if impinged and not challenged.  If people start making SageThis and
SageThat, we may lose control.

Per the norm, when sticky legal questions arise, I think we should
look to the projects we respect the most.  Python has an excellent
page[1] up about exactly this issue, as the word 'Python' and their
logo are trademarks.  In particular, they do not have a registered
trademark.  But they can still litigate on their trademark.  Debian
has an official use logo[2], and a lengthy discussion[3] rather than
a cogent policy (maybe somebody can find something more official from
them?).  Linux appears to have an entire institute[4] devoted to
this.  Honestly, I haven't read this yet.

The other big issue in my mind is the Sage software company that,
among other things, makes financial software.  If we register our
trademark and impinge theirs with a finance module, will we lose the
entire trademark, or just the rights to distribute financial software
named Sage?

Moreover, I'm very concerned about the notion that we should hurry up
and get this done now.  That's often a sign of a bum deal, in my
experience.

My initial reaction was slightly elevated thumb and has been
downgraded to dubious frown.  If there is money in the Sage
Foundation coffers, I think it would be prudent to consult a lawyer
that is not employed by the university.  Otherwise, William, I'd
suggest you pay out of pocket, since our only possible escape from a
tyrannical change in university policy would result in the trademark
being in your name -- it's in your financial best interest to make
sure that's a sound deal.

On that note -- I trust you 100% more than I trust UW.  Perhaps if we
go through with this, you should just pay the fee the moment the
deal's done?

[1] http://www.python.org/psf/trademarks/
[2] http://www.debian.org/logos/
[3] http://wiki.debian.org/ProposedTrademarkPolicy
[4] http://www.linuxfoundation.org/programs/legal/trademark

On Thu, May 31, 2012 at 11:05 PM, Martin Albrecht
martinralbre...@googlemail.com wrote:
 Hi,

 I am usually quite hesitant to add more layers of law (or lawyers) to how we
 interact, but I have to admit that I cannot predict the fallout from doing
 something like this.

 Perhaps to understand things better, let's say someone wants to setup a
 project which improves linear algebra in Sage (I am at a summer school where
 Clément is about to give a talk :)) and wants to call this thing SageLin or
 SageMathLin. I guess if UW and William are happy with that nothing would
 happen. However, what if either party (UW or William) disagrees with that
 project for whatever reason? They could force SageLin to drop its name?

 Secondly, it shouldn't be a problem but to verify: having a trademark on the
 name does not present a problem for being included in Debian et al., right?

 On Thursday 31 May 2012, William Stein wrote:
 Hello,

 As Sage grows, we may have to face more and more crap like [1] and
 possibly attacks from others, which might force us to completely
 change the name of our project to have nothing to do with sage,
 which would wreak havoc on google searches, etc.   To stop this before
 it is too late, I talked with a patent/trademark attorney at
 University of Washington yesterday.  To my pleasant surprise, they are
 willing to do all the work and pay the costs associated with
 trademarking Sage in some context of what we are doing (whatever turns
 out to make sense from a legal perspective).  They are also willing to
 sell the trademark to me later, if I should so desire.  Having the
 trademark owned by UW instead of me personally is I think much more
 useful, since UW is a huge enterprise with the resources to actually
 defend the trademark.

 The current common law owners of the trademark are the community of
 Sage developers.  Thus I'm writing to ask if anybody who has
 significantly contributed to Sage has any major objections to me
 working with my university to officially trademark the name.    Due to
 UW's patent/trademark attorney leaving UW soon for another job, this
 has to happen ASAP if it is going to happen, so please respond by **
 Monday, June 4 **.  (Emailing me offlist at wst...@uw.edu is fine
 too.)

 [1] http://www.sagetrac.org/

 Cheers,
 Martin

 --
 name: Martin Albrecht
 _pgp: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x8EF0DC99
 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
 _www: http://martinralbrecht.wordpress.com/
 _jab: martinralbre...@jabber.ccc.de

 --
 To post to this group, send an email to sage-devel@googlegroups.com
 To unsubscribe from this group, send an email to 
 sage-devel+unsubscr...@googlegroups.com
 For more options, visit this group at 
 http://groups.google.com/group/sage-devel
 URL: http://www.sagemath.org

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this 

Re: [sage-devel] Sage (tm)

2012-06-01 Thread Tom Boothby
Found a nice feature of Python's approach.

License for this Policy

Interested parties may adapt this policy document freely under the
Creative Commons CC0 license:

On Thu, May 31, 2012 at 11:50 PM, Tom Boothby tomas.boot...@gmail.com wrote:
 Thanks, Martin, I hadn't thought about that -- Debian/IceWeasel is an
 excellent example of things that can go wrong.  Trademarks are useless
 if impinged and not challenged.  If people start making SageThis and
 SageThat, we may lose control.

 Per the norm, when sticky legal questions arise, I think we should
 look to the projects we respect the most.  Python has an excellent
 page[1] up about exactly this issue, as the word 'Python' and their
 logo are trademarks.  In particular, they do not have a registered
 trademark.  But they can still litigate on their trademark.  Debian
 has an official use logo[2], and a lengthy discussion[3] rather than
 a cogent policy (maybe somebody can find something more official from
 them?).  Linux appears to have an entire institute[4] devoted to
 this.  Honestly, I haven't read this yet.

 The other big issue in my mind is the Sage software company that,
 among other things, makes financial software.  If we register our
 trademark and impinge theirs with a finance module, will we lose the
 entire trademark, or just the rights to distribute financial software
 named Sage?

 Moreover, I'm very concerned about the notion that we should hurry up
 and get this done now.  That's often a sign of a bum deal, in my
 experience.

 My initial reaction was slightly elevated thumb and has been
 downgraded to dubious frown.  If there is money in the Sage
 Foundation coffers, I think it would be prudent to consult a lawyer
 that is not employed by the university.  Otherwise, William, I'd
 suggest you pay out of pocket, since our only possible escape from a
 tyrannical change in university policy would result in the trademark
 being in your name -- it's in your financial best interest to make
 sure that's a sound deal.

 On that note -- I trust you 100% more than I trust UW.  Perhaps if we
 go through with this, you should just pay the fee the moment the
 deal's done?

 [1] http://www.python.org/psf/trademarks/
 [2] http://www.debian.org/logos/
 [3] http://wiki.debian.org/ProposedTrademarkPolicy
 [4] http://www.linuxfoundation.org/programs/legal/trademark

 On Thu, May 31, 2012 at 11:05 PM, Martin Albrecht
 martinralbre...@googlemail.com wrote:
 Hi,

 I am usually quite hesitant to add more layers of law (or lawyers) to how we
 interact, but I have to admit that I cannot predict the fallout from doing
 something like this.

 Perhaps to understand things better, let's say someone wants to setup a
 project which improves linear algebra in Sage (I am at a summer school where
 Clément is about to give a talk :)) and wants to call this thing SageLin or
 SageMathLin. I guess if UW and William are happy with that nothing would
 happen. However, what if either party (UW or William) disagrees with that
 project for whatever reason? They could force SageLin to drop its name?

 Secondly, it shouldn't be a problem but to verify: having a trademark on the
 name does not present a problem for being included in Debian et al., right?

 On Thursday 31 May 2012, William Stein wrote:
 Hello,

 As Sage grows, we may have to face more and more crap like [1] and
 possibly attacks from others, which might force us to completely
 change the name of our project to have nothing to do with sage,
 which would wreak havoc on google searches, etc.   To stop this before
 it is too late, I talked with a patent/trademark attorney at
 University of Washington yesterday.  To my pleasant surprise, they are
 willing to do all the work and pay the costs associated with
 trademarking Sage in some context of what we are doing (whatever turns
 out to make sense from a legal perspective).  They are also willing to
 sell the trademark to me later, if I should so desire.  Having the
 trademark owned by UW instead of me personally is I think much more
 useful, since UW is a huge enterprise with the resources to actually
 defend the trademark.

 The current common law owners of the trademark are the community of
 Sage developers.  Thus I'm writing to ask if anybody who has
 significantly contributed to Sage has any major objections to me
 working with my university to officially trademark the name.    Due to
 UW's patent/trademark attorney leaving UW soon for another job, this
 has to happen ASAP if it is going to happen, so please respond by **
 Monday, June 4 **.  (Emailing me offlist at wst...@uw.edu is fine
 too.)

 [1] http://www.sagetrac.org/

 Cheers,
 Martin

 --
 name: Martin Albrecht
 _pgp: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x8EF0DC99
 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
 _www: http://martinralbrecht.wordpress.com/
 _jab: martinralbre...@jabber.ccc.de

 --
 To post to this group, send an email to sage-devel@googlegroups.com
 To unsubscribe from

Re: [sage-devel] Re: Sage (tm)

2012-05-31 Thread Tom Boothby
I think this makes a lot of sense from a legal perspective (IANAL).
My only concern is: how legally binding is asking this question on
sage-devel with a 5-day turnaround?

On Thu, May 31, 2012 at 4:08 PM, William Stein wst...@gmail.com wrote:
 On Thu, May 31, 2012 at 12:20 PM, Jason Grout
 jason-s...@creativetrax.com wrote:
 On 5/31/12 2:15 PM, Keshav Kini wrote:

 Harald Schillyharald.schi...@gmail.com  writes:

 On Thursday, May 31, 2012 8:07:46 PM UTC+2, kcrisman wrote:

     ...move to some
     other umbrella control (perhaps FSF, or maybe not, or maybe something
     separate like the http://oeisf.org/).



 What about http://sfconservancy.org/ ?

 This is separate from this trademark question here, but thinking about a
 better
 umrella in the long term might be a good thing. Also, what about the
 trademark in the EU, etc.


 Don't we already have a Sage Foundation? There is `a wiki page`_, but it
 seems to be a proposal rather than information about a currently
 existing organization. I'm sure I've heard people referring to the Sage
 Foundation as something that exists, though.

 ... _a wiki page: http://wiki.sagemath.org/Foundation


 The Sage Foundation is also through UW (IIRC), so I guess that is one more
 reason to let UW control the Sage trademark...

 Yep, the Sage Foundation is an account at Univ of Washington.  It
 contains a not insignificant amount of money, and receives regular
 tax-deductible donations from a range of sources, e.g., people who
 visit this web site [1].

 This message was brought to you buy the Sage Foundation.  Now back to
 our regularly scheduled programming...

 [1] 
 https://online.gifts.washington.edu/secure/makeagift/checkout_addAmountRecurring.aspx?page=makeCode=MATSAG


 Jason




 --
 To post to this group, send an email to sage-devel@googlegroups.com
 To unsubscribe from this group, send an email to
 sage-devel+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/sage-devel
 URL: http://www.sagemath.org



 --
 William Stein
 Professor of Mathematics
 University of Washington
 http://wstein.org

 --
 To post to this group, send an email to sage-devel@googlegroups.com
 To unsubscribe from this group, send an email to 
 sage-devel+unsubscr...@googlegroups.com
 For more options, visit this group at 
 http://groups.google.com/group/sage-devel
 URL: http://www.sagemath.org

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: SAT and MAXSAT in Sage

2012-05-01 Thread Tom Boothby
At one point, Victor Miller, William Stein and I looked at interfacing
directly to minisat, but IMO, we stopped due to a lack of a nice
interface.  I've tried to rewrite my SAT approach every time I solve a
new problem with SAT solvers -- forcing me to rethink it every time.

In general, I've gotten happier with the interface every time, and I'm
fairly satisfied with this.  In particular, it feels very similar to
the interface for DLXCPP, the ExactCover solver in Sage.  It supports
any hashable variables, and most SAT solvers.  I don't know anything
about MAXSAT.

If anybody wants to use this, I'm happy to place it in the public domain.

SATPROG = '/home/boothby/minisat'
class SAT:
def __init__(self,clauses):
self.vars = {}
self.clauses = []
for c in clauses:
self(*c)
def __getitem__(self,k):
if k in self.vars:
return self.vars[k]
else:
r = self.vars[k] = len(self.vars)+1
return r
def __call__(self,pos = (),neg = ()):
clause = [` self[v]` for v in pos]
clause+= [`-self[v]` for v in neg]
self.clauses.append(clause)
def __str__(self):
s = 'p cnf %s %s\n'%(len(self.vars), len(self.clauses))
s+= ' 0\n'.join(map(' '.join, self.clauses+['']))
return s

def solve(self):
fn = tmp_filename()
open(fn+.sat,'w').write(str(self))
os.system(%s -verb=0 %s.sat %s.sol /dev/null%(SATPROG,fn,fn))
sol = open(fn+.sol)
res = sol.readline()[:-1]
if res == SAT:
xtovar = dict((v,k) for k,v in self.vars.iteritems())
keys = map(int,sol.readline().split(' ')[:-1])
return [xtovar[i] for i in keys if i  0], [xtovar[-i] for
i in keys if i  0]
else:
return None

def all_sols(self):
sol = self.solve()
while sol is not None:
pos,neg = sol
yield pos,neg
self(pos=neg,neg=pos)
sol = self.solve()

Example:

sage: a,b,c,d = var('a,b,c,d')
sage: clauses = [
...[ [a,b],[c] ], # a or b or not c
...[ [a,c],[b] ], # a or c or not b
...[ [c,d],[]   ], # c or d
...
sage: ]
sage: for sol in SAT(clauses):
...   pos,neg = sol
...   print pos
[a, d]
[d]
[a, c]
[a, c, d]
[a, b, d]
[b, c]
[b, c, d]
[a, b, c]
[a, b, c, d]

On Tue, May 1, 2012 at 2:40 AM, Dima Pasechnik dimp...@gmail.com wrote:
 On 2012-05-01, Martin Albrecht martinralbre...@googlemail.com wrote:
 Hi,

 On Tuesday 01 May 2012, Dima Pasechnik wrote:
 Has there been any discussion and/or consensus on how to encode boolean
 formulae in Sage?

 So far the only interfaces to SAT Solvers were fire  forget interfaces for
 Boolean polynomials. There also the logic module but I never used it.

 The latter (which I was not even aware about, thanks for pointing it
 out!) is very basic. In constructs truth tables and decides
 satisfiability by searching them, which makes it pretty useless for
 real problems.
 On the other hand it can parse quite complicated expressions, so it
 seems to be a reasonable starting point for extension.
 Or maybe not...

 Dima


 I, incidentally, need to solve some MAXSAT problems from Sage-generated
 data, and am musing about writing a proper interface to akmaxsat, see
 http://www.uni-ulm.de/fileadmin/website_uni_ulm/iui.inst.190/Mitarbeiter/ku
 egel/akmaxsat_1.1.tgz which has a Sage-compatible licence, by the way...

 Dima

 Cheers,
 Martin

 --
 name: Martin Albrecht
 _pgp: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x8EF0DC99
 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
 _www: http://martinralbrecht.wordpress.com/
 _jab: martinralbre...@jabber.ccc.de


 --
 To post to this group, send an email to sage-devel@googlegroups.com
 To unsubscribe from this group, send an email to 
 sage-devel+unsubscr...@googlegroups.com
 For more options, visit this group at 
 http://groups.google.com/group/sage-devel
 URL: http://www.sagemath.org

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-combinat-devel] Drawings for Permutations -- how would you plot them ?

2012-04-24 Thread Tom Boothby
I typically draw them top-to-bottom.  I've seen them called string
diagrams by people in pattern avoidance.

On Tue, Apr 24, 2012 at 8:24 AM, Nathann Cohen nathann.co...@gmail.com wrote:
 Helloo everybody !!!

 Because of a former post on this google group [1] I created the following
 patch [2]. It adds to Permutation objects a .show() method that produces
 this kind of drawings [3].

 Hence, that would be the default way to plot Permutations in Sage. The
 thing is that it is the natural drawing for what I am current working on
 (Permutation graphs [4]), and David says he uses them and calls them
 Swapping diagrams -- which is non-standard according to him.

 Well. Do you think there should be other ways to draw permutations in Sage ?
 Do you have anything against that patch, which somehow makes these drawings
 the default ones ?
 If you like other type of drawings, I think it would be nice to have many
 arguments to the .show() method that would yield different kind of drawings,
 but the .show() method is definitely what I would look for if I were to try
 to plot a drawing, so I think that these drawings should be reachable
 through the .show() method, even if they are not the default ones.

 Well, I'm all ears now ! Give me your thoughts, mysterious sage-combinat
 crowd O_O

 Nathann

 [1] https://groups.google.com/d/topic/sage-combinat-devel/vdfE7iaJTxs/discussion
 [2] http://trac.sagemath.org/sage_trac/ticket/12872
 [3] http://trac.sagemath.org/sage_trac/attachment/ticket/12872/tmp_1.png
 [4] http://en.wikipedia.org/wiki/Permutation_graph

 --
 You received this message because you are subscribed to the Google Groups
 sage-combinat-devel group.
 To post to this group, send email to sage-combinat-devel@googlegroups.com.
 To unsubscribe from this group, send email to
 sage-combinat-devel+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/sage-combinat-devel?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-devel] April Fool's Day

2012-04-02 Thread Tom Boothby
Oh man, that's a shame.  I really thought we were gonna get a real
productivity boost out of spooning.  And, of course, knifing.

On Mon, Apr 2, 2012 at 6:38 AM, Jason Grout jason-s...@creativetrax.com wrote:
 Just so we are clear, some (but not all) of the posts yesterday were jokes
 posted as part of the April Fool's Day tradition [1].  If you have a
 question about a specific post, please ask.

 (sorry to be the guy who explains jokes, but the other year, when William
 jokingly announced the port of Sage to lisp, we saw many people take it
 seriously who may not have an April Fool's Day tradition in their
 culture...)

 Thanks,

 Jason

 [1] http://en.wikipedia.org/wiki/April_Fools'_Day

 --
 To post to this group, send an email to sage-devel@googlegroups.com
 To unsubscribe from this group, send an email to
 sage-devel+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/sage-devel
 URL: http://www.sagemath.org

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-combinat-devel] Catalan

2012-03-26 Thread Tom Boothby
Christian, this is far from standard.  It's fairly discombobulated
scratch work.  The objects aren't even classes.

If you look for the cell that starts out:

CatCat = CatalanCatalog()
CatCat.add_type('c','binary tree',...

and execute that, then things should work better for you.  The
relevant cells are marked #auto, but apparently there's a bug in that,
too.



On Mon, Mar 26, 2012 at 1:45 AM, Christian Stump
christian.st...@gmail.com wrote:
 http://flask.sagenb.org/home/pub/101/

 Thanks, I can see it now. I was also able to call

 sage: CatCat
 __main__.CatalanCatalog instance at 0x10d01be60

 on 4.7.2, but the bijections seem to be missing,

 sage: CatCat.map('r','o')
 ValueError: Can't map objects of type r into objects of type o

 and also the graph CatCat._graph didn't have any edges. However, on
 4.5.beta6, CatCat wasn't even present anymore.

 It would be great if I could get your code running to enhance it with
 further objects, and build a similar catalog for Coxeter-Catalan
 objects.

 btw: I wasn't aware of this way to collects objects and bijections; is
 this considered the standard way to catalog objects?

 Thanks, Christian

 --
 You received this message because you are subscribed to the Google Groups 
 sage-combinat-devel group.
 To post to this group, send email to sage-combinat-devel@googlegroups.com.
 To unsubscribe from this group, send email to 
 sage-combinat-devel+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/sage-combinat-devel?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-combinat-devel] Catalan

2012-03-26 Thread Tom Boothby
Yes, this was suggested to me after I'd abandoned the catalog I
posted.  I'm fairly sure that most, if not all of my bijections follow
directly from the recursive structure of Catalan objects.

On Mon, Mar 26, 2012 at 10:25 AM, matthew Drescher knav...@gmail.com wrote:
 i would be interested. I had it in mind to focus on the recursive structure
 of the Catalan objects( objects that can be counted via catalan numbers).

  C_{n+1} = \sum_{i=0}^{n}C_{n-i}C_{i}

 when defining a new catalan object we would just need to specify the
 recursive structure. This way we might not have to deal with specific
 bijectionsbut that was just my initial idea...i dont know :)



 On Mon, Mar 26, 2012 at 9:54 AM, Christian Stump christian.st...@gmail.com
 wrote:

  Christian, this is far from standard.  It's fairly discombobulated
  scratch work.  The objects aren't even classes.

 my last reply was too fast, sorry. Now as I look at the actual code, I
 see what you are doing... Nonetheless, I find it a nice idea to gather
 Catalan objects and their bijections, as people are apparently looking
 for that!

 What about implementing the objects as classes in the folder
 combinat/catalan (maybe with some identifications by canonical
 bijections, like i = h =  = r = hhh), and then making them
 available as

 CatalanObjects.YourCatalanObject

 like in

 Posets.BooleanLattice

 (to not pollute the global name space too much), and also provide
 bijections, maybe in

 CatalanObjects.Bijections.YourFavoriteBijection

 (these are, of course, not unique, so we must give them names to
 distinguish, like reverse and upside-down to get from
 \sigma-avoiding permutations to reverse(\sigma)-avoiding permutations
 for \sigma \in S_3.)

 Better or other ideas, suggestions?

 @vivace: are you interested in working/collaborating on that? was this
 somehow what you thought of?

 cheers, Christian

 --
 You received this message because you are subscribed to the Google Groups
 sage-combinat-devel group.
 To post to this group, send email to sage-combinat-devel@googlegroups.com.
 To unsubscribe from this group, send email to
 sage-combinat-devel+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/sage-combinat-devel?hl=en.


 --
 You received this message because you are subscribed to the Google Groups
 sage-combinat-devel group.
 To post to this group, send email to sage-combinat-devel@googlegroups.com.
 To unsubscribe from this group, send email to
 sage-combinat-devel+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/sage-combinat-devel?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-devel] Wolfram on Reddit

2012-03-13 Thread Tom Boothby
On Tue, Mar 13, 2012 at 6:29 AM, David Kirkby david.kir...@onetel.net wrote:
 On 12 March 2012 01:57, Tom Boothby tomas.boot...@gmail.com wrote:
 On Sun, Mar 11, 2012 at 12:01 PM, Dr. David Kirkby

 I take exception to what he said:

 It'll probably be related to my goal in the next year or two of making
 Mathematica definitively the world's easiest to learn language...

 The man's got a respectable goal.  What's to take exception to?

 I believe it is a totally unrealistic goal.

 The
 goal may be unobtainable within our current view of what Mathematica
 is, but if you read the rest of the reddit discussion, he really seems
 to be pushing hard on the alpha paradigm, and natural language
 interaction.

 He has Wolfram|Alpha, and that takes natural language, but it has some
 serious problems. I'm sure he can improve it, but personally I'm
 convinced Mathematica will be the easyist language to learn. If you
 mean will it be the easist to get a result, then perhaps it might be.

 As I noted before, there's a big difference between learning a
 language properly, and being able to cobble something
 together that does what you want it to do.

 Two years ago, few would believe that a computer could win Jeopardy,
 much less against the best players in recent history.

 I'm not sure whta Jeopardy is in this context.

 I know nobody thought computers would beat humans at chess, but they
 beat the top grandmasters on a regular basis.

 But in some ways chess is much easier, as a computer knows the rules,
 and it bascially boils down to processing power. There is no ambiguity
 in the input. But human speak is not so precise.

Um.  Way to fail the Turing test.  Here, why don't I google that for you?

http://lmgtfy.com/?q=jeopardy


 Anyway, we shall see in a couple of years time if Wolfram was right,
 but past experience tells me he exagerates. His book NKS was such an
 example. He is undoubty a bright guy, but has an ego the size of the
 moon.


 dave

 --
 To post to this group, send an email to sage-devel@googlegroups.com
 To unsubscribe from this group, send an email to 
 sage-devel+unsubscr...@googlegroups.com
 For more options, visit this group at 
 http://groups.google.com/group/sage-devel
 URL: http://www.sagemath.org

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Wolfram on Reddit

2012-03-13 Thread Tom Boothby
On Tue, Mar 13, 2012 at 8:30 AM, David Kirkby david.kir...@onetel.net wrote:
 On 13 March 2012 13:42, Tom Boothby tomas.boot...@gmail.com wrote:
 On Tue, Mar 13, 2012 at 6:29 AM, David Kirkby david.kir...@onetel.net 
 wrote:

 Two years ago, few would believe that a computer could win Jeopardy,
 much less against the best players in recent history.

 I'm not sure what Jeopardy is in this context.
...
 in the input. But human speak is not so precise.

 Um.  Way to fail the Turing test.  Here, why don't I google that for you?

 http://lmgtfy.com/?q=jeopardy


 Em, I suggest you consider there are many meanings of that word

 http://en.wikipedia.org/wiki/Jeopardy_%28disambiguation%29


And which of those might one win?

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Wolfram on Reddit

2012-03-11 Thread Tom Boothby
On Sun, Mar 11, 2012 at 12:01 PM, Dr. David Kirkby
david.kir...@onetel.net wrote:
 On 03/11/12 05:00 PM, Volker Braun wrote:

 On Saturday, March 10, 2012 3:59:24 PM UTC-5, Dr. David Kirkby wrote:


 HARD
 C++, Mathematica

 The Mathematica language is just difficult because its ugly and uses weird
 operators (hello /. operator). But in terms of difficulty its a far cry
 from C++ which is really three totally different Turing-complete languages
 (preprocessor, C++, templates) in one with funky interactions between
 them.
 Its definitely easier to become proficient with Mathematica than C++. Of
 course C++ will teach you much more about programming than Mathematica.


 I'm personally not going to get drawn into arguments about what languages
 are harder and for what reasons. Perhaps I should not have even answered
 William's question, or posted that list.

 But I still maintain that Stephen Wolfram will never definitively make
 Mathematica the world's easiest to learn language.

 I take exception to what he said:

 It'll probably be related to my goal in the next year or two of making
 Mathematica definitively the world's easiest to learn language...

The man's got a respectable goal.  What's to take exception to?  The
goal may be unobtainable within our current view of what Mathematica
is, but if you read the rest of the reddit discussion, he really seems
to be pushing hard on the alpha paradigm, and natural language
interaction.

Two years ago, few would believe that a computer could win Jeopardy,
much less against the best players in recent history.  From what I
hear, Siri is fairly awesome.  Natural language interaction is coming.
 If Wolfram's goal is to make Mathematica operate via a natural
language interface, it could be viewed as the easiest language to
learn.  Will its performance compete with hand-written C?  Not for a
while.  Will its usability?  Time will tell.

The end goal, from a usability standpoint, is likely a do what I
mean spoken language interface.  Compute the Davenport constant for
all abelian groups of order less than 20.  In another part of the
discussion, Wolfram mentions an interest in automatic algorithm
discovery.  Imagine a system which understands English and math well
enough to solve such problems with automatically-discovered
algorithms.

I doubt an army of 1 million Wolframs could implement such a thing in
2 years.  But, these are awesome goals.  Don't hate the man for
dreaming.



 dave


 --
 To post to this group, send an email to sage-devel@googlegroups.com
 To unsubscribe from this group, send an email to
 sage-devel+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/sage-devel
 URL: http://www.sagemath.org

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: Literal matrix syntax

2012-01-26 Thread Tom Boothby
On Thu, Jan 26, 2012 at 10:13 AM, Robert Bradshaw
rober...@math.washington.edu wrote:
 To get a quick sense of what people think about this, I've decided to
 rephrase this as a survey.  To be clear, though this coincides with
 Matlab syntax, the intent is not to try to make Sage a Matlab clone,
 rather it is to add a missing feature to Sage.

 Should [a, b; c, d] be a valid syntax for matrix construction in Sage?

[x] Yes, I love this syntax! It would be make life better for me

 Should the default basering be more linear-algebra friendly? E.g. R -
 Frac(R), RR - RDF.

[x] Yes, that would take away a lot of pain/be what I'd have to
specify manually anyway.

It would be nice to be able to specify a type.  Perhaps

R.[1,2,3;2,3,4] - Matrix(R,[[1,2,3],[2,3,4]])

or perhaps even

R[1,2,3;2,3,4]




 On Thu, Jan 26, 2012 at 6:12 AM, Jason Grout
 jason-s...@creativetrax.com wrote:
 On 1/26/12 7:54 AM, Marco Streng wrote:

 2012/1/26 Jason Groutjason-s...@creativetrax.com:

 That's part of the problem pointed out in an earlier message---our RR
 matrices really are pretty bad for numerical things, but RDF matrices are
 the way to go (the RDF matrices use standard numerical algorithms for the
 most part, whereas RR matrices use naive algorithms that can be really
 bad
 and slow).  This should be fixed, but for right now, RR matrices don't
 seem
 to be all that useful compared to RDF matrices.


 Is RDF always better than 53-bit RR in this way? If so, perhaps
 RealNumber or the preparser could be changed to use RDF if the
 precision is sufficiently small. Most users typing 12.345 will want
 the fastest implementation and not something generic.


 No, this is a linear algebra problem, not a general problem in Sage. Usually
 RR is better mathematically than RDF.

 Thanks,

 Jason




 --
 To post to this group, send an email to sage-devel@googlegroups.com
 To unsubscribe from this group, send an email to
 sage-devel+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/sage-devel
 URL: http://www.sagemath.org

 --
 To post to this group, send an email to sage-devel@googlegroups.com
 To unsubscribe from this group, send an email to 
 sage-devel+unsubscr...@googlegroups.com
 For more options, visit this group at 
 http://groups.google.com/group/sage-devel
 URL: http://www.sagemath.org

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: Literal matrix syntax

2012-01-26 Thread Tom Boothby
On Thu, Jan 26, 2012 at 12:09 PM, Jason Grout
jason-s...@creativetrax.com wrote:

 Another option would be:

 [QQ: 1,2,3; 4,5,6]

QQ:1 is a slice...

 or, as Robert suggests:

 [1,2,3; 4,5,6, base_ring=QQ] -- but then it looks like base_ring=QQ is
 another element.

assignments aren't literals... but I don't like this.

My thought for R[1,2,3;4,5,6] is that just as we preparse

'[1..2]' to 'ellipsis_range(Integer(1),Ellipsis,Integer(2))', we'd preparse

'[1,2,3;4,5,6]' to 'matrix_literal((1,2,3),(4,5,6))'

where

Ring.__getitem__(self, x)

could have a fast option for matrix literals - matrices.

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: Literal matrix syntax

2012-01-26 Thread Tom Boothby
On Thu, Jan 26, 2012 at 2:36 PM, Robert Bradshaw
rober...@math.washington.edu wrote:
 On Thu, Jan 26, 2012 at 1:51 PM, Michael Orlitzky mich...@orlitzky.com 
 wrote:
 On 01/26/12 16:36, William Stein wrote:

 Why *not* use it?

 The standard argument against preparser stuff like this is that you
 have to be careful to not use it when writing .py code for the Sage
 core library.     But at least this matrix notation will always result
 in a SyntaxError if used in Python code.

 A better reason is that, once implemented, someone has to maintain it
 forever.

 This is a fairly invasive preparse, and will likely cause more than a
 few bugs (see implicit multiplication for examples).

 I'd say it's a fairly simple preparse. The only tricky part is
 multi-line handling in the face of iPython (where each line needs to
 be pre-parsed individually, and that IMHO should be handled better at
 a higher level where we buffer lines until we have a complete
 statement and then preparse them as a whole). In any case, I'm willing
 to maintain it for the next 5 years (which I expect will be trivial).

 It also risks suggesting that sage matrices behave like Matlab ones, which 
 could cause confusion.

 Or suggest they behave like Pari matrices which use the same syntax,
 but I don't think that's any more of an issue than say integers or
 division in Matlab vs Sage.

 Furthermore, some preparses are mutually exclusive: if you implement
 this one now, and Mathematica comes out with a killer feature a year
 from now using similar syntax ([do; my; homework; for; me;]), you can't
 preparse that.

 If we found such a feature useful, we probably wouldn't try to embed
 it into our syntax.

 Some preparses are worth it, obviously; I wouldn't throw them both out
 because they might conflict with one another. But the bar for inclusion
 should be pretty high.

 I totally agree with you here, the bar for adding to the preparser
 should be high. I think it's a good candidate here because (1) It's
 easy to understand what it means (2) it's illegal Python syntax, and
 (3) Python doesn't even have the notion of matrices, so it's doubly
 clear (perhaps once you get the SyntaxError) that it's a Sage-only
 feature.



 On Thu, Jan 26, 2012 at 12:30 PM, Tom Boothby tomas.boot...@gmail.com wrote:
 On Thu, Jan 26, 2012 at 12:09 PM, Jason Grout
 jason-s...@creativetrax.com wrote:

 Another option would be:

 [QQ: 1,2,3; 4,5,6]

 QQ:1 is a slice...

 or, as Robert suggests:

 [1,2,3; 4,5,6, base_ring=QQ] -- but then it looks like base_ring=QQ is
 another element.

 assignments aren't literals... but I don't like this.

 My thought for R[1,2,3;4,5,6] is that just as we preparse

 '[1..2]' to 'ellipsis_range(Integer(1),Ellipsis,Integer(2))', we'd preparse

 '[1,2,3;4,5,6]' to 'matrix_literal((1,2,3),(4,5,6))'

 where

 Ring.__getitem__(self, x)

 could have a fast option for matrix literals - matrices.

 Interesting idea, but then we'd have to detect whether the brackets
 were creating a list vs. acting as an index operator and prepares
 differently in the two situations lest we have R[...;...] -
 R[matrix_literal(...)] forcing [...;...] - [matrix_literal(...)], a
 list of one item.

Yeah, I had my doubts about that, too.  Perhaps

R[[...;...]]

would be better, but I'm not really happy with this either.

 One also has [a, b; c, d].change_ring(R). The exact notation for
 specifying the basering can be deferred, though it does highlight the
 importance of choosing a default according to the principle of least
 surprise.

I'd like whatever notation we arrive at to be efficient.  If we preparse

RDF[1,2,3;4,5,6] - Matrix(RDF,[[Integer(1),Integer(2),...]])

or use

[...;...].change_ring(R)

then we're gonna waste a lot of time, creating useless Integers and /
or computing a common parent.

What of a new keyword,

[1,2...;...] over R - Matrix(R,[[R(1),R(2)...],[...]])

or perhaps something like

[R$1,2,3;4,5,6]

or

[1,2,3;4,5,6]@R

I'm not particularly attached to any idea.


 - Robert

 --
 To post to this group, send an email to sage-devel@googlegroups.com
 To unsubscribe from this group, send an email to 
 sage-devel+unsubscr...@googlegroups.com
 For more options, visit this group at 
 http://groups.google.com/group/sage-devel
 URL: http://www.sagemath.org

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: Literal matrix syntax

2012-01-26 Thread Tom Boothby
On Thu, Jan 26, 2012 at 3:21 PM, Robert Bradshaw
rober...@math.washington.edu wrote:
 On Thu, Jan 26, 2012 at 3:08 PM, Tom Boothby tomas.boot...@gmail.com wrote:
 On Thu, Jan 26, 2012 at 2:36 PM, Robert Bradshaw
 rober...@math.washington.edu wrote:
 On Thu, Jan 26, 2012 at 1:51 PM, Michael Orlitzky mich...@orlitzky.com 
 wrote:
 On 01/26/12 16:36, William Stein wrote:

 Why *not* use it?

 The standard argument against preparser stuff like this is that you
 have to be careful to not use it when writing .py code for the Sage
 core library.     But at least this matrix notation will always result
 in a SyntaxError if used in Python code.

 A better reason is that, once implemented, someone has to maintain it
 forever.

 This is a fairly invasive preparse, and will likely cause more than a
 few bugs (see implicit multiplication for examples).

 I'd say it's a fairly simple preparse. The only tricky part is
 multi-line handling in the face of iPython (where each line needs to
 be pre-parsed individually, and that IMHO should be handled better at
 a higher level where we buffer lines until we have a complete
 statement and then preparse them as a whole). In any case, I'm willing
 to maintain it for the next 5 years (which I expect will be trivial).

 It also risks suggesting that sage matrices behave like Matlab ones, which 
 could cause confusion.

 Or suggest they behave like Pari matrices which use the same syntax,
 but I don't think that's any more of an issue than say integers or
 division in Matlab vs Sage.

 Furthermore, some preparses are mutually exclusive: if you implement
 this one now, and Mathematica comes out with a killer feature a year
 from now using similar syntax ([do; my; homework; for; me;]), you can't
 preparse that.

 If we found such a feature useful, we probably wouldn't try to embed
 it into our syntax.

 Some preparses are worth it, obviously; I wouldn't throw them both out
 because they might conflict with one another. But the bar for inclusion
 should be pretty high.

 I totally agree with you here, the bar for adding to the preparser
 should be high. I think it's a good candidate here because (1) It's
 easy to understand what it means (2) it's illegal Python syntax, and
 (3) Python doesn't even have the notion of matrices, so it's doubly
 clear (perhaps once you get the SyntaxError) that it's a Sage-only
 feature.



 On Thu, Jan 26, 2012 at 12:30 PM, Tom Boothby tomas.boot...@gmail.com 
 wrote:
 On Thu, Jan 26, 2012 at 12:09 PM, Jason Grout
 jason-s...@creativetrax.com wrote:

 Another option would be:

 [QQ: 1,2,3; 4,5,6]

 QQ:1 is a slice...

 or, as Robert suggests:

 [1,2,3; 4,5,6, base_ring=QQ] -- but then it looks like base_ring=QQ is
 another element.

 assignments aren't literals... but I don't like this.

 My thought for R[1,2,3;4,5,6] is that just as we preparse

 '[1..2]' to 'ellipsis_range(Integer(1),Ellipsis,Integer(2))', we'd preparse

 '[1,2,3;4,5,6]' to 'matrix_literal((1,2,3),(4,5,6))'

 where

 Ring.__getitem__(self, x)

 could have a fast option for matrix literals - matrices.

 Interesting idea, but then we'd have to detect whether the brackets
 were creating a list vs. acting as an index operator and prepares
 differently in the two situations lest we have R[...;...] -
 R[matrix_literal(...)] forcing [...;...] - [matrix_literal(...)], a
 list of one item.

 Yeah, I had my doubts about that, too.  Perhaps

 R[[...;...]]

 would be better, but I'm not really happy with this either.

 One also has [a, b; c, d].change_ring(R). The exact notation for
 specifying the basering can be deferred, though it does highlight the
 importance of choosing a default according to the principle of least
 surprise.

 I'd like whatever notation we arrive at to be efficient.  If we preparse

 RDF[1,2,3;4,5,6] - Matrix(RDF,[[Integer(1),Integer(2),...]])

 or use

 [...;...].change_ring(R)

 then we're gonna waste a lot of time, creating useless Integers and /
 or computing a common parent.

 I'm not extremely concerned about efficiency. These are literal
 matrices after all, so presumably someone's typing them in by hand.

Fair enough.

 (If they're programmatically generated, construct the matrix directly
 or vai a better constructor if you're worried about efficiency.
 Conversion of ZZ to QQ is much faster than the parsing or even str -
 ZZ in the first place). But if the basering can be worked into the
 original constructor, that's a plus. It'd be nice to be able to pass
 arbitrary keywords into the constructor for the same reason.

 What of a new keyword,

 [1,2...;...] over R - Matrix(R,[[R(1),R(2)...],[...]])

 or perhaps something like

 [R$1,2,3;4,5,6]

 or

 [1,2,3;4,5,6]@R

 I'm not particularly attached to any idea.

 It's much simpler (technically and conceptually) to pick out the ring
 if it lies entirely in the brackets. I'd go for a colon over # or @.

Another issue: do we allow [1..10; 10..20]?  I can't seem to construct
matrices with matrix entries

Re: [sage-devel] Re: Literal matrix syntax

2012-01-26 Thread Tom Boothby
On Thu, Jan 26, 2012 at 5:15 PM, David Roe r...@math.harvard.edu wrote:
 Another issue: do we allow [1..10; 10..20]?

 We probably shouldn't go to extra effort to support it.

 I can't seem to construct
 matrices with matrix entries (this is not absurd) -- but should the
 preparser grok it? [[1..10; 10..20] ; [2..12; 14..24]]

 Yes, for sure. And [[1..10; 10..20].det() ; [2..12; 14..24].det()]

 I'm not quite clear how these are square matrices (or even how the
 rows have the same length).  What does [1..10; 10..20] translate to?

They aren't square... and worse, [1..10; 10..20] doesn't make sense
since the top row has 9 entries whereas the bottom has 10.  We're
being sloppy for the sake of conversation.  I tend to think that we
should support ellipses, though I admit it's a corner case of limited
utility.

[0..2; 10..12] - [[0,1,2],[10,11,12]]

 David

 --
 To post to this group, send an email to sage-devel@googlegroups.com
 To unsubscribe from this group, send an email to 
 sage-devel+unsubscr...@googlegroups.com
 For more options, visit this group at 
 http://groups.google.com/group/sage-devel
 URL: http://www.sagemath.org

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] graph isomorphism checking with labeled (or colored) vertices

2012-01-06 Thread Tom Boothby
Jason,

I've been working with nonisomorphic colorings recently.  I use the following:

def canonical_coloring_label(G,c):

Given a coloring dictionary,

   {color1 : [u1, u2, ...], color2 : [v1, v2, ... ], ... }

return a string which uniquely identifies the isomorphism
class of the coloring.


H = G.copy()
for i in c:
H.add_edges([(i,j) for j in c[i]])
P = [G.vertices(), c.keys()]
return H.canonical_label(partition=P).graph6_string()

I agree, it'd be nice to not have to do this.  I've been talking with
Robert Miller to use the new canonical augmentation code to generate
nonisomorphic colorings.

With colorings, embeddings, and matchings, I wonder: should we create
classes to represent these objects instead of passing around naked
data structures?  Then, it would make a lot of sense to have things
like coloring1.is_isomorphic(coloring2).


On Fri, Jan 6, 2012 at 7:42 AM, Nathann Cohen nathann.co...@gmail.com wrote:
 And if you accept to sligthly change the graph, you can add a universal
 vertex v to it. If u is of color red, color edge uv with red, and the same
 for all vertices. Do this in both graph and all will be fine :-)

 Nathann

 --
 To post to this group, send an email to sage-devel@googlegroups.com
 To unsubscribe from this group, send an email to
 sage-devel+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/sage-devel
 URL: http://www.sagemath.org

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Executive decision needed

2012-01-03 Thread Tom Boothby
By this logic, no bugs should be fixed, because they aren't covered in
the warranty... this isn't a healthy attitude.

On Tue, Jan 3, 2012 at 2:39 PM, Michael Orlitzky mich...@orlitzky.com wrote:
 This is an old ticket to catch misspellings of 'sage:' in doctests:

  http://trac.sagemath.org/sage_trac/ticket/6439

 Am I being insensitive, or should it be marked invalid? I don't think
 developer typos are covered by the warranty.

 --
 To post to this group, send an email to sage-devel@googlegroups.com
 To unsubscribe from this group, send an email to
 sage-devel+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/sage-devel
 URL: http://www.sagemath.org

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: Proposal for faster linear algebra over GF(q), q255 odd and non-prime

2011-12-01 Thread Tom Boothby
On Wed, Nov 30, 2011 at 6:52 AM, Simon King simon.k...@uni-jena.de wrote:
 Hi Dima,

 On 30 Nov., 15:29, Dima Pasechnik dimp...@gmail.com wrote:
 I might get blamed for making discouraging remarks, but let me play the
 devil's advocate:

 I wonder if these kinds of speed-ups are to be beaten, soon, by
 sufficiently fast hardware implementations of level 2 and 3 BLAS, coupled
 with some crude use of their super-fast vector arithmetic.

 No discouragement taken. For my actual project (which is not about
 linear algebra but about Ext algebras of finite dimensional path
 algebra quotients) it doesn't matter at all what back end is used.
 Currently (for me) it is M4RI, M4RIE, Linbox and MeatAxe. But I am
 happy with everything, provided it is fast in multiplication and
 computation of kernels.

 By the way, would, what you describe, provide an asymptotically fast
 algorithm à la Strassen? Probably not.


Yeah, Sage has one implemented in Cython.  Use MeatAXE for the base
case of a reasonable size based on the dimension / prime.

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-combinat-devel] Sage coding sprint in Orsay

2011-11-25 Thread Tom Boothby
I'm seriously interested in cythonizing generators.  If there's
funding, I'd be delighted to come and hack for a week.

On Thu, Nov 24, 2011 at 8:08 AM, Vincent Delecroix
20100.delecr...@gmail.com wrote:
 2011/11/24 Florent Hivert florent.hiv...@lri.fr:

  I'm thinking about organizing a small one-week coding sprint around
 January-February in the south-west of Paris. Following the *-combinat
 tradition I plan to reserve the Guest house at Cernay-la-Ville:

   [...]

  - Refactoring of the combinatorics infrastructure (factories, Cythonizing
   partitions, compositions...)

 Cool ! And I would like to add for combinatorics infrastructure :

 - implementations of Gray codes (for much faster generation)
 - iterator for conjugacy class of the symmetric group (the call to Gap
 takes hours)

 And I would like to emphasize that there are Cythonization problems
 with iterators...

  - Categories (Morphisms, functorial constructions, optimization, coercion ?)

  - who is interested ?

 I am.

  - what is the preferred week ?

 Any time in January or the first week of February.

  - any thematic suggestion,

 Depending on the audience (Thierry Monteil ? Samuel Lelièvre ? Timo
 Jolivet ?), I would like to start the migration of
  - flat surfaces (quadratic differentials, topolgoy stuff, origamis, ...)
  - language and symbolic dynamics
  - tilings
 Some of it is ready and documented and only needs review.

 Nicolas Borie will you be there ? If you do, I would like to hear
 about the code in Sage (and more generally about algorithms) for
 generating things up to isomorphism (like graphs, Integer vectors and
 co.).

 Cheers,
 Vincent

 --
 You received this message because you are subscribed to the Google Groups 
 sage-combinat-devel group.
 To post to this group, send email to sage-combinat-devel@googlegroups.com.
 To unsubscribe from this group, send email to 
 sage-combinat-devel+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/sage-combinat-devel?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-devel] Re: Fwd: C compiler in Mathematica

2011-11-25 Thread Tom Boothby
On Thu, Nov 24, 2011 at 9:25 PM, rjf fate...@gmail.com wrote:

 William seems to prefer to tout the Sage-Cython link.

That's because we use Cython, and it's easy to use in Sage, and
provides a fully-functional language-native interface between Cython
and Sage.  Not a single part of that is true about the Maxima
compiler.

It'd be dishonest to go on at length about how awesome and fast and
useful this Maxima feature is, if we didn't use it and didn't have its
functionality well-exposed in Sage.  We're not all Maxima experts
(whoda thinkit?), so why don't you show us how to do it, or better
yet, improve the Sage-Maxima interface so that we can use it?

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] 90% doctest coverage thrust

2011-11-14 Thread Tom Boothby
I'll doctest polynomial_compiled this week, since it's 100% my fault.

On Sun, Nov 13, 2011 at 12:41 PM, William Stein wst...@gmail.com wrote:
 Hi Sage Developers,
 After deleting the server directory we need to add doctests to
 about588 more functions to get coverage to 90%, which is a major goal
 forsage-5.0, which we've been working on getting to for over a year
 now.I did an audit and came up with about 350 functions in 18 files
 forwhich adding coverage will not be too hard.  Some are
 disturbing,e.g., where a *huge* patch was *recently* added to Sage
 with over 100untested functions, due to sloppy refereeing and release
 management.
 Can you help me in getting these files tested?  I've posted a copy of
 thisat http://trac.sagemath.org/sage_trac/ticket/12024/.
 Just edit the ticket description and add your name after the * thatyou
 will get coverage to 100% on that file.  You an also create aticket
 with your tests (put #number) in.  Then it will be easy toreferee all
 these doctest patches.  Try to make different ticketsif/when you find
 bugs, and restrict your ticket to just doctests so itis easy to
 referee.    You can also add another file to the list.
 Once we get this done, another iteration should get us over 90%.
 I'lldo this by myself over the next decade if I have to, but I would
 muchprefer to get help.
 Probably Easy:
 * algebras/free_algebra_quotient_element.py: 0% (0 of 12)
 * databases/stein_watkins.py: 0% (0 of 15) -- easy, since there are
 tons of examples at the top already
 * gsl/interpolation.pyx: 0% (0 of 9) -- easy, examples at top and easy math
 * interfaces/psage.py: 0% (0 of 13) -- easy, since lots of examples at top
 * matrix/benchmark.py: 0% (0 of 29) -- easy; just run each function
 and paste into an EXAMPLES:: section.   This would also provide some
 useful additional testing.  Maybe use non-default arguments so not too
 slow.
 * misc/log.py: 0% (0 of 42) -- just make object and call methods; easy
 * monoids/monoid.py: 0% (0 of 3) -- easy
 * algebras/free_algebra_quotient.py: 6% (1 of 16) -- there is a big
 example in there -- just use it to construct similar examples
 everywhere else int he file.

 Probably Medium:
 * libs/mpmath/ext_main.pyx: 7% (8 of 111) -- How the *hell* did this
 get into Sage with a coverage score of 7%?!!??  This was added several
 years after we started a 100% doctest policy.  This appeared in
 http://trac.sagemath.org/sage_trac/ticket/8159 where the positive
 review is from Harald Schilly: That was easy, all tests pass ...
 green light from me! I'm setting this to needs_review, and start with
 a positiv review from me.    Yes, it's easy for all tests to pass
 when there are only 7% tests.  Oops.   It will be a lot of work to
 properly doctest this file, but much of it is straightforward (e.g.,
 examples for the mpnumber) class.
 * rings/polynomial/polynomial_compiled.pyx: 0% (0 of 20) -- just a
 bunch of little classes for working with optimized polynomials,
 which is actually used somewhere, evidently.  Not a single example.
 Either doctest it completely, by following how it is used by
 polynomial_element.pyx, or delete it because maybe fast_callable is
 better?  But watch out for large degree, since fast_callable segfaults
 if the degree is large, so this polynomial_compiled.pyx might have
 some real value.
 * media/wav.py: 0% (0 of 25) -- mostly just a bunch of functions to
 get basic info about a wave file; what makes this harder is you have
 to get a .wav file and put it somewhere in Sage to be used for
 testing.  You can probably generate an empty wave file by using the
 kwds constructor of the class, save it to a temp file, and use it, but
 that is boring.
 * matrix/matrix_window.pyx: 0% (0 of 26) -- look at some code
 elsewhere that uses this, and just go through examples; probably not
 so hard* matrix/matrix_window_modn_dense.pyx: 0% (0 of 11)

 Probably Harder:
 * categories/action.pyx: 0% (0 of 31)

 Delete from SAGE?!:
 * databases/bz2Pickle.py  -- looks stupid and not used anywhere!
 * databases/db.py: 0% (0 of 21) -- also maybe not used anywhere; I
 think we shoudl remove ZODB anyways.
 * databases/gamma0wt2.py: 0% (0 of 7) -- delete


 --
 William Stein
 Professor of Mathematics
 University of Washington
 http://wstein.org

 --
 To post to this group, send an email to sage-devel@googlegroups.com
 To unsubscribe from this group, send an email to 
 sage-devel+unsubscr...@googlegroups.com
 For more options, visit this group at 
 http://groups.google.com/group/sage-devel
 URL: http://www.sagemath.org


-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] flask.sagenb.org

2011-11-10 Thread Tom Boothby
Is it possible to move/merge the OpenID accounts over to sagenb.org?

 On Wed, Nov 9, 2011 at 8:03 AM, Jason Grout jason-s...@creativetrax.com 
 wrote:
 Is anyone using flask.sagenb.org?  It is now an obsolete experiment, since
 the new flask notebook is running on sagenb.org and the cutting-edge flask
 notebook is running on test.sagenb.org.

 Does anyone have any objections to deleting flask.sagenb.org (after a time
 period, of course).  Or should we just update flask.sagenb.org to the most
 recent flask server and leave it at that, and have yet one more server in
 addition to demo, demo2, alpha, etc.

 The reason why I ask is that the disk where the sage servers are running on
 is running low on disk space, and consolidating the flask server to be like
 the others would save several GB.

 Thanks,

 Jason

 --
 To post to this group, send an email to sage-devel@googlegroups.com
 To unsubscribe from this group, send an email to
 sage-devel+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/sage-devel
 URL: http://www.sagemath.org



-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] flask.sagenb.org

2011-11-09 Thread Tom Boothby
I'm using it.  I'll save relevant worksheets elsewhere.

On Wed, Nov 9, 2011 at 8:03 AM, Jason Grout jason-s...@creativetrax.com wrote:
 Is anyone using flask.sagenb.org?  It is now an obsolete experiment, since
 the new flask notebook is running on sagenb.org and the cutting-edge flask
 notebook is running on test.sagenb.org.

 Does anyone have any objections to deleting flask.sagenb.org (after a time
 period, of course).  Or should we just update flask.sagenb.org to the most
 recent flask server and leave it at that, and have yet one more server in
 addition to demo, demo2, alpha, etc.

 The reason why I ask is that the disk where the sage servers are running on
 is running low on disk space, and consolidating the flask server to be like
 the others would save several GB.

 Thanks,

 Jason

 --
 To post to this group, send an email to sage-devel@googlegroups.com
 To unsubscribe from this group, send an email to
 sage-devel+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/sage-devel
 URL: http://www.sagemath.org


-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: Using several algorithms in parallel

2011-11-04 Thread Tom Boothby
On Thu, Nov 3, 2011 at 9:28 PM, leif not.rea...@online.de wrote:
 On 4 Nov., 02:15, Tom Boothby tomas.boot...@gmail.com wrote:
 This is fairly easy to do with @parallel:

 def fast(x):
     return x

 def slow(x):
     sleep(x)
     return x

 def slower(x):
     sleep(x*x)
     return x

 algorithms = [slower, slow, fast]

 @parallel(len(algorithms))
 def fastest(i,x):
     global algorithms
     return algorithms[i](x)

 def compute(x):
     return fastest([(i,x) for i in range(len(algorithms))]).next()[1]

 I doubt that already kills the slow() and slower() processes...


 -leif

Did you run the example?

sage: compute(5)
Killing any remaining workers...
5

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: Using several algorithms in parallel

2011-11-04 Thread Tom Boothby
The @parallel instance kills its still-running children once it drops
out of scope.  This happens immediately after the return statement is
executed.  Since I merely call .next() on the generator, the first one
to finish gets picked out in milliseconds, and the remainders are axed
almost immediately.

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Using several algorithms in parallel

2011-11-03 Thread Tom Boothby
This is fairly easy to do with @parallel:


def fast(x):
return x

def slow(x):
sleep(x)
return x

def slower(x):
sleep(x*x)
return x

algorithms = [slower, slow, fast]

@parallel(len(algorithms))
def fastest(i,x):
global algorithms
return algorithms[i](x)

def compute(x):
return fastest([(i,x) for i in range(len(algorithms))]).next()[1]



On Thu, Nov 3, 2011 at 11:37 AM, mmarco mma...@unizar.es wrote:
 There are some computations for which there are several algorithms
 available. Think, for example, of GTZ and SY algorithms for primary
 decomposition. There is no useful criterion to determine which one
 will be faster for a given case in advance. With modern computers
 having multiple cores, i think it could be a good idea to run both of
 them in parallel, until one of them finishes, and then stop the other.

 I still haven't thought how, but it seems reasonable that this aproach
 would be doable in Sage. So, do you think we should follow this
 aproach in sage? Namely, include an option algorithm='faster' (or
 something like that) for functions that admit several algorithms.

 --
 To post to this group, send an email to sage-devel@googlegroups.com
 To unsubscribe from this group, send an email to 
 sage-devel+unsubscr...@googlegroups.com
 For more options, visit this group at 
 http://groups.google.com/group/sage-devel
 URL: http://www.sagemath.org


-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-combinat-devel] Re: Ribbon graphs

2011-10-03 Thread Tom Boothby
Bruce,

Please keep posting here; or at the very least, copy me on the
conversation.  I'm curious how your ribbon graphs differ from
orientable maps.  I implemented Graph.genus(), which enumerates
rotation systems which represent a given graph embedded on an
orientable surface.

To me, a rotation system is a fixed-point free involution (e) and
another permutation (v).  If #p is the number of orbits of a
permutation, the Euler characteristic of the rotation system is
#v-#e+#(ev).

The definition of a ribbon graph that I've seen is a topological
structure where vertices of a graph are taken to be discs, and edges
are taken to be 'ribbons' glued to the boundary of the discs, possibly
with twists and knotting.  See http://arxiv.org/abs/math-ph/9811024
for some example pictures.

On Mon, Oct 3, 2011 at 5:24 AM, Bruce brucewestb...@gmail.com wrote:


 On Oct 3, 11:16 am, Vincent Delecroix 20100.delecr...@gmail.com
 wrote:
 As far as I understand, your index.html should be built from the
 source. But I read the source and I find it not well documented from
 the point of vue of programmer. I'm really interested in your code as
 I implement similar stuff and it would be time saving to merge our
 classes. Moreover, I could help to submit your code to Sage.
 At the moment I don't know what you have done or what you are trying
 to do.

 1) You wrote : A Ribbon graph is a finite set with an involution and
 a bijection. You did not precise that the involution is without fixed
 point ? Is that volunteer ? In the book I mentionned, the author even
 authorize any permutations. This is useful from the point of vue of
 Grothendieck's dessin d'enfants as a Ribbon graph also encode a
 ramified covering of the sphere over three points.

 Yes, the involution has no fixed points and it would have been helpful
 if I had said this. The book you mentioned has been taken out of
 the library. I have recalled it but for now I have to wait.

 2) The advantage I get from the representation with three permutations
 (s,a,f) (s for vertices, a for edges and f for faces) is that it is
 immediate to get the inverse. Moreover, it emphasize a duality (s,a,f)
 - (f^-1, a^-1, s^-1) which corresponds to the standard duality of
 embedded graphs. But perhaps, it is out of your interest (but your
 function anti (which is NOT documented) seems to do that operation).

 I am not familiar with your notation. In the notation I adopted you
 move
 around an vertex clockwise. The function anti just moves
 anticlockwise.
 The dual graph is constructed by replacing the clockwise map c by
 either
 ce (or ec) where e is the involution.

 3) As I mentionned, I only deal with subsets of {0,1,...,n-1} where
 you seem to be interested in more general subsets. The way
 permutations are actually implemented with Sage suggest that the base
 class deal with subsets of {0,1, ..., n-1} and a derived class could
 use a permutation with domain (which is just a mapping from {0,1, ...,
 n-1} to a subset of size n). But on the other hand, there are very
 standard operations which consists to remove edges and it is very
 natural in that context tu use partial permutation.
 I don't follow you.

 4) Your main class halfedge contains two mysterious arguments IsI
 and decorations. What are they ?
 The IsI is for technical reasons. The decorations is to allow edges to
 be drawn differently.

 5) If you intend to put your code inside Sage, I find the way
 classes/functions are implemented is not clear. Why join is a function
 and not a method (as union for Python set) ? Moreover, in Sage, there
 is a convention that any class should be denoted in Wiki syntax as
 MyFavoriteClass and functions should use lower case with underscore as
 my_favorite_function (There are counterexample inside Sage). In your
 case, you should be much more precise in the choosen names : Embedding
 should become for example RibbonGraphEmbedding or similar.
 I think it is clear. I accept I may not have followed conventions.
 I have no problem with editing names.

 I have many more comments, but I would like to have more
 specifications in each of the methods (and not more example). I want
 to understand what is implemented (and how) and not what the code can
 do.
 Maybe we should discuss this further off-line. Please feel free to e-
 mail me.

 Cheers,
 Vincent

 --
 You received this message because you are subscribed to the Google Groups 
 sage-combinat-devel group.
 To post to this group, send email to sage-combinat-devel@googlegroups.com.
 To unsubscribe from this group, send email to 
 sage-combinat-devel+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/sage-combinat-devel?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 

Re: [sage-devel] Re: can't name a script new.sage?

2011-09-21 Thread Tom Boothby
I capitulate on the hidden file idea, in favor of putting 'em in
~/.sage/ though one might note that we're exchanging one hidden file
for another ;)

On Tue, Sep 20, 2011 at 6:47 PM, John H Palmieri jhpalmier...@gmail.com wrote:
 On Tuesday, September 20, 2011 5:46:03 PM UTC-7, Tom wrote:

 +1 to .file.py, since it'll hide the file from directory listings.

 I'm not sure I want to hide the file.  I don't actually use xxx.sage files
 much, but when I do, I usually just delete the py file right away, and if
 it's hidden, that's harder to do.  I think of hidden files as ones that I
 don't want to see but I want to keep for a while, not temporary files like
 these preparsed ones.  Do people like to keep the preparsed ones around for
 a while?

 Another option: should we by default delete the preparsed file automatically
 after using it?  That is, if you do sage file.sage, then
 file_preparsed.py (or something like that) would be created, then fed into
 sage-python, and then deleted at the end.  If you wanted to keep the file,
 you could run sage -preparse file.sage on its own.

 Or I suppose we could store the preparsed files in ~/.sage/preparsed/, with
 filenames modified to reflect the full path of the original file (so you can
 have different files script.sage in several different directories, and the
 preparser will create different .py files for each one).



 On Tue, Sep 20, 2011 at 1:23 PM, Felix Salfelder fe...@salfelder.org
 wrote:
  On Tue, Sep 20, 2011 at 12:55:32PM -0700, John H Palmieri wrote:
  Should sage-preparse name the preparsed file something safer, in
  order to
  prevent name clashes like this?  For example, turn FILE.sage into
  FILE_preparsed.py?
 
  Hi.
 
  while You are at it:
  preparsed_FILE.py or even simply .FILE.py would make tab completion
  happy. (who has not accidentally edited FILE.py instead of FILE.sage
  more than once?)

 I can see your point, but there is also virtue in having the preparsed file
 listed alphabetically next to the original file.

 --
 John

 --
 To post to this group, send an email to sage-devel@googlegroups.com
 To unsubscribe from this group, send an email to
 sage-devel+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/sage-devel
 URL: http://www.sagemath.org


-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: can't name a script new.sage?

2011-09-20 Thread Tom Boothby
+1 to .file.py, since it'll hide the file from directory listings.

On Tue, Sep 20, 2011 at 1:23 PM, Felix Salfelder fe...@salfelder.org wrote:
 On Tue, Sep 20, 2011 at 12:55:32PM -0700, John H Palmieri wrote:
 Should sage-preparse name the preparsed file something safer, in order to
 prevent name clashes like this?  For example, turn FILE.sage into
 FILE_preparsed.py?

 Hi.

 while You are at it:
 preparsed_FILE.py or even simply .FILE.py would make tab completion
 happy. (who has not accidentally edited FILE.py instead of FILE.sage
 more than once?)

 regards
 felix

 --
 To post to this group, send an email to sage-devel@googlegroups.com
 To unsubscribe from this group, send an email to 
 sage-devel+unsubscr...@googlegroups.com
 For more options, visit this group at 
 http://groups.google.com/group/sage-devel
 URL: http://www.sagemath.org


-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: GiNaC and Python disagree on arithmetic

2011-09-13 Thread Tom Boothby
I uniformized the behavior of 0^0 a long time ago (though I make no
claim about what has happened between then and now -- just that it was
uniform for a few precious minutes).  The decision back then (which I
still stand behind) is that while it is mathematically unjustifiable,
it's Python's convention so we should stick with it.

On Mon, Sep 12, 2011 at 10:28 AM, kcrisman kcris...@gmail.com wrote:


 On Sep 12, 12:45 pm, Keshav Kini keshav.k...@gmail.com wrote:
 Hey Burcin,

 I guess that means you think that pynac should return 1 for 0^0, then? As
 opposed to making Sage throw a ValueError or something at
 Integer(0)^Integer(0) ?


 I think that Sage has had 0^0 return 1 for quite some time now?  On
 the other hand, Wolfram Alpha doesn't like it, and Maxima raises an
 error.  I assume the BDFL has some input on this issue.

 - kcrisman

 --
 To post to this group, send an email to sage-devel@googlegroups.com
 To unsubscribe from this group, send an email to 
 sage-devel+unsubscr...@googlegroups.com
 For more options, visit this group at 
 http://groups.google.com/group/sage-devel
 URL: http://www.sagemath.org


-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: GiNaC and Python disagree on arithmetic

2011-09-13 Thread Tom Boothby
On Mon, Sep 12, 2011 at 10:18 PM, Dima Pasechnik dimp...@gmail.com wrote:
 I guess this all boils down to the point made by William - that _pow_ needs
 to be integrated into the coersion framework (currently it is not).

+1.  Also, I should point out that I didn't make the decision myself
back then; I was sitting next to William at the time and we had quite
the lengthy discussion about it with some others in IRC.

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-combinat-devel] unrooted planar trees

2011-09-11 Thread Tom Boothby
A plane tree is a tree with an embedding into the plane.

A planar tree is a tree which can be embedded in the plane.  Every
tree is planar, so this term is offensive and redundant.

Please don't put planar tree anywhere in Sage.

On Sun, Sep 11, 2011 at 5:37 AM, Vincent Delecroix
20100.delecr...@gmail.com wrote:
 Salut Florent, dear trees developer,

 Florent, I see your nice patches about trees which I will use in a
 next future. More precisely, I would like to iterate through unrooted
 planar trees (planar = cyclic ordering at each node).

  * do your patches stable enough that I can open a new one just after them ?
  * does anybody have references for the problem I'm interested in ?

 Cheers,
 Vincent

 --
 You received this message because you are subscribed to the Google Groups 
 sage-combinat-devel group.
 To post to this group, send email to sage-combinat-devel@googlegroups.com.
 To unsubscribe from this group, send email to 
 sage-combinat-devel+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/sage-combinat-devel?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-devel] Very global variable

2011-07-15 Thread Tom Boothby
Do you want all users to be able to change the variable?  You could
easily make variable support local, but not superglobal writes by
putting its definition in all.py

On Fri, Jul 15, 2011 at 11:45 AM, VictorMiller victorsmil...@gmail.com wrote:
 I'd like to have a python very global variable -- i.e. one which
 will be unique, not only across all worksheets in a notebook, but
 across ALL notebook sessions on a server, even those with different
 log in ids.  How can I do this?

 --
 To post to this group, send an email to sage-devel@googlegroups.com
 To unsubscribe from this group, send an email to 
 sage-devel+unsubscr...@googlegroups.com
 For more options, visit this group at 
 http://groups.google.com/group/sage-devel
 URL: http://www.sagemath.org


-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Preparser idiosyncrasy

2011-06-24 Thread Tom Boothby
This is exceptionally strange:

sage: def x(a,1):
sage: return a+1
sage: print x(1,5)
6

In my opinion, that's a bug, as is

sage: def y(a,b=1):
sage:return a+b
sage: 1=5
sage: y(1)
6

Thoughts?

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: Preparser idiosyncrasy

2011-06-24 Thread Tom Boothby
Thanks, Nils.  I've found another great example:

class 0:
def 0(0):
return 0



On Fri, Jun 24, 2011 at 7:53 PM, Nils Bruin nbr...@sfu.ca wrote:
 This is now http://trac.sagemath.org/sage_trac/ticket/11542
 There are some ideas there on how to fix this.

 --
 To post to this group, send an email to sage-devel@googlegroups.com
 To unsubscribe from this group, send an email to 
 sage-devel+unsubscr...@googlegroups.com
 For more options, visit this group at 
 http://groups.google.com/group/sage-devel
 URL: http://www.sagemath.org


-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: Backward incompatible change for BinaryTree

2011-06-13 Thread Tom Boothby
Feel free to unimport BinaryTree from everywhere, and only import it
in compiled_polynomial.

On Mon, Jun 13, 2011 at 7:43 AM, Florent Hivert
florent.hiv...@univ-rouen.fr wrote:
      Hi Simon,

  On Mon, Jun 13, 2011 at 01:03:07PM +0200, Florent hivert wrote:
      So I'd like to have a vote for either one of those four options:
 
   1. unimport BinaryTree from sage.misc.sage_ds and import them from 
   combinat
 
   2. leave think as such. Find a different name for the mathematical binary
      trees (eg: BinaryTreesCombinatorial).
 
   3. rename BinaryTree from sage.misc.sage_ds (eg: 
   BinaryTreesDataStructure)
      and import BinaryTree from combinat
 
  My vote: 1 or 3. Like most of the sage-combinat people I guess :-)

 I need more information: How do the binary trees from
 sage.misc.sage_ds and from combinat compare, performance-wise?

 Short answer: of course they don't ! See below.

 In particular, will there be a performance regression for the compiled
 polynomials?

 It seem that I haven't been clear. There will be *NO* performance regression
 for polynomials since they will *KEEP* using the binary trees from
 sage.misc.sage_ds. I'm *NOT* asking to remove them from sage but from
 sage.all. The only question is to decide what kinds of binary tree will be
 accessible for the user under the name of BinaryTree (from sage.all).

 If there is a regression then the combinat binary trees should learn
 from sage.misc.sage_ds. A backward-incompatible change is out of
 question if it is combined with a regression, IMHO.

 The question of performance regression is somehow meaning less since both kind
 of binary trees don't have the same feature:

 - sage.misc.sage_ds.BinaryTree is a mutable algorithmic data structure which
  is mutable, not hashable, and don't have any parent. Of course this
  data-structure is needed if you are writing an algorithm with in-place
  modification (eg: AVL set/hash table implementation).

 - sage.combinat.binary_tree.BinaryTree is a mathematical object which as such
  is immutable, hashable and doesn't support in place modification (though
  they use the Prototype/Clone design pattern). They are not suitable for
  algorithmic usage with performance in mind since you will need a lot of
  copy, but this is a design choice.

 If there is no regression and if compiled polynomials really is the
 only application of sage.misc.sage_ds, then I wouldn't complain about
 a change.

 I hope I've made myself clear.

 Cheers,

 Florent

 --
 To post to this group, send an email to sage-devel@googlegroups.com
 To unsubscribe from this group, send an email to 
 sage-devel+unsubscr...@googlegroups.com
 For more options, visit this group at 
 http://groups.google.com/group/sage-devel
 URL: http://www.sagemath.org


-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Review delegation

2011-05-25 Thread Tom Boothby
In the past, I've sent out a few dozen emails to people to urge
developers to do more reviews.  They usually look something like,

Hi ___,

Please take a minute and look at the following tickets:

   SAGE Notebook leaves dead processes on OS X
   http://trac.sagemath.org/sage_trac/ticket/1

   Notebook locking
   http://trac.sagemath.org/sage_trac/ticket/2

Could you please review them?  There's no obligation, but if you
choose not to review any/all of these, please notify me so I can
re-delegate the review to another.

Thanks,
   -- Tom

These worked really well, and since the number of tickets needing
review has been getting out of control, I figured I should send some
more out.  But... it's a really repetitive task, and I've done it at
least twice before.  So,  I've written a script to generate review
requests.  It's not going to be as well thought out as my previous
delegations, but this is a good first step to an automated system.

The missing part is a way to go between usernames and full names, and
make a list of email addresses.  Then, we could set this up on a cron
job to blast out review requests every month.

I think the results of it are pretty good (modulo some silly name
issues).  It works by collecting authors/reviewers that contribute to
various components, and then distributing open tickets in each
component across those contributors (trying to avoid author/review
conflict).

I've attached the script review_delegation.py and the results of
running the script.

Comments?  In the past, people had very positive reactions to these
emails, and they got a lot of good work done.  Would it somehow become
more offensive if they were automated?

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org
Attempting to load remote file: 
http://trac.sagemath.org/sage_trac/query?status=needs_reviewformat=tabcol=idcol=componentcol=authorcol=reporterorder=priority
Loading: [..]
Attempting to load remote file: 
http://trac.sagemath.org/sage_trac/query?status=closedstatus=positive_reviewformat=tabcol=idcol=componentcol=reviewercol=authorcol=changetimedesc=1order=changetime
Loading: [..]
no candidate found for 8241
no candidate found for 9308
no candidate found for 10570
Marc Fuentes ['10802']
Nathann Cohen ['8', '11367', '10180', '10848']
Chris Wuthrich ['10850']
Nils Bruin ['8992']
Sébastien Labbé ['10817']
Tim Dokchitser and group (Sage Days 22) ['9402']
Florent Hivert ['9378', '10347']
pang ['10566']
Andrey Novoseltsev ['10540']
Jonathan Gutow ['7469']
Stefan Reiterer ['8783', '9494']
John Cremona ['10240']
John Palmieri ['7797', '8290', '10190', '10226', '10667', '11009', '11026', 
'11244', '1013']
Christian Stump ['8386', '10621', '11099', '10795']
Teresa Gomez-Diaz ['9280']
Robert Miller ['9128', '9621', '10153', '10497']
mario pernici ['9826']
Willem Jan Palenstijn ['9465', '10555']
William Stein ['10319', '5352', '10926', '5187', '11307']
Tom Boothby ['10192']
David Loeffler ['4578']
Nishanth Amuluru ['9729']
Tom Coates ['10679']
Minh Van Nguyen ['8821']
Robert Bradshaw ['9446', '10255', '11130', '11319', '9751', '11374', '11378']
David Monarres ['11251']
Adam Sorkin ['9320']
Craig Citro ['10572']
Alex Raichev ['10227']
Johan Bosman ['11034', '5313', '10771']
Ethan Van Andel ['11329']
Marshall Hampton ['7766']
Alex Ghitza ['5048']
Alexei Sheplyakov ['11273']
Gonzalo Tornaria ['11306']
Luis Felipe Tabera Alonso ['10736']
Francis Clarke ['10767', '1145', '7695']
cswiercz ['9586']
Nick Alexander ['9180']
Andrzej Giniewicz ['10524']
Paul MERCAT ['8168']
Moritz Minzlaff ['11166']
Michael Brickenstein ['8972']
Jean-Pierre Flori ['11354']
Ralf Hemmecke ['9382']
Karl-Dieter Crisman ['10993', '11313', '11036', '11364', '11371']
Paul Zimmermann ['10839', '11267']
Mariah Lenox ['9310', '6391', '8741', '9894', '10719', '9411', '10620', '11142']
Adam Webb ['10607']
Pablo Angulo ['10057']
Jason Bandlow ['10519']
Kwankyu Lee ['10154']
Luiz Aquino ['7630']
Marco Streng ['8327']
Burcin Erocal ['9138', '11068', '11321', '11335']
Eviatar Bach ['10333']
Dan Drake ['9238', '11259']
L. Pierron ['11165']
wuthrich ['10658']
Simon King ['5489', '8538', '8885', '9016', '9220', '9559', '9887', '10052', 
'11043', '11363', '8896']
Simon Spicer ['6371', '11356']
Martin Raum ['10453', '11199', '11104']
Alexander Dreyer ['11246']
Niles Johnson ['10271']
Volker Braun ['6284', '9536', '9562', '9631', '10296', '11200', '6670', '8908', 
'10716', '9759']
Paulo Cesar Pereira de Andrade ['329']
David Kirkby ['10827', '11377', '10587']
Dima Pasechnik ['2420']
Lauri Ruotsalainen ['9728']
Ivan Andrus ['4489', '6801', '8217', '10521']
Joris Vankerschaver ['9240']
Jeroen Demeyer ['6494', '10112', '11325', '10843', '10940', '10970']
Jaap Spies ['4411', '7782']
Douglas S. McNeil

Re: [sage-devel] Re: Review delegation

2011-05-25 Thread Tom Boothby
On Wed, May 25, 2011 at 3:49 PM, John H Palmieri jhpalmier...@gmail.com wrote:
 My first objection is that it assigns too many tickets to me for review  :)

:) As Francois pointed out, it assigns you tickets because you're one
of a few rockstar developers who indiscriminately fix / review
tickets no matter what component they belong to.  When doing this by
hand, I assigned them disproportionately many tickets and they tended
to knock most of them out in no time without complaint.

 A more serious issue: does it pay any attention to levels of recent
 activity?  Some people on the list may not have posted anything to trac in
 several months, so asking them to referee tickets may not work: they may not
 be active in Sage development right now.

Yes.  The design will ideally

1) Always delegate to the reporter if reporter != author (not
implemented due to naming issues)
2) Delegate to another author in the same component also awaiting review
3) Failing 1 and 2, look for reviewers / authors from the most recent
(by modification date) 500 tickets in the component with status
(positive_review | needs_work | closed).

in order to spread out reviews more fairly, 23 get kinda blurred together.

 As far as my first comment goes, if you're willing to have it almost
 automated, you could create the original list this way, and then
 automatically flag people who have been tagged for a lot of tickets (I'm not
 sure what a lot means).  Then you might manually reassign some of those
 tickets.

I'll probably do that.  I note that William hardly got any tickets,
and I usually put him in the rockstar category and dump a quite a
few on him.

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Review delegation

2011-05-25 Thread Tom Boothby
On Wed, May 25, 2011 at 4:25 PM, Robert Bradshaw
rober...@math.washington.edu wrote:
 I don't think it would be more offensive, but I think it would be less
 effective. (I certainly ignore machine-generated nag emails better
 than personal ones.

I've sent out these emails two or three times total in the last 4
years, and they've been highly effective.  If we go to sending them
out bimonthly and they're only half as effective, the net result
should be more reviews than are currently happening.

 Another idea, it would be good to work review karma into this. It's
 certainly something I've considered adding to the patchbot (review
 tickets, it'll bump yours up the test priority queue).

I'm not sure how to do that at this point of the development process.
The aim of this is to assign each ticket to one reviewer. Developers
with good karma are punished by giving them a disproportionate
review load already.  Do you have a specific suggestion along these
lines?

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Review delegation

2011-05-25 Thread Tom Boothby
On Wed, May 25, 2011 at 5:03 PM, William Stein wst...@gmail.com wrote:

 This is similar to nagbot, which I wrote for the same purpose in a few
 hours at a Sage days in Leiden:

   http://sage.math.washington.edu/home/wstein/nagbot/

 People found it annoying.  But it's better than nothing.

 We need something like ask.sagemath.org, but for ticket reviewing!

Oh very nice.  I think that's annoying for a few reasons:

1) it'll send out gobs of emails -- the reason my nagging has been
effective is because I created requests for people, not for the ticket
(imagine poor John P.; he'd get 9 emails!)
2) it seems too arbitrary

However... you've implemented everything that I haven't gotten around
to yet.  Perhaps I'll use your framework to implement my regimen, and
I think the result should be pretty close to ideal.  If we don't run
it regularly but instead use it when tickets needing review pile up,
maybe that'll be the best.

Also, I noticed that I'm the only person to ever unsubscribe from it
(irony).  You've set the permissions in that directory so that the
email database is inaccessible, yet the unsubscribe list is world
readable (more irony). :D

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Patch rejected after merge

2011-05-12 Thread Tom Boothby
I've been reviewing #10804, which was merged in sage-4.7.1.alpha0.  I
though this was a done deal... but apparently not.  In the meantime,
#10549 got a positive review.  It conflicted with #10804.  Jeroen,
acting RM (for which I'm immensely grateful), backed out #10804 and
marked both patches needs_work.

Now, I've gotta re-review #10804.  I've already put in lots of time
into this review so as long as tests pass, I'm gonna give a +1.  The
work's done, problem solved.  No hard feelings (note: posting to
sage-devel, not sage-flame).  Fortunately, Robert was the author of
both patches, but if that wasn't the case, I imagine both authors
scrambling to rebase / re-review.

Bottom line: I think this was handled wrong.  If a ticket's been
merged, unless it's found to have a genuine flaw, it should supersede
(IMO) tickets with positive reviews which have not been merged.

Thoughts?

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: Coefficients of univariate polynomials

2011-05-11 Thread Tom Boothby
On Tue, May 10, 2011 at 10:37 PM, Mike Hansen mhan...@gmail.com wrote:
 On Tue, May 10, 2011 at 6:52 PM, Rob Beezer goo...@beezer.cotse.net wrote:
 OK, thanks for the explanation, Tom.  p.exponents() was the missing
 piece I did not have.

 It would probably make sense to have p.monomials() method to be
 consistent with the multivariate case:

 sage: R.t,s = QQ[]
 sage: p = t^4 + 8
 sage: p.coefficients()
 [1, 8]
 sage: p.monomials()
 [t^4, 1]
 sage: sum(c*m for c,m in zip(p.coefficients(), p.monomials()))
 t^4 + 8

+1

 p.coeffs() might be better off renamed to something like
 all_coefficients or dense_coefficients or 

I use p.coeffs() pretty often.  Perhaps p.coefficients should take an
additional argument: p.coeffs could be an alias to
p.coefficients(dense=True), and get deprecated.

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Coefficients of univariate polynomials

2011-05-10 Thread Tom Boothby
Yeah, I thought this was a bug too at one point.  I discussed it with
Craig Citro, and we were all ready to open a ticket when William
overheard us and pointed out that it was made to be consistent with
symbolics.

The convention makes the following nice:

for c,e in zip(p.coefficients(), p.exponents()):
   ...



On Tue, May 10, 2011 at 5:30 PM, Rob Beezer goo...@beezer.cotse.net wrote:
 There is a non-zero probability this has been hashed out before, but I
 couldn't find it.  And it was brought to me by an experienced Sage
 user, and the documentation is not much help either.

 sage: t = polygen(QQ, 't')
 sage: p = t^4 + 8
 sage: p.parent()
 Univariate Polynomial Ring in t over Rational Field
 sage: p.coeffs()
 [8, 0, 0, 0, 1]
 sage: p.coefficients()
 [8, 1]

 The output of  coeffs()  is what I would expect from both of these.
 And I cannot see the use of the latter output since I have no idea
 where these coefficients come from (ie  t + 8 would yield identical
 output).

 Behavior is different for symbolic expressions, and makes more sense,
 given the possibility of negative or non-integer exponents, and you
 can track where the coefficients came from.

 sage: z = var('z')
 sage: q = z^4 + 8
 sage: q.coefficients()
 [[8, 0], [1, 4]]

 Also, for symbolic expressions, coeffs is an alias:

 sage: q.coeffs == q.coefficients
 True

 Any explanations or comments on the univariate polynomial case?  I'm
 not trying to open the can-of-worms that is symbolic polynomials.

 --
 To post to this group, send an email to sage-devel@googlegroups.com
 To unsubscribe from this group, send an email to 
 sage-devel+unsubscr...@googlegroups.com
 For more options, visit this group at 
 http://groups.google.com/group/sage-devel
 URL: http://www.sagemath.org


-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] weirdness on the wiki

2011-04-20 Thread Tom Boothby
The spammer's account is named Lila Marion, can somebody with access
delete it?

On Wed, Apr 20, 2011 at 6:26 PM, Tom Boothby tomas.boot...@gmail.com wrote:
 Thanks Ryan, fixed.

 On Wed, Apr 20, 2011 at 6:18 PM, Ryan Grout ayr...@gmail.com wrote:
 Hi,

 Am I the only one seeing a funny starting page on wiki.sagemath.org?

 I see:
 
 http://www.eradicatebedbugs.com - Bed Bug Dog NYC

 Here is an article through which you will get to know what your dog maybe
 called when infected by various types of insects; take the example of
 chigger dog, flea dog, scabies dog etc. We hope that this article will be
 helpful in solving mite problem of your dog.

 http://www.eradicatebedbugs.com/bed-bug-dog/chigger-dog - Also known as
 harvest mites, chiggers create problems for dogs only in the larval
 stage. Chiggers are hard to detect since they may or may not be active on
 the host’s body for days. But once detected, they should be immediately
 removed from the dog. During their early stage, chiggers can be
 completely terminated with the help of a hot water bath only.

 http://www.eradicatebedbugs.com/bed-bug-dog/tick-dog - Ticks can cause
 anaemia and paralysis due to their rigorous blood sucking activity. They
 are found in wooded areas where it is damp. Tick attaches itself to a dog
 and does not leave the host till its tummy is full. They can also spread
 various diseases.

 http://www.eradicatebedbugs.com/bed-bug-dog/flea-dog - Fleas are blood
 sucking parasites. They pierce your skin for this purpose and leave you
 blistered and sore skinned. Their body is designed in such a way that
 they can easily jump from host to host. Their body is tough enough to
 save them even after being smashed. Your dog can be given a monthly pill
 that prevents the flea attack.

 http://www.eradicatebedbugs.com/bed-bug-dog/mites-dog - Mites launch
 themselves in hair follicle or oil glands and generally infect domestic
 animals. Sometimes they are harmless and feed only on dead skin of the
 dog; and if the dog has low immunity, then they help themselves with a
 nice treat.

 http://www.eradicatebedbugs.com/bed-bug-dog/scabies-dog - Scabies, which
 is caused by the parasite sarcoptes scabiei, results in the loss of hair
 of the infected dog. Scabies mites dig deep into the skin making it
 vulnerable to infections. It may also lead to secondary skin infections.

 MyStartingPage (last edited 2011-04-19 12:38:16 by Lila Marion)
 --

 Regards,
 Ryan Grout

 --
 To post to this group, send an email to sage-devel@googlegroups.com
 To unsubscribe from this group, send an email to 
 sage-devel+unsubscr...@googlegroups.com
 For more options, visit this group at 
 http://groups.google.com/group/sage-devel
 URL: http://www.sagemath.org



-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: buildbot applying to 4.6.2

2011-04-18 Thread Tom Boothby
On Mon, Apr 18, 2011 at 1:11 PM, Jason Grout
jason-s...@creativetrax.com wrote:

 Instead of keeping track of dependencies back to 4.6.2, for example, can we
 just list a dependency as 4.7.alpha4 and have the build-bot understand
 that as a meta-dependency and apply everything up to 4.7.alpha4?

What if the alpha has test failures?  Otherwise +1.

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Of powersets and subsets

2011-04-10 Thread Tom Boothby
On Sun, Apr 10, 2011 at 1:10 PM, Stefan van Zwam
stefanvanz...@gmail.com wrote:
 3) ???

Option 3: rejoice, the work has been done for you!

http://www.sagemath.org/doc/reference/sage/misc/bitset.html

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-combinat-devel] finite complex reflection groups and matrices over the universal cyclotomic field

2011-04-08 Thread Tom Boothby
On Thu, Apr 7, 2011 at 4:37 PM, Christian Stump
christian.st...@gmail.com wrote:

 - is there a Sage implementation of permutation groups, or only the
 gap implementation (it takes very long to go through the elements of a
 permutation group, even in small examples)?

Christian,

Robert Miller has been hard at work implementing stabilizer chains for
permutation groups (see #10804).  It should be fairly easy to
enumerate iterate over the elements of a permutation group, fully
within Cython, if that was your desire.  Eventually, it'd be nice to
have the PermutationGroup class use Robert's code by default.

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-combinat-devel] Re: [sage-devel] permutation groups

2011-04-08 Thread Tom Boothby
On Fri, Apr 8, 2011 at 10:27 AM, Jason B Hill jason.b.h...@colorado.edu wrote:

 The only real exception I see to accessibility of the theory is in the
 partition backtrack algorithms themselves. Those simply need to be
 written in a language that is appropriate for consumption. As far as I
 know, nobody has really done this. Has anyone done this? I don't think
 it would be hard. (E.g., for my purposes I use a language much more
 like I.G. Macdonald's text... although this blurs the difference
 between partitions and set compositions.)

Please read through Robert Miller's code.  It's written very cleanly
in Cython; I'd call it appropriate for consumption.   It isn't
necessarily state of the art, but it's a very good beginning.

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



[sage-combinat-devel] Quantum Graph Algebra

2011-03-11 Thread Tom Boothby
Hello all,

I'm currently taking a course on graph limits, and we've recently been
discussing the algebra of quantum graphs.  Some of this stuff is too
incredible not to implement, so I knocked something together, and I've
been playing with it for the past few days.  What I'm writing is pure
Python, though it leans heavily on R. Miller's canonical labeling
code.

Definitions: A partially labeled graph is a graph G = (V,E) where a
subset U of the vertices are labeled by unique integers.  Denote the
set of partially labeled graphs by L.

For a pair of partially labeled graphs G and H, define G*H to be the
graph obtained by taking the disjoint union of G and H and then
identifying vertices of G and H whose labels agree.

A quantum graph is a formal linear combination of partially labeled graphs,

X = \sum_{G \in L} x_G G

The algebra of quantum graphs is the set of quantum graphs with sum

X+Y = \sum_{G \in L} (x_G + y_G) G

and product

X*Y = \sum_{G \in L}\sum_{H \in L} (x_G * y_H) G*H.

This is an unreasonably effective computational tool: if p is a
multiplicative, positive semidefinite graph parameter, then we define

p(X) = \sum_{G \in L} x_G p(G),

which can be used to derive combinatorial identities.  For example, if
p(G) counts the number of t-colorings of G, (or more generally, the
chromatic polynomial in t)

X = G_1 + G_2 - (t-1)*G_3

where G_1 is the path [1,_,2], G_2 is the path [1,2] and G_3 is the
edgeless graph on 2 labeled vertices, then

p(X) = 0

which demonstrates the deletion-contraction identity of the chromatic
polynomial.  My code can currently demonstrate this identity with a
few lines of code:

R = QQ['t']
t = R.gen()
QGA = QuantumGraphAlgebra(R)
X = QGA({-1:[1,2]}) + QGA({1:[2]}) - (t-1)*QGA({1:[],2:[]})
def t_colorings(G):
return G.chromatic_polynomial()(t)
print t_colorings(X) = , X.parameter(t_colorings)

Is this of sufficient interest that I should make a trac ticket and
polish the code up?  I think we should have such a thing, if only
because nobody else does.

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



  1   2   3   4   5   >