[sage-devel] Re: How much do we support the casual user

2018-03-28 Thread saad khalid
On Wednesday, March 28, 2018 at 1:52:17 AM UTC-5, Simon King wrote: > > Hi Andrey and Saad, > > On 2018-03-28, Andrey Novoseltsev > > wrote: > > On Tuesday, 27 March 2018 18:03:48 UTC-6, saad khalid wrote: > >> > >> Why not assume by default that when someone enters a floating point > >> numb

[sage-devel] Re: How much do we support the casual user

2018-03-28 Thread Simon King
On 2018-03-28, Vincent Delecroix <20100.delecr...@gmail.com> wrote: > > > On 28/03/2018 08:44, Simon King wrote: >> Hi Vincent, >> >> On 2018-03-28, Vincent Delecroix <20100.delecr...@gmail.com> wrote: >>> Anyway the rank of a floating point matrix is a bad notion. See also my >>> answer here for

Re: [sage-devel] Re: How much do we support the casual user

2018-03-28 Thread rjf
There is a history of CAS providing strong mathematical typing as part of the user interface, as in Sage. Those systems have been unpopular. Axiom, FriCAS. Users tend to be mathematicians. There is a history of pasting on formal mathematical typing on other systems. Maple, and (I think) ModeReduc

Re: [sage-devel] Re: How much do we support the casual user

2018-03-28 Thread Vincent Delecroix
On 28/03/2018 08:44, Simon King wrote: Hi Vincent, On 2018-03-28, Vincent Delecroix <20100.delecr...@gmail.com> wrote: Anyway the rank of a floating point matrix is a bad notion. See also my answer here for the computation of the "kernel" It isn't necessarily a bad notion if you define it i

[sage-devel] Re: How to make documentation appear in the web version

2018-03-28 Thread Nils Bruin
On Wednesday, March 28, 2018 at 9:54:27 AM UTC-7, Dima Pasechnik wrote: > > > needless to say, I meant it has to go through trac and get merged... :-) > Thanks! https://trac.sagemath.org/ticket/24370 is ready for review. -- You received this message because you are subscribed to the Google Gro

[sage-devel] Re: How much do we support the casual user

2018-03-28 Thread kcrisman
> > > I thought I'd try Sage for a casual computation. I was interested in which > numbers of the form (2^n - (-1)^n)/3 are prime. I first tried out n=23: > > sage: (2^23+1)/3 > 2796203 > sage: _.is_prime() > False > sage: factor(2796203) > 2796203 > > It turns out that Rational.is_prime does not

[sage-devel] Gauss sum for the Dirichet character modulo 1

2018-03-28 Thread Nicolás Sirolli
The Gauss sum for the Dirichlet character modulo 1 is equal to 1, but: sage: G = DirichletGroup(1) sage: chi = G.list()[0] sage: chi.gauss_sum() 0 The output is zero because the gauss_sum function in modular/dirichlet.py, after some preliminaries, computes the following: for c in chi.values()[1

Re: [sage-devel] Re: How much do we support optional packages.

2018-03-28 Thread kcrisman
> > I agree--I think there should be at least one buildbot run > per-platform--maybe not for every issue but at least run once a week, > that tests building all optional packages and running tests that use > them (i.e. tagged with # optional - ). > > A build with broken optional packages coul

[sage-devel] Re: How to make documentation appear in the web version

2018-03-28 Thread Dima Pasechnik
On Wednesday, March 28, 2018 at 5:31:51 PM UTC+1, Dima Pasechnik wrote: > > > > On Wednesday, March 28, 2018 at 5:20:59 PM UTC+1, Nils Bruin wrote: >> >> I noticed that on: >> >> http://doc.sagemath.org/html/en/reference/curves/sage/schemes/ >> >> the subdirectory "riemann_surfaces" is missing. T

[sage-devel] Re: How to make documentation appear in the web version

2018-03-28 Thread Dima Pasechnik
On Wednesday, March 28, 2018 at 5:20:59 PM UTC+1, Nils Bruin wrote: > > I noticed that on: > > http://doc.sagemath.org/html/en/reference/curves/sage/schemes/ > > the subdirectory "riemann_surfaces" is missing. There is probably > something straightforward to do to make it appear. Is it something

[sage-devel] How to make documentation appear in the web version

2018-03-28 Thread Nils Bruin
I noticed that on: http://doc.sagemath.org/html/en/reference/curves/sage/schemes/ the subdirectory "riemann_surfaces" is missing. There is probably something straightforward to do to make it appear. Is it something I can do myself? What is it? -- You received this message because you are subs

Re: [sage-devel] Re: How much do we support the casual user

2018-03-28 Thread Dima Pasechnik
I think that we just need a beginner mode, with all such restricted defauls... -- 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

[sage-devel] Re: Graphical tool for matrix input

2018-03-28 Thread Simon King
Hi Jeroen, On 2018-03-28, Jeroen Demeyer wrote: > On 2018-03-28 15:05, Simon King wrote: >> By "graphical", I really mean "interactively". > > It seems to me that those would be two different things: > > (1) A notebook widget for inputting matrices > > (2) A command-line tool (running in the term

Re: [sage-devel] Re: Graphical tool for matrix input

2018-03-28 Thread Jeroen Demeyer
On 2018-03-28 15:05, Simon King wrote: By "graphical", I really mean "interactively". It seems to me that those would be two different things: (1) A notebook widget for inputting matrices (2) A command-line tool (running in the terminal) for inputting matrices -- You received this message be

[sage-devel] Re: Graphical tool for matrix input

2018-03-28 Thread Simon King
On 2018-03-28, Jeroen Demeyer wrote: > On 2018-03-28 14:25, Simon King wrote: >> I think it would be nice for SageMath to have such function, too. Both >> in the notebook and on command line, actually. > > I don't see much point for the command line. If you're using the command > line, it's reaso

Re: [sage-devel] Graphical tool for matrix input

2018-03-28 Thread Jeroen Demeyer
On 2018-03-28 14:52, Samuel Lelievre wrote: Sometimes you want to copy-paste a matrix, say from a web page (eg an Ask Sage question) where the matrix was given only as an output, and you would hope to save yourself the trouble of adding in all the commas. That is a different issue: why would a

Re: [sage-devel] Graphical tool for matrix input

2018-03-28 Thread Samuel Lelievre
Wed 2018-03-28 12:42:31 UTC, Jeroen Demeyer: > > On 2018-03-28 14:25, Simon King wrote: > > I think it would be nice for SageMath to have such function, too. Both > > in the notebook and on command line, actually. > > I don't see much point for the command line. If you're using the command > l

[sage-devel] Re: Graphical tool for matrix input

2018-03-28 Thread Marc Mezzarobba
Simon King wrote: > The reason he gave: In Mathematica, matrices can be defined with a > graphical tool. Hence, one can input some entries, use arrow keys to > switch from entry to entry, and can insert (and delete?) rows or > columns on the fly. > > I think it would be nice for SageMath to have s

[sage-devel] Re: Graphical tool for matrix input

2018-03-28 Thread Samuel Lelievre
Wed 2018-03-28 12:27:32 UTC, Simon King: > > Hi! > > A colleague told me that when grading linear algebra exams (thus, when > he needs to input many matrices to find out where exactly the students > made miscalculations), he prefers to work with Mathematica. > > The reason he gave: In Mathemati

Re: [sage-devel] Graphical tool for matrix input

2018-03-28 Thread Jeroen Demeyer
On 2018-03-28 14:25, Simon King wrote: I think it would be nice for SageMath to have such function, too. Both in the notebook and on command line, actually. I don't see much point for the command line. If you're using the command line, it's reasonable to expect that you can enter a matrix manu

[sage-devel] Graphical tool for matrix input

2018-03-28 Thread Simon King
Hi! A colleague told me that when grading linear algebra exams (thus, when he needs to input many matrices to find out where exactly the students made miscalculations), he prefers to work with Mathematica. The reason he gave: In Mathematica, matrices can be defined with a graphical tool. Hence, o

Re: [sage-devel] Re: How much do we support the casual user

2018-03-28 Thread 'Martin R' via sage-devel
I also think that this (restricting the global function is_prime to input that look like integers) is a very elegant solution. I would actually guess that novice users tend to try global functions first, and I am often surprised how long it takes some people to discover tab-completion. Martin

Re: [sage-devel] Re: How much do we support the casual user

2018-03-28 Thread mforets
One question: if 3/1 is not prime but ZZ(3/1) is, shouldn't 3/1 == ZZ(3/1) return False? (I don't know how does sage evaluate == , is it documented? I searched for "==" in the docs and got nothing, and "equivalence" gives a super long list.) El miércoles, 28 de marzo de 2018, 9:02:41 (UTC-3), J

Re: [sage-devel] Re: How much do we support the casual user

2018-03-28 Thread John Cremona
I agree with both Marc's last 2 suggestions. If the global function is_prime() is called on an integer (even of type Rational) it should do the natural thing. Anything else raises an error with a helpful message that x.is_prime() might be what is wanted. On Wed, 28 Mar 2018, 12:19 Marc Mezzarob

[sage-devel] Re: How much do we support the casual user

2018-03-28 Thread Marc Mezzarobba
Dima Pasechnik wrote: > is_prime() should be restricted to rings in which one can have > non-trivial prime elements Well, that's what I'm doubting. If the goal is that the global is_prime() function doesn't do anything surprising for people who would have integers in mind, then it may be better

[sage-devel] Re: How much do we support the casual user

2018-03-28 Thread Dima Pasechnik
On Wednesday, March 28, 2018 at 10:07:17 AM UTC+1, Marc Mezzarobba wrote: > > Simon King wrote: > > That makes sense to me. > > Thus I now think, z.is_prime() should roughly work like this: > > def is_prime(self): > > ... > > What about keeping the is_prime() *method* unchanged (except p

[sage-devel] Re: How much do we support the casual user

2018-03-28 Thread Dima Pasechnik
On Wednesday, March 28, 2018 at 9:25:07 AM UTC+1, Simon King wrote: > > Hi Ralf, > > On 2018-03-28, Ralf Stephan > wrote: > > Ask yourself, are these arguments you give for current is_prime(x) > > behaviour not just the inertia of your thinking. > > No. It is a sign of appreciation of mathema

Re: [sage-devel] How much do we support the casual user

2018-03-28 Thread Erik Bray
On Tue, Mar 27, 2018 at 9:57 PM, Michael Orlitzky wrote: > On 03/27/2018 03:11 PM, William Stein wrote: >> >> Sorry -- I'm not trying to flamebait you, but in order to have any >> further discussion, what exactly do you think a floating point number >> in a computer is? >> What is the mathematica

Re: [sage-devel] Re: How much do we support the casual user

2018-03-28 Thread Erik Bray
On Tue, Mar 27, 2018 at 9:37 PM, Eric Gourgoulhon wrote: > Hi Simon, hi Erik, > > > Le mardi 27 mars 2018 21:09:08 UTC+2, Simon King a écrit : >> >> Hi Erik, >> >> On 2018-03-27, Erik Bray wrote: >> > What about adding an optional argument to the is_prime() >> > method--something like a.is_prime(

[sage-devel] Re: How much do we support the casual user

2018-03-28 Thread Simon King
Hi TB, On 2018-03-28, TB wrote: > A bit of future bike-shedding: I would not mind if QQ(3) be printed on > the command line as 3/1 or stay 3, but the LaTeX version is probably a > harder decision. For example, > > sage: latex([bernoulli(i) for i in range(10)]) > \left[1, -\frac{1}{2}, \frac{1}{

[sage-devel] Re: How much do we support the casual user

2018-03-28 Thread Marc Mezzarobba
Simon King wrote: > That makes sense to me. > Thus I now think, z.is_prime() should roughly work like this: > def is_prime(self): > ... What about keeping the is_prime() *method* unchanged (except perhaps for adding an optional warning in the default implementation for field elements), and r

[sage-devel] Re: Re: How much do we support the casual user

2018-03-28 Thread Marc Mezzarobba
William Stein wrote: > If we are going to change something in this case, probably Simon's > suggestion to have a warning (that can be turned off) be printed by > the top-level globalsI() is_prime when confronted with a field element > seems best... It definitely won't break anybody's code, and avo

Re: [sage-devel] Re: How much do we support the casual user

2018-03-28 Thread John Cremona
On 28 March 2018 at 09:34, TB wrote: > On 28/03/18 10:33, Ralf Stephan wrote: > >> Ask yourself, are these arguments you give for current is_prime(x) >> behaviour not just the inertia of your thinking. >> >> Wolfram tells me plainly "1/3 (2^23 + 1) is a prime number"---no >> ambiguity, no attempt

Re: [sage-devel] Re: How much do we support the casual user

2018-03-28 Thread TB
On 28/03/18 11:22, Simon King wrote: As I said in an earlier post, I'd be in favour of changing printed output of basic number types in Sage, so that pasting output will result in a copy of the object. A bit of future bike-shedding: I would not mind if QQ(3) be printed on the command line as 3/

Re: [sage-devel] Re: How much do we support the casual user

2018-03-28 Thread TB
On 28/03/18 10:33, Ralf Stephan wrote: Ask yourself, are these arguments you give for current is_prime(x) behaviour not just the inertia of your thinking. Wolfram tells me plainly "1/3 (2^23 + 1) is a prime number"---no ambiguity, no attempt to show a glimpse of algebraic truth. Pari gives ?

[sage-devel] Re: How much do we support the casual user

2018-03-28 Thread Dima Pasechnik
On Tuesday, March 27, 2018 at 8:07:41 AM UTC+1, Ralf Stephan wrote: > > Hello, > I thought I'd try Sage for a casual computation. I was interested in which > numbers of the form (2^n - (-1)^n)/3 are prime. I first tried out n=23: > > sage: (2^23+1)/3 > 2796203 > sage: _.is_prime() > False > sage

[sage-devel] Re: How much do we support the casual user

2018-03-28 Thread Simon King
Hi Ralf, On 2018-03-28, Ralf Stephan wrote: > Ask yourself, are these arguments you give for current is_prime(x) > behaviour not just the inertia of your thinking. No. It is a sign of appreciation of mathematical notions. Sorry to start with politics here, but I am against populism. And droppin

[sage-devel] Re: How much do we support the casual user

2018-03-28 Thread Ralf Stephan
Ask yourself, are these arguments you give for current is_prime(x) behaviour not just the inertia of your thinking. Wolfram tells me plainly "1/3 (2^23 + 1) is a prime number"---no ambiguity, no attempt to show a glimpse of algebraic truth. Pari gives ? isprime((2^23+1)/3) %1 = 1 Giac: >> is_p