[sage-support] Sage Crash Report

2017-04-06 Thread Kevin Buzzard


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

IPython post-mortem report

{'commit_hash': u'1961f94',
 'commit_source': 'installation',
 'default_encoding': 'UTF-8',
 'ipython_path': '/opt/SageMath/local/lib/python2.7/site-packages/IPython',
 'ipython_version': '4.0.0',
 'os_name': 'posix',
 'platform': 'Linux-4.4.0-72-generic-x86_64-with-debian-jessie-sid',
 'sys_executable': '/opt/SageMath/local/bin/python',
 'sys_platform': 'linux2',
 'sys_version': '2.7.10 (default, Jan 21 2016, 11:17:06) \n[GCC 4.9.3]'}

***



***

Crash traceback:

---
---
OperationalError  Python 2.7.10: /opt/SageMath/local/bin/python
   Fri Apr  7 02:21:33 2017
A problem occurred executing Python code.  Here is the sequence of function
calls leading up to the error, with the most recent (innermost) call last.
/opt/SageMath/src/bin/sage-ipython in ()
  1 #!/usr/bin/env python
  2 # -*- coding: utf-8 -*-
  3 """
  4 Sage IPython startup script.
  5 """
  6 
  7 # Install extra readline commands before IPython initialization
  8 from sage.repl.readline_extra_commands import *
  9 
 10 from sage.repl.interpreter import SageTerminalApp
 11 
 12 app = SageTerminalApp.instance()
---> 13 app.initialize()
global app.initialize = >
 14 app.start()

 in initialize(self=, argv=None)

/opt/SageMath/local/lib/python2.7/site-packages/traitlets/config/application.pyc
 in catch_config_error(method=, 
app=, *args=(None,), **kwargs={})
 60 
 61 
#-
 62 # Application class
 63 
#-
 64 
 65 @decorator
 66 def catch_config_error(method, app, *args, **kwargs):
 67 """Method decorator for catching invalid config 
(Trait/ArgumentErrors) during init.
 68 
 69 On a TraitError (generally caused by bad config), this will print 
the trait's
 70 message, and exit the app.
 71 
 72 For use on init methods, to prevent invoking excepthook on invalid 
input.
 73 """
 74 try:
---> 75 return method(app, *args, **kwargs)
method = 
app = 
args = (None,)
kwargs = {}
 76 except (TraitError, ArgumentError) as e:
 77 app.print_help()
 78 app.log.fatal("Bad config encountered during initialization:")
 79 app.log.fatal(str(e))
 80 app.log.debug("Config at the time: %s", app.config)
 81 app.exit(1)
 82 
 83 
 84 class ApplicationError(Exception):
 85 pass
 86 
 87 class LevelFormatter(logging.Formatter):
 88 """Formatter with additional `highlevel` record
 89 
 90 This field is empty if log level is less than highlevel_limit,

/opt/SageMath/local/lib/python2.7/site-packages/IPython/terminal/ipapp.pyc in 
initialize(self=, argv=None)
299 
300 return super(TerminalIPythonApp, self).parse_command_line(argv)
301 
302 @catch_config_error
303 def initialize(self, argv=None):
304 """Do actions after construct, but before starting the app."""
305 super(TerminalIPythonApp, self).initialize(argv)
306 if self.subapp is not None:
307 # don't bother initializing further, starting subapp
308 return
309 # print self.extra_args
310 if self.extra_args and not self.something_to_run:
311 self.file_to_run = self.extra_args[0]
312 self.init_path()
313 # create the shell
--> 314 self.init_shell()
self.init_shell = >
315 # and draw the banner
316 self.init_banner()
317 # Now a variety of things that happen after the banner is 
printed.
318 self.init_gui_pylab()
319 self.init_extensions()
320 self.init_code()
321 
322 def init_shell(self):
323 """initialize the InteractiveShell instance"""
324 # Create an InteractiveShell instance.
325 # shell.display_banner 

Re: [sage-support] Why factor(6*x+3) doesn't give 3*(2*x+1) in SageCell?

2017-04-06 Thread Christophe Bal
Hello

Havr you try to work with ZZ[X] ?

Le 6 avr. 2017 17:47, "Chris Seberino"  a écrit :

> Why factor(6*x+3) doesn't give 3*(2*x+1) ?
>
> Thanks!
>
> cs
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-support+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-support@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.
>

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


[sage-support] Why factor(6*x+3) doesn't give 3*(2*x+1) in SageCell?

2017-04-06 Thread Chris Seberino
Why factor(6*x+3) doesn't give 3*(2*x+1) ?

Thanks!

cs

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


[sage-support] Re: Documentation on defining functions on Sage

2017-04-06 Thread Emmanuel Charpentier
This  should 
enlighten you...

HTH,

--
Emmanuel Charpentier

Le vendredi 31 mars 2017 18:22:24 UTC+2, saad khalid a écrit :
>
> Hey everyone:
>
> I'm just looking for the documentation for properly defining functions on 
> Sage. As far as I can tell, there are several ways to define functions. I 
> think you can define functions as sage objects, and then functions as 
> python functions, and then also lambda functions through python. I don't 
> really understand the difference between the former two options, or the 
> difference in how to create them. I also don't understand if they do things 
> differently. Is there some documentation on properly defining functions. 
> For example, what is the difference between:
>
> var('x')
> f(x) = x^2 #just an eg function
> and 
>
> var('x')
> f = x^2
>
> Moreover, what are the implications or possible problems with:
>
> var('x,y')
> f(x) = x^2*y
>
> Thanks! I tried googling for this but I couldn't find a clear answer 
> anywhere.
>
>
>

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


[sage-support] Re: Inequalities

2017-04-06 Thread Emmanuel Charpentier
That works because your inequation has exactly one variable. Currentkly, 
Maxima (and therefore Sage) can't solve an inequation with more than one 
variable (i. e. express the solution for one variable using otrher 
variables as parameters).

HTH,

--
Emmanuel Charpentier

Le mardi 4 avril 2017 05:02:11 UTC+2, kcrisman a écrit :
>
>
>
> On Sunday, April 2, 2017 at 5:41:48 PM UTC-4, Emmanuel Charpentier wrote:
>>
>> Sorry for the late answer.
>>
>> Symbolic inequations solving seems currently broken in Maxima, and, 
>> hence, in Sage (at least if my interpretation of the error messages is 
>> correct...).
>>
>
> For other readers, I should point out that the following command does give 
> a correct, if hard to parse, answer:
>
> solve(abs(5*x-6) >= 3*x+2,x)
>
> [[x == 4],
>  [x == (1/2)],
>  [x == (-2/3)],
>  [(-2/3) < x, x < (1/2)],
>  [4 < x], 
>
>  [x < (-2/3)]] 
>

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


[sage-support] error on the first run of a newly installed pre-built Sage 7.6

2017-04-06 Thread Zhangjie Huang
I downloaded the latest Sage 7.6 binary tarball and unpack it. Then I typed 
"./sage" in the $SAGE_ROOT directory, after a long list of patching 
messages, I got this error message:

$SAGE_ROOT/local/bin/python: 1: $SAGE_ROOT/local/bin/python: Syntax error: 
word unexpected (expecting ")")

Do you get any clue?

My operating system is *Ubuntu 14.04.5 LTS (64-bit) *with kernel *Linux 
4.4.0-72-generic #93~14.04.1-Ubuntu SMP Fri Mar 31 15:06:30 UTC 2017.*

The binary is sage-7.6-Ubuntu_14.04-x86_64.tar.bz2 and i have checked the 
md5 sum.

The output of "/usr/bin/env python --version" is: Python 2.7.6.

It seems that another thread 
https://groups.google.com/d/topic/sage-support/F-sxLuaazLM/discussion have 
the same problem. I can't solve the problem by installing gfortran.

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