Re: [sage-devel] Sagemath Conway polynomials error from Conda Forge

2019-03-10 Thread Steven Craighead
Thanks.  I was having other issues with building the regular way and went to 
Conda.

I’ll try again and document better.

Sent from my iPad

> On Mar 10, 2019, at 3:15 PM, Dima Pasechnik  wrote:
> 
> On Sun, Mar 10, 2019 at 10:06 PM Steven Craighead
>  wrote:
>> 
>> I have tried to build SageMath from Conda Forge multiple times and it 
>> continually fails out due to the fact that the Conway polynomial package is 
>> too old.
>> 
>> Who on sage development works with updating Conda Forge.
> 
> Nobody really works on it now.
> You'd be able to build Sagemath without Conda.
> 
>> 
>> I’m running the latest miniconda3 on an older Mac laptop with a current 
>> MacOS.
>> 
>> Sent from my iPad
>> 
>> --
>> 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 https://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 https://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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Sagemath Conway polynomials error from Conda Forge

2019-03-10 Thread Steven Craighead
I have tried to build SageMath from Conda Forge multiple times and it 
continually fails out due to the fact that the Conway polynomial package is too 
old.  

Who on sage development works with updating Conda Forge.

I’m running the latest miniconda3 on an older Mac laptop with a current MacOS.

Sent from my iPad

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


Re: [sage-devel] sage installation

2018-12-18 Thread Steven Craighead
Did you run
./configure

Or 
./configure —help
 And read any messages of problems?

You may be able to just run 
Sudo app-get -f ecl.16.1.2.pt

Also, consider doing sudo app-get on any packages that fail from the 
./configure step.
Also, you may need to set SAGE_LOCAL to some useable directory on your machine 
as in the configure below
./configure --prefix=SAGE_LOCAL
I also forced installed python2 and python3
Once you sort out what tools the make needs then rerun make.

Sent from my iPad

> On Dec 18, 2018, at 11:15 AM, Mathieu Roux  wrote:
> 
> so what can i do?
> 
> when i try to build sage from sources, i got this problem with ecl
> 
> when i try apt-get install sagemath, i got
> 
> ┌┐
> │ SageMath version 8.1, Release Date: 2017-12-07 │
> │ Type "notebook()" for the browser-based notebook interface.│
> │ Type "help()" for help.│
> └┘
> Traceback (most recent call last):
>File "/usr/share/sagemath/bin/sage-ipython", line 7, in 
>  from sage.repl.interpreter import SageTerminalApp
> ModuleNotFoundError: No module named 'sage'
> 
> 
> 
> 
> i am so disappointed :-(
> 
> 
>> Le 18/12/2018 à 20:12, Dima Pasechnik a écrit :
>> hmm, a segfault in ecl_min, that's not easy to understand what's going on :-(
>> 
>>> On Tue, Dec 18, 2018 at 5:16 PM Mathieu Roux  wrote:
>>> here it is !
>>> 
 Le mar. 18 déc. 2018 à 17:52, Dima Pasechnik  a écrit :
 And what is in /home/m/sage-8.4/logs/pkgs/ecl-16.1.2.p5.log ?
 Could you post it here?
> On Tue, Dec 18, 2018 at 4:44 PM Mathieu Roux  wrote:
> Good evening,
> So i have tried to build from sources (linux mint cinnamon).
> With make, after a great time of computation, i get:
> 
> ***
> Error building Sage.
> 
> The following package(s) may have failed to build (not necessarily
> during this run of 'make all-start'):
> 
> * package: ecl-16.1.2.p5
>   log file: /home/m/sage-8.4/logs/pkgs/ecl-16.1.2.p5.log
>   build directory: /home/m/sage-8.4/local/var/tmp/sage/build/ecl-16.1.2.p5
> 
> The build directory may contain configuration files and other potentially
> helpful information. WARNING: if you now run 'make' again, the build
> directory will, by default, be deleted. Set the environment variable
> SAGE_KEEP_BUILT_SPKGS to 'yes' to prevent this.
> 
> Makefile:31: recipe for target 'all-start' failed
> make[1]: *** [all-start] Error 1
> make[1]: Leaving directory '/home/m/sage-8.4'
> Makefile:13: recipe for target 'all' failed
> make: *** [all] Error 2
> 
> 
>> Le mar. 18 déc. 2018 à 11:36, E. Madison Bray  a 
>> écrit :
>>> On Mon, Dec 17, 2018 at 8:11 PM Mathieu Roux  wrote:
>>> Good evening,
>>> 
>>> I am trying to install sage on my computer.
>>> I am using Linux Mint Cinnamon.
>>> I wrote
>>> sudo apt-get install sagemath
>>> et
>>> sudo apt-get install sagemath-jupyter
>>> with no errors.
>>> But then, when i try/usr/bin/sage, i get
>>> 
>>> ┌┐
>>> │ SageMath version 8.1, Release Date: 2017-12-07 │
>>> │ Type "notebook()" for the browser-based notebook interface.│
>>> │ Type "help()" for help.│
>>> └┘
>>> Traceback (most recent call last):
>>>   File "/usr/share/sagemath/bin/sage-ipython", line 7, in 
>>> from sage.repl.interpreter import SageTerminalApp
>>> ModuleNotFoundError: No module named 'sage'
>> Try running just
>> 
>> $ sage -python -c 'import sys; print(sys.path)'
>> 
>> I bet something is messed up about your python path (or the package
>> itself is broken somehow).
>> 
>> --
>> 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 https://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 https://groups.google.com/group/sage-devel.
> For more opti

Re: [sage-devel] Re: Bug in sage.sat.boolean_polynomials.solve() with CryptoMiniSat 5.0.1

2018-12-17 Thread Steven Craighead
Mate, do you run Bosphorus from SageMath?

Get Outlook for iOS


From: sage-devel@googlegroups.com on behalf of Mate Soos 
Sent: Monday, December 17, 2018 3:10 PM
To: sage-devel
Subject: Re: [sage-devel] Re: Bug in sage.sat.boolean_polynomials.solve() with 
CryptoMiniSat 5.0.1

Hi,

Oh, thanks for that ticket. I put it on my backlog to fix. The issue is, I have 
no idea how many people use this thing and it takes time to fix :S In the 
meanwhile, I am interested in your feedback on this (not yet publicized) ANF 
simplifier and ANF-to-CNF converter:

https://github.com/meelgroup/bosphorus

It takes in an ANF, spits out a simplified ANF and a simplified CNF, plus 
solves it using an external SAT solver if available. It uses a bunch of cool 
tricks to get a simplified ANF and CNF. In particular, it uses ElimLin, XL, ANF 
propagation, variable replacement, and Karnaugh tables. Check it out :)

Mate

On Monday, 17 December 2018 19:42:57 UTC+1, Jörg-Volker wrote:
Hi,

just want to add that the equation system in my example definitly has a 
solution. I boiled it down from a much bigger system.

Meanwhile I found a ticket in sage-trac dealing with this bug in the binding of 
CryptoMiniSat (src/sage/sat/solvers/cryptominisat.py) to SageMath, see 
https://trac.sagemath.org/ticket/26676.


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


Re: [sage-devel] sage installation

2018-12-17 Thread steven . craighead
I installed everything under my user directory and had to have sage completely 
compile from source.  I was then able to use that version.  The standard 
Ubuntu’s install didn’t work, so the one day source install was required.  I 
also made sure I had all of the needed packages to compile available.
There is some configuration tool that you should run before the recompile.  
This will make sure that you have all packages and will configure the makefiles 
needed.  

Sent from my iPhone

> On Dec 17, 2018, at 11:11 AM, Mathieu Roux  wrote:
> 
> Good evening,
> 
> I am trying to install sage on my computer.
> I am using Linux Mint Cinnamon.
> I wrote
> sudo apt-get install sagemath
> et
> sudo apt-get install sagemath-jupyter
> with no errors.
> But then, when i try/usr/bin/sage, i get
> 
> ┌┐
> │ SageMath version 8.1, Release Date: 2017-12-07 │
> │ Type "notebook()" for the browser-based notebook interface.│
> │ Type "help()" for help.│
> └┘
> Traceback (most recent call last):
>   File "/usr/share/sagemath/bin/sage-ipython", line 7, in 
> from sage.repl.interpreter import SageTerminalApp
> ModuleNotFoundError: No module named 'sage'
> 
> 
> 
> Can you help me?
> Thanks,
> Mathieu
> -- 
> 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 https://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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Bug in sage.sat.boolean_polynomials.solve() with CryptoMiniSat 5.0.1

2018-12-13 Thread steven . craighead
Once I got cryptominisat installed, I was able to replicate the bug.  I also 
rearranged the equations and got it to solve as well, without rearranging the 
order of the variables.

Sent from my iPhone

> On Dec 13, 2018, at 11:58 AM, Sébastien Labbé  wrote:
> 
> I tested cryptominisat, picosat and glucose. Glucose (added as a optional or 
> experimental package in https://trac.sagemath.org/ticket/26361) finds a 
> solution in the first case. In the second case (variables in reverse order), 
> all of them finds something.
> 
> My experiments are copied below.
> 
> sage: varl = ['k{0}'.format(p) for p in range(29)]
> : 
> : B = BooleanPolynomialRing(names = varl)
> : B.inject_variables(verbose=False)
> : 
> : keqs = [
> : k0 + k6 + 1,
> : k3 + k9 + 1,
> : k5*k18 + k6*k18 + k7*k16 + k7*k10,
> : k9*k17 + k8*k24 + k11*k17,
> : k1*k13 + k1*k15 + k2*k12 + k3*k15 + k4*k14,
> : k5*k18 + k6*k16 + k7*k18,
> : k3 + k26,
> : k0 + k19,
> : k9 + k28,
> : k11 + k20]
> : 
> : from sage.sat.boolean_polynomials import solve as solve_sat
> : 
> sage: solve_sat(keqs, n=1)
> False
> sage: solve_sat(keqs, n=1, solver=SAT('picosat'))
> False
> sage: solve_sat(keqs, n=1, solver=SAT('glucose'))
> [{k28: 1,
>   k26: 0,
>   k24: 0,
>   k20: 0,
>   k19: 1,
>   k18: 0,
>   k17: 0,
>   k16: 0,
>   k15: 1,
>   k14: 1,
>   k13: 0,
>   k12: 1,
>   k11: 0,
>   k10: 0,
>   k9: 1,
>   k8: 0,
>   k7: 0,
>   k6: 0,
>   k5: 0,
>   k4: 0,
>   k3: 0,
>   k2: 0,
>   k1: 0,
>   k0: 1}]
> 
> 
> 
> 
> sage: varl = ['k{0}'.format(p) for p in range(28, -1, -1)]
> sage: B = BooleanPolynomialRing(names = varl)
> : B.inject_variables(verbose=False)
> : 
> : keqs = [
> : k0 + k6 + 1,
> : k3 + k9 + 1,
> : k5*k18 + k6*k18 + k7*k16 + k7*k10,
> : k9*k17 + k8*k24 + k11*k17,
> : k1*k13 + k1*k15 + k2*k12 + k3*k15 + k4*k14,
> : k5*k18 + k6*k16 + k7*k18,
> : k3 + k26,
> : k0 + k19,
> : k9 + k28,
> : k11 + k20]
> : 
> sage: 
> sage: solve_sat(keqs, n=1, solver=SAT('cryptominisat'))
> [{k0: 1,
>   k1: 0,
>   k2: 0,
>   k3: 0,
>   k4: 0,
>   k5: 0,
>   k6: 0,
>   k7: 0,
>   k8: 0,
>   k9: 1,
>   k10: 0,
>   k11: 0,
>   k12: 0,
>   k13: 0,
>   k14: 0,
>   k15: 0,
>   k16: 0,
>   k17: 0,
>   k18: 0,
>   k19: 1,
>   k20: 0,
>   k24: 0,
>   k26: 0,
>   k28: 1}]
> sage: solve_sat(keqs, n=1, solver=SAT('picosat'))
> [{k0: 0,
>   k1: 0,
>   k2: 0,
>   k3: 1,
>   k4: 1,
>   k5: 0,
>   k6: 1,
>   k7: 0,
>   k8: 0,
>   k9: 0,
>   k10: 0,
>   k11: 0,
>   k12: 1,
>   k13: 1,
>   k14: 1,
>   k15: 1,
>   k16: 0,
>   k17: 0,
>   k18: 0,
>   k19: 0,
>   k20: 0,
>   k24: 0,
>   k26: 1,
>   k28: 0}]
> sage: solve_sat(keqs, n=1, solver=SAT('glucose'))
> [{k0: 1,
>   k1: 1,
>   k2: 1,
>   k3: 1,
>   k4: 0,
>   k5: 0,
>   k6: 0,
>   k7: 0,
>   k8: 0,
>   k9: 0,
>   k10: 0,
>   k11: 0,
>   k12: 0,
>   k13: 0,
>   k14: 1,
>   k15: 1,
>   k16: 0,
>   k17: 0,
>   k18: 0,
>   k19: 1,
>   k20: 0,
>   k24: 0,
>   k26: 1,
>   k28: 0}]
> 
> 
> -- 
> 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 https://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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Bug in sage.sat.boolean_polynomials.solve() with CryptoMiniSat 5.0.1

2018-12-12 Thread Steven Craighead
Mate Soos, I have Sage installed in both Linux Mint 19 and also installed on a 
Mac Book.

My Linux install wouldn’t install cryptominisat, but I was able to install it 
on my Mac book with no issues.  So I was able to duplicate the error raised by
>>>> Jörg-Volker below.

I was curious why the equation order led to different situations and think that 
this due to a need to place a partial order on the equations before attempting 
to solve them.  

Is that true, Mate?
Sent from my iPad

> On Dec 12, 2018, at 12:05 PM, Mate Soos  wrote:
> 
> Hey,
> 
> I'm the author of CryptoMinISat :) Let me know what the issue is and I will 
> debug :) Please explain what you tried doing, what failed and what you think 
> the problem might be. I'll try to help to the best of my ability and time!
> 
> Cheers,
> 
> Mate
> 
>> On Monday, 10 December 2018 02:52:45 UTC+1, Steven Craighead wrote:
>> I'm trying to install cryptominisat for SAGEMATH 8.4.  I'm hitting a wall.  
>> Any advice?
>> 
>>> On Sun, Dec 9, 2018 at 10:20 AM Steven Craighead  
>>> wrote:
>>> Equations three through six in keqs are nonlinear.  I would expect if you 
>>> left the var1 order alone and permuted the order of the equations you might 
>>> even get different answers.
>>> 
>>> For instance if you swapped equation one with equation nine, you might get 
>>> the same answer with the standard order on var1 that you are getting with 
>>> your reversed order on var1.
>>> 
>>> Sent from my iPad
>>> 
>>>> On Dec 9, 2018, at 8:46 AM, Jörg-Volker  wrote:
>>>> 
>>>> Just a reminder that there's still a bug in the communication with the 
>>>> experimental package CryptoMiniSat 5.0.1 when used via the function  
>>>> sage.sat.boolean_polynomials.solve().
>>>> In the following example no solution of the boolean equation system is not 
>>>> found:
>>>> 
>>>> varl = ['k{0}'.format(p) for p in range(29)]
>>>> 
>>>> B = BooleanPolynomialRing(names = varl)
>>>> B.inject_variables(verbose=False)
>>>> 
>>>> keqs = [
>>>> k0 + k6 + 1,
>>>> k3 + k9 + 1,
>>>> k5*k18 + k6*k18 + k7*k16 + k7*k10,
>>>> k9*k17 + k8*k24 + k11*k17,
>>>> k1*k13 + k1*k15 + k2*k12 + k3*k15 + k4*k14,
>>>> k5*k18 + k6*k16 + k7*k18,
>>>> k3 + k26,
>>>> k0 + k19,
>>>> k9 + k28,
>>>> k11 + k20]
>>>> 
>>>> from sage.sat.boolean_polynomials import solve as solve_sat
>>>> 
>>>> kpsol = solve_sat(keqs, n=1)
>>>> 
>>>> print type(kpsol)
>>>> print len(kpsol)
>>>> 
>>>> Changing the first statement to
>>>> 
>>>> varl = ['k{0}'.format(p) for p in range(28, -1, -1)]
>>>> 
>>>> which just re-orders the generators, a solution can be found.
>>>> Any ideas?
>>>> 
>>>> Jörg-Volker.
>>>> -- 
>>>> 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+...@googlegroups.com.
>>>> To post to this group, send email to sage-...@googlegroups.com.
>>>> Visit this group at https://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 https://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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Bug in sage.sat.boolean_polynomials.solve() with CryptoMiniSat 5.0.1

2018-12-09 Thread Steven Craighead
I'm trying to install cryptominisat for SAGEMATH 8.4.  I'm hitting a wall.
Any advice?

On Sun, Dec 9, 2018 at 10:20 AM Steven Craighead 
wrote:

> Equations three through six in keqs are nonlinear.  I would expect if you
> left the var1 order alone and permuted the order of the equations you might
> even get different answers.
>
> For instance if you swapped equation one with equation nine, you might get
> the same answer with the standard order on var1 that you are getting with
> your reversed order on var1.
>
> Sent from my iPad
>
> On Dec 9, 2018, at 8:46 AM, Jörg-Volker  wrote:
>
> Just a reminder that there's still a bug in the communication with the
> experimental package CryptoMiniSat 5.0.1 when used via the function
> sage.sat.boolean_polynomials.solve().
> In the following example no solution of the boolean equation system is not
> found:
>
> varl = ['k{0}'.format(p) for p in range(29)]
>
> B = BooleanPolynomialRing(names = varl)
> B.inject_variables(verbose=False)
>
> keqs = [
> k0 + k6 + 1,
> k3 + k9 + 1,
> k5*k18 + k6*k18 + k7*k16 + k7*k10,
> k9*k17 + k8*k24 + k11*k17,
> k1*k13 + k1*k15 + k2*k12 + k3*k15 + k4*k14,
> k5*k18 + k6*k16 + k7*k18,
> k3 + k26,
> k0 + k19,
> k9 + k28,
> k11 + k20]
>
> from sage.sat.boolean_polynomials import solve as solve_sat
>
> kpsol = solve_sat(keqs, n=1)
>
> print type(kpsol)
> print len(kpsol)
>
> Changing the first statement to
>
> varl = ['k{0}'.format(p) for p in range(28, -1, -1)]
>
> which just re-orders the generators, a solution can be found.
> Any ideas?
>
> Jörg-Volker.
>
> --
> 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 https://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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Bug in sage.sat.boolean_polynomials.solve() with CryptoMiniSat 5.0.1

2018-12-09 Thread Steven Craighead
Equations three through six in keqs are nonlinear.  I would expect if you left 
the var1 order alone and permuted the order of the equations you might even get 
different answers.

For instance if you swapped equation one with equation nine, you might get the 
same answer with the standard order on var1 that you are getting with your 
reversed order on var1.

Sent from my iPad

> On Dec 9, 2018, at 8:46 AM, Jörg-Volker  wrote:
> 
> Just a reminder that there's still a bug in the communication with the 
> experimental package CryptoMiniSat 5.0.1 when used via the function  
> sage.sat.boolean_polynomials.solve().
> In the following example no solution of the boolean equation system is not 
> found:
> 
> varl = ['k{0}'.format(p) for p in range(29)]
> 
> B = BooleanPolynomialRing(names = varl)
> B.inject_variables(verbose=False)
> 
> keqs = [
> k0 + k6 + 1,
> k3 + k9 + 1,
> k5*k18 + k6*k18 + k7*k16 + k7*k10,
> k9*k17 + k8*k24 + k11*k17,
> k1*k13 + k1*k15 + k2*k12 + k3*k15 + k4*k14,
> k5*k18 + k6*k16 + k7*k18,
> k3 + k26,
> k0 + k19,
> k9 + k28,
> k11 + k20]
> 
> from sage.sat.boolean_polynomials import solve as solve_sat
> 
> kpsol = solve_sat(keqs, n=1)
> 
> print type(kpsol)
> print len(kpsol)
> 
> Changing the first statement to
> 
> varl = ['k{0}'.format(p) for p in range(28, -1, -1)]
> 
> which just re-orders the generators, a solution can be found.
> Any ideas?
> 
> Jörg-Volker.
> -- 
> 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 https://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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Bug in sage.sat.boolean_polynomials.solve() with CryptoMiniSat 5.0.1

2018-12-09 Thread Steven Craighead
Isn’t this like a situation that requires Groebner bases?  Your equations can’t 
be solved when your variables go from 0 to 28, but can from 28 to 0.

This might be a neat little research problem figuring out why you need a 
specific order on your variable list.

Sent from my iPad

> On Dec 9, 2018, at 8:46 AM, Jörg-Volker  wrote:
> 
> Just a reminder that there's still a bug in the communication with the 
> experimental package CryptoMiniSat 5.0.1 when used via the function  
> sage.sat.boolean_polynomials.solve().
> In the following example no solution of the boolean equation system is not 
> found:
> 
> varl = ['k{0}'.format(p) for p in range(29)]
> 
> B = BooleanPolynomialRing(names = varl)
> B.inject_variables(verbose=False)
> 
> keqs = [
> k0 + k6 + 1,
> k3 + k9 + 1,
> k5*k18 + k6*k18 + k7*k16 + k7*k10,
> k9*k17 + k8*k24 + k11*k17,
> k1*k13 + k1*k15 + k2*k12 + k3*k15 + k4*k14,
> k5*k18 + k6*k16 + k7*k18,
> k3 + k26,
> k0 + k19,
> k9 + k28,
> k11 + k20]
> 
> from sage.sat.boolean_polynomials import solve as solve_sat
> 
> kpsol = solve_sat(keqs, n=1)
> 
> print type(kpsol)
> print len(kpsol)
> 
> Changing the first statement to
> 
> varl = ['k{0}'.format(p) for p in range(28, -1, -1)]
> 
> which just re-orders the generators, a solution can be found.
> Any ideas?
> 
> Jörg-Volker.
> -- 
> 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 https://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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Weak references in the coercion model

2018-12-05 Thread steven . craighead
Thanks for explaining it in detail.  I used to have to chase large amounts of 
memory leaks and your discussion reminded me of that complex chase every two to 
three months which had to fit in our software release cycles.

Sent from my iPhone

> On Dec 5, 2018, at 3:50 AM, Simon King  wrote:
> 
> Hi Steven,
> 
>> On 2018-12-05, Steven Craighead  wrote:
>> How difficult is it to create a stack that can control the order of objects
>> being created and destroyed so you prevent leaks?  Can you add a new method
>> on your base class that is inherited to all children to track this?
> 
> One basic principle in the development of Sage is: "Do not reinvent the
> wheel, but build the car."
> 
> So, we use mainstream programming languages (Python for user
> interface, Python and Cython for the Sage library), and we use
> existing software packages, partly from the Python ecosystem,
> partly stand-alone, such as Singular. These third-party packages can of
> course be written in all kinds of languages, such as fortran, C++, Java,
> etc.
> 
> Therefore, memory leaks could have three causes:
> 
> 1. A leak in a third-party package. In that case, we send a bug report to 
>   upstream, possibly fixing it by a downstream patch until the bug is
>   fixed upstream.
> 2. A bug in Python's cyclic garbage collection. I don't know if we ever
>   stumbled over such bug, but in principle it is a possible cause.
> 3. Constructions in the Sage library that prevent Python's cyclic
>   garbage collection from properly working.
> 
> This thread is about yet another instance of cause 3, or rather about a
> strategy to generally prevent instances of cause 3.
> 
> What prevents cyclic gc from working?
> - If there is a reference cycle involving one instance with a __del__
>  method, then Python would not apply garbage collection to that cycle.
>  If I recall correctly, there has been a Sage memory leak in the past where
>  the existence of a __del__ method was the underlying cause.
> - For performance reason, Sage does a lot of caching, and the caching
>  involves objects that typically have lots of cross references. See,
>  for example, the coercion system. Note that coercion in Sage is not
>  the same as coercion in C. A coercion in Sage, in first approximation,
>  is a canonical morphism in a mathematical category. If caching is done
>  improperly, then there may be some external reference to a reference
>  cycle, which of course means that Python wouldn't (and shouldn't)
>  garbage collect that cycle.
> 
> In order to prevent external strong references to a reference cycle, we
> often use weak references for caching.
> But that needs to be done with care: If there are two many weak
> references, then stuff may be garbage collected although we wanted it to
> be cached, and also following a weak references is slower than following
> a strong reference; but using too few weak references creates a memory
> leak.
> 
> I believe it would be an extremely bad idea to try and implement our own
> cyclic garbage collection, disabling Python's.
> 
> Best regards,
> Simon
> 
> -- 
> 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 https://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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Weak references in the coercion model

2018-12-04 Thread Steven Craighead
How difficult is it to create a stack that can control the order of objects 
being created and destroyed so you prevent leaks?  Can you add a new method on 
your base class that is inherited to all children to track this?

Sent from my iPad

> On Dec 4, 2018, at 6:54 PM, David Roe  wrote:
> 
> 
> 
>> On Tue, Dec 4, 2018 at 9:06 PM  wrote:
>> Would it be advisable to change the base programming language to one that 
>> does automatic garbage collection instead of having to check to see if a 
>> class has been properly disposed like it appears from all of these related 
>> bugs?
> 
> I can't tell if you're being sarcastic, but I'll just say that the problem 
> isn't the language.  Both Python and Cython have garbage collection.  The 
> issue is that we want to cache things for speed reasons, but also need to 
> prevent unbounded growth in Sage's memory usage.
> David
> 
>> 
>> Sent from my iPhone
>> 
>> > On Dec 4, 2018, at 12:44 PM, Jeroen Demeyer  wrote:
>> > 
>> >> On 2018-12-04 18:06, Nils Bruin wrote:
>> >> Tripledict does that to some extent (with its keys): if one of the key
>> >> parts gets deallocated, the weakref callback removes the strong
>> >> reference to the value.
>> > 
>> > Yes, but then we potentially end up again in the situation where things 
>> > are *only* weakly referenced. Currently, you still need a strong reference 
>> > in a fixed place and ideally we shouldn't.
>> > 
>> > I have a very preliminary idea at #26811 to "fix" this.
>> > 
>> > -- 
>> > 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 https://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 https://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 https://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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Weak references in the coercion modeled

2018-12-04 Thread steven . craighead
No sarcasm intended.  I used to work at a software development firm and we were 
forced to use c++.  Most of the back and forth that I have been observing with 
the team is around memory leaks and I just wondered if that is due to your 
development language choice.  Hence, my comment. However, if you are using low 
level languages to get the fastest processing time, then I can see why you are 
doing what you are doing.  I’m just afraid that there may be some low level 
design flaw leading to all of these leaks.  For instance you might consider 
using messages between different objects to help isolate object disposal, 
instead of carefully remembering what object has to be disposed in which order. 
 This is difficult to do because of the late binding due to the flexibility of 
sage.

Sent from my iPhone

> On Dec 4, 2018, at 6:54 PM, David Roe  wrote:
> 
> 
> 
>> On Tue, Dec 4, 2018 at 9:06 PM  wrote:
>> Would it be advisable to change the base programming language to one that 
>> does automatic garbage collection instead of having to check to see if a 
>> class has been properly disposed like it appears from all of these related 
>> bugs?
> 
> I can't tell if you're being sarcastic, but I'll just say that the problem 
> isn't the language.  Both Python and Cython have garbage collection.  The 
> issue is that we want to cache things for speed reasons, but also need to 
> prevent unbounded growth in Sage's memory usage.
> David
> 
>> 
>> Sent from my iPhone
>> 
>> > On Dec 4, 2018, at 12:44 PM, Jeroen Demeyer  wrote:
>> > 
>> >> On 2018-12-04 18:06, Nils Bruin wrote:
>> >> Tripledict does that to some extent (with its keys): if one of the key
>> >> parts gets deallocated, the weakref callback removes the strong
>> >> reference to the value.
>> > 
>> > Yes, but then we potentially end up again in the situation where things 
>> > are *only* weakly referenced. Currently, you still need a strong reference 
>> > in a fixed place and ideally we shouldn't.
>> > 
>> > I have a very preliminary idea at #26811 to "fix" this.
>> > 
>> > -- 
>> > 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 https://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 https://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 https://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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Weak references in the coercion model

2018-12-04 Thread steven . craighead
Would it be advisable to change the base programming language to one that does 
automatic garbage collection instead of having to check to see if a class has 
been properly disposed like it appears from all of these related bugs?

Sent from my iPhone

> On Dec 4, 2018, at 12:44 PM, Jeroen Demeyer  wrote:
> 
>> On 2018-12-04 18:06, Nils Bruin wrote:
>> Tripledict does that to some extent (with its keys): if one of the key
>> parts gets deallocated, the weakref callback removes the strong
>> reference to the value.
> 
> Yes, but then we potentially end up again in the situation where things are 
> *only* weakly referenced. Currently, you still need a strong reference in a 
> fixed place and ideally we shouldn't.
> 
> I have a very preliminary idea at #26811 to "fix" this.
> 
> -- 
> 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 https://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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] the command: "E = EllipticCurve('14a1') K. = E.division_field(5); K" never finishes

2018-12-01 Thread Steven Craighead
E = EllipticCurve('14a1')
K. = E.division_field(p); K for p = 2 and 3 finishes quickly.  When I 
use p = 5 or p = 7, the command never finishes.

I use Sagemath 8.4 on a linux mint 19.  This is a toshiba AMD Turion II 
Dual Core Process M500 with 4GB ram.   This is a Pentium 64-bit.

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