hyperexpand returns incorrect result for negative coefficients

160 views
Skip to first unread message

Ondřej Čertík

unread,
Jan 27, 2016, 8:12:18 PM1/27/16
to sympy
GitHub is down, so I am reporting here for now:


It returns 0 for the following function, even though we can verify the
(correct) answer using .n(), that it is nonzero:

In [123]: hyper((-6, -7, -5), (-6, -6), 1)
Out[123]:
┌─ ⎛-6, -7, -5 │ ⎞
├─ ⎜ │ 1⎟
3╵ 2 ⎝ -6, -6 │ ⎠

In [124]: hyperexpand(hyper((-6, -7, -5), (-6, -6), 1))
Out[124]: 0

In [125]: hyper((-6, -7, -5), (-6, -6), 1).n()
Out[125]: -0.166666666666667


In some other cases it works:

In [128]: hyperexpand(hyper((-5, -3, -4), (-6, -6), 1))
Out[128]: 1/30

In [129]: hyper((-5, -3, -4), (-6, -6), 1).n()
Out[129]: 0.0333333333333333


Ondrej

Sergey Kirpichev

unread,
Jan 29, 2016, 9:48:47 AM1/29/16
to sympy

Francesco Bonazzi

unread,
Jan 29, 2016, 9:56:43 AM1/29/16
to sympy
Sergey, is it OK to merge edits from your fork into SymPy?

Sergey B Kirpichev

unread,
Jan 29, 2016, 10:22:03 AM1/29/16
to sy...@googlegroups.com
On Fri, Jan 29, 2016 at 06:56:43AM -0800, Francesco Bonazzi wrote:
> Sergey, is it OK to merge edits from your fork into SymPy?

I'm not a layer. But for example, BSD license requires, that you
must reproduce copyright's and this was prohibited in your Co,
you can't mention me. Funny situation. Anyway, I don't care.

Aaron Meurer

unread,
Jan 29, 2016, 10:39:27 AM1/29/16
to sy...@googlegroups.com
Sergey, I am understanding this to mean that you are OK with upstreaming changes from your fork to SymPy. The license will be kept as "SymPy development team" (your prior changes are also under that attribution, so I consider you to already be part of the "SymPy development team" for legal purposes). If you disagree with this, please make it clear here.

If you wish to be added back to the SymPy AUTHORS file, you can be. The removal was done only because you requested it.  

Aaron Meurer


--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/20160129151322.GA5938%40darkstar.order.hcn-strela.ru.
For more options, visit https://groups.google.com/d/optout.

Sergey B Kirpichev

unread,
Jan 29, 2016, 11:46:26 AM1/29/16
to sy...@googlegroups.com
On Fri, Jan 29, 2016 at 10:39:02AM -0500, Aaron Meurer wrote:
> Sergey, I am understanding this to mean that you are OK with upstreaming
> changes from your fork to SymPy.

In general case, no, of course. But if someone send a message to your
black hole (I mean maillist) - it should be clear, that he doesn't care
about stupid legal issues. What point else in showing you a solution?!

> I consider you to already be part of the "SymPy development team" for
> legal purposes).

I don't think so.

> If you wish to be added back to the SymPy AUTHORS file, you can be.

Sure. Unblock banned/filtered people, apologize them publicly,
don't repeat similar silly thing again - and then you can re-add me.

I don't think this all is ever possible. So, no, I can't and
lets just stop your excursus into the politcorrect sympy history.

Aaron Meurer

unread,
Jan 29, 2016, 11:56:10 AM1/29/16
to sy...@googlegroups.com
On Fri, Jan 29, 2016 at 11:44 AM, Sergey B Kirpichev <skirp...@gmail.com> wrote:
On Fri, Jan 29, 2016 at 10:39:02AM -0500, Aaron Meurer wrote:
>    Sergey, I am understanding this to mean that you are OK with upstreaming
>    changes from your fork to SymPy.

In general case, no, of course.  But if someone send a message to your
black hole (I mean maillist) - it should be clear, that he doesn't care
about stupid legal issues.  What point else in showing you a solution?!

No, sending a link to a mailing list doesn't constitute permission to use the contents of that link. And we're not going to use your work without your permission, which is why I'm asking for a very clear yes or no on whether we can. 
 
So let me ask you two questions:

Is it OK if we upstream this specific patch (https://github.com/skirpichev/omg/pull/204)?

Is it OK if we upstream additional patches of yours, both past and future? 

I don't want to change the copyright file, or add copyright notices to specific patches. So a "yes" to either of the above questions would mean that the copyright notice of SymPy stays as it is now, same as for any other contribution to SymPy. 


>    I consider you to already be part of the "SymPy development team" for
>    legal purposes).

I don't think so.

>    If you wish to be added back to the SymPy AUTHORS file, you can be.

Sure.  Unblock banned/filtered people, apologize them publicly,
don't repeat similar silly thing again - and then you can re-add me.

I don't think this all is ever possible.  So, no, I can't and
lets just stop your excursus into the politcorrect sympy history.

I agree that it's a waste of time to get into this again. I only want to know here what permission(s) we have from you, regarding your changes in your fork.  If you ever want to change your position on AUTHORS, let me know. If not, that is also fine. We will leave it as is.

Aaron Meurer


--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.

Sergey B Kirpichev

unread,
Jan 29, 2016, 12:25:26 PM1/29/16
to sy...@googlegroups.com
On Fri, Jan 29, 2016 at 11:54:39AM -0500, Aaron Meurer wrote:
> No, sending a link to a mailing list doesn't constitute permission to use
> the contents of that link.

You know better. As I said, I'm not a layer and just use common sense.

> So let me ask you two questions:
> Is it OK if we upstream this specific patch
> ([2]https://github.com/skirpichev/omg/pull/204)?

I answered this question: in _this_ case - I don't care.

> Is it OK if we upstream additional patches of yours, both past and
> future?

No. Only if you gonor all terms of the license (BSD for now).

PS:
For me, it's a nonsense. Instead of technical
discussion - this all... Lets stop.

Ondřej Čertík

unread,
Jan 30, 2016, 11:28:58 PM1/30/16
to sympy
We would have to consult a lawyer, which I currently don't have time
nor money to do.

It is not practical to have all ~450 contributors in the copyright
statement, so we have just "SymPy Development Team" and then all the
authors are in the AUTHORS files (unless they specifically don't want
to be listed). So that's what we've been following so far. Since you
said that this is not acceptable for your contribution, then we will
not accept it until we can figure out the legal stuff.


Ondrej

Sergey B Kirpichev

unread,
Jan 31, 2016, 11:01:10 AM1/31/16
to sy...@googlegroups.com
On Sat, Jan 30, 2016 at 09:28:54PM -0700, Ondřej Čertík wrote:
> It is not practical to have all ~450 contributors in the copyright
> statement, so we have just "SymPy Development Team" and then all the
> authors are in the AUTHORS files

Perhaps, that's fine for your authors. But, thanks to you, right now
I'm not sympy author and you must obey BSD license terms (if you
don't have a special permission).

You can get this patch, but it will not give you automatically
rights to use _all_ my code on public-domain terms. You must
properly credit my work and so on. (Why sympy project is so
damn special? That's a general rule.)

> we will not accept it

It's up to you.

I'm just telling you about solution of the particular technical
problem. You can discuss that, you can use that. Or you can show
yourself useless and start all this bullshit...

> until we can figure out the legal stuff.

Yeah. Perhaps, you should better instruct your precious
moderators to filter out "wrong persons" in maillist: it looks
like even simple few-line patches with bugfixes can damage your
"welcoming and helpful" (tm) community...

Denis Akhiyarov

unread,
Jan 31, 2016, 11:49:03 AM1/31/16
to sympy, skirp...@gmail.com
is there SymPy code of conduct? Especially since SymPy is one of NumFOCUS projects:

Ondřej Čertík

unread,
Jan 31, 2016, 12:06:39 PM1/31/16
to sympy
Hi Denis,

On Sun, Jan 31, 2016 at 9:49 AM, Denis Akhiyarov
<denis.a...@gmail.com> wrote:
> is there SymPy code of conduct? Especially since SymPy is one of NumFOCUS
> projects:
>
> http://www.numfocus.org/code-of-conduct.html

We are in the process of adopting one. We will update this list once
we adopt it and publish it.

Regarding the legal question that arose in this thread, I have asked here:

http://programmers.stackexchange.com/questions/308909/how-to-manage-copyright-notices-from-contributors-to-a-bsd-licensed-project

Let's move the legal discussion over there.

Ondrej
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sympy+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/b9cc76bf-e7c6-4d82-aef5-3487db73c8aa%40googlegroups.com.

Sergey Kirpichev

unread,
Jan 31, 2016, 2:57:04 PM1/31/16
to sy...@googlegroups.com
On Sun, Jan 31, 2016 at 8:06 PM, Ondřej Čertík <ondrej...@gmail.com> wrote:
> Regarding the legal question that arose in this thread, I have asked here:
> http://programmers.stackexchange.com/questions/308909/how-to-manage-copyright-notices-from-contributors-to-a-bsd-licensed-project

Ondrej, I'm sorry, but it's a wrong question, do you understand?

You can consider me as a contributor - in case, like with _submitted_
patch above. And here you have a clear permission in the very beginning
of this conversation: please do, whatever you want. Is this still not clear?!

But in general, my repo - is not a reservoir of public domain code for
inclusion eventually in sympy, that can be just cherry-pick'ed or
copy-pasted. Unless all this wasn't submitted to you by author - I'm not
your contributor and you have simple BSD-terms, if you really want to
use that, it's all.

PS:
> I have asked here

Please respect intelligence of you readers and don't misinform people with
ridiculous claims that I require from you changing Copyright notice just
for a few-line patch.

Ondřej Čertík

unread,
Jan 31, 2016, 3:16:05 PM1/31/16
to sympy
Hi Sergey,
I misunderstood what you said above. I thought you said that we cannot
use your patch without modifying our copyright. Thanks for clarifying
that. Thanks for allowing us to use this specific patch.

The question on stackoverflow stays though --- the question is, if you
fork SymPy (there is over 1300 forks just on GitHub alone), and
whether or not you rename the repository from sympy to something else,
and you keep the license, how do we integrate it back, according to
the license terms. The specific question is about the copyright
notice, whether you can incorporate it as two different files (LICENSE
and AUTHORS) or whether the text must be intact. It is actually not
clear, because you keep the copyright to all patches, whether or not
you acknowledge it, so the copyright notice is actually redundant.
Specifically, your fork is not public domain. Your fork is (currently)
released under the BSD licensed (so you already gave us permission to
use your code by using this license), and git commits with your name
are copyrighted to you, just like other git commits that you also
include are copyrighted to their authors.

Ondrej
Reply all
Reply to author
Forward
0 new messages