Re: [sage-support] libSingular multiple return values are lost.

2015-08-06 Thread 'Martin Albrecht' via sage-support
Hi, On Wednesday 05 Aug 2015 23:35:26 Kwankyu wrote: > Hi, > > I am learning to use the libSingular interface to use Singular functions in > Sage. I have two questions. > > (1) My Singular procedures return multiple values, but my Sage function > wrapping the procedure (via "singular_function")

Re: [sage-support] CryptoMiniSat package

2015-05-14 Thread Martin Albrecht
Hi, see here: http://doc.sagemath.org/html/en/reference/sat/index.html#solvers sage: from sage.sat.solvers.dimacs import DIMACS sage: fn = tmp_filename() sage: solver = DIMACS(filename=fn) sage: solver.add_clause( ( 1, 2, 3) ) sage: solver.add_clause( ( 1, 2, -3) ) sage: _ = solver.write() sa

Re: [sage-support] I.variety() and polynomial order

2015-04-20 Thread Martin Albrecht
Hi Peter, variety() calls triangular_decomposition() which indeed changes the term ordering for you if required: # make sure to work w.r.t. 'lex' if P.term_order() != 'lex': Q = P.change_ring(order='lex') else: Q = P So the documentation should be

Re: [sage-support] CryptoMiniSat

2015-04-20 Thread Martin Albrecht
Hi, $ sage -i cryptominisat && sage -b should do the trick. Cheers, Martin On Monday 20 Apr 2015 07:01:00 Dibyendu Roy wrote: > Dear Members, > > I want to install CryptoMiniSat 2.9.9. I have downloaded the latest file > from https://gforge.inria.fr/frs/?group_id=1992. Could you please tell me

Re: [sage-support] F,s = sr.polynomial_system(P,K) for SR(5,2,2,4)

2015-03-17 Thread Martin Albrecht
abf7158809cf4f3c' > > On Monday, March 16, 2015 at 11:59:52 PM UTC+1, Martin Albrecht wrote: > > On Monday 16 Mar 2015 12:45:07 Joe Ouni wrote: > > > Hello , > > > > > > The following SR (2,1,1,4) worked fine. > > > > > >

Re: [sage-support] F,s = sr.polynomial_system(P,K) for SR(5,2,2,4)

2015-03-16 Thread Martin Albrecht
On Monday 16 Mar 2015 12:45:07 Joe Ouni wrote: > Hello , > > The following SR (2,1,1,4) worked fine. > > sage: sr = SR(2,1,1,4,star=True,aes_mode=True, > gf2=True,allow_zero_inversions = True) > sage: P = sr.vector([0, 0, 1, 0]) > > sage: K = sr.vector([1, 0, 0, 1]) > sage: C = sr(P,K) > sage: l

Re: [sage-support] m4rie build error on debian wheezy 7.8.0

2015-03-08 Thread Martin Albrecht
Hi, it seems you're running into a compiler bug: libtool: compile: gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I./m4rie -I/home/alwi- wheezy/sage-6.5/local/include -I/include -mmmx -msse -msse2 -msse3 -O2 -fPIC - Wall -pedantic -g -I/home/alwi-wheezy/sage-6.5/local/include -MT m4rie/conversion_cling16.

Re: [sage-support] How convert from PolynomialSequence to DIMAC format

2015-01-28 Thread Martin Albrecht
Hi, try: http://www.sagemath.org/doc/reference/sat/ Cheers, Martin PS: it's the first hit on Google when you search for "PolynomialSequence DIMACS Sage". Just saying. On Wednesday 28 Jan 2015 12:57:21 Juan Grados wrote: > Dears members, > I have a object PolynomialSequence in ANF. > > PF = P

Re: [sage-support] Sage LLL differs from PARI/gp

2015-01-05 Thread Martin Albrecht
sage: gp.qflll? Type: GpFunction String form:qflll File: /opt/sage-devel/local/lib/python2.7/site- packages/sage/interfaces/gp.py Definition: gp.qflll(self, *args, **kwds) Docstring: qflll(x,{flag=0}): LLL reduction of the vectors forming the matrix x (gives the unimodul

Re: [sage-support] PB with sr.mq module

2014-11-14 Thread Martin Albrecht
Works for me: sage: sr = mq.SR(1,1,1,4, gf2=True, polybori=True) sage: K = sr.base_ring() sage: a = K.gen() sage: K = [a] sage: P = [1] sage: F,s = sr.polynomial_system(P=P, K=K) sage: F.groebner_basis() [k100, k101 + 1, k102, k103 + k003, x100 + 1, x101 + k003 + 1, x102 + k003 + 1, x103 + k003,

Re: [sage-support] Re: var() definition in finite fields

2014-09-30 Thread Martin Albrecht
Your matrix is over GF(2) not over the symbolic ring SR: sage: m1 = SR(GF(2)(1)) * var("m1") sage: m2 = SR(GF(2)(1)) * var("m2") sage: m3 = SR(GF(2)(1)) * var("m3") sage: m4 = SR(GF(2)(1)) * var("m4") sage: q = Matrix(SR, [ [m1, m2], [m3, m4], ]) sage: q^2 [ m1^2 + m2*m3 m1*m2 + m2*m4] [

[sage-support] Re: Weird! OverflowError: cannot convert float infinity to integer

2014-09-22 Thread Martin Albrecht
This is a bug in Sage's finite field via NTL's GF2E implementation which is triggered by M4RIE: sage: K. = GF(2^15) sage: type(K), type(matrix(K)) (sage.rings.finite_rings.finite_field_givaro.FiniteField_givaro_with_category, sage.matrix.matrix_mod2e_dense.Matrix_mod2e_dense) sage: K. = GF(2^16

Re: [sage-support] Question about solve_sat

2014-08-27 Thread Martin Albrecht
It means that the system is believed to be unsolvable. On Wednesday 27 Aug 2014 13:54:47 Juan Grados wrote: > Dear members, > > I'm trying to solve the attach formulas but I get FALSE, anyone know what > means that, or Why I get FALSE? > > sage: solve_sat(PolynomialSequence(F,RR),n=infinity) > F

Re: [sage-support] Question about SAT solver

2014-08-12 Thread Martin Albrecht
This is a bug. In particular: sage: S.solve(eliminate_linear_variables=False) [{w: 0, z: 0, y: 0, x: 0}] Does the trick. The bug is that eliminating linear variables already solves the problem and the logic in solve() doesn't handle this case. Please open a ticket and CC me. On Tuesday 12 Aug

Re: [sage-support] A possible bug in boolean polynomial

2014-08-10 Thread Martin Albrecht
Why? These are different errors. One is (probably) an integer overflow, the other a failure to allocate 2^30 something. On Sunday 10 Aug 2014 04:38:52 pp wrote: > Hi all, > > Consider the following code: > > NUM = 2 > R = BooleanPolynomialRing(NUM, ['x%d'%(i) for i in range(NUM)]) > expr = R('x

Re: [sage-support] Error when trying to input an 8-bit Sbox into the argument of S = mq.SBox(.)

2014-06-19 Thread Martin Albrecht
> this? > > On Saturday, December 22, 2012 9:16:31 AM UTC-8, Martin Albrecht wrote: > > Pass a list of numbers instead of independent numbers. SBox( [1,2,3]) not > > SBox(1,2,3) > > > > sent from a telephone. > > > > On 19 Dec 2012 08:17, "sea21&qu

Re: [sage-support] Re: Sage posts "PowmInsecureWarning: Not using mpz_powm_sec." when launched

2014-06-08 Thread Martin Albrecht
On Saturday 07 Jun 2014 13:34:18 Volker Braun wrote: > Afaik its only used in the openid module. And exploiting a timing attack > over network is most likely not possible. they are practical at least over LAN: https://crypto.stanford.edu/~dabo/papers/ssl-timing.pdf > On Saturday, June 7, 2014 8

Re: [sage-support] enum algorithm

2014-05-26 Thread Martin Albrecht
ction is L.closest_vector(t) which uses > Miccianchio-Voulgaris algorithm. Is there also another algorithm from > fplll? > thanks > > On Tuesday, May 13, 2014 8:37:25 PM UTC+3, Martin Albrecht wrote: > > On Tuesday 13 May 2014 09:51:27 J.A. Ketch wrote: > > > are the fo

Re: [sage-support] Can't evaluate a polynomial on a finite field if representation is not "poly"

2014-05-21 Thread Martin Albrecht
Looks like a bug, can you open a ticket? On Monday 19 May 2014 19:13:55 Grégory Landais wrote: > Hello, > > evaluating a polynomial on a finite field does not work if the finite > field was created with a 'repr' argument in the constructor different > than the default one (poly). > > Curently us

Re: [sage-support] enum algorithm

2014-05-13 Thread Martin Albrecht
On Tuesday 13 May 2014 09:51:27 J.A. Ketch wrote: > are the following algorithms implemented in sage? > enum algorithm (for svp and cvp) fpLLL has enumeration for finding the shortest vector (the code for CVP is experimental according to the docs). There's a ticket on trac implementing an interf

Re: [sage-support] Re: Sampling elements from a vector space

2014-05-12 Thread Martin Albrecht
Why not: %time A = random_matrix(GF(4,'a'), 36, 10^6) CPU times: user 568 ms, sys: 12 ms, total: 580 ms Wall time: 578 ms However, getting the rows out takes ages. The reason is that vectors over GF(4) are generic, i.e. noone sat down and wrote up a simple class which implements these vectors a

Re: [sage-support] Re: Complex embedding with quotient()

2014-05-07 Thread Martin Albrecht
Hi Nils, On Wednesday 07 May 2014 16:43:03 Nils Bruin wrote: > On Wednesday, May 7, 2014 9:58:48 AM UTC-7, François Colas wrote: > > What I want to do is a way to evaluate polynomials of K in a power of a > > primitive square root of unity: > > > > omega = CC(e^(2*I*pi/m)) > > F = Hom(K, CC) > >

Re: [sage-support] Irreducibility of polynomials

2014-05-07 Thread Martin Albrecht
Here's how to find out: sage: P. = GF(2)[] sage: f = P.random_element() sage: f.is_irreducible?? if 0 == GF2X_IterIrredTest(self.x): return False else: return True Okay, what's GF2X_IterIrredTest? sage: search_src("GF2X_IterIrredTest") libs/ntl/ntl_GF2X_d

[sage-support] Re: Not spam despite subject ... Fwd: REQUEST FOR ASSISTANCE

2014-05-01 Thread Martin Albrecht
Hi, just doing sage: A = matrix(GF(2), 52751923, 39) sage: A[i,j] = your entry doesn't do the trick? In this case: with extremely high probability this matrix has full rank, so imply extract a, say, 1000 x 39 submatrix, compute Gaussian elimination on that. The rest will be zero anyway. On T

Re: [sage-support] what is the syntax of the repeat loop ?

2014-03-18 Thread Martin Albrecht
You'd write it like this: sage: sage.rings.polynomial.toy_buchberger.buchberger?? G = set(F.gens()) B = set(filter(lambda (x,y): x!=y, [(g1,g2) for g1 in G for g2 in G])) while B!=set(): g1,g2 = select(B) B.remove( (g1,g2) ) h = spol(g1,g2).reduce(G)

[sage-support] Re: CryptoMiniSat package

2013-12-31 Thread Martin Albrecht
attribute 'clauses'? If so, how may > I go about doing it? > > Also, is there a possibility for multi-threading for CryptoMiniSat in Sage? > > > Valerie Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6532AFB4 _otr: 47

Re: [sage-support] Install cryptominisat-2.9.5 in Ubuntu 13.10

2013-11-18 Thread Martin Albrecht
age(package, force) > 169 if not force: > 170 if is_package_installed(package): > --> 171 raise ValueError, "Package is already installed. > Try install_package('%s',force=True)"%(package) > 172 raise Value

Re: Re: [sage-support] Re: Re: Re: Re: Re: Re: Re: error: setupterm: could not find terminal

2013-08-24 Thread Martin Albrecht
fix it? > > It should be set to $SAGE_LOCAL/share/terminfo -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6532AFB4 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: http://martinralbrecht.wordpress.com/ _jab: martinralbre...@jabber.ccc.de signature.a

[sage-support] Re: Re: Re: Re: Re: Re: Re: error: setupterm: could not find terminal

2013-08-23 Thread Martin Albrecht
Maybe there is some permission problem? > > On Thursday, August 22, 2013 10:32:46 PM UTC+1, Martin Albrecht wrote: > > Hi Volker, > > > > here you go. Grepping through it nothing stood out ... I am not sure what > > I am > > looking for, though. > > >

[sage-support] Re: Re: Re: Re: error: setupterm: could not find terminal

2013-08-22 Thread Martin Albrecht
perhaps note that I am on zsh if that makes a difference (?) Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6532AFB4 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: http://martinralbrecht.wordpress.com/ _jab: martinralbre...@jabber.ccc.de signature.asc Description: This is a digitally signed message part.

[sage-support] Re: Re: Re: error: setupterm: could not find terminal

2013-08-22 Thread Martin Albrecht
L. -lpanelw > -lncursesw -lpython2.7 -o build/lib.linux-x86_64-2.7/_curses_panel.so *** > WARNING: renaming "_curses_panel" since importing it failed: > /lib64/libncursesw.so.5: undefined symbol: _nc_putchar > > On Thursday, August 22, 2013 2:22:50 PM UTC+1, Martin Albrec

[sage-support] Re: Re: error: setupterm: could not find terminal

2013-08-22 Thread Martin Albrecht
/p/iterm2/issues/detail?id=1956 > > On Thursday, August 22, 2013 1:56:09 PM UTC+1, Martin Albrecht wrote: > > Hi all, > > > > with Sage 5.12.beta3 I get: > > > > sage: os.environ["TERM"] > > 'xterm' > > sage: ZZ? > > > >

[sage-support] error: setupterm: could not find terminal

2013-08-22 Thread Martin Albrecht
wn"), ---> 33 fd=_sys.__stdout__.fileno()) 34 stdscr = _curses.initscr() 35 for key, value in _curses.__dict__.items(): error: setupterm: could not find terminal sage: This is in konsole (KDE's console). Any ideas? Cheers, Martin -- name: Martin Al

Fwd: [sage-support] Re: Possible bug in algebraic_immunity( ) function in crypto toolbox

2013-08-20 Thread Martin Albrecht
upport+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/groups/opt_out. - -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/loo

[sage-support] n-dimensional numerical integration

2013-06-29 Thread Martin Albrecht
Hi all, do we have n-dimensional numerical integration in Sage? All I can find is 3D, but what about higher dimensions? Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6532AFB4 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www:

Re: [sage-support] Modifying ANF2CNF converter to produce limited number of CNF clauses

2013-05-22 Thread Martin Albrecht
be input to the converter, along with the ANF expression). > > Please help if anybody can come up with a solution. > > Thanks a lot. Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E

Re: [sage-support] Conjunctive Normal Form

2013-04-20 Thread Martin Albrecht
leanPolynomialRing() > f=a+b*c Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: http://martinralbrecht.wordpress.com/ _jab: martinralbre...@jabber.ccc.de -- You received thi

Re: [sage-support] What is "set_verbose" command in buchberger algorithm?

2013-04-05 Thread Martin Albrecht
y^2 + z, z^3 + y^2]) > > (z^3 + y^2, x^6 - y^2 + z) => 0 > G: set([x^6 - y^2 + z, z^3 + y^2]) > > 2 reductions to zero. > [x^6 - y^2 + z, z^3 + y^2] > I just want to know what is "set_verbose(3)" command in this? also "toy:" > ... that I just

Re: [sage-support] Problem in Sat Solver

2013-04-05 Thread Martin Albrecht
e.sat.boolean_polynomials > B= sage.sat.boolean_polynomials.solve(I.gens()) Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: http://martinralbrecht.wordpress.com/ _jab: martinralbre...@jabber.c

Re: [sage-support] Possible bug in anf2cnf.py

2013-03-13 Thread Martin Albrecht
he monomial a*b. On multiplying these clauses, the > answer comes as a' + b', and not a*b as required. > > Can anybody please help? Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E

Re: [sage-support] Re: Random Permutation

2013-03-04 Thread Martin Albrecht
t; zero-based, but Permutations(50) permutes the numbers from 1 to 50, not > from 0 to 49. > > Best regards, > Simon Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _ww

Re: [sage-support] Arrays of Boolean variables

2013-02-27 Thread Martin Albrecht
shows the variables, which I > do not want. > Is there any way to tackle this? Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: http://martinralbrecht.wordpress.com/ _jab:

Re: [sage-support] Sat Solver

2012-12-24 Thread Martin Albrecht
infinity import PlusInfinity > > from sage.sat.solvers import SatSolver > from sage.sat.converters import ANF2CNFConverter > > > > Traceback (click to the left of this block for traceback) > ... > ImportError: No module named sat.solvers Cheers, Martin -- name: Marti

Re: Re: [sage-support] Solve system of non linear equations

2012-12-23 Thread Martin Albrecht
> * Unable to download cryptominisat-2.9.5 > * Please see http://www.sagemath.org//packages for a list of valid > * packages or check the package name. > ** > Error:

Re: [sage-support] Error when trying to input an 8-bit Sbox into the argument of S = mq.SBox(.)

2012-12-22 Thread Martin Albrecht
Pass a list of numbers instead of independent numbers. SBox( [1,2,3]) not SBox(1,2,3) sent from a telephone. On 19 Dec 2012 08:17, "sea21" wrote: > Why is it that when I try to input an 8-bit Sbox into the argument of S = > mq.SBox(.), I get the error: "SyntaxError: more than 255 arguments"? Doe

Re: Re: [sage-support] Re: Groebner Basis over finite field

2012-12-13 Thread Martin Albrecht
> "sage-support" group. > > To post to this group, send email to sage-support@googlegroups.com. > > To unsubscribe from this group, send email to > > sage-support+unsubscr...@googlegroups.com. > > Visit this group at http://groups.google.com/group/sage-support?hl=

Re: Re: [sage-support] Solve system of non linear equations

2012-12-13 Thread Martin Albrecht
lean_polynomials.solve(I.gens()) [{x7: 1, x8: 0, x9: 1, x6: 0, x5: 0, x4: 1, x3: 1, x1: 1, x2: 1, x0: 1}] sage: I.groebner_basis() [x0 + 1, x1 + 1, x2 + 1, x3 + 1, x4 + 1, x5, x6, x7 + 1, x8, x9 + 1] Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=g

Re: Re: [sage-support] Re: Solve system of non linear equations

2012-12-08 Thread Martin Albrecht
e you can download it in the paper. > > All that said, when I look at your system, I wonder if something's wrong > with the formatting, because it looks to me as if it's either linear or > univariate. Is that the case? > > regards > john perry Cheers, Martin

Re: [sage-support] Re: Solve system of non linear equations

2012-12-08 Thread Martin Albrecht
fineSpace(GF(2),2) > sage: S = AA.subscheme(x^2+y^2) > sage: S.point_set().points() > [(0, 0), (1, 1)] > > On Saturday, December 8, 2012 6:14:19 AM UTC, Santanu wrote: > > I have a system of non linear equations over GF(2). How to solve > > > > them in Sage? Che

Re: [sage-support] libm4rie-20120613 will not build on Ubuntu Server 12.04.1 LTS x86

2012-11-04 Thread Martin Albrecht
don-Curtis/5046185> > <https://plus.google.com/u/0/105858766264293200612/about> > <http://brandoncurtis.net> > <http://jbei.org> > * Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36

Re: [sage-support] Re: The matrix function

2012-10-21 Thread Martin Albrecht
x(2, 3, [1, 0, 2, 0, 1, 2]) > [1 0 2] > [0 1 2] > > #rows, #columns and a function to supply elements > sage: matrix(6, 4, lambda i, j: i+j) > [0 1 2 3] > [1 2 3 4] > [2 3 4 5] > [3 4 5 6] > [4 5 6 7] > [5 6 7 8] > > > Hope it helps, > > jo

Re: [sage-support] obtaining coefficient matrix of a set of linear equations

2012-09-09 Thread Martin Albrecht
n n unknowns, how do I use SAGE to give > me the coefficient matrix* A*(size m *n) and column vector *b*(size m*1) > such that Ax = b; where *x*(size n*1) is the vector of unknowns ? > > Thanks a lot. Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?

Re: [sage-support] Multivariate polynomials: libsingular vs. polydict

2012-09-05 Thread Martin Albrecht
and Q over the > course of several days and don't quite understand what happened. > > Thanks! > > Robert Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: htt

Re: Re: [sage-support] Boolean function evalution

2012-07-17 Thread Martin Albrecht
m > f chosen at the time this function is yz. What does the call f(*G) mean? sage: f(x,y,z) calls f on x,y,z. G is a list of length three and * turns that into three different arguments for f's call. This is not a Sage feature but a feature of the Python language. Cheers, Martin --

Re: [sage-support] Boolean function evalution

2012-07-17 Thread Martin Albrecht
d similarly, how do I compute f(g()) > composition? > > Can someone help please? > > Thanks in advance. > Virendra Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: h

Re: [sage-support] multivariate polynomial factorization over GF(2)

2012-06-18 Thread Martin Albrecht
> > R.=GF(2)['t,x'] > g=t^16*x + t^10*x + t^9*x + t^6*x + t^5 + t*x + x^2 > g.factor(proof=False) Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: http:/

Re: [sage-support] Re: Polynomial representation over GF(2^n)

2012-06-16 Thread Martin Albrecht
store it, then I worry about the phrase > > The docs for multiplicative_generator() say: "return a generator of the > > multiplicative group", then add "Warning: This generator might change > > from one version of Sage to another." > > > > 2. So the qu

Re: Re: [sage-support] Command in sage for partial Gaussian Elimination

2012-06-14 Thread Martin Albrecht
ckages (LinBox, NTL, IML, M4RI, M4RIE, Pari, ...) or implements its own highly efficient linear algebra. The only case when Singular is called is when linear algebra over multivariate polynomial rings is performed. See http://wiki.sagemath.org/DenseLinearAlgebra Cheers, Martin -- name: Martin

Re: [sage-support] Command in sage for partial Gaussian Elimination

2012-06-13 Thread Martin Albrecht
trix and perform the algorithm > on that part of it, and just re-join it to the rest of the matrix, but I > was wondering if there is some built-in function for this. > > Thanks, > Tom Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&s

Re: Re: [sage-support] Generator of Finite Field

2012-06-03 Thread Martin Albrecht
PARI doesn't have a log_repr() to begin with, so I don't see how that's relevant. On Sunday 03 Jun 2012, Jeroen Demeyer wrote: > On 2012-06-03 12:14, Martin Albrecht wrote: > > 2) K.multiplicative_generator() currently returns a random generator, but > > for t

Re: Re: [sage-support] Generator of Finite Field

2012-06-03 Thread Martin Albrecht
> > Why is it clear that a^4+a+1 is not a multiplicative generator? I think > > it is: > > > > sage: k. = GF(2^8, names='a', name='a', modulus=x^8+x^4+x^3+x+1) > > sage: (a^4+a+1).multiplicative_order() > > 255 > > &g

Re: Re: [sage-support] Re: Solving quadratic inequalities with Mixed Ineger Linear Programming

2012-05-31 Thread Martin Albrecht
gh the > > MILP class. > > > > Nathann > > > > -- > > To post to this group, send email to sage-support@googlegroups.com > > To unsubscribe from this group, send email to > > sage-support+unsubscr...@googlegroups.com > > For more options, vi

Re: [sage-support] Methods in GF

2012-05-29 Thread Martin Albrecht
sage: *ZZ.zero_element()* > 0 > sage: *QQ.zero_element()* > 0 > sage: QQ['x'].*zero_element()* > 0 > > The result is cached: > > sage: ZZ.*zero_ele

Re: [sage-support] ZZ for base more than 2^64

2012-05-29 Thread Martin Albrecht
us a patch ;) On a more serious note, it seems you found a bug and your code above is the right fix. So it would be great if you could open a ticket and provide a patch which falls back to the generic code above if the base is >= 2^64. Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.

Re: [sage-support] Re: Generator of Finite Field

2012-05-29 Thread Martin Albrecht
you switch to multiplicative_generator() or does that present problems for you? Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: http://martinralbrecht.wordpress.com/

[sage-support] IntegerVectors question

2012-05-17 Thread Martin Albrecht
y sat down and implemented the correct formula (i.e., is it known)? If an exact formula is not know, does anyone know an upper bound (somewhat tight :))? Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F

Re: [sage-support] Testing multivariate quadratic polynomial system [crypto]

2012-05-02 Thread Martin Albrecht
her. The idea > is similar to polynomial system construction in mq.SR for AES and *ctc.py* > for Courtois Toy Cipher by Martin Albrecht. And I'm wondering what is the > best way to test correctness of the system. > > What I've implemented so far: > >1. replacing ev

Re: [sage-support] Smith form [bug?]

2012-04-27 Thread Martin Albrecht
mod2_dense.Matrix_mod2_dense.submatrix > (sage/matrix/matrix_mod2_dense.c:9696) TypeError: submatrix() takes > exactly 4 positional arguments (2 given) > > > When I looked at the code, it seemed that "Matrix Mod2" submatrix doesn't > have the parameters "nrow

Re: [sage-support] Eval problem with rationals

2012-04-19 Thread Martin Albrecht
Try sage: sage_eval? which preparses it's input while eval does not. On Thursday 19 Apr 2012, Graham Gerrard wrote: > z="1/2*x" > x=3 > eval(z) > 0 > z="x*1/2" > eval(z) > 3/2 > > ?? > > Graham Cheers, Martin -- name: Martin Albrec

Re: [sage-support] Are there any SAT Solver implemented in Sage?

2012-04-16 Thread Martin Albrecht
w it can be used. I would appreciate any help and hints on using > SAT solvers in Sage. > > Thanks. Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: http://martinralbrecht.w

Re: [sage-support] Solving a set of quadratic inequalities (continuous)

2012-04-13 Thread Martin Albrecht
rict or not, as I feel free to replace > < 1 by <= 0.9. > > Would you know of any way to solve this type of equations, or to > ensure that no solution exists ? > > Thank yo ! :-) > > Nathann Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.e

Re: [sage-support] Deriving an irreducible polynomial for F_2

2012-03-21 Thread Martin Albrecht
gt; clinton Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: http://martinralbrecht.wordpress.com/ _jab: martinralbre...@jabber.ccc.de -- To post to this group, send email to s

Re: [sage-support] Question about polynomials roots

2012-03-02 Thread Martin Albrecht
F is a Galois Field. In sage i > have a roots() function, I want know please, What is a algorithm used > for implement this function?. > > thanks. Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEB

Re: [sage-support] Re: Some bugs and some wishes

2012-02-21 Thread Martin Albrecht
ts). Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: http://martinralbrecht.wordpress.com/ _jab: martinralbre...@jabber.ccc.de -- To post to this group, send email to sage-support@

Re: [sage-support] performance of matrix_from_columns method ...

2012-01-29 Thread Martin Albrecht
s? How soon do you need it? I'm asking because I don't know how soon I could make this happen, but I'm sure we can make this much much faster by doing this in the M4RI library itself, i.e., in C. Do you know a bit of C? Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:

Re: [sage-support] Question about Groener Basis

2011-10-13 Thread Martin Albrecht
ear much slower than it should (it's my fault btw.). Someone should implement it and send us a patch :) cf. solve.h in M4RI: http://m4ri.sagemath.org/doxygen/solve_8h.html Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99

Re: [sage-support] Re: Minimal set of Generators(basis) for an ideal/module

2011-09-29 Thread Martin Albrecht
n('minbase') sage: minbase(J) [x^2, x*y*z, x*z^2, y^2, y*z^2, z^3] Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: http://www.informatik.uni-bremen.de/~malb _jab: mar

Re: [sage-support] Re: how does one do this in Cython?

2011-09-01 Thread Martin Albrecht
reply; I looked at the solution a long time ago & > it seems to work. A natural question, naturally :-) is there an easier > way to specify the include directory? after all, this changes by > machine & version. > > john > > On Jul 25, 8:34 am, Martin Albrecht > wrote:

Re: Re: [sage-support] Binary array to integer

2011-08-23 Thread Martin Albrecht
; > For more options, visit this group at > > http://groups.google.com/group/sage-support > > URL: http://www.sagemath.org Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951C

Re: [sage-support] Re: Bug: Finding kernel of a matrix over GF(2) seems to be broken.

2011-08-19 Thread Martin Albrecht
t; That seems to fix it for me! Indeed, I can confirm this. I don't know which change in M4RI triggered the fix (i.e., we didn't explicitly work on kernels since 2009). Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr:

Re: [sage-support] Re: how does one do this in Cython?

2011-07-25 Thread Martin Albrecht
Hi John, see attachment. You'll have to change the cinclude path for it to work on your machine. On Monday 25 July 2011, john_perry_usm wrote: > On Jul 25, 6:46 am, Martin Albrecht > > wrote: > > You'll need to compile your extension module (i.e. your pyx file) with

Re: [sage-support] Re: how does one do this in Cython?

2011-07-25 Thread Martin Albrecht
ore ‘<’ token > - > > then more of other types. You'll need to compile your extension module (i.e. your pyx file) with C++ instead of C. See http://sagemath.org/doc/developer/coding_in_cython.html#special-pragmas Cheers, Martin -- name: Martin Albrecht

Re: [sage-support] Re: Need arbitrary Singular term orders

2011-05-21 Thread Martin Albrecht
hg qpush # it will print the same error as above, ignore it 5) ./sage -b Essentially, you do the same thing as the Sage command you quote above, but you ignore the error (since it isn't really that important in this particular case) For more details check: http://sagemath.org/doc/develope

Re: [sage-support] Re: Need arbitrary Singular term orders

2011-05-19 Thread Martin Albrecht
of the Sage community have invested in this tool. A lot of my > research has come out of what I've been able to write in Sage. Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _

Re: [sage-support] Need arbitrary Singular term orders

2011-05-18 Thread Martin Albrecht
ever, it might be the case that the patch at #11316 fixes this issue as well. Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: http://martinralbrecht.wordpress.com/ _jab: martinr

Re: Re: [sage-support] what's mpz_ function ?

2011-03-31 Thread Martin Albrecht
//www.mpir.org/ Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: http://martinralbrecht.wordpress.com/ _jab: martinralbre...@jabber.ccc.de -- To post to this group, send email to

Re: [sage-support] Re: Multiple ideal membership

2011-03-27 Thread Martin Albrecht
irectly in Sage, by writing singular.eval("foo") to send the command foo. Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: http://martinralbrecht.wordpress.com/ _jab: marti

Re: [sage-support] Re: Intersection of complex Ideals

2011-03-01 Thread Martin Albrecht
I started changing that (only RR so far) in: http://trac.sagemath.org/sage_trac/ticket/7577 but the ticket got stuck because we need to decide whether it's okay to use MPF instead of MPFR for multivariate polynomials. Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:1137

Re: [sage-support] Re: multivariate polynomial division

2011-02-28 Thread Martin Albrecht
On Monday 28 February 2011, dmharvey wrote: > On Feb 27, 5:29 pm, Martin Albrecht > > wrote: > > sage: R. = PolynomialRing(QQ) > > sage: f = x0^2*x1 + x1^2*x2 + x2^2*x3 + x3^2*x0 > > sage: (f0, f1, f2, f3) = [f.derivative(v) for v in [x0, x1, x2, x3]] > >

Re: [sage-support] multivariate polynomial division

2011-02-27 Thread Martin Albrecht
^5 Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: http://martinralbrecht.wordpress.com/ _jab: martinralbre...@jabber.ccc.de -- To post to this group, send email to sage-support@

Re: [sage-support] GF(2) -Grobner Basis - How to force x^2 = x ?

2011-02-04 Thread Martin Albrecht
Hi, I know of no elegant way of doing that. There are a few ANF (polynomials) to CNF (ORs and ANFs) strategies which are used for example in cryptography. Those might be of interrest to you. I have a few pointers in my thesis. Cheers, Martin On Feb 4, 2011 6:12 PM, "Francois Maltey" wrote: -- T

Re: Re: [sage-support] GF(2) -Grobner Basis - How to force x^2 = x ?

2011-02-03 Thread Martin Albrecht
the quotient P/ is precisely the right one to use since x_i^2 - x_i has the roots 0, 1 and no root in the extension. Thus, the only possible solutions to the common system have components in GF(2). More details for example in my thesis (Section 3.6): http://martinralbrecht.files.wordpress.com/2010/10/

Re: [sage-support] GF(2) -Grobner Basis - How to force x^2 = x ?

2011-02-03 Thread Martin Albrecht
hat happens in the latter. In sage you should construct B. = BooleanPolynomialRing() Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: http://martinralbrecht.wordpress.com/ _jab:

Re: [sage-support] polynomial interpolation

2010-12-24 Thread Martin Albrecht
? sage: K = GF(32003) sage: P. = K[] sage: P.lagrange_polynomial([(K.random_element(),K.random_element()) for _ in range(10)]) 25484*x^9 + 16230*x^8 + 21258*x^7 + 5369*x^6 + 5329*x^5 + 26390*x^4 + 18568*x^3 + 24278*x^2 + 26684*x + 4684 Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit

Re: [sage-support] Re: Bug in genus of an ideal

2010-11-23 Thread Martin Albrecht
ng)c); + res->data = (char *)((long)cc); return jjPLUSMINUS_Gen(res,u,v); } """ It seems with the new patch the overflow would at least be detected? Can you give it a try? Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0D

Re: [sage-support] Re: size of varities

2010-10-13 Thread Martin Albrecht
On Wednesday 13 October 2010, Simon King wrote: > Hi Martin! > > On 13 Okt., 15:12, Martin Albrecht > > wrote: > > > sage: I.radical().vector_space_dimension() > > > 6 > > > which would raise a TypeError if the ideal was not zero dimensional. >

Re: [sage-support] Re: size of varities

2010-10-13 Thread Martin Albrecht
> sage: I.radical().vector_space_dimension() > 6 > which would raise a TypeError if the ideal was not zero dimensional. We should probably change that to be a ValueError, since the "value" of the ideal is wrong, not the type? -- name: Martin Albrecht _pgp: http://pg

Re: [sage-support] initial ideal

2010-10-10 Thread Martin Albrecht
ate Polynomial Ring in x, y, z over Rational Field Is that what you want? Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: http://martinralbrecht.wordpress.com/ _jab: marti

Re: [sage-support] grobner bases

2010-10-09 Thread Martin Albrecht
Q,order='neglex') sage: I = Ideal(x^5 + y^4 +z^3, x^3 + y^2 + z^2 -1) sage: I.groebner_basis() [1] See http://sagemath.org/doc/reference/sage/rings/polynomial/multi_polynomial_ideal.html Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF

Re: [sage-support] converting RealLiteral to str without trailing zero's

2010-07-22 Thread Martin Albrecht
le.com/group/sage-support > URL: http://www.sagemath.org > -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: http://www.informatik.uni-bremen.de/~malb _jab: martinralbre...@jabber.c

  1   2   3   >