Opened 6 years ago
Closed 4 years ago
#21946 closed defect (fixed)
solve(x==x, x) returns [x == r1]
Reported by:  Peleg Michaeli  Owned by:  Ashutosh Ahelleya 

Priority:  minor  Milestone:  sage8.4 
Component:  symbolics  Keywords:  solve, days79 
Cc:  Merged in:  
Authors:  Ashutosh Ahelleya  Reviewers:  Bryan Ginge Chen 
Report Upstream:  N/A  Work issues:  
Branch:  224e064 (Commits, GitHub, GitLab)  Commit:  224e0641f083472bda753ca8c1a833073b08a218 
Dependencies:  #21554  Stopgaps: 
Description (last modified by )
Not sure if it's a bug or a problem with the documentation, but without any assumptions on x
, solve(x==x, x)
returns [x == r1]
. The documentation does not state what r1
is, but gives the following example:
If there is a parameter in the answer, that will show up as a new variable. In the following example, "r1" is a real free variable (because of the "r"): sage: solve([x+y == 3, 2*x+2*y == 6],x,y) [[x == r1 + 3, y == r1]]
However, without assumptions on x
, there's no reason to believe that x
is real.
This ticket also fixes a grammar issue introduced in #21554 (see comments).
Change History (18)
comment:1 Changed 6 years ago by
Owner:  set to Ashutosh Ahelleya 

comment:2 Changed 6 years ago by
Branch:  → u/aashu12/documentation 

comment:3 Changed 6 years ago by
Authors:  → Ashutosh Ahelleya 

Commit:  → e8760d5ba490fa59a043879c2993b14c8ababde3 
comment:4 Changed 6 years ago by
Status:  new → needs_review 

comment:5 Changed 6 years ago by
Dependencies:  → #21554 

comment:6 followup: 7 Changed 6 years ago by
Milestone:  sage7.5 → sage7.6 

what do you mean to say by
+ In case one of the solutions while solving an equation is a real number::
First of all, I would have written
+ In case one of the solutions of an equation is a real number::
Still, it's unclear what the following sequence of assumptions following this line has to do with the one of solutions being real. Do you mean to say that in order to make sure that one (rather, every?) solution is real, you need to make the following assumptions? Something else?
comment:7 followup: 8 Changed 6 years ago by
Replying to dimpase:
what do you mean to say by
+ In case one of the solutions while solving an equation is a real number::First of all, I would have written
+ In case one of the solutions of an equation is a real number::
It was a part of ticket #21554 which has already been merged.
Still, it's unclear what the following sequence of assumptions following this line has to do with the one of solutions being real. Do you mean to say that in order to make sure that one (rather, every?) solution is real, you need to make the following assumptions? Something else?
According to the documentation provided earlier, the solution of the equation described in the issue is r1, which is a real number (That is what the documentation says!). But the solution to this equation can be a complex number too! So, I just changed the documentation and redefined r1 to be any arbitrary constant. You can refer to this conversation: https://groups.google.com/forum/#!topic/sagesupport/_XWjrYjk_3A
comment:8 followup: 9 Changed 6 years ago by
Replying to aashu12:
Replying to dimpase:
what do you mean to say by
+ In case one of the solutions while solving an equation is a real number::First of all, I would have written
+ In case one of the solutions of an equation is a real number::It was a part of ticket #21554 which has already been merged.
OK, I didn't notice this. But this makes no sense regardless, and you should fix it here.
Still, it's unclear what the following sequence of assumptions following this line has to do with the one of solutions being real. Do you mean to say that in order to make sure that one (rather, every?) solution is real, you need to make the following assumptions? Something else?
According to the documentation provided earlier, the solution of the equation described in the issue is r1, which is a real number (That is what the documentation says!). But the solution to this equation can be a complex number too! So, I just changed the documentation and redefined r1 to be any arbitrary constant. You can refer to this conversation: https://groups.google.com/forum/#!topic/sagesupport/_XWjrYjk_3A
I understand this  my question is wholly about the commit from #21554. How does this docstring clarify anything about assuming noninteger? I don't get it.
comment:9 followup: 10 Changed 6 years ago by
Replying to dimpase:
I understand this  my question is wholly about the commit from #21554. How does this docstring clarify anything about assuming noninteger? I don't get it.
No. The commits are different. I pushed them in different branches. But they showed up when I changed the author name. That was what my doubt was about > https://groups.google.com/forum/#!topic/sagesupport/iqqEhA4K2Gg
comment:10 followup: 11 Changed 6 years ago by
Replying to aashu12:
Replying to dimpase:
I understand this  my question is wholly about the commit from #21554. How does this docstring clarify anything about assuming noninteger? I don't get it.
No. The commits are different. I pushed them in different branches. But they showed up when I changed the author name. That was what my doubt was about > https://groups.google.com/forum/#!topic/sagesupport/iqqEhA4K2Gg
Differently named branches always have some common commits (and as I wrote on sagesupport, it is the case that the commit c7acfd6 from #21554 is present in the branch here). Branch names are merely labels in the directed graph of commits in a repo.
Anyhow, c7acfd6 needs fixing, if only because it's broken English there...
comment:11 Changed 6 years ago by
Replying to dimpase:
Differently named branches always have some common commits (and as I wrote on sagesupport, it is the case that the commit c7acfd6 from #21554 is present in the branch here). Branch names are merely labels in the directed graph of commits in a repo.
Anyhow, c7acfd6 needs fixing, if only because it's broken English there...
Yea, I will fix it :)
comment:12 Changed 6 years ago by
Commit:  e8760d5ba490fa59a043879c2993b14c8ababde3 → b88104716685c7864077452950ceee7280933b67 

Branch pushed to git repo; I updated commit sha1. New commits:
b881047  Fixed #21946

comment:13 Changed 6 years ago by
Commit:  b88104716685c7864077452950ceee7280933b67 → ea063c358af8349cac165083099a381a29f5e922 

Branch pushed to git repo; I updated commit sha1. New commits:
ea063c3  Fixed #21946 and added example for #21554

comment:15 Changed 4 years ago by
Branch:  u/aashu12/documentation → public/21946_solve_returns_r1 

Commit:  ea063c358af8349cac165083099a381a29f5e922 → 224e0641f083472bda753ca8c1a833073b08a218 
Description:  modified (diff) 
Status:  needs_work → positive_review 
I fixed the merge conflict. Unless there are other outstanding objections, I'm setting this to positive_review as this is certainly an improvement to the docs.
New commits:
e8760d5  Fixed: #21946

b881047  Fixed #21946

ea063c3  Fixed #21946 and added example for #21554

224e064  Merge branch 'u/aashu12/documentation' of git://trac.sagemath.org/sage into 21946_solve_returns_r1

comment:16 Changed 4 years ago by
Reviewers:  → Bryan Ginge Chen 

comment:17 Changed 4 years ago by
Milestone:  sage7.6 → sage8.4 

comment:18 Changed 4 years ago by
Branch:  public/21946_solve_returns_r1 → 224e0641f083472bda753ca8c1a833073b08a218 

Resolution:  → fixed 
Status:  positive_review → closed 
New commits:
Fixes #21554
Fixed: #21946