[sage-support] Re: Loading an object containing a matrix that was saved in Python 2 sage

2020-08-19 Thread Paul Leopardi
I have about 6 TB of saved Sage objects that I would like to recover, so am 
interested in testing the fix.


On Thursday, 20 August 2020 at 14:10:34 UTC+10 Paul Leopardi wrote:

> Done. https://trac.sagemath.org/ticket/30402
>
> On Thursday, 20 August 2020 at 02:35:15 UTC+10 Nils Bruin wrote:
>
>> On Wednesday, August 19, 2020 at 5:24:48 AM UTC-7, Paul Leopardi wrote:
>>>
>>> See also 
>>> https://groups.google.com/g/sage-support/c/3WKui-LojKs/m/DgEPBGF3AQAJ 
>>> and https://trac.sagemath.org/ticket/28444
>>>
>>> On Wednesday, 19 August 2020 at 22:17:40 UTC+10 Paul Leopardi wrote:
>>>
>>>> Hello,
>>>> I am currently trying to convert my Boolean-Cayley-graphs project from 
>>>> Python 2 to Python 3 Sage. 
>>>> https://github.com/penguian/Boolean-Cayley-graphs/tree/23-port-to-python-3
>>>>
>>>> I have succeeded in converting the code, but am having a tough time 
>>>> trying to load objects that were saved by my previous Python 2-based code. 
>>>> These objects contain matrices as members.What do I need to do to be able 
>>>> to load these objects?
>>>>
>>>> As far as I can tell, load(...,encoding='latin-1') doesn't work with a 
>>>> dict containing a matrix but load(...,encoding='bytes') does. See the 
>>>> attachment.
>>>> Thanks!
>>>>
>>>
>> Yes, we know how to fix it and it's not complicated: if "bytes" is 
>> expected in a pickle and a "str" is found, we should assume it represents 
>> the bytes-object via latin-1. It's come up in matrices elsewhere and we 
>> should just make this change. We've already determined that 
>> "encoding='bytes'" is a lot harder to get to work.
>>
>> Please open a ticket. Fixing this should save a LOT of pickles.
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/ce3aeb65-4d8b-4d67-b8ac-64f1d35c56fen%40googlegroups.com.


[sage-support] Re: Loading an object containing a matrix that was saved in Python 2 sage

2020-08-19 Thread Paul Leopardi
Done. https://trac.sagemath.org/ticket/30402

On Thursday, 20 August 2020 at 02:35:15 UTC+10 Nils Bruin wrote:

> On Wednesday, August 19, 2020 at 5:24:48 AM UTC-7, Paul Leopardi wrote:
>>
>> See also 
>> https://groups.google.com/g/sage-support/c/3WKui-LojKs/m/DgEPBGF3AQAJ 
>> and https://trac.sagemath.org/ticket/28444
>>
>> On Wednesday, 19 August 2020 at 22:17:40 UTC+10 Paul Leopardi wrote:
>>
>>> Hello,
>>> I am currently trying to convert my Boolean-Cayley-graphs project from 
>>> Python 2 to Python 3 Sage. 
>>> https://github.com/penguian/Boolean-Cayley-graphs/tree/23-port-to-python-3
>>>
>>> I have succeeded in converting the code, but am having a tough time 
>>> trying to load objects that were saved by my previous Python 2-based code. 
>>> These objects contain matrices as members.What do I need to do to be able 
>>> to load these objects?
>>>
>>> As far as I can tell, load(...,encoding='latin-1') doesn't work with a 
>>> dict containing a matrix but load(...,encoding='bytes') does. See the 
>>> attachment.
>>> Thanks!
>>>
>>
> Yes, we know how to fix it and it's not complicated: if "bytes" is 
> expected in a pickle and a "str" is found, we should assume it represents 
> the bytes-object via latin-1. It's come up in matrices elsewhere and we 
> should just make this change. We've already determined that 
> "encoding='bytes'" is a lot harder to get to work.
>
> Please open a ticket. Fixing this should save a LOT of pickles.
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/16c52cc2-4a50-45b5-bee9-af82e125e4bfn%40googlegroups.com.


[sage-support] Re: Loading an object containing a matrix that was saved in Python 2 sage

2020-08-19 Thread Paul Leopardi
See also 
https://groups.google.com/g/sage-support/c/3WKui-LojKs/m/DgEPBGF3AQAJ and 
https://trac.sagemath.org/ticket/28444

On Wednesday, 19 August 2020 at 22:17:40 UTC+10 Paul Leopardi wrote:

> Hello,
> I am currently trying to convert my Boolean-Cayley-graphs project from 
> Python 2 to Python 3 Sage. 
> https://github.com/penguian/Boolean-Cayley-graphs/tree/23-port-to-python-3
>
> I have succeeded in converting the code, but am having a tough time trying 
> to load objects that were saved by my previous Python 2-based code. These 
> objects contain matrices as members.What do I need to do to be able to load 
> these objects?
>
> As far as I can tell, load(...,encoding='latin-1') doesn't work with a 
> dict containing a matrix but load(...,encoding='bytes') does. See the 
> attachment.
> Thanks!
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/06074cc2-8777-4171-b92b-8aab8e982a73n%40googlegroups.com.


[sage-support] Loading an object containing a matrix that was saved in Python 2 sage

2020-08-19 Thread Paul Leopardi
Hello,
I am currently trying to convert my Boolean-Cayley-graphs project from 
Python 2 to Python 3 Sage. 
https://github.com/penguian/Boolean-Cayley-graphs/tree/23-port-to-python-3

I have succeeded in converting the code, but am having a tough time trying 
to load objects that were saved by my previous Python 2-based code. These 
objects contain matrices as members.What do I need to do to be able to load 
these objects?

As far as I can tell, load(...,encoding='latin-1') doesn't work with a dict 
containing a matrix but load(...,encoding='bytes') does. See the attachment.
Thanks!

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/ca2c8bd4-b465-4e9f-ba50-d9b431444829n%40googlegroups.com.
~/test-matrix-save-load$ sage
┌┐
│ SageMath version 8.6.rc0, Release Date: 2019-01-03 │
│ Using Python 2.7.15. Type "help()" for help.   │
└┘
┏┓
┃ Warning: this is a prerelease version, and it may be unstable. ┃
┗┛
sage: m=matrix([[1,2,3],[4,5,7]])
sage: m
[1 2 3]
[4 5 7]
sage: d={'1':0,'2':'Hello','3':m}
sage: d
{'1': 0, '2': 'Hello', '3': [1 2 3]
 [4 5 7]}
sage: save(m,'m')
sage: save(d,'d')
sage: dl=load('d.sobj')
sage: dl==d
True
sage: df=open('d.sobj','rb').read()
sage: explain_pickle(df)
pg_make_integer = unpickle_global('sage.rings.integer', 'make_integer')
pg_unpickle = unpickle_global('sage.matrix.matrix0', 'unpickle')
pg_Matrix_integer_dense = unpickle_global('sage.matrix.matrix_integer_dense', 
'Matrix_integer_dense')
pg_unreduce = unpickle_global('sage.structure.unique_representation', 
'unreduce')
pg_MatrixSpace = unpickle_global('sage.matrix.matrix_space', 'MatrixSpace')
pg_IntegerRing = unpickle_global('sage.rings.integer_ring', 'IntegerRing')
pg = unpickle_instantiate(pg_IntegerRing, ())
{'1':pg_make_integer('0'), '3':pg_unpickle(pg_Matrix_integer_dense, 
pg_unreduce(pg_MatrixSpace, (pg, 2r, 3r, False, pg_Matrix_integer_dense), {}), 
False, None, '1 2 3 4 5 7', 0r), '2':'Hello'}
sage: quit
Exiting Sage (CPU time 0m0.82s, Wall time 3m12.86s).

~/test-matrix-save-load$ sage
┌┐
│ SageMath version 9.1, Release Date: 2020-05-20 │
│ Create a "Sage Worksheet" file for the notebook interface. │
│ Enhanced for CoCalc.   │
│ Using Python 3.7.3. Type "help()" for help.│
└┘
sage: df=open('d.sobj','rb').read()
sage: explain_pickle(df)
pg_make_integer = unpickle_global('sage.rings.integer', 'make_integer')
pg_unpickle = unpickle_global('sage.matrix.matrix0', 'unpickle')
pg_Matrix_integer_dense = unpickle_global('sage.matrix.matrix_integer_dense', 
'Matrix_integer_dense')
pg_unreduce = unpickle_global('sage.structure.unique_representation', 
'unreduce')
pg_MatrixSpace = unpickle_global('sage.matrix.matrix_space', 'MatrixSpace')
pg_IntegerRing = unpickle_global('sage.rings.integer_ring', 'IntegerRing')
pg = unpickle_instantiate(pg_IntegerRing, ())
{'1':pg_make_integer('0'), '3':pg_unpickle(pg_Matrix_integer_dense, 
pg_unreduce(pg_MatrixSpace, (pg, 2r, 3r, False, pg_Matrix_integer_dense), {}), 
False, None, '1 2 3 4 5 7', 0r), '2':'Hello'}
sage: dl=load('d.sobj')
---
RuntimeError  Traceback (most recent call last)
 in ()
> 1 dl=load('d.sobj')

/ext/sage/sage-9.1/local/lib/python3.7/site-packages/sage/misc/persist.pyx in 
sage.misc.persist.load (build/cythonized/sage/misc/persist.c:2900)()
156
157 ## Load file by absolute filename
--> 158 with open(filename, 'rb') as fobj:
159 X = loads(fobj.read(), compress=compress, **kwargs)
160 try:

/ext/sage/sage-9.1/local/lib/python3.7/site-packages/sage/misc/persist.pyx in 
sage.misc.persist.load (build/cythonized/sage/misc/persist.c:2850)()
157 ## Load file by absolute filename
158 with open(filename, 'rb') as fobj:
--> 159 X = loads(fobj.read(), compress=compress, **kwargs)
160 try:
161 X._default_filename = os.path.abspath(filename)

/ext/sage/sage-9.1/local/lib/python3.7/site-packages/sage/misc/persist.pyx in 
sage.misc.persist.loads (build/cythonized/sage/misc/persist.c:7424)()
   1042
   1043 unpickler = SageUnpickler(io.BytesIO(s), **kwargs)
-> 1044 return unpickler.load()
   1045
   1046


[sage-support] Re: Bug in BooleanFunction: truth_table(format="hex") is wrong

2017-11-26 Thread Paul Leopardi
I have now reported this suspected bug as 
https://trac.sagemath.org/ticket/24282

-- 
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] Bug in BooleanFunction: truth_table(format="hex") is wrong

2017-11-23 Thread Paul Leopardi
Hi all,
Sometimes, especially with functions of 8 variables, the 
BooleanFunction.truth_table() method with format='hex" gives wrong values 
that are the wrong length.
I don't yet have a login to Trac. Should I obtain one and report the bug 
there?
All the best, Paul



*Bug in BooleanFunction.truth_table(format='hex")*To reproduce:

┌┐
│ SageMath version 7.6, Release Date: 2017-03-25 │
│ Type "notebook()" for the browser-based notebook interface.│
│ Type "help()" for help.│
└┘
sage: from sage.rings.integer_ring import ZZ
sage: from sage.crypto.boolean_function import BooleanFunction
sage: hex_str = 
"0123456789112345678921234567893123456789412345678951234567896123"
sage: len(hex_str)
64
sage: bf = BooleanFunction(hex_str)
sage: bf.nvariables()
8
sage: bf_tt_hex = bf.truth_table(format="hex")
sage: bf_tt_hex
'123456789112345678921234567893123456789412345670123456789112345678921234567893123456789412345678951234567896123'
sage: len(bf_tt_hex)
111
sage: S = ZZ(bf.truth_table(), 2).str(16)
sage: padding = "0" * ((1 << (bf.nvariables() - 2)) - len(S))
sage: tt_hex = padding + S
sage: tt_hex
'0123456789112345678921234567893123456789412345678951234567896123'
sage: len(tt_hex)
64

Suspect source code: 
https://github.com/sagemath/sage/blob/develop/src/sage/crypto/boolean_function.pyx
 
lines 566 to 576:

if format == 'hex':

S = ""
S = ZZ(self.truth_table(),2).str(16)
S = "0"*((1<<(self._nvariables-2)) - len(S)) + S
for 1 <= i < self._truth_table.limbs:
if sizeof(long)==4:
t = "%04x"%self._truth_table.bits[i]
if sizeof(long)==8:
t = "%08x"%self._truth_table.bits[i]
S = t + S
return S

This could simply be replaced by:

if format == 'hex':

S = ZZ(self.truth_table(),2).str(16)
S = "0"*((1<<(self._nvariables-2)) - len(S)) + S
return S


-- 
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.


Re: [sage-support] How to use Sphinx to create documentation for a project that uses Sage?

2017-05-31 Thread Paul Leopardi


On Wednesday, 31 May 2017 19:39:32 UTC+10, Jeroen Demeyer wrote:
>
> I think you need to import sage.all first, before importing anything 
> else from sage. 
>

Thanks, I think I figured out what you mean. I updated conf.py to contain 
the following:
...
# If extensions (or modules to document with autodoc) are in another 
directory,
# add these directories to sys.path here. If the directory is relative to 
the
# documentation root, use os.path.abspath to make it absolute, like shown 
here.
#
import os
import sys
sys.path.insert(0, os.path.abspath('../sage-code'))
sys.path.insert(0, os.path.abspath('../sage-code/boolean_cayley_graphs'))
import sage.all
...
After that, make html worked.
 

-- 
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.


Re: [sage-support] How to use Sphinx to create documentation for a project that uses Sage?

2017-05-31 Thread Paul Leopardi


On Wednesday, 31 May 2017 19:39:32 UTC+10, Jeroen Demeyer wrote:
>
> I think you need to import sage.all first, before importing anything 
> else from sage. 
>

Thanks, in which file do you mean, every Python file that uses Sage, or 
some specific file?
 

-- 
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.


Re: [sage-support] How to use Sphinx to create documentation for a project that uses Sage?

2017-05-30 Thread Paul Leopardi


On Tuesday, 30 May 2017 23:35:37 UTC+10, Jeroen Demeyer wrote:
>
> Sphinx needs to be able to import your modules to document them. There 
> is nothing Sphinx-specific about this, it's just usual Python imports. I 
> am assuming that your package works within Sage but not outside of Sage. 
> That means that you need to run Sphinx also within the Sage environment. 
>
> The easiest way to do this is running a Sage shell: 
>
> $ sage --sh 
>
> And now do everything again within this environment. 
>

Thanks. I was not aware of sage -sh. This gets me a little further, but 
still doesn't work.

(sage-sh) leopardi@catawba:doc$ make html
Running Sphinx v1.4.4
loading pickled environment... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 1 source files that are out of date
updating environment: 0 added, 1 changed, 0 removed
reading sources... [100%] 
index   


 

/home/leopardi/sync/src/sage-sandbox/Boolean-Cayley-graphs/doc/index.rst:13: 
WARNING: autodoc: failed to import module 
u'bent_function_cayley_graph_classification'; the following exception was 
raised:
Traceback (most recent call last):
  File 
"/home/leopardi/sync/src-downloaded/sage/sage-7.6-Ubuntu_16.04-x86_64/local/lib/python2.7/site-packages/sphinx/ext/autodoc.py",
 
line 518, in import_object
__import__(self.modname)
  File 
"/home/leopardi/sync/src/sage-sandbox/Boolean-Cayley-graphs/sage-code/boolean_cayley_graphs/bent_function_cayley_graph_classification.py",
 
line 48, in 
from sage.arith.srange import xsrange
  File "sage/rings/integer.pxd", line 7, in init sage.arith.srange 
(/home/leopardi/sync/src-downloaded/sage/sage-7.6-Ubuntu_16.04-x86_64/src/build/cythonized/sage/arith/srange.c:9410)
cdef class Integer(EuclideanDomainElement):
  File "sage/rings/rational.pxd", line 8, in init sage.rings.integer 
(/home/leopardi/sync/src-downloaded/sage/sage-7.6-Ubuntu_16.04-x86_64/src/build/cythonized/sage/rings/integer.c:50835)
cdef class Rational(sage.structure.element.FieldElement):
  File "sage/rings/rational.pyx", line 66, in init sage.rings.rational 
(/home/leopardi/sync/src-downloaded/sage/sage-7.6-Ubuntu_16.04-x86_64/src/build/cythonized/sage/rings/rational.c:40571)
  File "sage/rings/integer_ring.pyx", line 60, in init 
sage.rings.integer_ring 
(/home/leopardi/sync/src-downloaded/sage/sage-7.6-Ubuntu_16.04-x86_64/src/build/cythonized/sage/rings/integer_ring.c:15199)
  File 
"/home/leopardi/sync/src-downloaded/sage/sage-7.6-Ubuntu_16.04-x86_64/local/lib/python2.7/site-packages/sage/structure/factorization.py",
 
line 190, in 
from sage.misc.all import prod
  File 
"/home/leopardi/sync/src-downloaded/sage/sage-7.6-Ubuntu_16.04-x86_64/local/lib/python2.7/site-packages/sage/misc/all.py",
 
line 88, in 
from .functional import (additive_order,
  File 
"/home/leopardi/sync/src-downloaded/sage/sage-7.6-Ubuntu_16.04-x86_64/local/lib/python2.7/site-packages/sage/misc/functional.py",
 
line 32, in 
from sage.rings.complex_double import CDF
  File "sage/rings/real_double.pxd", line 8, in init 
sage.rings.complex_double 
(/home/leopardi/sync/src-downloaded/sage/sage-7.6-Ubuntu_16.04-x86_64/src/build/cythonized/sage/rings/complex_double.c:23863)
cdef class RealDoubleField_class(Field):
  File "sage/rings/real_double.pyx", line 63, in init 
sage.rings.real_double 
(/home/leopardi/sync/src-downloaded/sage/sage-7.6-Ubuntu_16.04-x86_64/src/build/cythonized/sage/rings/real_double.c:26478)
ImportError: cannot import name ZZ
/home/leopardi/sync/src/sage-sandbox/Boolean-Cayley-graphs/doc/index.rst:15: 
WARNING: don't know which module to import for autodocumenting 
u'BentFunction' (try placing a "module" or "currentmodule" directive in the 
document, or giving an explicit module name)
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] 
index   


  

generating indices... genindex
writing additional pages... search
copying static files... done
copying extra files... done
dumping search index in English (code: en) ... done
dumping object inventory... done
build succeeded, 2 warnings.

Build finished. The HTML pages are in _build/html.

 

-- 
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 

Re: [sage-support] How to use Sphinx to create documentation for a project that uses Sage?

2017-05-30 Thread Paul Leopardi


On Tuesday, 30 May 2017 18:16:51 UTC+10, Jeroen Demeyer wrote:
>
> Good! Since you are sending this email, I assume that something is not 
> working for you. What is the problem? 
>

Please bear with me as I retrace my steps and show you the result.

 1. Following 
https://codeandchaos.wordpress.com/2012/07/30/sphinx-autodoc-tutorial-for-dummies/
 
<https://www.google.com/url?q=https%3A%2F%2Fcodeandchaos.wordpress.com%2F2012%2F07%2F30%2Fsphinx-autodoc-tutorial-for-dummies%2F=D=1=AFQjCNGLay4LlDv9nj1z2U8AFtp7Mmzdbg>
 
I ran sphinx-quickstart:

leopardi@catawba:~/sync/src/sage-sandbox/Boolean-Cayley-graphs/doc$ 
sphinx-quickstart
Welcome to the Sphinx 1.5.3 quickstart utility.

Please enter values for the following settings (just press Enter to
accept a default value, if one is given in brackets).

Enter the root path for documentation.
> Root path for the documentation [.]: 

You have two options for placing the build directory for Sphinx output.
Either, you use a directory "_build" within the root path, or you separate
"source" and "build" directories within the root path.
> Separate source and build directories (y/n) [n]: 

Inside the root directory, two more directories will be created; 
"_templates"
for custom HTML templates and "_static" for custom stylesheets and other 
static
files. You can enter another prefix (such as ".") to replace the underscore.
> Name prefix for templates and static dir [_]: 

The project name will occur in several places in the built documentation.
> Project name: Boolean-Cayley-graphs
> Author name(s): Paul Leopardi

Sphinx has the notion of a "version" and a "release" for the
software. Each version can have multiple releases. For example, for
Python the version is something like 2.5 or 3.0, while the release is
something like 2.5.1 or 3.0a1.  If you don't need this dual structure,
just set both to the same value.
> Project version []: 0.0
> Project release [0.0]: 0.0.1

If the documents are to be written in a language other than English,
you can select a language here by its language code. Sphinx will then
translate text that it generates into that language.

For a list of supported codes, see
http://sphinx-doc.org/config.html#confval-language.
> Project language [en]: 

The file name suffix for source files. Commonly, this is either ".txt"
or ".rst".  Only files with this suffix are considered documents.
> Source file suffix [.rst]: 

One document is special in that it is considered the top node of the
"contents tree", that is, it is the root of the hierarchical structure
of the documents. Normally, this is "index", but if your "index"
document is a custom template, you can also set this to another filename.
> Name of your master document (without suffix) [index]: 

Sphinx can also add configuration for epub output:
> Do you want to use the epub builder (y/n) [n]: 

Please indicate if you want to use one of the following Sphinx extensions:
> autodoc: automatically insert docstrings from modules (y/n) [n]: y
> doctest: automatically test code snippets in doctest blocks (y/n) [n]: y
> intersphinx: link between Sphinx documentation of different projects 
(y/n) [n]: 
> todo: write "todo" entries that can be shown or hidden on build (y/n) 
[n]: 
> coverage: checks for documentation coverage (y/n) [n]: y
> imgmath: include math, rendered as PNG or SVG images (y/n) [n]: 
> mathjax: include math, rendered in the browser by MathJax (y/n) [n]: y
> ifconfig: conditional inclusion of content based on config values (y/n) 
[n]: 
> viewcode: include links to the source code of documented Python objects 
(y/n) [n]: 
> githubpages: create .nojekyll file to publish the document on GitHub 
pages (y/n) [n]: 

A Makefile and a Windows command file can be generated for you so that you
only have to run e.g. `make html' instead of invoking sphinx-build
directly.
> Create Makefile? (y/n) [y]: 
> Create Windows command file? (y/n) [y]: n

Creating file ./conf.py.
Creating file ./index.rst.
Creating file ./Makefile.

Finished: An initial directory structure has been created.

You should now populate your master file ./index.rst and create other 
documentation
source files. Use the Makefile to build the docs, like so:
   make builder
where "builder" is one of the supported builders, e.g. html, latex or 
linkcheck.

2. Next, I ran make html

leopardi@catawba:~/sync/src/sage-sandbox/Boolean-Cayley-graphs/doc$ make 
html
Running Sphinx v1.5.3
making output directory...
loading pickled environment... not yet created
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 1 source files that are out of date
updating environment: 1 added, 0 changed, 0 removed
reading sources... [100%] 
index  

[sage-support] How to use Sphinx to create documentation for a project that uses Sage?

2017-05-28 Thread Paul Leopardi
Hello,
I am trying to create HTML documentation for my Boolean-Cayley-graphs 
project ( https://github.com/penguian/Boolean-Cayley-graphs ) that uses 
Sage.
If I try to just use Sphinx, following the instructions at 
https://codeandchaos.wordpress.com/2012/07/30/sphinx-autodoc-tutorial-for-dummies/
 
it is no clear to me how to tell Sphinx where to find everything in Sage 
that it might need to import.

The Sage documentation itself says how to generate the Sage manuals ( 
http://doc.sagemath.org/html/en/developer/sage_manuals.html ).
I can't find anything that says how to generate documentation for code that 
uses Sage without incorporating that code into Sage proper.

I need step by step instructions, with examples. Do these exist somewhere? 
Have I overlooked something? Or is it just assumed that I should fork Sage 
itself and incorporate my code there, just so that I can generate 
documentation?
All the best, Paul

-- 
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: Linking error in FLINT when building Sage 7.4 on Ubuntu 16.10

2017-01-02 Thread Paul Leopardi
On Friday, 28 October 2016 02:49:16 UTC+11, Dima Pasechnik wrote:
>
>
> In the general case, either -no-pie needs to be passed or cc needs to be 
> invoked with -r rather than -Wl,-r.
>
> The corresponding trac ticket is https://trac.sagemath.org/ticket/21782 ? 
And the branch to use right now when building Sage on Ubuntu 16.10 is 
u/charpent/fix-flint 
?

-- 
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: How should I determine if two strongly regular graphs are isomorphic?

2016-12-13 Thread Paul Leopardi
Hi again Dima,
For the record, see below.

On Wednesday, 24 August 2016 00:46:06 UTC+10, Dima Pasechnik wrote:
>
> Hi,
>
> I think the best way to fix your issue is to fix 
> https://trac.sagemath.org/ticket/21313
> This will allow is_isomorphic to use bliss or nauty.
> (In fact, IIRC checking for isomorphism is in practice a bit faster than 
> canonical labelling).
>
> Also, do I get it right that you have a new "generic" construction of 
> strongly regular graphs?
> As you know, we are collecting them - would you be interested in adding it 
> into sage/graphs/generators/ ?
>
> Dima
>
>
How do I add to sage/graphs/generators , based o what I have now, as 
described below?

I have been developing Sage and Python code for use in my exploration of 
bent functions and their strongly regular Cayley graphs as described in my 
recent (today) talk;
Classifying bent functions by their Cayley graphs, using Sage 
,
 
40 ACCMCC, 2016.
The code (and manuscript) repository is at  
https://github.com/penguian/Boolean-Cayley-graphs
There is also a public SageMathCloud directory at 
https://cloud.sagemath.com/projects/80f4c9e7-8a37-4f59-82e7-aa179ec0b652/files/Boolean-Cayley-graphs/
with extra SageMathCloud worksheets.

I am in the process of updating the code and especially the comments to 
conform to SageMath expectations, and porting some of the Sage code to 
Python, where sensible, but some will remain as Sage code.

-- 
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.


Re: [sage-support] How can I double check a non-isomorphism between graphs?

2016-11-03 Thread Paul Leopardi


On Thursday, 3 November 2016 04:58:11 UTC+11, Dima Pasechnik wrote:
>
> On Wednesday, November 2, 2016 at 11:57:20 AM UTC, Paul Leopardi wrote:
>>
>> On Wednesday, 2 November 2016 20:08:20 UTC+11, Dima Pasechnik wrote:
>>>
>>> I must say I don't know why these libgap.set_global and get_global are 
>>> needed.
>>>
>>>>
>> I used them to get my large matrices into libgap as globals. Trying to 
>> pass them through a text based interface does not work.
>>
>
> ld you show an example of this? 
> IMHO you might indeed have a problem if you use libgap.eval(). But you 
> should not...
> The other thought is that you appear to work with Cayley graphs, and for 
> them you only need to pass one row of the adjacency matrix,
> and the group; passing the whole matrix is an overkill.
>
>
Hi Dima,
Thanks for your patience and for all your help. I finally got the following 
to work:


gap.load_package('grape')


def check_graphs_using_gap(g_0, g_1):
m_0 = g_0.adjacency_matrix()
m_1 = g_1.adjacency_matrix()
dim = str(m_0.dimensions()[0])
gap.eval('M_0 := '+gap(m_0).str())
gap.eval('M_1 := '+gap(m_1).str())
gap.eval('GR := Group( () )')
gap.eval('G_0 := Graph( GR, [1..'+dim+'], OnPoints, function(x,y) 
return M_0[x][y] = 1; end,true );')
gap.eval('G_1 := Graph( GR, [1..'+dim+'], OnPoints, function(x,y) 
return M_1[x][y] = 1; end,true );')
return gap.eval('IsIsomorphicGraph(G_0, G_1);')

Assuming that the algorithm used is Nauty rather than Bliss, running this 
code against my graphs confirms the cases of non-isomorphism that I 
previously identified.

-- 
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.


Re: [sage-support] How can I double check a non-isomorphism between graphs?

2016-11-02 Thread Paul Leopardi


On Wednesday, 2 November 2016 20:08:20 UTC+11, Dima Pasechnik wrote:
>
> I must say I don't know why these libgap.set_global and get_global are 
> needed.
>
>>
>>
I used them to get my large matrices into libgap as globals. Trying to pass 
them through a text based interface does not work.


Following is a toy example, starting with a graph lg on 16 vertices. 
sage: lg=c[1].linear_graph_class_list[0]
sage: mlg=lg.adjacency_matrix()
sage: libgap.set_global('MLG',mlg)
sage: MLG=libgap.get_global('MLG')
sage: type(MLG)

sage: libgap.eval('MLG')
[ [ 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0 ], [ 1, 0, 0, 1, 0, 1, 
1, 0, 0, 1, 0, 1, 0, 0, 0, 0 ], [ 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 
0, 0 ], [ 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0 ], [ 1, 0, 1, 0, 
0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0 ], [ 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 
0, 1, 0, 0 ], [ 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0 ], [ 0, 0, 
1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0 ], [ 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 
0, 0, 0, 1, 1, 0 ], [ 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1 ], [ 
1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1 ], [ 0, 1, 0, 1, 0, 1, 0, 0, 
0, 0, 1, 0, 0, 0, 1, 1 ], [ 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1 
], [ 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1 ], [ 0, 0, 0, 0, 0, 0, 
1, 1, 1, 0, 1, 1, 0, 0, 0, 1 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 
1, 0 ] ]

The actual adjacency matrices that I want to use in my test are 256x256. 

sage: c, reclassification, cayley_graph_classes = 
load_boolean_dimension_graph_classifications(8,9)
sage: lg=c[9].linear_graph_class_list[0]
sage: mlg=lg.adjacency_matrix()
sage: mlg.dimensions()
(256, 256)
sage: libgap.set_global('MLG',mlg)
sage: MLG=libgap.get_global('MLG')
sage: HH=libgap.eval('HH := Graph( G, [1..16], OnPoints, function(x,y) 
return MLG[x][y] = 1; end,true );')
sage: cg=c[9].cayley_graph_class_list[0]
sage: mcg=cg.adjacency_matrix()
sage: mcg.dimensions()
(256, 256)
sage: libgap.set_global('MCG',mcg)
sage: GG=libgap.eval('GG := Graph( G, [1..16], OnPoints, function(x,y) 
return MCG[x][y] = 1; end,true );')

-- 
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.


Re: [sage-support] How can I double check a non-isomorphism between graphs?

2016-11-02 Thread Paul Leopardi
Hi Dima,
Thanks. By the way, should  gap.set_global and gap.get_global do the same sort 
of things as libgap.set_global and libgap.get_global? If not, why not?

On 2 November 2016 7:41:11 AM AEDT, Dima Pasechnik <dimp...@gmail.com> wrote:
>Right, this looks like a recent regression. AFAIR, it used to work.
>
>If you use gap.* rather than libgap.*, things seem to work for me, e.g.
>
>sage: gap.load_package('grape')
>sage: gap.eval('GG:=JohnsonGraph(5,2);')
>'rec( adjacencies := [ [ 2, 3, 4, 5, 6, 7 ] ], group := Group([ 
>(1,5,8,10,4)\n  (2,6,9,3,7), (2,5)(3,6)(4,7) ]), isGraph := true,
>isSimple 
>:= true, \n  names := [ [ 1, 2 ], [ 1, 3 ], [ 1, 4 ], [ 1, 5 ], [ 2, 3
>], [ 
>2, 4 ], \n  [ 2, 5 ], [ 3, 4 ], [ 3, 5 ], [ 4, 5 ] ], order := 10,
>\n 
>representatives := [ 1 ], schreierVector := [ -1, 2, 2, 1, 1, 1, 2, 1,
>1, 
>1 \n ] )'
>sage: gap.eval('AutGroupGraph(GG);')
>'Group([ (3,4)(6,7)(8,9), (2,3)(5,6)(9,10), (2,5)(3,6)(4,7), 
>(1,2)(6,8)(7,9) ])'
>sage: 
>
>(whereas if I use libgap.* I end up with the same error as you)
>
>This is now
>https://trac.sagemath.org/ticket/21794
>
>
>On Tuesday, November 1, 2016 at 12:48:05 PM UTC, Paul Leopardi wrote:
>>
>>
>>
>> On Tuesday, 25 October 2016 06:02:06 UTC+11, Dima Pasechnik wrote:
>>>
>>> I would do a check using GAP's Grape package, which allows for
>checking 
>>> isomorphisms
>>> (it uses nauty as the backend)
>>> While there is no ready function to call Grape from Sage, this
>should be 
>>> easy to write using e.g.
>>> libgap.function_factory()
>>>
>>
>> I finally managed to figure out how to get graphs from Sage to Grape,
>but 
>> now Grape can't find nauty. What do I need to do to configure Grape 
>> properly?
>>
>> sage: GG=libgap.eval('GG := Graph( G, [1..16], OnPoints,
>function(x,y) 
>> return MCG[x][y] = 1; end,true );')
>> sage: GG
>> rec( adjacencies := [ [ 2, 3, 5, 7, 10, 11 ], [ 1, 4, 6, 7, 10, 12 ],
>[ 1, 
>> 4, 5, 8, 11, 13 ], [ 2, 3, 6, 8, 12, 13 ], [ 1, 3, 6, 9, 11, 14 ], [
>2, 4, 
>> 5, 9, 12, 14 ], [ 1, 2, 8, 9, 10, 15 ], [ 3, 4, 7, 9, 13, 15 ], [ 5,
>6, 7, 
>> 8, 14, 15 ], [ 1, 2, 7, 13, 14, 16 ], [ 1, 3, 5, 12, 15, 16 ], [ 2,
>4, 6, 
>> 11, 15, 16 ], [ 3, 4, 8, 10, 14, 16 ], [ 5, 6, 9, 10, 13, 16 ], [ 7,
>8, 9, 
>> 11, 12, 16 ], [ 10, 11, 12, 13, 14, 15 ] ], group := Group(()),
>isGraph := 
>> true, names := [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
>16 ], 
>> order := 16, representatives := [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
>12, 
>> 13, 14, 15, 16 ], schreierVector := [ -1, -2, -3, -4, -5, -6, -7, -8,
>-9, 
>> -10, -11, -12, -13, -14, -15, -16 ] )
>> sage: HH=libgap.eval('HH := Graph( G, [1..16], OnPoints,
>function(x,y) 
>> return MLG[x][y] = 1; end,true );')
>> sage: HH
>> rec( adjacencies := [ [ 2, 3, 5, 7, 10, 11 ], [ 1, 4, 6, 7, 10, 12 ],
>[ 1, 
>> 4, 5, 8, 11, 13 ], [ 2, 3, 6, 8, 12, 13 ], [ 1, 3, 6, 9, 11, 14 ], [
>2, 4, 
>> 5, 9, 12, 14 ], [ 1, 2, 8, 9, 10, 15 ], [ 3, 4, 7, 9, 13, 15 ], [ 5,
>6, 7, 
>> 8, 14, 15 ], [ 1, 2, 7, 13, 14, 16 ], [ 1, 3, 5, 12, 15, 16 ], [ 2,
>4, 6, 
>> 11, 15, 16 ], [ 3, 4, 8, 10, 14, 16 ], [ 5, 6, 9, 10, 13, 16 ], [ 7,
>8, 9, 
>> 11, 12, 16 ], [ 10, 11, 12, 13, 14, 15 ] ], group := Group(()),
>isGraph := 
>> true, names := [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
>16 ], 
>> order := 16, representatives := [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
>12, 
>> 13, 14, 15, 16 ], schreierVector := [ -1, -2, -3, -4, -5, -6, -7, -8,
>-9, 
>> -10, -11, -12, -13, -14, -15, -16 ] )
>> sage: 
>> libgap.eval('GraphIsomorphism(GG,HH)')   
> 
>>  
>>
>---
>> ValueErrorTraceback (most recent call
>last)
>>  in ()
>> > 1 libgap.eval('GraphIsomorphism(GG,HH)')
>>
>> /home/leopardi/opt/sage/sage-7.2/src/sage/libs/gap/libgap.pyx in 
>> sage.libs.gap.libgap.Gap.eval 
>>
>(/home/leopardi/opt/sage/sage-7.2/src/build/cythonized/sage/libs/gap/libgap.c:4183)()
>> 429 if not isinstance(gap_command, basestring):
>> 430 gap_command = str(gap_command._gap_init_())
>> --> 431 return make_any_gap_element(self,
>gap_eval(gap_command))
>> 432 
>> 433 @cached_method
>>
>> /home/leopardi/opt/sage/sage-7.2/src/sage/libs/gap/util.pyx in 
>> sage.libs.gap.util.gap_eval 
>>
>(/home/leopardi/opt/sage/sage-7.2/src/build/cythoniz

Re: [sage-support] How can I double check a non-isomorphism between graphs?

2016-11-01 Thread Paul Leopardi


On Tuesday, 25 October 2016 06:02:06 UTC+11, Dima Pasechnik wrote:
>
> I would do a check using GAP's Grape package, which allows for checking 
> isomorphisms
> (it uses nauty as the backend)
> While there is no ready function to call Grape from Sage, this should be 
> easy to write using e.g.
> libgap.function_factory()
>

I finally managed to figure out how to get graphs from Sage to Grape, but 
now Grape can't find nauty. What do I need to do to configure Grape 
properly?

sage: GG=libgap.eval('GG := Graph( G, [1..16], OnPoints, function(x,y) 
return MCG[x][y] = 1; end,true );')
sage: GG
rec( adjacencies := [ [ 2, 3, 5, 7, 10, 11 ], [ 1, 4, 6, 7, 10, 12 ], [ 1, 
4, 5, 8, 11, 13 ], [ 2, 3, 6, 8, 12, 13 ], [ 1, 3, 6, 9, 11, 14 ], [ 2, 4, 
5, 9, 12, 14 ], [ 1, 2, 8, 9, 10, 15 ], [ 3, 4, 7, 9, 13, 15 ], [ 5, 6, 7, 
8, 14, 15 ], [ 1, 2, 7, 13, 14, 16 ], [ 1, 3, 5, 12, 15, 16 ], [ 2, 4, 6, 
11, 15, 16 ], [ 3, 4, 8, 10, 14, 16 ], [ 5, 6, 9, 10, 13, 16 ], [ 7, 8, 9, 
11, 12, 16 ], [ 10, 11, 12, 13, 14, 15 ] ], group := Group(()), isGraph := 
true, names := [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ], 
order := 16, representatives := [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 
13, 14, 15, 16 ], schreierVector := [ -1, -2, -3, -4, -5, -6, -7, -8, -9, 
-10, -11, -12, -13, -14, -15, -16 ] )
sage: HH=libgap.eval('HH := Graph( G, [1..16], OnPoints, function(x,y) 
return MLG[x][y] = 1; end,true );')
sage: HH
rec( adjacencies := [ [ 2, 3, 5, 7, 10, 11 ], [ 1, 4, 6, 7, 10, 12 ], [ 1, 
4, 5, 8, 11, 13 ], [ 2, 3, 6, 8, 12, 13 ], [ 1, 3, 6, 9, 11, 14 ], [ 2, 4, 
5, 9, 12, 14 ], [ 1, 2, 8, 9, 10, 15 ], [ 3, 4, 7, 9, 13, 15 ], [ 5, 6, 7, 
8, 14, 15 ], [ 1, 2, 7, 13, 14, 16 ], [ 1, 3, 5, 12, 15, 16 ], [ 2, 4, 6, 
11, 15, 16 ], [ 3, 4, 8, 10, 14, 16 ], [ 5, 6, 9, 10, 13, 16 ], [ 7, 8, 9, 
11, 12, 16 ], [ 10, 11, 12, 13, 14, 15 ] ], group := Group(()), isGraph := 
true, names := [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ], 
order := 16, representatives := [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 
13, 14, 15, 16 ], schreierVector := [ -1, -2, -3, -4, -5, -6, -7, -8, -9, 
-10, -11, -12, -13, -14, -15, -16 ] )
sage: 
libgap.eval('GraphIsomorphism(GG,HH)')  
   
 
---
ValueErrorTraceback (most recent call last)
 in ()
> 1 libgap.eval('GraphIsomorphism(GG,HH)')

/home/leopardi/opt/sage/sage-7.2/src/sage/libs/gap/libgap.pyx in 
sage.libs.gap.libgap.Gap.eval 
(/home/leopardi/opt/sage/sage-7.2/src/build/cythonized/sage/libs/gap/libgap.c:4183)()
429 if not isinstance(gap_command, basestring):
430 gap_command = str(gap_command._gap_init_())
--> 431 return make_any_gap_element(self, gap_eval(gap_command))
432 
433 @cached_method

/home/leopardi/opt/sage/sage-7.2/src/sage/libs/gap/util.pyx in 
sage.libs.gap.util.gap_eval 
(/home/leopardi/opt/sage/sage-7.2/src/build/cythonized/sage/libs/gap/util.c:4947)()
286 sig_off()
287 except RuntimeError as msg:
--> 288 raise ValueError('libGAP: '+str(msg).strip())
289 
290 if libGAP_Symbol != libGAP_S_SEMICOLON:

ValueError: libGAP: d
$1n16g
2
3
5
7
10
11;
1
4
6
7
10
12;
1
4
5
8
11
13;
2
3
6
8
12
13;
1
3
6
9
11
14;
2
4
5
9
12
14;
1
2
8
9
10
15;
3
4
7
9
13
15;
5
6
7
8
14
15;
1
2
7
13
14
16;
1
3
5
12
15
16;
2
4
6
11
15
16;
3
4
8
10
14
16;
5
6
9
10
13
16;
7
8
9
11
12
16;
10
11
12
13
14
15.
> /tmp/tmd2qUpq/ftmp1 p,cx
>> /tmp/tmd2qUpq/ftmp2 bq
16
Error, cannot find output produced by `dreadnaut'

-- 
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.


Re: [sage-support] How can I double check a non-isomorphism between graphs?

2016-10-25 Thread Paul Leopardi
On Tuesday, 25 October 2016 06:02:06 UTC+11, Dima Pasechnik wrote:
>
> I would do a check using GAP's Grape package, which allows for checking 
> isomorphisms
> (it uses nauty as the backend)
> While there is no ready function to call Grape from Sage, this should be 
> easy to write using e.g.
> libgap.function_factory()
>
>
Is there a simple guide on how to copy Sage graphs and matrices into and 
out of Gap? What I have seen so far is not encouraging. In fact I have not 
yet seen any documentation on how to copy a GF(2) matrix from Sage to Gap. 
Similarly for graphs. Presumably someone has done it by now. Is there a FAQ 
for this?
 

-- 
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.


Re: [sage-support] How can I double check a non-isomorphism between graphs?

2016-10-24 Thread Paul Leopardi
On Tuesday, 25 October 2016 06:02:06 UTC+11, Dima Pasechnik wrote:
>
> I would do a check using GAP's Grape package, which allows for checking 
> isomorphisms
> (it uses nauty as the backend)
> While there is no ready function to call Grape from Sage, this should be 
> easy to write using e.g.
> libgap.function_factory()
>
>
>
Thanks for the tip!
 

-- 
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.


Re: [sage-support] How can I double check a non-isomorphism between graphs?

2016-10-24 Thread Paul Leopardi
Hi, 
I have attached the output file here. I am sorry that I have not put more 
time into cleaning up the code and the output.

Once you figure out what the output is trying to tell you, you will see 
that the relevant pairs of strongly regular graphs are isomorphic for dim=4 
and dim=6, and also for the first 8 of 10 polynomials for dim=8.
All the best, Paul


-- 
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: load("boolean_dimension_cayley_graph_classifications.sage")
sage: import cayley_graph_controls as controls
sage: controls.verbose = True
sage: c, reclassification, graph_classes = 
load_boolean_dimension_cayley_graph_classifications(2)
1 :
[ 0  1]
[12  4]
Algebraic normal form: x0*x1
Function is bent.
Dillon-Schatz incidence structure t-design parameters: (True, (1, 4, 1, 1))

Clique polynomial, strongly regular parameters, rank, and order of each 
representative Cayley graph in the extended affine class;
linear code and generator matrix for one of the bent functions in the Cayley 
class:
Polynomial 2*t^2 + 4*t + 1
Parameters (4, 1, 0, 0)
Rank 4 Order 8
Linear code of length 1, dimension 1 over Finite Field of size 2
Generator matrix:
[1]
Linear code is projective.
Weight distribution {0: 1, 1: 1}

Polynomial t^4 + 4*t^3 + 6*t^2 + 4*t + 1
Parameters False
Rank 4 Order 24
Linear code of length 3, dimension 2 over Finite Field of size 2
Generator matrix:
[1 0 1]
[0 1 1]
Linear code is projective.
Weight distribution {0: 1, 2: 3}

Cayley graph index matrix:
[0 0 0 1]
[0 1 0 0]
[0 0 1 0]
[1 0 0 0]
Weight class matrix:
[0 0 0 1]
[0 1 0 0]
[0 0 1 0]
[1 0 0 0]
sage: c, reclassification, graph_classes = 
load_boolean_dimension_cayley_graph_classifications(4)
1 :
[  0   1]
[160  96]
Algebraic normal form: x0*x1 + x2*x3
Function is bent.
Dillon-Schatz incidence structure t-design parameters: (True, (2, 16, 6, 2))

Clique polynomial, strongly regular parameters, rank, and order of each 
representative Cayley graph in the extended affine class;
linear code, generator matrix, and corresponding clique polynomial, strongly 
regular parameters, rank, and order for one of the bent functions in the Cayley 
class:
Polynomial 8*t^4 + 32*t^3 + 48*t^2 + 16*t + 1
Parameters (16, 6, 2, 2)
Rank 6 Order 1152
Strongly regular graph from code is isomorphic to Cayley graph.
Linear code of length 6, dimension 4 over Finite Field of size 2
Generator matrix:
[1 0 0 0 0 1]
[0 1 0 1 0 0]
[0 0 1 1 0 0]
[0 0 0 0 1 1]
Linear code is projective.
Weight distribution {0: 1, 2: 6, 4: 9}

Polynomial 16*t^5 + 120*t^4 + 160*t^3 + 80*t^2 + 16*t + 1
Parameters (16, 10, 6, 6)
Rank 6 Order 1920
Strongly regular graph from code is isomorphic to Cayley graph.
Linear code of length 10, dimension 4 over Finite Field of size 2
Generator matrix:
[1 0 1 0 1 0 0 1 0 0]
[0 1 1 0 1 1 0 1 1 0]
[0 0 0 1 1 1 0 0 0 1]
[0 0 0 0 0 0 1 1 1 1]
Linear code is projective.
Weight distribution {0: 1, 4: 5, 6: 10}

Cayley graph index matrix:
[0 0 0 1 0 0 0 1 0 0 0 1 1 1 1 0]
[0 1 0 0 0 1 0 0 0 1 0 0 1 0 1 1]
[0 0 1 0 0 0 1 0 0 0 1 0 1 1 0 1]
[1 0 0 0 1 0 0 0 1 0 0 0 0 1 1 1]
[0 0 0 1 1 1 1 0 0 0 0 1 0 0 0 1]
[0 1 0 0 1 0 1 1 0 1 0 0 0 1 0 0]
[0 0 1 0 1 1 0 1 0 0 1 0 0 0 1 0]
[1 0 0 0 0 1 1 1 1 0 0 0 1 0 0 0]
[0 0 0 1 0 0 0 1 1 1 1 0 0 0 0 1]
[0 1 0 0 0 1 0 0 1 0 1 1 0 1 0 0]
[0 0 1 0 0 0 1 0 1 1 0 1 0 0 1 0]
[1 0 0 0 1 0 0 0 0 1 1 1 1 0 0 0]
[1 1 1 0 0 0 0 1 0 0 0 1 0 0 0 1]
[1 0 1 1 0 1 0 0 0 1 0 0 0 1 0 0]
[1 1 0 1 0 0 1 0 0 0 1 0 0 0 1 0]
[0 1 1 1 1 0 0 0 1 0 0 0 1 0 0 0]
Weight class matrix:
[0 0 0 1 0 0 0 1 0 0 0 1 1 1 1 0]
[0 1 0 0 0 1 0 0 0 1 0 0 1 0 1 1]
[0 0 1 0 0 0 1 0 0 0 1 0 1 1 0 1]
[1 0 0 0 1 0 0 0 1 0 0 0 0 1 1 1]
[0 0 0 1 1 1 1 0 0 0 0 1 0 0 0 1]
[0 1 0 0 1 0 1 1 0 1 0 0 0 1 0 0]
[0 0 1 0 1 1 0 1 0 0 1 0 0 0 1 0]
[1 0 0 0 0 1 1 1 1 0 0 0 1 0 0 0]
[0 0 0 1 0 0 0 1 1 1 1 0 0 0 0 1]
[0 1 0 0 0 1 0 0 1 0 1 1 0 1 0 0]
[0 0 1 0 0 0 1 0 1 1 0 1 0 0 1 0]
[1 0 0 0 1 0 0 0 0 1 1 1 1 0 0 0]
[1 1 1 0 0 0 0 1 0 0 0 1 0 0 0 1]
[1 0 1 1 0 1 0 0 0 1 0 0 0 1 0 0]
[1 1 0 1 0 0 1 0 0 0 1 0 0 0 1 0]
[0 1 1 1 1 0 0 0 1 0 0 0 1 0 0 0]
sage: c, reclassification, graph_classes = 
load_boolean_dimension_cayley_graph_classifications(6)
1 :
[   01]
[2304 1792]
Algebraic normal form: x0*x1 + x2*x3 + x4*x5
Function is bent.
Dillon-Schatz incidence structure t-design parameters: (True, (2, 64, 28, 12))

Clique polynomial, strongly regular parameters, rank, and order of each 
representative Cayley graph in the extended affine class;
linear code, generator matrix, and corresponding clique polynomial, strongly 
regular parameters, rank, and order for one of the bent functions in the Cayley 
class:
Polynomial 

Re: [sage-support] How can I double check a non-isomorphism between graphs?

2016-10-24 Thread Paul Leopardi


On Tuesday, 25 October 2016 05:55:42 UTC+11, Dima Pasechnik wrote:
>
> I am trying to run your script, but am getting
>
> IOError: did not find file 
> 'boolean_dimension_cayley_graph_classifications.sage' to load or attach
>
> and indeed, there is no file so named in your github repo.
>
>
>
It is here: 
https://github.com/penguian/Boolean-Cayley-graphs/blob/python-refactor/boolean_dimension_cayley_graph_classifications.sage
You need to use the python-refactor branch. 
Sorry, this is all work in progress, and I have been sick over the last few 
days, with not enough energy to tidy things up.

-- 
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.


Re: [sage-support] How can I double check a non-isomorphism between graphs?

2016-10-24 Thread Paul Leopardi


On 25 October 2016 12:12:44 AM AEDT, Dima Pasechnik <dimp...@gmail.com> wrote:
>I'd start by checking that the parameters of these strongly regular
>graphs 
>are the same, i.e. comparing
>
>G2.is_strongly_regular(parameters=True)
>G1.is_strongly_regular(parameters=True)
>
>it could be that you'd need to take the complement, or, even worse, a
>graph 
>coming from the dual (in the S-ring, etc sense)
>association scheme.
>
>In particular, I recall stumbling upon this while working on these
>graphs, 
>and finding out that the formulae here:
>http://moodle.tec.hkr.se/~chen/research/2-weight-codes/index.htm
>are not always correct.

Thanks, Dima.
The strongly regular graph parameters are always the same. The graphs 
themselves are in some cases not isomorphic. In my next message I will post the 
relevant output from my code.
-- 
Paul Leopardi https://sites.google.com/site/paulleopardi/

-- 
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.


Re: [sage-support] How can I double check a non-isomorphism between graphs?

2016-10-24 Thread Paul Leopardi
On Monday, 24 October 2016 01:45:10 UTC+11, David Joyner wrote:
>
>
> I haven't looked at your code but are you comparing the SRG associated 
> to the Boolean bent function and the graph associated to the incidence 
> matrix of that graph? 
>
>
I don't understand your precise meaning here, so I will spell out exactly 
what I have done.

Briefly, if f is a Boolean bent function f: Z_2^{dim} -> Z_2, with f(0)=0, 
then, if Z_2^{dim} is given lexicographical ordering from 0 to 2^{dim}-1, 
define the matrix M[i,j]=f(i \xor j).
The matrix M is the *adjacency* matrix of the Cayley graph of f, and is 
simple because f(0) != 1. The following function takes the equivalent f : Z 
-> Z_2 and produces the Cayley graph for a given dim.

def boolean_cayley_graph(dim, f):
v = 2 ** dim
result = Graph(v)
result.add_edges([(i,j) for i in xsrange(v) for j in xsrange(i) if f(i 
^ j)])
return result

This is the graph that I am using for G1 in test_isomorphism.sage

A Boolean bent function can also generate a projective, two-weight linear 
code. Again, we take lexicographic ordering of Z_2^{dim} and produce a 
matrix M, but here the number of columns is the weight of f, i.e. the size 
of the support of f,
the number of rows is 2^{dim}, and each entry M[x,j] =  
where support is a list corresponding to the support of f. This matrix M 
generates the linear code. In fact, the elements of the code are the rows 
of M.

def linear_code(self):
dim = self.nvariables()
v = 2 ** dim
f = self.extended_translate()
support = [y
   for y in xsrange(n)
   if f(y)==1]
M = matrix(GF(2), [[inner(x, y)
for y in support]
for x in xsrange(v)])
return LinearCode(M)

There is Sage function strongly_regular_from_two_
weight_code(), described at 
http://doc.sagemath.org/html/en/reference/graphs/sage/graphs/strongly_regular_db.html
"A strongly regular graph can be built from a two-weight projective code 
with weights w1,w2 (assuming w1 < w2) by adding an edge between any two 
codewords whose difference has weight w1."

The graph G2 that I am using in test_isomorphism.sage is thus 
strongly_regular_from_two_weight_code(f.linear_code()).

The bent function f can have one of two weights. If m=dim/2, the weight of 
f is either 2^{2m-1} - 2^{m-1} (weight class 0) or 2^{2m-1}+2^{m-1} (weight 
class 1).
In all cases where m<4, it turns out that if f has weight class 0 then 
f.cayley_graph() is isomorphic to f.strongly_regular_graph(), and if f has 
weight class 0 then f.cayley_graph() is isomorphic to 
f.strongly_regular_graph().complement().
For m=4, these isomorphisms are true for the bent functions in the extended 
affine equivalence class of the bent function corresponding to each of the 
first 8 polynomials listed below. For polynomials 9 and 10, there are 
exceptions,
according to the canonical label algorithms as implemented in Sage.

def bent_function_extended_affine_representative_polynomials_dimension_8():
r"""
The Boolean polynomials p8[i] for from 1 to 10 are the representatives 
of
the extended affine equivalence classes of bent functions in 8 
variables,
with degree up to 3, as listed at 7.3 of Tokareva 2015,
with citation [167] to Hou 1998.
"""
R8. = BooleanPolynomialRing(8)
p8 = [None]*11
p8[1] = x1*x2 + x3*x4 + x5*x6 + x7*x8
p8[2] = x1*x2*x3 + x1*x4 + x2*x5 + x3*x6 + x7*x8
p8[3] = x1*x2*x3 + x2*x4*x5 + x3*x4 + x2*x6 + x1*x7 + x5*x8
p8[4] = x1*x2*x3 + x2*x4*x5 + x1*x3 + x1*x5 + x2*x6 + x3*x4 + x7*x8
p8[5] = x1*x2*x3 + x2*x4*x5 + x3*x4*x6 + x3*x5 + x2*x6 + x2*x5 + x1*x7 
+ x4*x8
p8[6] = x1*x2*x3 + x2*x4*x5 + x3*x4*x6 + x3*x5 + x1*x3 + x1*x4 + x2*x7 
+ x6*x8
p8[7] = x1*x2*x3 + x2*x4*x5 + x3*x4*x6 + x3*x5 + x2*x6 + x2*x5 + x1*x2 
+ x1*x3 + x1*x4 + x7*x8
p8[8] = x1*x2*x3 + x2*x4*x5 + x3*x4*x6 + x3*x5 + x1*x6 + x2*x7 + x4*x8
p8[9] = x1*x2*x7 + x3*x4*x7 + x5*x6*x7 + x1*x4 + x3*x6 + x2*x5 + x4*x5 
+ x7*x8
p8[10] = x1*x2*x3 + x2*x4*x5 + x3*x4*x6 + x1*x4*x7 + x3*x5 + x2*x7 + 
x1*x5 + x1*x6 + x4*x8
return p8

 

-- 
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.


Re: [sage-support] How can I double check a non-isomorphism between graphs?

2016-10-24 Thread Paul Leopardi


On Monday, 24 October 2016 01:45:10 UTC+11, David Joyner wrote:
>
>
> I haven't looked at your code but are you comparing the SRG associated 
> to the Boolean bent function and the graph associated to the incidence 
> matrix of that graph? 
>
> I don't understand your precise meaning here, so I will spell out exactly 
what I have done.

Briefly, if f is a Boolean bent function f: Z_2^{dim} -> Z_2, with f(0)=0, 
then, if Z_2^{dim} is given lexicographical ordering from 0 to 2^{dim}-1, 
define the matrix M[i,j]=f(i \xor j).
The matrix M is the *adjacency* matrix of the Cayley graph of f, and is 
simple because f(0) != 1. The following function takes the equivalent f : Z 
-> Z_2 and produces the Cayley graph for a given dim.

def boolean_cayley_graph(dim, f):
v = 2 ** dim
result = Graph(v)
result.add_edges([(i,j) for i in xsrange(v) for j in xsrange(i) if f(i 
^ j)])
return result

This is the graph that I am using for G1 in test_isomorphism.sage

A Boolean bent function can also generate a projective, two-weight linear 
code. Again, we take lexicographic ordering of Z_2^{dim} and produce a 
matrix M, but here the number of columns is the weight of f, i.e. the size 
of the support of f,
the number of rows is 2^{dim}, and each entry M[x,j] =  
where support is a list corresponding to the support of f. This matrix M 
generates the linear code. In fact, the elements of the code are the rows 
of M.

def linear_code(self):
dim = self.nvariables()
v = 2 ** dim
f = self.extended_translate()
support = [y
   for y in xsrange(n)
   if f(y)==1]
M = matrix(GF(2), [[inner(x, y)
for y in support]
for x in xsrange(v)])
return LinearCode(M)

There is Sage function strongly_regular_from_two_weight_code(), described 
at 
http://doc.sagemath.org/html/en/reference/graphs/sage/graphs/strongly_regular_db.html
"A strongly regular graph can be built from a two-weight projective code 
with weights w1,w2 (assuming w1 = BooleanPolynomialRing(8)
p8 = [None]*11
p8[1] = x1*x2 + x3*x4 + x5*x6 + x7*x8
p8[2] = x1*x2*x3 + x1*x4 + x2*x5 + x3*x6 + x7*x8
p8[3] = x1*x2*x3 + x2*x4*x5 + x3*x4 + x2*x6 + x1*x7 + x5*x8
p8[4] = x1*x2*x3 + x2*x4*x5 + x1*x3 + x1*x5 + x2*x6 + x3*x4 + x7*x8
p8[5] = x1*x2*x3 + x2*x4*x5 + x3*x4*x6 + x3*x5 + x2*x6 + x2*x5 + x1*x7 
+ x4*x8
p8[6] = x1*x2*x3 + x2*x4*x5 + x3*x4*x6 + x3*x5 + x1*x3 + x1*x4 + x2*x7 
+ x6*x8
p8[7] = x1*x2*x3 + x2*x4*x5 + x3*x4*x6 + x3*x5 + x2*x6 + x2*x5 + x1*x2 
+ x1*x3 + x1*x4 + x7*x8
p8[8] = x1*x2*x3 + x2*x4*x5 + x3*x4*x6 + x3*x5 + x1*x6 + x2*x7 + x4*x8
p8[9] = x1*x2*x7 + x3*x4*x7 + x5*x6*x7 + x1*x4 + x3*x6 + x2*x5 + x4*x5 
+ x7*x8
p8[10] = x1*x2*x3 + x2*x4*x5 + x3*x4*x6 + x1*x4*x7 + x3*x5 + x2*x7 + 
x1*x5 + x1*x6 + x4*x8
return p8


-- 
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] How can I double check a non-isomorphism between graphs?

2016-10-23 Thread Paul Leopardi
Since asking the question "How should I determine if two strongly regular 
graphs are isomorphic?" I have made great progress in classifying Bent 
functions by their Cayley graphs.
That is, up until now. I have found two graphs which I was (emprically) 
expecting to be isomorphic have different canonical labels.

To reproduce:
1. Clone the python-refactor branch of penguian/Boolean-Cayley-graphs
2. Copy the attached Sage file test_isomorphism.sage to your cloned 
Boolean-Cayley-graphs 
directory.
3. In your cloned Boolean-Cayley-graphs directory, run sage and enter
load("test_isomorphism.sage")

You should see:

















*sage: load("test_isomorphism.sage")Defining bent function 
f...f.algebraic_normal_form() == x0*x1*x6 + x0*x3 + x1*x4 + x2*x3*x6 + 
x2*x5 + x3*x4 + x4*x5*x6 + x6*x7Determining strongly regular graphs SG1 and 
SG2...Finding canonical labels CG1 and GG2...CG1 == CG2: 
FalseG1.is_isomorphic(G2): FalseSageCG1 == SageCG2: 
FalseSG1.stored_clique_polynomial == SG2.stored_clique_polynomial: 
TrueSG1.stored_clique_polynomial == 45056*t^9 + 780288*t^8 + 2998272*t^7 + 
5505024*t^6 + 4816896*t^5 + 1892352*t^4 + 286720*t^3 + 15360*t^2 + 256*t + 
1SG1.rank == SG2.rank: TrueSG1.rank == 16SG1.group_order == 
SG2.group_order: TrueSG1.group_order == 
229376G1.automorphism_group().is_isomorphic(G2.automorphism_group()): 
Truesage: *
This is saying that G1, the Cayley graph of f, and G2, the strongly regular 
graph obtained from the two-weight code derived from f, are not isomorphic, 
*but*
G1 and G2 have the same clique polynomial, *and*
G1 and G2 have isomorphic automorphism groups.

Do you have any hints on how I can further diagnose what is really going on 
here? I suspect a bug in my own code rather than a bug in Sage or a true 
non-isomorphism, but at this stage I can't be sure.
For example, I have not yet found nor devised a proof that G1 and G2 should 
be isomorphic, beyond observing that it is true for all the other cases I 
have examined so far.

The code for cayley_graph() and for strongly_regular_graph() is in 
bent_function.py. 
The method strongly_regular_graph() depends on linear_code(), which is 
defined in boolean_function_improved.py, and is based on a simplified 
version of Ding III a) https://arxiv.org/abs/1503.06511 
Sorry I haven't yet fully documented my code. It is a work in progress.

-- 
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.


test_isomorphism.sage
Description: Binary data


[sage-support] Re: How can Sage and Python communicate via global variables?

2016-09-20 Thread Paul Leopardi
Thanks, that all works quite well.


-- 
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] How can Sage and Python communicate via global variables?

2016-09-19 Thread Paul Leopardi
Hello,
I am trying to use global variables to control the behaviour of Python 
functions called from Sage. (Yes, I know there is probably a better way to 
do it, but I am still interested in what's going on here.)

If in foo.py I have

def bar():
print blah

def baz():
global zilch
zilch = 0

and, in Sage I do:

sage: from foo import bar
sage: global blah
sage: blah = 1
sage: bar()

the result is:
---
NameError Traceback (most recent call last)
 in ()
> 1 bar()

/home/leopardi/sync/src/sage-sandbox/Boolean-Cayley-graphs/foo.py in bar()
  1 def bar():
> 2 print blah

NameError: global name 'blah' is not defined

If instead I do:

sage: from foo import baz
sage: baz()
sage: print zilch

the result is:
---
NameError Traceback (most recent call last)
 in ()
> 1 print zilch

NameError: name 'zilch' is not defined

Is there a way in Sage that I can assign to a global variable that a called 
Python function will recognize as a global variable?
Thanks, Paul

-- 
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] In a SageMathCloud worksheet, how do I save an instance of a user defined class?

2016-09-17 Thread Paul Leopardi
Hello,
When I am using Sage from the command line on my own PC (SageMath version 
7.2, Release Date: 2016-05-15) I can do:

sage:  class myint(SageObject):
: def __init__(self, n):
: self.value = n
: 
sage: p = myint(3)
sage: save(p,'p')
sage: q = load('p')
sage: print q.value
3
sage: help(p)
Help on myint in module __main__ object:

class myint(sage.structure.sage_
object.SageObject)
 |  Method resolution order:
 |  myint
 |  sage.structure.sage_object.SageObject
 |  __builtin__.object
...

If I try to do the same in a SageMathCloud worksheet: 
https://cloud.sagemath.com/projects/80f4c9e7-8a37-4f59-82e7-aa179ec0b652/files/public/save_bug_example.sagews
I see:

class myint(SageObject):
def __init__(self, n):
   self.value = n

p = myint(3)
save(p,'p')
---

Error in lines 5-5
Traceback (most recent call last):
  File 
"/projects/sage/sage-7.3/local/lib/python2.7/site-packages/smc_sagews/sage_server.py",
 line 957, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
  File "", line 1, in 
  File "sage/structure/sage_object.pyx", line 1076, in 
sage.structure.sage_object.save 
(/projects/sage/sage-7.3/src/build/cythonized/sage/structure/sage_object.c:11864)
obj.save(filename=filename, compress=compress, **kwds)
  File "sage/structure/sage_object.pyx", line 439, in 
sage.structure.sage_object.SageObject.save 
(/projects/sage/sage-7.3/src/build/cythonized/sage/structure/sage_object.c:3410)
open(filename, 'wb').write(self.dumps(compress))
  File "sage/structure/sage_object.pyx", line 463, in 
sage.structure.sage_object.SageObject.dumps 
(/projects/sage/sage-7.3/src/build/cythonized/sage/structure/sage_object.c:3701)
s = cPickle.dumps(self, protocol=2)
PicklingError: Can't pickle : attribute lookup __builtin__.myint 
failed

---
help(p)
---

Help on myint in module __builtin__ object:

class myint(sage.structure.sage_object.SageObject)
 |  Method resolution order:
 |  myint
 |  sage.structure.sage_object.SageObject
 |  object
 |  

Why are the module and the method resolution order different between Sage 
and SageMathCloud worksheet?

In a SageMathCloud worksheet, how do I save an instance of a user defined 
class?

All the best, Paul

-- 
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] How dosave an instance of a user defined class in a SageMathCloud worksheet?

2016-09-17 Thread Paul Leopardi
Hello,
When I am using Sage from the command line on my own PC (SageMath version 
7.2, Release Date: 2016-05-15) I can do:

sage:  class myint(SageObject):
: def __init__(self, n):
: self.value = n
: 
sage: p = myint(3)
sage: save(p,'p')
sage: q = load('p')
sage: print q.value
3
sage: help(p)
Help on myint in module __main__ object:

class myint(sage.structure.sage_object.SageObject)
 |  Method resolution order:
 |  myint
 |  sage.structure.sage_object.SageObject
 |  __builtin__.object
...

If I try to do the same in a SageMathCloud worksheet: 
https://cloud.sagemath.com/projects/80f4c9e7-8a37-4f59-82e7-aa179ec0b652/files/public/save_bug_example.sagews
I see:

class myint(SageObject):
def __init__(self, n):
   self.value = n

p = myint(3)
save(p,'p')
---

Error in lines 5-5
Traceback (most recent call last):
  File 
"/projects/sage/sage-7.3/local/lib/python2.7/site-packages/smc_sagews/sage_server.py",
 line 957, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
  File "", line 1, in 
  File "sage/structure/sage_object.pyx", line 1076, in 
sage.structure.sage_object.save 
(/projects/sage/sage-7.3/src/build/cythonized/sage/structure/sage_object.c:11864)
obj.save(filename=filename, compress=compress, **kwds)
  File "sage/structure/sage_object.pyx", line 439, in 
sage.structure.sage_object.SageObject.save 
(/projects/sage/sage-7.3/src/build/cythonized/sage/structure/sage_object.c:3410)
open(filename, 'wb').write(self.dumps(compress))
  File "sage/structure/sage_object.pyx", line 463, in 
sage.structure.sage_object.SageObject.dumps 
(/projects/sage/sage-7.3/src/build/cythonized/sage/structure/sage_object.c:3701)
s = cPickle.dumps(self, protocol=2)
PicklingError: Can't pickle : attribute lookup __builtin__.myint 
failed

---
help(p)
---

Help on myint in module __builtin__ object:

class myint(sage.structure.sage_object.SageObject)
 |  Method resolution order:
 |  myint
 |  sage.structure.sage_object.SageObject
 |  object
 |  

Why are the module and the method resolution order different between Sage 
and SageMathCloud worksheet?

In a SageMathCloud worksheet, how do I save an instance of a user defined 
class?

All the best, Paul

-- 
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: How should I determine if two strongly regular graphs are isomorphic?

2016-08-30 Thread Paul Leopardi


On Wednesday, 24 August 2016 02:00:03 UTC+10, Dima Pasechnik wrote:
>
> Also, do I get it right that you have a new "generic" construction of 
> strongly regular graphs?
> As you know, we are collecting them - would you be interested in adding it 
> into sage/graphs/generators/ ?
>

Sorry for the delay in replying.
I am pursuing the goal of classifying bent functions by their Cayley 
graphs.  
https://sites.google.com/site/paulleopardi/Leopardi-ACCMCC-2015-talk-revised.pdf?attredirects=0=1
To do this, at first I tried creating a large worksheet in SageMathCloud: 
https://cloud.sagemath.com/projects/80f4c9e7-8a37-4f59-82e7-aa179ec0b652/files/public/bent-functions-duals-Cayley-graphs-public.sagews
This turned out to be too slow even for the ternary bent functions in 8 
dimensions, so I am refactoring the code into smaller, faster pieces, and 
using Bliss: https://github.com/penguian/Boolean-Cayley-graphs

The construction is the simple one described by (e.g.) Bernasconi and 
Codenotti 1999: http://ieeexplore.ieee.org/document/755000/
One key difference is that I only consider those f such that f(0)=0, to 
yield a simple undirected strongly regular graph, as per Lemma 12 of 
Bernasconi and Codenotti.

Starting with a representative f of an Extended Affine (EA) equivalence 
class of bent functions in (Z_2)^{dim} -> Z_2, my code forms each 
g(x)=f(x+b)++f(b) for each b,c in (Z_2)^{dim},
and then lists the unique Cayley graphs found, yielding a list of Cayley 
graphs, and a matrix of indices.
The code that performs this search is in 
https://github.com/penguian/Boolean-Cayley-graphs/blob/master/boolean_function_cayley_graph_classification.sage

My starting point is known lists of representatives of EA equivalence 
classes of bent functions. So far, these are fully enumerated only up to 
ternary functions in dim=8.
See (e.g.) Tokareva, Bent Functions, 2015, Chapter 7. 
http://store.elsevier.com/Bent-Functions/Natalia-Tokareva/isbn-9780128023181/

The web site http://langevin.univ-tln.fr/project/quartics/quartics.html 
lists quartic forms in dim=8, but this is apparently not sufficient to 
enumerate the EA equivalence classes 
( Langevin and Leander 2011 
http://link.springer.com/article/10.1007/s10623-010-9455-z )
Maybe my code could help to count these classes?



-- 
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: How should I determine if two strongly regular graphs are isomorphic?

2016-08-23 Thread Paul Leopardi


On Wednesday, 24 August 2016 02:00:03 UTC+10, Dima Pasechnik wrote:
>
> In this case your graphs give rise to Hadamard matrices (take Seidel 
> adjacency matrix), so if you get nonisomorphic Hadamard matrices then you 
> get nonisomorphic graphs, but not the other way around, generally speaking.
> Although isomorphism of Hadamard matrices is probably harder...


See  
https://github.com/penguian/Boolean-Cayley-graphs/blob/master/README.md for 
some of the background and references.

I am developing Sage code to enumerate the Cayley graphs of those bent 
functions whose value at 0...0 is 0. 
Each such graph is strongly regular. See (e.g.) 
http://ieeexplore.ieee.org/document/954512/
The code explores the bent functions within each extended Affine 
equivalence class. Actually, the extended *translation* equivalence class 
gives all isomorphism classes of Cayley graphs.

-- 
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.


Re: [sage-support] How should I determine if two strongly regular graphs are isomorphic?

2016-08-23 Thread Paul Leopardi

On Wednesday, 24 August 2016 00:14:10 UTC+10, vdelecroix wrote:
>
> Do you have the package bliss or nauty installed? 
>


sage: is_package_installed('bliss')
True
sage: is_package_installed('nauty')
True
 

-- 
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] How should I determine if two strongly regular graphs are isomorphic?

2016-08-23 Thread Paul Leopardi
Hi all,
I am currently trying to use Sage to classify bent functions by their 
Cayley graphs.

I have attached an example where I have two (256, 120, 56, 56) strongly 
regular graphs, g and h, which are also canonical labels, such that g does 
not equal h, and so g and h are not isomorphic.
It takes a relatively short time to produce the canonical labels, 38.8s to 
run h.is_isomorphic(g), and g.is_isomorphic(h) is still running.

The example includes the Sage code that I used to generate the graphs, as 
well as a transcript of my Sage session, including the graph6_string() of 
each of the two graphs.

I would like some advice on how I should proceed with the classification, 
given that I want to compare about 2^(16) such graphs to a small number of 
representative graphs (about 6).

I have done other tests with graphs of this size that show that usually 
g.is_isomorphic(h) is faster than comparing g.automorphism_group().order() 
with h.automorphism_group().order(), which is faster than comparing 
g.canonical_label() with h.canonical_label().
It's just that occasionally I have found cases where g.is_isomorphic(h) is 
extremely slow.

I'm thinking of using threading and a timeout of (e.g.) 5 seconds, so that 
my search first tries to use g.is_isomorphic(h), and if this times out, it 
then compares the automorphism group orders, and only if they are equal, 
does it then compute the canonical label.

What are other people doing?
All the best, Paul

-- 
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.
┌┐
│ SageMath version 7.2, Release Date: 2016-05-15 │
│ Type "notebook()" for the browser-based notebook interface.│
│ Type "help()" for help.│
└┘
sage: from sage.crypto.boolean_function import BooleanFunction
sage: R. = BooleanPolynomialRing(8)
sage: fg=BooleanFunction(x1*x2*x3 + x1*x4 + x2*x5 + x3*x6 + x7*x8 + x1 + x2 + 
x3)
sage: fh=BooleanFunction(x1*x2*x3 + x1*x4 + x2*x5 + x3*x6 + x7*x8 + x4)
sage: load("boolean_cayley_graph.sage")
sage: bg=boolean_function_cayley_graph(fg)
sage: bh=boolean_function_cayley_graph(fh)
sage: %time g=bg.canonical_label()
CPU times: user 80 ms, sys: 4 ms, total: 84 ms
Wall time: 78.1 ms
sage: %time h=bh.canonical_label()
CPU times: user 188 ms, sys: 4 ms, total: 192 ms
Wall time: 189 ms
sage: print g.is_strongly_regular(parameters=True)
(256, 120, 56, 56)
sage: print h.is_strongly_regular(parameters=True)
(256, 120, 56, 56)
sage: %time g == h
CPU times: user 0 ns, sys: 0 ns, total: 0 ns
Wall time: 913 µs
False
sage: gs=g.graph6_string()
sage: hs=h.graph6_string()
sage: len(gs)
5444
sage: len(hs)
5444
sage: print gs

Re: [sage-support] Meta question: How do I best specify graphs in sage-support?

2016-08-23 Thread Paul Leopardi
On Tuesday, 23 August 2016 14:45:42 UTC+10, jori.ma...@uta.fi wrote:
>
> dig6_string() is only available do directed graphs, but a Graph made from 
> DiGraph is just a graph with directions forgotten. So you can say 
>
> DiGraph(g).dig6_string() 
>
>
Is there a particular reason why you prefer DiGraph(g).dig6_string() to 
g.graph6_string() even though it likely to give a string that is twice as 
long?


 

-- 
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] Meta question: How do I best specify graphs in sage-support?

2016-08-22 Thread Paul Leopardi
Hi,
I am seeing a problem where "g.is_isomorphic(h)" is taking an inordinately 
long time, where g and h are graphs, even though 
"g.automorphism_group().order() == h.automorphism_group().order()", and 
"g.canonical_label() == h.canonical_label()" both take a reasonable time.

My main question for the moment is how do I specify graphs here in 
sage-support so that others can reproduce the problem?

All the best, Paul

https://github.com/penguian/Boolean-Cayley-graphs/blob/master/README.md

-- 
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] Cannot load a BooleanFunction of 8 variables (?)

2016-07-22 Thread Paul Leopardi
Hi,

I am using Sage 7.2 built from sources. 

If I save a BooleanFunction of 6 variables, it loads OK.
If I save a BooleanFunction of 8 variables, loading gives an exception 
error message:

ValueError: (ValueError('the length of the truth table must be a power of 
2',), , 
('22d222d2dd2d22d222d222d2dd2d22d2dd2ddd2d22d2dd2d22d222d2dd2d22d222d222d2dd2d22d2dd2ddd2d22d2dd2d22d222d2dd2d22d2',))

See the attachments for a transcript and the saved sobj files for details.

It looks like the save didn't work correctly. Should I report this as a bug?
All the best, Paul



-- 
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: sigma_bf_list[3]
Boolean function with 6 variables
sage: len(sigma_bf_list[3].truth_table())
64
sage: save(sigma_bf_list[3],"sigma_3")
sage: saved_sigma_3=load("sigma_3")
sage: sigma_bf_list[4]
Boolean function with 8 variables
sage: len(sigma_bf_list[4].truth_table())
256
sage: save(sigma_bf_list[4],"sigma_4")
sage: saved_sigma_4=load("sigma_4")
---
ValueErrorTraceback (most recent call last)
 in ()
> 1 saved_sigma_4=load("sigma_4")

/home/leopardi/opt/sage/sage-7.2/src/sage/structure/sage_object.pyx in 
sage.structure.sage_object.load 
(/home/leopardi/opt/sage/sage-7.2/src/build/cythonized/sage/structure/sage_object.c:11626)()
   1030
   1031 ## Load file by absolute filename
-> 1032 X = loads(open(filename).read(), compress=compress)
   1033 try:
   1034 X._default_filename = os.path.abspath(filename)

/home/leopardi/opt/sage/sage-7.2/src/sage/structure/sage_object.pyx in 
sage.structure.sage_object.loads 
(/home/leopardi/opt/sage/sage-7.2/src/build/cythonized/sage/structure/sage_object.c:13854)()
   1406 unpickler.find_global = unpickle_global
   1407
-> 1408 return unpickler.load()
   1409
   1410

/home/leopardi/opt/sage/sage-7.2/src/sage/crypto/boolean_function.pyx in 
sage.crypto.boolean_function.unpickle_BooleanFunction 
(/home/leopardi/opt/sage/sage-7.2/src/build/cythonized/sage/crypto/boolean_function.c:16987)()
   1109 True
   1110 """
->  return BooleanFunction(bool_list)
   1112
   1113 cdef class BooleanFunctionIterator:

/home/leopardi/opt/sage/sage-7.2/src/sage/crypto/boolean_function.pyx in 
sage.crypto.boolean_function.BooleanFunction.__cinit__ 
(/home/leopardi/opt/sage/sage-7.2/src/build/cythonized/sage/crypto/boolean_function.c:8539)()
292 x = ZZ("0x"+x).digits(base=2,padto=4*L)
293 else:
--> 294 raise ValueError, "the length of the truth table must 
be a power of 2"
295 from types import GeneratorType
296 if isinstance(x, (list,tuple,GeneratorType)):

ValueError: (ValueError('the length of the truth table must be a power of 2',), 
, 
('22d222d2dd2d22d222d222d2dd2d22d2dd2ddd2d22d2dd2d22d222d2dd2d22d222d222d2dd2d22d2dd2ddd2d22d2dd2d22d222d2dd2d22d2',))


sigma_3.sobj
Description: Binary data


sigma_4.sobj
Description: Binary data


Re: [sage-support] How do I build Sage 7.2 on ubuntu 16.04? Build fails in atlas-3.10.2.p2

2016-07-22 Thread Paul Leopardi
On Thursday, 21 July 2016 21:38:38 UTC+10, Paul Leopardi wrote:
>
> On Thursday, 21 July 2016 08:57:55 UTC+10, Paul Leopardi wrote:
>>
>>
>> The build now gets past the point where it failed previously. 
>>
>>
> The build now fails in dochtml with a problem that looks like this WONTFIX 
> bug:  https://trac.sagemath.org/ticket/18891
> and also looks like this unresolved issue: 
> https://groups.google.com/forum/#!msg/sage-devel/Lz4NjfvjMbg/c-xdU8uwAAAJ
> It also looks like this bug https://trac.sagemath.org/ticket/21014
> which is fixed in this commit: 
> https://git.sagemath.org/sage.git/commit?id=d741fbb99328eb03aea7c78db8d8370700ee705c
>
> I will wipe the sage-7.2 directory again, but before starting the make, I 
> will apply the patch described in the commit.
>
>
Wiping sage-7.2 and applying the patch from 
https://trac.sagemath.org/ticket/21014 does work. Sage built successfully. 

-- 
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.


Re: [sage-support] How do I build Sage 7.2 on ubuntu 16.04? Build fails in atlas-3.10.2.p2

2016-07-22 Thread Paul Leopardi
Hi John,
Yes that branch fixes the problem.

On 22 July 2016 1:31:53 AM AEST, John H Palmieri <jhpalmier...@gmail.com> wrote:
>
>
>On Thursday, July 21, 2016 at 4:38:38 AM UTC-7, Paul Leopardi wrote:
>>
>> On Thursday, 21 July 2016 08:57:55 UTC+10, Paul Leopardi wrote:
>>>
>>>
>>> The build now gets past the point where it failed previously. 
>>>
>>>
>> The build now fails in dochtml with a problem that looks like this
>WONTFIX 
>> bug:  https://trac.sagemath.org/ticket/18891
>>
>
>Does the branch at https://trac.sagemath.org/ticket/21014 fix it? That 
>branch will actually be merged soon, as opposed to whatever is at
>#18891.
>
>-- 
>John
>
>-- 
>You received this message because you are subscribed to a topic in the
>Google Groups "sage-support" group.
>To unsubscribe from this topic, visit
>https://groups.google.com/d/topic/sage-support/KoVST32UAeQ/unsubscribe.
>To unsubscribe from this group and all its topics, 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.

-- 
Paul Leopardi https://sites.google.com/site/paulleopardi/

-- 
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.


Re: [sage-support] How do I build Sage 7.2 on ubuntu 16.04? Build fails in atlas-3.10.2.p2

2016-07-21 Thread Paul Leopardi

On Thursday, 21 July 2016 22:50:10 UTC+10, Dima Pasechnik wrote:
>
> On Thursday, July 21, 2016 at 1:43:22 PM UTC+1, Paul Leopardi wrote:
>>
>> ERROR:  The Sage installation tree has moved
>>
>> from /home/leopardi/sync/src-downloaded/sage/sage-7.2
>>   to /home/leopardi/opt/sage/sage-7.2
>>
>> This is not supported, and Sage will not work. 
>>
>
> well, this is indeed not supported. Do not move your tree...
>

Then why do the installation instructions at  
http://doc.sagemath.org/html/en/installation/source.html#installation-in-a-multiuser-environment
say "After building Sage, you may optionally copy or move the entire build 
tree to /usr/local or another location. If you do this, then you must run 
./sage once so that various hardcoded locations get updated. For this 
reason, it might be easier to simply build Sage in its final location."
Does the build of sage itself use up the "starting Sage the first time" so 
that the given instructions will never work? If so, should the misleading 
part of the instructions be deleted?

-- 
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.


Re: [sage-support] How do I build Sage 7.2 on ubuntu 16.04? Build fails in atlas-3.10.2.p2

2016-07-21 Thread Paul Leopardi
On Thursday, 21 July 2016 21:38:38 UTC+10, Paul Leopardi wrote:
>
> Before I do so, I will try an experiment: apply the patch to the existing 
> sage-7.2 directory, and run make again.
>
>
The experiment apparently succeeded. The make ran to a successful 
conclusion.

I could not successfully relocate the built directory, but Sage did run 
once I updated SAGE_ROOT in /usr/local/bin/sage to say

SAGE_ROOT=/home/leopardi/sync/src-downloaded/sage/sage-7.2

leopardi@catawba:~/src/sage-sandbox$ sage
┌┐
│ SageMath version 7.2, Release Date: 2016-05-15 │
│ Type "notebook()" for the browser-based notebook interface.│
│ Type "help()" for help.│
└┘

ERROR:  The Sage installation tree has moved

from /home/leopardi/sync/src-downloaded/sage/sage-7.2
  to /home/leopardi/opt/sage/sage-7.2

This is not supported, and Sage will not work. To install Sage from a
binary package:

1. Open the .tar.bz2 archive (or .dmg on OSX)

2. Move the SageMath folder/app to where you want it to be. You can
   also rename the directory now.

3. Start sage for the first time. This will then automatically patch
   paths in binaries.

After starting Sage for the first time you cannot change the
installation any more. To install Sage elsewhere, start over from the
binary package. Or recompile Sage from scratch in the new location
("make distclean && make")

Thanks for all the help!

-- 
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.


Re: [sage-support] How do I build Sage 7.2 on ubuntu 16.04? Build fails in atlas-3.10.2.p2

2016-07-21 Thread Paul Leopardi
On Thursday, 21 July 2016 08:57:55 UTC+10, Paul Leopardi wrote:
>
>
> The build now gets past the point where it failed previously. 
>
>
The build now fails in dochtml with a problem that looks like this WONTFIX 
bug:  https://trac.sagemath.org/ticket/18891
and also looks like this unresolved issue: 
https://groups.google.com/forum/#!msg/sage-devel/Lz4NjfvjMbg/c-xdU8uwAAAJ
It also looks like this bug https://trac.sagemath.org/ticket/21014
which is fixed in this commit: 
https://git.sagemath.org/sage.git/commit?id=d741fbb99328eb03aea7c78db8d8370700ee705c

I will wipe the sage-7.2 directory again, but before starting the make, I 
will apply the patch described in the commit.
Before I do so, I will try an experiment: apply the patch to the existing 
sage-7.2 directory, and run make again.


-- 
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.


Re: [sage-support] How do I build Sage 7.2 on ubuntu 16.04? Build fails in atlas-3.10.2.p2

2016-07-20 Thread Paul Leopardi


On Thursday, 21 July 2016 08:21:14 UTC+10, Paul Leopardi wrote:
>
>
>
> On Thursday, 21 July 2016 08:06:37 UTC+10, Volker Braun wrote:
>>
>> Well do you have PYTHON set in your environment? I'm pretty sure that 
>> there are a number of python-related environment settings that will cause 
>> problems
>>>
>>>
>>>
> I did have but the value of PYTHON in my environment 
>
> was different from the value at the time of the failure:
>
> /home/leopardi/sync/src-downloaded/sage/sage-7.2/local/var/lib/sage/installed/python2-2.7.10.p1
>  
> I am trying again after clearing my ~/.bashrc of all variable definitions, 
> logging out and logging back in again.
> And by "trying again", yes, I do mean removing the whole sage-7.2 
> directory, untarring it again, and running make.
>
>
The build now gets past the point where it failed previously. 

in brial-0.8.4.3-log:

checking for a Python interpreter with version >= 2.7... python
checking for python... 
/home/leopardi/sync/src-downloaded/sage/sage-7.2/local/bin/python
checking for python version... 2.7
checking for python platform... linux2
checking for python script directory... 
${prefix}/lib/python2.7/site-packages
checking for python extension module directory... 
${exec_prefix}/lib/python2.7/site-packages

The key point missing from the documentation is that you need to have your 
environment as clean as possible before you start make.

-- 
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.


Re: [sage-support] How do I build Sage 7.2 on ubuntu 16.04? Build fails in atlas-3.10.2.p2

2016-07-20 Thread Paul Leopardi


On Thursday, 21 July 2016 08:06:37 UTC+10, Volker Braun wrote:
>
> Well do you have PYTHON set in your environment? I'm pretty sure that 
> there are a number of python-related environment settings that will cause 
> problems
>>
>>
>>
I did have but the value of PYTHON in my environment 

was different from the value at the time of the failure:
/home/leopardi/sync/src-downloaded/sage/sage-7.2/local/var/lib/sage/installed/python2-2.7.10.p1
 
I am trying again after clearing my ~/.bashrc of all variable definitions, 
logging out and logging back in again.
And by "trying again", yes, I do mean removing the whole sage-7.2 
directory, untarring it again, and running make.

-- 
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.


Re: [sage-support] How do I build Sage 7.2 on ubuntu 16.04? Build fails in atlas-3.10.2.p2

2016-07-20 Thread Paul Leopardi

Attached config.log for brial-0.8.4.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.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by BRiAl configure 0.8.4.3, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ ./configure --prefix=/home/leopardi/sync/src-downloaded/sage/sage-7.2/local 
--libdir=/home/leopardi/sync/src-downloaded/sage/sage-7.2/local/lib 
--enable-shared --disable-static

## - ##
## Platform. ##
## - ##

hostname = catawba
uname -m = x86_64
uname -r = 4.4.0-31-generic
uname -s = Linux
uname -v = #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch  = unknown
/usr/bin/arch -k   = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo  = unknown
/bin/machine   = unknown
/usr/bin/oslevel   = unknown
/bin/universe  = unknown

PATH: /home/leopardi/sync/src-downloaded/sage/sage-7.2/build/bin
PATH: /home/leopardi/sync/src-downloaded/sage/sage-7.2/src/bin
PATH: /home/leopardi/sync/src-downloaded/sage/sage-7.2/local/bin
PATH: /home/leopardi/sync/src-downloaded/sage/sage-7.2/build/bin
PATH: /home/leopardi/sync/src-downloaded/sage/sage-7.2/src/bin
PATH: /home/leopardi/sync/src-downloaded/sage/sage-7.2/local/bin
PATH: /home/leopardi/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games
PATH: /usr/local/games
PATH: /snap/bin


## --- ##
## Core tests. ##
## --- ##

configure:2708: checking for a BSD-compatible install
configure:2776: result: /usr/bin/install -c
configure:2787: checking whether build environment is sane
configure:2842: result: yes
configure:2993: checking for a thread-safe mkdir -p
configure:3032: result: /bin/mkdir -p
configure:3039: checking for gawk
configure:3055: found /usr/bin/gawk
configure:3066: result: gawk
configure:3077: checking whether make sets $(MAKE)
configure:3099: result: yes
configure:3128: checking whether make supports nested variables
configure:3145: result: yes
configure:3234: checking whether UID '1000' is supported by ustar format
configure:3237: result: yes
configure:3244: checking whether GID '1000' is supported by ustar format
configure:3247: result: yes
configure:3255: checking how to create a ustar tar archive
configure:3266: tar --version
tar (GNU tar) 1.28
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later .
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
configure:3269: $? = 0
configure:3309: tardir=conftest.dir && eval tar --format=ustar -chf - "$tardir" 
>conftest.tar
configure:3312: $? = 0
configure:3316: tar -xf - &5
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.1) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3712: $? = 0
configure:3701: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 
5.4.0-6ubuntu1~16.04.1' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs 
--enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr 
--program-suffix=-5 --enable-shared --enable-linker-build-id 
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix 
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu 
--enable-libstdcxx-debug --enable-libstdcxx-time=yes 
--with-default-libstdcxx-abi=new --enable-gnu-unique-object 
--disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib 
--disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo 
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home 
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar 
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 
--with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib 
--with-tune=generic --enable-checking=release --build=x86_64-linux-gnu 
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 

Re: [sage-support] How do I build Sage 7.2 on ubuntu 16.04? Build fails in atlas-3.10.2.p2

2016-07-20 Thread Paul Leopardi
On Wednesday, 20 July 2016 22:42:57 UTC+10, Paul Leopardi wrote:
 

> I checked python2-2.7.10.p1.log and discovered a problem: I had DESTDIR 
> set to "/home/leopardi/usr/local". As a result, there were lines like:
>
> (cd 
> /home/leopardi/usr/local/home/leopardi/sync/src-downloaded/sage/sage-7.2/local/bin;
>  ln -s python2 python)
> rm -f 
> /home/leopardi/usr/local/home/leopardi/sync/src-downloaded/sage/sage-7.2/local/bin/python2
>
> etc.
>
> I am trying the build again with export DESTDIR="".
>

The build now gets much further and fails in brial-0.8.4.3.
See the attached log file.

checking whether 
/home/leopardi/sync/src-downloaded/sage/sage-7.2/local/var/lib/sage/installed/python2-2.7.10.p1
 
version is >= 2.7... no
configure: error: Python interpreter is too old
Error configuring BRiAl

real0m5.036s
user0m0.912s
sys 0m0.236s

Error installing package brial-0.8.4.3

Please email sage-devel (http://groups.google.com/group/sage-devel)
explaining the problem and including the relevant part of the log file
  
/home/leopardi/sync/src-downloaded/sage/sage-7.2/logs/pkgs/brial-0.8.4.3.log
Describe your computer, operating system, etc.
If you want to try to fix the problem yourself, *don't* just cd to
/home/leopardi/sync/src-downloaded/sage/sage-7.2/local/var/tmp/sage/build/brial-0.8.4.3
 
and type 'make' or whatever is appropriate.
Instead, the following commands setup all environment variables
correctly and load a subshell for you to debug the error:
  (cd 
'/home/leopardi/sync/src-downloaded/sage/sage-7.2/local/var/tmp/sage/build/brial-0.8.4.3'
 
&& '/home/leopardi/sync/src-downloaded/sage/sage-7.2/sage' --sh)
When you are done debugging, you can type "exit" to leave the subshell.

Makefile:1148: recipe for target 
'/home/leopardi/sync/src-downloaded/sage/sage-7.2/local/var/lib/sage/installed/brial-0.8.4.3'
 
failed
make[2]: *** 
[/home/leopardi/sync/src-downloaded/sage/sage-7.2/local/var/lib/sage/installed/brial-0.8.4.3]
 
Error 1
make[2]: Leaving directory 
'/home/leopardi/sync/src-downloaded/sage/sage-7.2/build/make'
Makefile:826: recipe for target 'all' failed
make[1]: *** [all] Error 2
 

-- 
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.
Found local metadata for brial-0.8.4.3
Using cached file 
/home/leopardi/sync/src-downloaded/sage/sage-7.2/upstream/brial-0.8.4.3.tar.bz2
brial-0.8.4.3

Setting up build directory for brial-0.8.4.3
Finished set up

Host system:
Linux catawba 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016 
x86_64 x86_64 x86_64 GNU/Linux

C compiler: gcc
C compiler version:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 
5.4.0-6ubuntu1~16.04.1' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs 
--enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr 
--program-suffix=-5 --enable-shared --enable-linker-build-id 
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix 
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu 
--enable-libstdcxx-debug --enable-libstdcxx-time=yes 
--with-default-libstdcxx-abi=new --enable-gnu-unique-object 
--disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib 
--disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo 
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home 
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar 
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 
--with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib 
--with-tune=generic --enable-checking=release --build=x86_64-linux-gnu 
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.1) 

Cleaning out old PolyBoRi and BRiAl installations
patching file Cudd/cudd/Makefile.in
patching file common.mk
patc

Re: [sage-support] How do I build Sage 7.2 on ubuntu 16.04? Build fails in atlas-3.10.2.p2

2016-07-20 Thread Paul Leopardi


On Wednesday, 20 July 2016 19:57:56 UTC+10, Dima Pasechnik wrote:
>
> I guess having a systemwide python2 might be a way out, as well...
>
>
No, I have a system-wide python2. That was not the issue, as far as I can 
tell.
 

-- 
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.


Re: [sage-support] How do I build Sage 7.2 on ubuntu 16.04? Build fails in atlas-3.10.2.p2

2016-07-20 Thread Paul Leopardi


On Wednesday, 20 July 2016 09:12:24 UTC+10, Volker Braun wrote:
>
> So is 
> /home/leopardi/usr/local/home/leopardi/sync/src-downloaded/sage/sage-7.2/local/bin/python
>  
> executable?
>

This is what I have at the point where the build fails:

leopardi@catawba:~/sync/src-downloaded/sage/sage-7.2$ ls -hl 
local/bin/  
   

total 4.0K
-rwxr-xr-x 1 leopardi leopardi 387 Jul 20 08:15 pkg-config

leopardi@catawba:~/sync/src-downloaded/sage/sage-7.2$ ls -hl 
local/bin/pkg-config
-rwxr-xr-x 1 leopardi leopardi 387 Jul 20 08:15 local/bin/pkg-config

leopardi@catawba:~/sync/src-downloaded/sage/sage-7.2$ file 
local/bin/pkg-config  
local/bin/pkg-config: Bourne-Again shell script, ASCII text executable

leopardi@catawba:~/sync/src-downloaded/sage/sage-7.2$ ls -hl 
local/var/tmp/sage/build
total 68K
drwxr-xr-x 4 leopardi leopardi 4.0K Jul 20 08:37 arb-2.8.1.p0
drwxr-xr-x 4 leopardi leopardi 4.0K Jul 20 08:45 atlas-3.10.2.p2
drwxr-xr-x 4 leopardi leopardi 4.0K Jul 20 08:15 bzip2-1.0.6-20150304
drwxr-xr-x 4 leopardi leopardi 4.0K Jul 20 08:34 flint-2.5.2.p0
drwxr-xr-x 4 leopardi leopardi 4.0K Jul 20 08:20 gf2x-1.1.p1
drwxr-xr-x 4 leopardi leopardi 4.0K Jul 20 08:42 libpng-1.2.51.p0
drwxr-xr-x 4 leopardi leopardi 4.0K Jul 20 08:19 mpc-1.0.3.p0
drwxr-xr-x 4 leopardi leopardi 4.0K Jul 20 08:18 mpfr-3.1.4
drwxr-xr-x 3 leopardi leopardi 4.0K Jul 20 08:15 mpir-2.7.2
drwxr-xr-x 4 leopardi leopardi 4.0K Jul 20 08:40 ncurses-5.9.20131221
drwxr-xr-x 4 leopardi leopardi 4.0K Jul 20 08:24 ntl-9.6.2.p1
drwxr-xr-x 3 leopardi leopardi 4.0K Jul 20 08:14 patch-2.7.5
drwxr-xr-x 4 leopardi leopardi 4.0K Jul 20 08:15 pkgconf-0.9.7
drwxr-xr-x 4 leopardi leopardi 4.0K Jul 20 08:43 python2-2.7.10.p1
drwxr-xr-x 4 leopardi leopardi 4.0K Jul 20 08:41 readline-6.3.008
drwxr-xr-x 3 leopardi leopardi 4.0K Jul 20 08:41 sqlite-3.8.4.3
drwxr-xr-x 4 leopardi leopardi 4.0K Jul 20 08:15 zlib-1.2.8.p0

I checked python2-2.7.10.p1.log and discovered a problem: I had DESTDIR set 
to "/home/leopardi/usr/local". As a result, there were lines like:

(cd 
/home/leopardi/usr/local/home/leopardi/sync/src-downloaded/sage/sage-7.2/local/bin;
 ln -s python2 python)
rm -f 
/home/leopardi/usr/local/home/leopardi/sync/src-downloaded/sage/sage-7.2/local/bin/python2

etc.

I am trying the build again with export DESTDIR="".

-- 
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.


Re: [sage-support] How do I build Sage 7.2 on ubuntu 16.04? Build fails in atlas-3.10.2.p2

2016-07-19 Thread Paul Leopardi
>From config.log I noticed that 

PATH: /home/leopardi/sync/src-downloaded/sage/sage-PPA/sagemath/local/bin
PATH: /home/leopardi/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games
PATH: /usr/local/games
PATH: /snap/bin
so just to be on the safe side, I ran the following. I will next run make, and 
will report on the results.

DETAILS

leopardi@catawba:~/sync/src-downloaded/sage$ rm -rf sage-7.2

leopardi@catawba:~/sync/src-downloaded/sage$ echo $PATH
/home/leopardi/sync/src-downloaded/sage/sage-PPA/sagemath/local/bin:/home/leopardi/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
leopardi@catawba:~/sync/src-downloaded/sage$ ls /usr/local/bin
bugpoint  clang-3.9 git-clang-format  llvm-as  
llvm-c-test   llvm-dsymutil   llvm-lib   llvm-mcmarkup  llvm-profdata  
llvm-sizellvm-tblgen  sancov  verify-uselistorder
c-index-test  clang-check   llc   llvm-bcanalyzer  
llvm-cxxdump  llvm-dwarfdump  llvm-link  llvm-nmllvm-ranlib
llvm-split   obj2yaml sanstatsyaml2obj
clang clang-cl  lli   llvm-config  
llvm-diff llvm-dwpllvm-lto   llvm-objdump   llvm-readobj   
llvm-stress  opt  scan-build
clang++   clang-format  llvm-ar   llvm-cov 
llvm-dis  llvm-extractllvm-mcllvm-pdbdump   llvm-rtdyld
llvm-symbolizer  qd-configscan-view
leopardi@catawba:~/sync/src-downloaded/sage$ ls 
/home/leopardi/sync/src-downloaded/sage/sage-PPA/sagemath/local/bin
ls: cannot access 
'/home/leopardi/sync/src-downloaded/sage/sage-PPA/sagemath/local/bin': No 
such file or directory
leopardi@catawba:~/sync/src-downloaded/sage$ export 
PATH=/home/leopardi/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
leopardi@catawba:~/sync/src-downloaded/sage$ . ~/.bashrc
leopardi@catawba:~/sync/src-downloaded/sage$ echo $PATH
/home/leopardi/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
leopardi@catawba:~/sync/src-downloaded/sage$ tar xfz sage-7.2.tar.gz
leopardi@catawba:~/sync/src-downloaded/sage$ cd sage-7.2  
leopardi@catawba:~/sync/src-downloaded/sage/sage-7.2$ ./configure  
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for root user... no
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for ar... yes
checking for m4... yes
checking for ranlib... yes
checking for strip... yes
checking for GNU or BSD tar... /bin/tar
checking for GNU make... /usr/bin/make
checking for latex... yes
checking for perl... /usr/bin/perl
checking for Perl version 5.8.0 or later... yes
checking for git... /usr/bin/git
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... none
checking how to run the C preprocessor... gcc -E
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... none
checking for gfortran... gfortran
checking whether we are using the GNU Fortran compiler... yes
checking whether gfortran accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking complex.h usability... yes
checking complex.h presence... yes
checking for complex.h... yes
checking whether g++ supports C++11 features by default... no
checking whether g++ supports C++11 features with -std=gnu++11... yes
checking for gcc option to accept ISO C99... none needed
checking for Fortran flag needed to accept free-form source... -ffree-form
checking if gcc accepts -dumpversion option... yes
checking gcc version... 5.4.0
checking if g++ accepts -dumpversion 

Re: [sage-support] How do I build Sage 7.2 on ubuntu 16.04? Build fails in atlas-3.10.2.p2

2016-07-19 Thread Paul Leopardi
On Wednesday, 20 July 2016 02:09:20 UTC+10, John Cremona wrote:
>
> Try running ./configure before make. 
>

I have now done the following and have attached config.log. I will next run 
make and will report the results.

Why do the instructions in  
http://doc.sagemath.org/html/en/installation/source.html and README.md 
*not* say to run ./configure before make?
(Also, step 4. of the instructions mentions README.txt but there is no such 
file.)

DETAILS

leopardi@catawba:~/sync/src-downloaded/sage$ rm -rf sage-7.2
leopardi@catawba:~/sync/src-downloaded/sage$ ls sage-7.2
ls: cannot access 'sage-7.2': No such file or directory
leopardi@catawba:~/sync/src-downloaded/sage$ tar xfz sage-7.2.tar.gz 
leopardi@catawba:~/sync/src-downloaded/sage$ ls sage-7.2
bootstrap  build  config  configure  configure.ac  COPYING.txt  m4  
Makefile  README.md  sage  src  upstream  VERSION.txt
leopardi@catawba:~/sync/src-downloaded/sage$ cd sage-7.2
leopardi@catawba:~/sync/src-downloaded/sage/sage-7.2$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for root user... no
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for ar... yes
checking for m4... yes
checking for ranlib... yes
checking for strip... yes
checking for GNU or BSD tar... /bin/tar
checking for GNU make... /usr/bin/make
checking for latex... yes
checking for perl... /usr/bin/perl
checking for Perl version 5.8.0 or later... yes
checking for git... /usr/bin/git
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... none
checking how to run the C preprocessor... gcc -E
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... none
checking for gfortran... gfortran
checking whether we are using the GNU Fortran compiler... yes
checking whether gfortran accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking complex.h usability... yes
checking complex.h presence... yes
checking for complex.h... yes
checking whether g++ supports C++11 features by default... no
checking whether g++ supports C++11 features with -std=gnu++11... yes
checking for gcc option to accept ISO C99... none needed
checking for Fortran flag needed to accept free-form source... -ffree-form
checking if gcc accepts -dumpversion option... yes
checking gcc version... 5.4.0
checking if g++ accepts -dumpversion option... yes
checking g++ version... 5.4.0
checking for sqrt in -lm... yes
checking multiprecision library... MPIR
checking BLAS library... atlas
checking package versions... 
4ti2-1.6.7
alabaster-0.7.7
arb-2.8.1.p0
atlas-3.10.2.p2
autotools-20141105
babel-2.2.0
backports_abc-0.4
backports_ssl_match_hostname-3.5.0.1
benzene-20130630
bliss-0.73
boost_cropped-1.58.0
brial-0.8.4.3
buckygen-1.0
bzip2-1.0.6-20150304
cbc-2.9.4
ccache-3.2.2
cddlib-094g.p0
cephes-2.8.p1
certifi-2016.2.28
cliquer-1.21.p3
cmake-3.2.3
combinatorial_designs-20140630
compilerwrapper-1.2
configure-164
conway_polynomials-0.4.p0
coxeter3-1.1
cryptominisat-2.9.6
csdp-6.2
cvxopt-1.1.8.p1
cycler-0.10.0
cysignals-1.1.0
cython-0.24.p0
d3js-3.4.8
database_cremona_ellcurve-20160211
database_gap-4.8.3
database_jones_numfield-4
database_mutation_class-1.0
database_odlyzko_zeta-20061209
database_pari-20140908
database_stein_watkins-20110713
database_stein_watkins_mini-20070827
database_symbolic_data-20070206
dateutil-2.2
decorator-4.0.6
docutils-0.12
dot2tex-2.9.0.p0
ecl-15.3.7.p1
eclib-20150827
ecm-6.4.4
elliptic_curves-0.8
fflas_ffpack-1.6.0.p2

[sage-support] How do I build Sage 7.2 on ubuntu 16.04? Build fails in atlas-3.10.2.p2

2016-07-19 Thread Paul Leopardi
Hi all,
My build of Sage 7.2 on Ubuntu 16.04 failed in atlas-3.10.2, with an error 
that I don't understand and don't know how to fix.
What should I be doing to obtain a successful build of Sage 7.2 from source?
All the best, Paul

DETAILS:

I downloaded sage-7.2.tar.gz to my home Linux box:

leopardi@catawba:~/sync/src-downloaded/sage/sage-7.2$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:Ubuntu 16.04 LTS
Release:16.04
Codename:   xenial

leopardi@catawba:~/sync/src-downloaded/sage/sage-7.2$ uname -a
Linux catawba 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016 
x86_64 x86_64 x86_64 GNU/Linux

leopardi@catawba:~/sync/src-downloaded/sage/sage-7.2$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.1) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I then followed the instructions at 
http://doc.sagemath.org/html/en/installation/source.html to install from 
source.

$ tar xvfz sage-7.2.tar.gz
$ cd sage-7.2
$ make

This failed with the following error message:

"Error: The spkg-install script is written in Python, but the Python
package is not yet installed in Sage.  You should add $(PYTHON)
as dependency in build/pkgs/atlas/dependencies"

I have attached the make output surrounding the error message, as the file 
make.out.
One point to note in the attachment is that the python2-2.7.10.p1 build 
within Sage 7.2 reported
"Finished installing python2-2.7.10.p1.spkg"
before the error message in the atlas-3.10.2.p2 build.

Also the files build/pkgs/atlas, build/pkgs/atlas/dependencies and 
logs/pkgs/atlas-3.10.2.p2.log contain:

leopardi@catawba:~/sync/src-downloaded/sage/sage-7.2$ ls build/pkgs/atlas
checksums.ini  configuration.py  dependencies  enums.py  
package-version.txt  patches  spkg-check  spkg-install  spkg-src  SPKG.txt  
type

leopardi@catawba:~/sync/src-downloaded/sage/sage-7.2$ cat 
build/pkgs/atlas/dependencies
| $(PYTHON)

--
All lines of this file are ignored except the first.
It is copied by SAGE_ROOT/build/make/install into 
SAGE_ROOT/build/make/Makefile.

leopardi@catawba:~/sync/src-downloaded/sage/sage-7.2$ more 
/home/leopardi/sync/src-downloaded/sage/sage-7.2/logs/pkgs/atlas-3.10.2.p2.log
Found local metadata for atlas-3.10.2.p2
Using cached file 
/home/leopardi/sync/src-downloaded/sage/sage-7.2/upstream/atlas-3.10.2.tar.bz2
atlas-3.10.2.p2

Setting up build directory for atlas-3.10.2.p2
Finished set up
Error: The spkg-install script is written in Python, but the Python
package is not yet installed in Sage.  You should add $(PYTHON)
as dependency in build/pkgs/atlas/dependencies

-- 
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.


make.out
Description: Binary data


Re: [sage-support] Run all cells on a large worksheet?

2015-12-09 Thread Paul Leopardi
I also could not reproduce the problem with the worksheet you gave me. I 
have reproduced it with the following worksheet
https://cloud.sagemath.com/projects/80f4c9e7-8a37-4f59-82e7-aa179ec0b652/files/public/new-order.sagews
which leads me to believe that it is caused by a 'corrupted' worksheet. My 
guess is that the corruption occurs either when I change the contents of a 
cell while a calculation is running in that cell or another cell, or I 
change the contents of a cell after an unsuccessful attempt to stop a 
calculation, possibly followed by a restart. I have done this many times 
over the course of creating my larger worksheets, but have not yet nailed 
down the problem.

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


[sage-support] Run all cells on a large worksheet?

2015-12-08 Thread Paul Leopardi
I have created a large worksheet at
https://cloud.sagemath.com/projects/3c2a9143-d685-410f-995c-28f44056999f/files/bent-functions-duals-Cayley-graphs.sagews
with a public copy at
https://cloud.sagemath.com/projects/80f4c9e7-8a37-4f59-82e7-aa179ec0b652/files/public/bent-functions-duals-Cayley-graphs.sagews
It contains a mix of quick and slow calculations.

When I try to run the worksheet by using CTRL-A then hitting the run 
button, it does not consistently run all cells in order. Sometimes the run 
skips cells, causing errors in later cells. Sometimes the run seems to hang 
on a long calculation. Is this a known bug?

How do I move the function definition portion of my worksheet to a module? 
Is moving to a module the best workaround for the CTRL-A problem? As an 
alternative, is there a way to chain the calculations of small worksheets?

All the best.

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


Re: [sage-support] Run all cells on a large worksheet?

2015-12-08 Thread Paul Leopardi
On Wednesday, 9 December 2015 12:21:07 UTC+11, William wrote:
>
> On Tue, Dec 8, 2015 at 2:41 PM, William Stein <wst...@gmail.com 
> > wrote: 
> > On Tue, Dec 8, 2015 at 4:05 AM, Paul Leopardi <paul.l...@gmail.com 
> > wrote: 
> >> I have created a large worksheet at 
> >> 
> https://cloud.sagemath.com/projects/3c2a9143-d685-410f-995c-28f44056999f/files/bent-functions-duals-Cayley-graphs.sagews
>  
> >> with a public copy at 
> >> 
> https://cloud.sagemath.com/projects/80f4c9e7-8a37-4f59-82e7-aa179ec0b652/files/public/bent-functions-duals-Cayley-graphs.sagews
>  
> >> It contains a mix of quick and slow calculations. 
> >> 
> >> When I try to run the worksheet by using CTRL-A then hitting the run 
> button, 
> >> it does not consistently run all cells in order. Sometimes the run 
> skips 
> >> cells, causing errors in later cells. Sometimes the run seems to hang 
> on a 
> >> long calculation. Is this a known bug? 
> > 
> > They should definitely all run in order... but looking at the relevant 
> code 
> > 
> >
> https://github.com/sagemathinc/smc/blob/master/src/smc-webapp/sagews.coffee#L1603
>  
> > 
> > I'm not 100% sure that something might go wrong (due to this being 
>
> Looking at the code again, I can't see how it wouldn't work.  I made a 
> worksheet to test the order in which things run, and I can't seem to 
> replicate the problem you noticed: 
>
>
> https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2015-12-08-171850-order.sagews
>  
>
> Is this something you're sure is happening? It's not been reported before. 
>
> The bug has happened to me on a number of occasions, along with certain 
cells in the worksheet becoming corrupted and displaying a sting of 
random-looking hex characters. These two bugs seem to be related, in that 
they happen on the same worksheet, but they don't always occur at the same 
time. Perhaps I have subtly corrupted my worksheet? I re-ran the public 
version of the worksheet and it ran almost all the way through, except for 
one corrupted cell. I will take a copy of your test worksheet and see if I 
can reproduce the problem.

Thanks!

PS. I have just joined the sage-cloud group and will post new problems over 
there. For the current problem, I think it would be better to just continue 
the thread here.

PPS. I have given a talk at the 39th Australasian Conference of 
Combinatorial Mathematics and Combinatorial Computing and am encouraging 
others to view and use the worksheet.
https://sites.google.com/site/paulleopardi/Leopardi-ACCMCC-2015-talk-revised.pdf?attredirects=0=1

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


[sage-support] Re: error in Sage

2015-11-17 Thread Paul Leopardi
Hi,
I have also just encountered the incorrect sign for BooleanFunction 
walsh_hadamard_transform(). 
In addition, I would like to point out that the documentation at
http://doc.sagemath.org/html/en/reference/cryptography/sage/crypto/boolean_function.html
 
agrees with the usual definition and not with the current implementation, 
and the doctest on that page does not check for correct sign. Finally, the 
sign on the Walsh Hadamard transform affects the definition of the dual, 
self-dual bent functions, etc. In particular, the function $x_1 x_2$ is 
self dual under the usual definition
http://www.inderscienceonline.com/doi/abs/10.1504/IJICoT.2010.032864 but 
not when when the current implementation is used. Clearly the current sign 
is a bug, rather than just a difference in convention.
All the best, Paul

On Tuesday, 30 December 2014 18:18:47 UTC+11, William wrote:
>
> -- Forwarded message -- 
> From: Aneta Buraczyńska  
> Date: Mon, Dec 29, 2014 at 11:03 PM 
> Subject: error in Sage 
> To: William Stein  
>
>
> Dear Mr William Stein, 
>
> I am writing with request for contact to Sage creators or reading my 
> problem. In module sage.crypto.boolean_function there is a function: 
> walsh_hadamard_transform(). I think this function gives wrong results. 
> For instance for function f defined by truth table (1, 0, 0, 0, 0, 1, 
> 1, 1) sage gives vector (0, 0, 0, 0, -4, 4, 4, 4) as a result, but the 
> correct value is (0, 0, 0, 0, 4, -4, -4, -4). All functions that I 
> verified have in sage error result due to incorrect signs. On appendix 
> I send a document with the calculations showing my statement. 
>
> I will be grateful for help in this problem. 
>
> Yours Sincerely, 
>
> Aneta Buraczyńska 
>
>
>
>
> -- 
> William Stein 
> Professor of Mathematics 
> University of Washington 
> http://wstein.org 
>

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


[sage-support] Repeat of report of incorrect sign for walsh_hadamard_transform().

2015-11-17 Thread Paul Leopardi
I am reposting a comment I just added to the topic, "Fwd: error in Sage" in 
the hopes that it will be more likely to be seen this way.

Hi,
I have also just encountered the incorrect sign for BooleanFunction 
walsh_hadamard_transform(). 
In addition, I would like to point out that the documentation at
http://doc.sagemath.org/html/en/reference/cryptography/sage/crypto/boolean_function.html
 
agrees with the usual definition and not with the current implementation, 
and the doctest on that page does not check for correct sign. Finally, the 
sign on the Walsh Hadamard transform affects the definition of the dual, 
self-dual bent functions, etc. In particular, the function $x_1 x_2$ is 
self dual under the usual definition
http://www.inderscienceonline.com/doi/abs/10.1504/IJICoT.2010.032864 but 
not when when the current implementation is used. Clearly the current sign 
is a bug, rather than just a difference in convention.
All the best, Paul

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


[sage-support] How to exponentiate a matrix with mixed entries?

2008-11-20 Thread Paul Leopardi

Hi all,
I'm trying to exponentiate a matrix with a complex entry. The input
and output is below. Why does Sage give me 103993*I/33102 in the upper
right hand corner, and how can I get it to give me the right answer?
Also, how do I get it to use (eg.) RealField(100)?
Best, Paul

[EMAIL PROTECTED]:~ sage
--
| SAGE Version 3.1.2, Release Date: 2008-09-19   |
| Type notebook() for the GUI, and license() for information.|
--

sage: A=Matrix([[1,0,i*float(pi)],[0,1,0],[0,0,1]])
sage: exp(A)/exp(1)

[ 1  0 103993*I/33102]
[ 0  1  0]
[ 0  0  1]
sage: B=Matrix([[1,0,i*pi],[0,1,0],[0,0,1]])
sage: exp(B)/exp(1)

[   10 I*pi]
[   010]
[   001]

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---