[sage-support] Failure to compile Sage 10.3.rc0

2024-02-26 Thread 'Peter Mueller' via sage-support
Installation of Sage 10.3.rc0 from source on an up-to-date Arch Linux 
machine fails. I'm not sure if the following snippet of the log file hints 
to the problem:

[sagelib-10.3.rc0] In file included from 
sage/symbolic/ginac/pseries.cpp:26:
[sagelib-10.3.rc0] sage/symbolic/ginac/useries-flint.h:31:11: error: 
'fmpq_init_set_mpz_frac_readonly' is deprecated.
[sagelib-10.3.rc0]31 | extern "C" void 
fmpq_init_set_mpz_frac_readonly(fmpq_t z, const mpz_t p, const mpz_t q);
[sagelib-10.3.rc0]   |   
^~
[sagelib-10.3.rc0] sage/symbolic/ginac/useries-flint.h:31:55: error: 
expected ')' before 'z'
[sagelib-10.3.rc0]31 | extern "C" void 
fmpq_init_set_mpz_frac_readonly(fmpq_t z, const mpz_t p, const mpz_t q);
[sagelib-10.3.rc0]   | 
   ~  ^~
[sagelib-10.3.rc0]   | 
  )

-- 
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/5b7e8223-0e7d-4886-a115-4e5bac8cc86dn%40googlegroups.com.


[sage-support] Build errors for sage_numerical_backends_[coin, gurobi]

2023-11-08 Thread 'Peter Mueller' via sage-support
On up-to-date Archlinux and Manjaro machines, I get build errors of the 
packages  sage_numerical_backends_coin-9.0b12 
and sage_numerical_backends_gurobi-9.3.1 in SageMath version 10.2.rc0. For 
both packages the error logs look similar.  I don't know if the following 
is the relevant part of the logs:

  Error compiling Cython file:
  
  ...
  if self.is_variable_continuous(variable):
  return v
  else:
  return int(round(v))

  cpdef int ncols(self):
^
  

  sage_numerical_backends_coin/coin_backend.pyx:924:10: Signature not 
compatible with previous declaration

-- Peter Mueller

-- 
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/db3774eb-e352-43cc-a70b-47b80921047en%40googlegroups.com.


Re: [sage-support] Bug in GAP installation provided by SageMath?

2023-04-18 Thread 'Peter Mueller' via sage-support
Thanks, the following line resolves the issue in Sage 10.0.beta6 (but not 
in 9.8, but I don't care):

`libgap.SetUserPreference("AtlasRep", "AtlasRepAccessRemoteFiles", true )`

Dima Pasechnik schrieb am Dienstag, 18. April 2023 um 12:50:49 UTC+2:

[...]
So you can either go and edit the file above, or use a proper GAP way 
to override 
AtlasRepAccessRemoteFiles from 
https://www.math.rwth-aachen.de/~Thomas.Breuer/atlasrep/doc/chap4.html 
(and let's know how to do this, please, if you figure this out)

-- 
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/a7b0abde-9682-4af2-905d-96c6450ae6b9n%40googlegroups.com.


[sage-support] Bug in GAP installation provided by SageMath?

2023-04-18 Thread 'Peter Mueller' via sage-support
While `libgap.SimpleGroup("J2")` yields the expected result, 
`libgap.SimpleGroup("J3")` raises a `GAPError: Error, The AtlasRep package 
could not load a group with parameters [ "J3" ]`. Calling 
`libgap.LoadPackage("AtlasRep")` returns without errors, but the problem 
persists.

The same happens when starting GAP directly from a shell via `sage -gap` 
and calling `SimpleGroup("J3");`. It is not a GAP bug, for a a local 
installation of GAP (same version  4.12.2) just works fine.

I have this problem in Sage versions 9.8 and 10.0.beta6. The same failure 
on the SageMathCell too.

-- Peter Mueller


-- 
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/62a75c03-29d5-41b5-b71b-04332b77ec2en%40googlegroups.com.


Re: [sage-support] How to use Gap interface for permutation groups?

2023-03-31 Thread 'Peter Mueller' via sage-support
Dear Dima, thanks a lot! Indeed, one should have expected it like that ... 
Anyway, maybe I'm not the only one who got stuck there, and the answer is 
useful for others too.

-- Peter Mueller 

Dima Pasechnik schrieb am Donnerstag, 30. März 2023 um 19:38:47 UTC+2:

>
>
> On Thu, 30 Mar 2023, 18:25 'Peter Mueller' via sage-support, <
> sage-s...@googlegroups.com> wrote:
>
>> When working with finite permutation groups, it seems to me that one has 
>> the choice to either use the groups as sage objects like 
>> `SymmetricGroup(4)`, or as a Gap object via `libgap.SymmetricGroup(4)`. The 
>> former has rather limited functionality (and quite a few bugs as reported 
>> earlier), so the advise was to use the latter concept.
>>
>> So after setting `g = libgap.SymmetricGroup(4)`, things like 
>> `g.Stabilizer(1)` work as expected. However, I have difficulties to figure 
>> out how for instance the equivalent of the Gap code `Stabilizer(g, [1,2], 
>> OnSets)` would look like. Something like `g. Stabilizer([1, 2], 'OnSets')` 
>> raises a GapError.
>>
>
> it is
>
> g. Stabilizer([1, 2], libgap.OnSets)
>
> (which makes sense, as in GAP you also don't pass a string to Stabilizer, 
> but you pass a GAP action)
>
>
>
>> Are these things documented somewhere? I couldn't find anything.
>>
>
> all we have is 
> https://doc.sagemath.org/html/en/reference/libs/sage/libs/gap/libgap.html
> (and source code, eg in src/sage/graphs/)
>
>  - pull requests welcome 
>
>  
> Dima
>
>
>
>> -- Peter Mueller
>>
>> -- 
>> 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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sage-support/9702a206-d4d9-4d05-95eb-3a2b729ec4c5n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/sage-support/9702a206-d4d9-4d05-95eb-3a2b729ec4c5n%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/cf6a0e2a-8c78-4335-98c1-f9888f453cf0n%40googlegroups.com.


[sage-support] How to use Gap interface for permutation groups?

2023-03-30 Thread 'Peter Mueller' via sage-support
When working with finite permutation groups, it seems to me that one has 
the choice to either use the groups as sage objects like 
`SymmetricGroup(4)`, or as a Gap object via `libgap.SymmetricGroup(4)`. The 
former has rather limited functionality (and quite a few bugs as reported 
earlier), so the advise was to use the latter concept.

So after setting `g = libgap.SymmetricGroup(4)`, things like 
`g.Stabilizer(1)` work as expected. However, I have difficulties to figure 
out how for instance the equivalent of the Gap code `Stabilizer(g, [1,2], 
OnSets)` would look like. Something like `g. Stabilizer([1, 2], 'OnSets')` 
raises a GapError.

Are these things documented somewhere? I couldn't find anything.

-- Peter Mueller

-- 
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/9702a206-d4d9-4d05-95eb-3a2b729ec4c5n%40googlegroups.com.


[sage-support] Set(L) == L and Set(L) != L are True at the same time?!

2023-02-23 Thread 'Peter Mueller' via sage-support
Secundum non datur ...:

sage: L = {0}
sage: L == Set(L)
True
sage: L != Set(L)
True

How can this happen?! With  the python bulltin `set` instead of `Set` I get 
the expected behavior though. (I'm using Sage version 9.8.)

-- Peter Mueller

-- 
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/9b354d1b-7d08-48d4-9af4-e10532969e4fn%40googlegroups.com.


[sage-support] Backends for SemidefiniteProgram()

2023-02-17 Thread 'Peter Mueller' via sage-support
Even though I installed the optional packages csdp and dsdp in Sage 9.8, 
they do not seem to be available as backends for `SemidefiniteProgram()`. 
At any rate, calling it with `solver='csdp'` or `solver='dsdp'` results in 
the error message *ValueError: 'solver' should be set to 'CVXOPT', 
'Matrix', a class, or None (in which case the default one is used* which 
does not help me further.

By the way, I would consider it useful if an instance of 
SemidefiniteProgram could export the program to some usable file, e.g. in 
SDPA sparse format. (In analogy to the` write_mps()`  method for linear 
programs.)

-- Peter Mueller

-- 
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/af16ae89-9032-4c0c-961b-589ac44e1c77n%40googlegroups.com.


[sage-support] Strange bug connected to GAP as a backend

2022-11-20 Thread 'Peter Mueller' via sage-support
Start with

g = SymmetricGroup(3)
chi = g.trivial_character()
u = g.subgroup([])

Next

reg = u.trivial_character().induct(g)
print(chi.scalar_product(reg))

yields as expected the answer 1.

Now repeat the very same two lines, but before doing so compute the  
representatives of conjugacy classes of subgroups:

lg = g.conjugacy_classes_subgroups()
reg = u.trivial_character().induct(g)
print(chi.scalar_product(reg))

This results in
---
GAPError  Traceback (most recent call last)
[...]
GAPError: Error, no method found! Error, no 1st choice method found for `=' 
on 2 arguments

I omit the full traceback, because it is very well reproducible in versions 
9.7 and 9.8.beta3, and also on the SageCell.

-- Peter Müller

-- 
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/d381c4c3-0a3a-495b-8953-4802639ede50n%40googlegroups.com.


Re: [sage-support] Bug in qepcad?

2022-07-12 Thread 'Peter Mueller' via sage-support
Dear Dima,

thanks for your input. Three additions: (i) I had overlooked that, but in 
fact one can directly call the qepcad shell within sage by 
'qepcad_console()'. (ii) The described error results from the frontend, it 
apparently misinterprets the result returned by the qepcad backend if it 
fails due to low memory. (iii) Indeed, I know msolve and it looks very 
promising. The system I sent is not the one I actually wanted to study, it 
resulted from reducing a bigger system which shows the unexpected behavior.

-- Peter Mueller

dim...@gmail.com schrieb am Dienstag, 12. Juli 2022 um 14:06:50 UTC+2:

> On Mon, Jul 11, 2022 at 8:24 PM 'Peter Mueller' via sage-support
>  wrote:
> >
> > OK, calling "sage -sh" and setting "export qe="~/local/sage/local" 
> allows to start qepcad without relocating files. However, qepcad fails for 
> this rather small example , telling "Failure occurred in: GCSI (final 
> check) Reason for the failure: Too few cells reclaimed." So either (i) 
> qepcad has a bug here, or (ii) qepcad's abilities are rather limited, or 
> (iii) I'm not using it the right way. If (i) or (ii) applies, there is 
> little hope for improvements, since the project seems to have abandoned in 
> 2012.
>
> qepcad is certainly too old to be saved. One ought to implement
> cylindrical algebraic decomposition (CAD)
> in a modern way, e.g. in Sage...
>
> On a practical side of things, I'd have converted your system into a
> system of equations (using squares etc
> to model inequalities) and then looked for real solutions only (e.g.
> using msolve).
>
> HTH
> Dima
> >
> > dim...@gmail.com schrieb am Montag, 11. Juli 2022 um 19:11:08 UTC+2:
> >>
> >>
> >>
> >> On Mon, 11 Jul 2022, 17:04 'Peter Mueller' via sage-support, <
> sage-s...@googlegroups.com> wrote:
> >>>
> >>> Thanks for the suggestion, I wasn't aware of this feature. However, 
> here it results in "Error HELPFRD: Could not open 
> ~/local/sage/local/bin/qepcad/share/qepcad/qepcad.help". Unfortunately, the 
> binary of qepcad is the file ~/local/sage/local/bin/qepcad, so I cannot 
> symlink the existing help page (at 
> ~/local/sage/local/share/qepcad/qepcad.help) to the place where qepcad is 
> looking for it.
> >>
> >>
> >> you can move ~/local/sage/local/bin/qepcad
> >> somewhere (e.g. rename it) and create the necessary link.
> >>
> >>>
> >>>
> >>>
> >>> dim...@gmail.com schrieb am Montag, 11. Juli 2022 um 17:40:11 UTC+2:
> >>>>
> >>>>
> >>>>
> >>>> On Mon, 11 Jul 2022, 16:33 'Peter Mueller' via sage-support, <
> sage-s...@googlegroups.com> wrote:
> >>>>>
> >>>>> When running
> >>>>>
> >>>>> var('p1', 'p2', 'p3', 'q1', 'q2', 'q3')
> >>>>> qf = qepcad_formula
> >>>>> # q1 = p1
> >>>>> l = [p1+q1 == 1, 0 < p1, p1 < 1,
> >>>>> 0 <= p2, p2 <= 1, 0 <= q2, q2 <= 1,
> >>>>> p2 + p1*q1 + q2 == 1,
> >>>>> 0 <= p3, p3 <= 1, 0 <= q3, q3 <= 1,
> >>>>> p3 + p2*q1 + p1*q2 + q3 == 1]
> >>>>> F = qepcad_formula.and_(l)
> >>>>> qepcad(F, solution='any-point')
> >>>>>
> >>>>> I get the wrong answer
> >>>>>
> >>>>> ValueError: input formula is false everywhere
> >>>>>
> >>>>> However, this set of inequalities has solutions. In fact, if there 
> were no solution, this should hold even more if we remove the comment in
> >>>>>
> >>>>> # q1 = p1
> >>>>>
> >>>>> above. However, doing that produces a correct solution
> >>>>>
> >>>>> {'p1': 1/2, 'p2': 0, 'p3': 0, 'q2': 3/4, 'q3': 5/8}.
> >>>>>
> >>>>> Am I doing something wrong? If it is a bug, then I don't know if 
> comes from the interface to qepcad, or qepcad itself.
> >>>>
> >>>>
> >>>> you can try running qepcad standalone, at
> >>>> ./sage -sh
> >>>> prompt, and try reproducing...
> >>>>
> >>>>
> >>>> https://www.usna.edu/CS/qepcadweb/B/QEPCAD.html
> >>>>>
> >>>>>
> >>>>> I've tried the above example in Sage versions 9.6 and 9.7.beta3 on a 
> linux machine.
> >>>>>
> >>>>> -- Peter Mueller
> >>>>>
&

Re: [sage-support] Bug in qepcad?

2022-07-11 Thread 'Peter Mueller' via sage-support
OK, calling "sage -sh" and setting "export qe="~/local/sage/local" allows 
to start qepcad without relocating files. However, qepcad fails for this 
rather small example , telling "Failure occurred in:GCSI (final check) 
Reason for the failure: Too few cells reclaimed." So either (i) qepcad has 
a bug here, or (ii) qepcad's abilities are rather limited, or (iii) I'm not 
using it the right way. If (i) or (ii) applies, there is little hope for 
improvements, since the project seems to have abandoned in 2012.  

dim...@gmail.com schrieb am Montag, 11. Juli 2022 um 19:11:08 UTC+2:

>
>
> On Mon, 11 Jul 2022, 17:04 'Peter Mueller' via sage-support, <
> sage-s...@googlegroups.com> wrote:
>
>> Thanks for the suggestion, I wasn't aware of this feature. However, here 
>> it results in "Error HELPFRD: Could not open 
>> ~/local/sage/local/bin/qepcad/share/qepcad/qepcad.help". Unfortunately, the 
>> binary of qepcad is the file ~/local/sage/local/bin/qepcad, so I cannot 
>> symlink the existing help page 
>> (at ~/local/sage/local/share/qepcad/qepcad.help) to the place where qepcad 
>> is looking for it.
>>
>
> you can move ~/local/sage/local/bin/qepcad 
> somewhere (e.g. rename it) and create the necessary link.
>
>
>>
>>
>> dim...@gmail.com schrieb am Montag, 11. Juli 2022 um 17:40:11 UTC+2:
>>
>>>
>>>
>>> On Mon, 11 Jul 2022, 16:33 'Peter Mueller' via sage-support, <
>>> sage-s...@googlegroups.com> wrote:
>>>
>>>> When running
>>>>
>>>> var('p1', 'p2', 'p3', 'q1', 'q2', 'q3')
>>>> qf = qepcad_formula
>>>> # q1 = p1
>>>> l = [p1+q1 == 1, 0 < p1, p1 < 1,
>>>>  0 <= p2, p2 <= 1, 0 <= q2, q2 <= 1,
>>>>  p2 + p1*q1 + q2 == 1,
>>>>  0 <= p3, p3 <= 1, 0 <= q3, q3 <= 1,
>>>>  p3 + p2*q1 + p1*q2 + q3 == 1]
>>>> F = qepcad_formula.and_(l)
>>>> qepcad(F, solution='any-point')
>>>>
>>>> I get the wrong answer
>>>>
>>>> ValueError: input formula is false everywhere
>>>>
>>>> However, this set of inequalities has solutions. In fact, if there were 
>>>> no solution, this should hold even more if we remove the comment in
>>>>
>>>> # q1 = p1
>>>>
>>>> above. However, doing that produces a correct solution
>>>>
>>>> {'p1': 1/2, 'p2': 0, 'p3': 0, 'q2': 3/4, 'q3': 5/8}.
>>>>
>>>> Am I doing something wrong? If it is a bug, then I don't know if comes 
>>>> from the interface to qepcad, or qepcad itself.
>>>>
>>>
>>> you can try running qepcad standalone, at 
>>>./sage -sh
>>> prompt, and try reproducing...
>>>
>>>
>>> https://www.usna.edu/CS/qepcadweb/B/QEPCAD.html
>>>
>>>>
>>>> I've tried the above example in Sage versions 9.6 and 9.7.beta3 on a 
>>>> linux machine.
>>>>
>>>> -- Peter Mueller
>>>>
>>>> -- 
>>>> 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...@googlegroups.com.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/sage-support/826d7ed3-969c-4604-b703-bb0215a2ede5n%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/sage-support/826d7ed3-969c-4604-b703-bb0215a2ede5n%40googlegroups.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>> -- 
>> 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...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sage-support/d5445e73-b84d-4fd0-86af-59e40aff9876n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/sage-support/d5445e73-b84d-4fd0-86af-59e40aff9876n%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/3ec4c1a7-a7fd-4b1e-8726-9ba305b17c54n%40googlegroups.com.


Re: [sage-support] Bug in qepcad?

2022-07-11 Thread 'Peter Mueller' via sage-support
Thanks for the suggestion, I wasn't aware of this feature. However, here it 
results in "Error HELPFRD: Could not open 
~/local/sage/local/bin/qepcad/share/qepcad/qepcad.help". Unfortunately, the 
binary of qepcad is the file ~/local/sage/local/bin/qepcad, so I cannot 
symlink the existing help page 
(at ~/local/sage/local/share/qepcad/qepcad.help) to the place where qepcad 
is looking for it.

dim...@gmail.com schrieb am Montag, 11. Juli 2022 um 17:40:11 UTC+2:

>
>
> On Mon, 11 Jul 2022, 16:33 'Peter Mueller' via sage-support, <
> sage-s...@googlegroups.com> wrote:
>
>> When running
>>
>> var('p1', 'p2', 'p3', 'q1', 'q2', 'q3')
>> qf = qepcad_formula
>> # q1 = p1
>> l = [p1+q1 == 1, 0 < p1, p1 < 1,
>>  0 <= p2, p2 <= 1, 0 <= q2, q2 <= 1,
>>  p2 + p1*q1 + q2 == 1,
>>  0 <= p3, p3 <= 1, 0 <= q3, q3 <= 1,
>>  p3 + p2*q1 + p1*q2 + q3 == 1]
>> F = qepcad_formula.and_(l)
>> qepcad(F, solution='any-point')
>>
>> I get the wrong answer
>>
>> ValueError: input formula is false everywhere
>>
>> However, this set of inequalities has solutions. In fact, if there were 
>> no solution, this should hold even more if we remove the comment in
>>
>> # q1 = p1
>>
>> above. However, doing that produces a correct solution
>>
>> {'p1': 1/2, 'p2': 0, 'p3': 0, 'q2': 3/4, 'q3': 5/8}.
>>
>> Am I doing something wrong? If it is a bug, then I don't know if comes 
>> from the interface to qepcad, or qepcad itself.
>>
>
> you can try running qepcad standalone, at 
>./sage -sh
> prompt, and try reproducing...
>
>
> https://www.usna.edu/CS/qepcadweb/B/QEPCAD.html
>
>>
>> I've tried the above example in Sage versions 9.6 and 9.7.beta3 on a 
>> linux machine.
>>
>> -- Peter Mueller
>>
>> -- 
>> 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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sage-support/826d7ed3-969c-4604-b703-bb0215a2ede5n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/sage-support/826d7ed3-969c-4604-b703-bb0215a2ede5n%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/d5445e73-b84d-4fd0-86af-59e40aff9876n%40googlegroups.com.


[sage-support] Bug in qepcad?

2022-07-11 Thread 'Peter Mueller' via sage-support
When running

var('p1', 'p2', 'p3', 'q1', 'q2', 'q3')
qf = qepcad_formula
# q1 = p1
l = [p1+q1 == 1, 0 < p1, p1 < 1,
 0 <= p2, p2 <= 1, 0 <= q2, q2 <= 1,
 p2 + p1*q1 + q2 == 1,
 0 <= p3, p3 <= 1, 0 <= q3, q3 <= 1,
 p3 + p2*q1 + p1*q2 + q3 == 1]
F = qepcad_formula.and_(l)
qepcad(F, solution='any-point')

I get the wrong answer

ValueError: input formula is false everywhere

However, this set of inequalities has solutions. In fact, if there were no 
solution, this should hold even more if we remove the comment in

# q1 = p1

above. However, doing that produces a correct solution

{'p1': 1/2, 'p2': 0, 'p3': 0, 'q2': 3/4, 'q3': 5/8}.

Am I doing something wrong? If it is a bug, then I don't know if comes from 
the interface to qepcad, or qepcad itself.

I've tried the above example in Sage versions 9.6 and 9.7.beta3 on a linux 
machine.

-- Peter Mueller

-- 
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/826d7ed3-969c-4604-b703-bb0215a2ede5n%40googlegroups.com.


[sage-support] Re: Multivariate polynomial ring with total degree no larger than n

2022-03-12 Thread 'Peter Mueller' via sage-support
I would do something like this (example for n=5):
```
n = 5
R = PolynomialRing(QQ, 'x', n)
x0 = R.gen(0) # A shorter alternative is R.0
f = sum((i+1)*x0^i for i in range(n+1)) # sample polynomial
p = 1
for xi in R.gens():
p *= f.substitute({x0:xi})
p = sum(coeff*mono for coeff, mono in list(p) if mono.degree() <= n)
``` 

timaeus schrieb am Samstag, 12. März 2022 um 12:14:26 UTC+1:

> Hello everyone,
>
> I need to compute the product: f(x_1)f(x_2)...f(x_n), where f is a 
> polynomial of degree n, and I do not need the part with total degree larger 
> than n. To reduce the computation complexity, I think it would be helpful 
> to construct an n-variable multivariate polynomial ring, with terms total 
> degree no larger than n. I found the following two possible ways to do 
> this, however, I could not make either of them work for my settings. 
>
>1. 
>
>Create a multivariate polynomial ring then quotient out every monomial 
>with total degree larger than n. However I do not know how to express this 
>ideal.
>2. 
>
>I found a link on this site concerning 
>"set-of-polynomial-under-a-certain-degree" (I cannot post it since I am a 
>new user) which suggests a function max_degree for polynomial rings. 
>However, it seems there is no such a max_total_degree function for the 
>multivariate case. 
>
> I am new to python, sage, and this community, so thank you in advance for 
> your helpful suggestions and comments!
>

-- 
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/e82c6d3f-1e4e-4142-92e2-384675b60f2bn%40googlegroups.com.


[sage-support] memory leak in trivial calculation?

2021-05-27 Thread 'Peter Mueller' via sage-support
The following trivial code eats up all the memory and crashes with 
an Unhandled SIGSEGV on my Linux machine and sage version 9.3. But it does 
not work either on the sage cell!

var('z y')
f = -(15*z/(17*y + 11) + 1)*(5*z/(4*y + 1) - 1)*(15*z/(3*y - 4) + 1)
f(y=I)

-- Peter Mueller

-- 
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/28e1a206-d7ee-4d98-abac-2a4f4be498d1n%40googlegroups.com.


[sage-support] Subgroups of subgroups aren't subgroups?

2020-08-16 Thread 'Peter Mueller' via sage-support
I had a hard to track down error which eventually relied on sage 
permutation groups behave odd in regard to subgroups. A subgroup y of a 
subgroup x of g isn't always considered as a subgroup of g. Compare

sage: g = SymmetricGroup(2)
: x = g.subgroup([])
: y = x.subgroup([])
: x == y
: 
False

with

sage: G = gap(g)
: X = G.Subgroup([])
: Y = X.Subgroup([])
: X == Y
: 
True

A probably related strange phenomenon arises with subgroups of g only:

 sage: g = SymmetricGroup(3)
: x = g.subgroup(['(1, 2)', '(2, 3)'])
: y = g.subgroup(['(1, 3)', '(2, 3)'])
: x == y; len({x, y})
: 
True
2

On the Gap level, same subgroups given by different generators apparently 
get hashed correctly:

sage: gap.eval('G := SymmetricGroup(3);;')
: gap.eval('U := Subgroup(G, [(1, 2), (2, 3)]);;')
: gap.eval('V := Subgroup(G, [(1, 3), (2, 3)]);;')
: gap.eval('Length(Set([U, V]))')
: 
'1'

-- Peter Mueller

-- 
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/a18bc5e8-a1d0-4c8c-8f77-e47e7abc6e49o%40googlegroups.com.


[sage-support] Weird bug in libgap?

2020-08-14 Thread 'Peter Mueller' via sage-support
The following code yields a Traceback for no (to me) obvious reason. The 
same happens on sagecell too. It seems to be a minimal case. For instance 
removing the line "P = ..." or having less deeply nested loops does not 
display this problem:

for A in PrimitiveGroups(3):
for G in A.normal_subgroups():
for U in G.conjugacy_classes_subgroups():
P = U.trivial_character()
for x in G.conjugacy_classes_subgroups():
for y in x.conjugacy_classes_subgroups():
pass

GAPError  Traceback (most recent call last)
 in ()
> 1 load('./bug2.sage')

/home/mueller/local/sage-9.1/local/lib/python3.7/site-packages/sage/misc/persist.pyx
 
in sage.misc.persist.load (build/cythonized/sage/misc/persist.c:2538)()
142 
143 if sage.repl.load.is_loadable_filename(filename):
--> 144 sage.repl.load.load(filename, globals())
145 return
146 
[.. SNIP .]
> 2514 sig_on()
   2515 if n == 0:
   2516 result = CALL_0ARGS(self.value)

GAPError: Error, usage: FreeGroup(,..) or FreeGroup()

-- 
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/cad3b419-62f4-4c68-9a52-974cb6a01deao%40googlegroups.com.


[sage-support] Bug in scalar products of characters coming from restrictions

2020-08-14 Thread 'Peter Mueller' via sage-support
In the code below  g1 and g2 are the same group, where g2 is produced as a 
subgroup of g1, and c is the principal character of g1. Still, when it 
comes to scalar products, somehow g1 is not considered as a subgroup of 
itself:
sage: g1 = SymmetricGroup(2)
: g2 = g1.conjugacy_classes_subgroups()[-1]
: c = g1.trivial_character()
: 
: def test(h):
: try:
: x = c.restrict(h)
: y = h.trivial_character()
: print('x == y?:', x == y)
: return x.scalar_product(y)
: except:
: return 'GAPError'
: g1 == g2
: [test(g2), test(g1)]
: 
True
x == y?: True
x == y?: True
[1, 'GAPError']

-- 
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/8beea2d1-3a62-4c7e-83d1-286244e1dca1o%40googlegroups.com.


[sage-support] Directly saving html file of Three.js graphic

2020-07-30 Thread 'Peter Mueller' via sage-support
If G is a 3d graphics object, then displaying it via 
G.show(viewer='threejs') the web browser allows to save the corresponding 
html code. However, for computing a large number of graphics on a server, 
it would be more convenient to save the html code directly. I would have 
expected something like 
G.save('name.html', viewer='threejs')
should work. However, it does not and I don't see if the intended task is 
implemented somehow.

-- Peter Mueller

-- 
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/8198df41-83ae-4d27-8653-85e00cc505d2o%40googlegroups.com.


Re: [sage-support] Optional package cunningham_tables unavailable (version 9.0)

2020-03-12 Thread 'Peter Mueller' via sage-support
Locally compiled versions of Sage on two up-to-date Manjaro Linux machines, 
and the binary distribution on a Debian 9 machine. In all three cases Sage 
version 9.0.

Am Donnerstag, 12. März 2020 16:53:48 UTC+1 schrieb vdelecroix:
>
> What is your setup? 
>
> Le 12/03/2020 à 14:15, 'Peter Mueller' via sage-support a écrit : 
> > Calling the example 
> > from sage.rings.factorint import factor_cunningham 
> > factor_cunningham(2^257-1) 
> > from the docs yields the message that the Cunningham tables should be 
> > installed  via ``sage -i cunningham_tables``. Trying this, however, 
> yields 
> > a `not found' message, and suggests to try the option `-p' instead of 
> '-i'. 
> > This, in turn results in an error message. 
> > 
> > -- Peter Mueller 
> > 
>

-- 
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/0beae95a-0678-4bc7-8430-0af03a0a34d1%40googlegroups.com.


[sage-support] Optional package cunningham_tables unavailable (version 9.0)

2020-03-12 Thread 'Peter Mueller' via sage-support
Calling the example
from sage.rings.factorint import factor_cunningham
factor_cunningham(2^257-1)
from the docs yields the message that the Cunningham tables should be 
installed  via ``sage -i cunningham_tables``. Trying this, however, yields 
a `not found' message, and suggests to try the option `-p' instead of '-i'. 
This, in turn results in an error message.

-- Peter Mueller

-- 
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/fc14bdf6-277f-4ad2-a5df-034bbad4e43d%40googlegroups.com.


[sage-support] Bug in rational_parameterization?

2019-07-05 Thread 'Peter Mueller' via sage-support
A slight modification of the example which documents the use of the method 
`rational_parameterization' yields a rather long Traceback:

A. = AffineSpace(QQ, 2)
C = Curve([10*x^2 + 2*y^2 - 3], A)
C.rational_parameterization()

---
ValueErrorTraceback (most recent call last)
 in ()
  1 A = AffineSpace(QQ, Integer(2), names=('x', 'y',)); (x, y,) = 
A._first_ngens(2)
  2 C = Curve([Integer(10)*x**Integer(2) + Integer(2)*y**Integer(2) - 
Integer(3)], A)
> 3 C.rational_parameterization()

SNIPPED MANY LINES

/home/sc_serv/sage/local/lib/python2.7/site-packages/sage/schemes/generic/morphism.pyc
 
in __init__(self, parent, polys, check)
927 target = parent._codomain.ambient_space()
928 if len(polys) != target.ngens():
--> 929 raise ValueError("there must be %s 
polynomials"%target.ngens())
930 try:
931 polys = [source_ring(poly) for poly in polys]

ValueError: there must be 3 polynomials


-- Peter Müller (Würzburg)

P.S.: This happens for SageMath version 8,7 on Manjaro-Linux and at 
https://sagecell.sagemath.org/ too.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/f2cff095-e765-4f6b-a1a1-e12a002fe6ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: True/False function about the solvability of linear programming

2019-04-28 Thread 'Peter Mueller' via sage-support
You can use an exception, something as follows:

def is_lp_solvable(P):
try:
P.solve()
return True
except:
return False

Am Sonntag, 28. April 2019 14:31:31 UTC+2 schrieb husi...@gmail.com:
>
> Hello everyone! I would like to ask a question about the solvability of a 
> linear programming problem.
> I use sagemath to check whether my LP problem has any feasible solution or 
> not.
> The program is similar to the following one without details
> sage: p = MixedIntegerLinearProgram(maximization=False, solver = "PPL")
> sage: w = p.new_variable(integer=True, nonnegative=True)
> sage: p.set_objective(w[0])
>
> Then I use p.solve() to solve this problem, and when there is no feasible 
> solution, the program will
> print out quite a few sentences with the last one like this:
> MIPSolverException: PPL : There is no feasible solution
>
> My question is whether I can define a True/False function such that when 
> the LP porble p has any feasible solution,
> then it returens True; otherwise it returns False?
>
> Thank you very much for your kind 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.


[sage-support] Do several sage processes in background interact and disturb each other?

2018-06-16 Thread 'Peter Mueller' via sage-support
Computing on a machine with 54 cpus, I parallelized a sage computation, 
running 40 sage scripts in the background at the same time. The strange 
thing (with narrowed down test examples) is: While each script for itself 
would need about 1s to finish, running these scripts in parallel do not 
finish even after 30m accumulated cpu time! Do several running instances of 
sage conflict with each other? I checked that each process gets about 20% 
cpu time (it should be 100%, because there are no other processes consuming 
considerable cpu), but even given that the total time should be a few 
seconds, and not more than an hour! 

-- Peter Mueller

-- 
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 polynomial ring over quotient ring of multivariate polynomial ring?

2017-11-30 Thread 'Peter Mueller' via sage-support
Is it a bug, or is there a reasonable explanation of the following?

kk. = GF(2)[]
k. = kk.quo(a^2+a+1)
K. = k[]
for n in [10..32]:
print n, (T*y)^n

0 y*T^10
11 (y + 1)*T^11
12 T^12
13 y*T^13
14 (y + 1)*T^14
15 T^15
16 y*T^16
17 (y + 1)*T^17
18 T^18
19 y*T^19
20 (y + 1)*T^20
21---
NotImplementedError   Traceback (most recent call last)
[...]
--> 986 return self.base_ring().characteristic()
987 
988 def cyclotomic_polynomial(self, n):
[...]
/home/mueller/local/sage-8.0/local/lib/python2.7/site-packages/sage/rings/quotient_ring.pyc
 
in characteristic(self)
757 NotImplementedError
758 """
--> 759 raise NotImplementedError
760 
761 def defining_ideal(self):

NotImplementedError: 
sage: 

-- Peter Mueller

-- 
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] Powers of polynomials in positive characteristic extremely slow

2017-11-28 Thread 'Peter Mueller' via sage-support
In Sage 8.0 I find the following unexpected behavior:

sage: k. = GF(2)[]
sage: K. = k[]
sage: f = x^1000 + a*x^500 + b
sage: time f^16
CPU times: user 7.61 s, sys: 8 ms, total: 7.62 s
Wall time: 7.62 s
x^16000 + a^16*x^8000 + b^16

Is it really the case that the exponentiation does not make use of the 
positive characteristic? Of course I could write a quick function which 
does what I need in *reasonable* time. But somehow I hope that Sage 
provides the most basic arithmetic operations, and I simply missed it. What 
puzzles me even more is this: f^16 takes 7.61 s, but f^1024 takes only 2.04 
s. While the latter time is still ridiculous, it seems that for larger 
exponents some better (yet very poor) algorithm is used.

-- Peter Mueller

-- 
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] phc interface not working in Sage version 8.0

2017-07-26 Thread 'Peter Mueller' via sage-support
Thanks, that solved the problem. (I wasn't aware that the actual phc binary 
isn't included in sage while the interface to it is.)

Am Mittwoch, 26. Juli 2017 19:19:10 UTC+2 schrieb vdelecroix:
>
> Do you have phc installed on your computer? The error message says that 
> there is no 'phc' command available... 
>
>

-- 
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] phc interface not working in Sage version 8.0

2017-07-26 Thread 'Peter Mueller' via sage-support
Trying the example from the doc of phc results in:

sage: from sage.interfaces.phc import phc
sage: R. = PolynomialRing(CDF,2)
sage: testsys = [x^2 + 1, x*y - 1]
sage: phc.mixed_volume(testsys)
---
ExceptionPexpect  Traceback (most recent call last)
 in ()
> 1 phc.mixed_volume(testsys)

/home/mueller/local/sage-8.0/local/lib/python2.7/site-packages/sage/interfaces/phc.pyc
 
in mixed_volume(self, polys, verbose)
758 4
759 """
--> 760 output_filename = self._output_from_command_list(['phc 
-m','4','n','n','n'], polys, verbose = verbose) 
 
761 
762 out = open(output_filename).read()

/home/mueller/local/sage-8.0/local/lib/python2.7/site-packages/sage/interfaces/phc.pyc
 
in _output_from_command_list(self, command_list, polys, verbose) 
452 
453 # Create a phc process
--> 454 child_phc = pexpect.spawn(command_list[0])
455 # feed it the commands
456 child_phc.sendline('y')

/home/mueller/local/sage-8.0/local/lib/python2.7/site-packages/pexpect/pty_spawn.pyc
 
in __init__(self, command, args, timeout, maxread, searchwindowsize, 
logfile, cwd, env, ignore_sighup, echo, preexec_fn, encoding, codec_errors, 
dimensions) 
  
196 self.name = ''
197 else:
--> 198 self._spawn(command, args, preexec_fn, dimensions)
199 
200 def __str__(self):

/home/mueller/local/sage-8.0/local/lib/python2.7/site-packages/pexpect/pty_spawn.pyc
 
in _spawn(self, command, args, preexec_fn, dimensions) 
269 if command_with_path is None:
270 raise ExceptionPexpect('The command was not found or 
was not ' +
--> 271 'executable: %s.' % self.command)
272 self.command = command_with_path   
 
273 self.args[0] = self.command

ExceptionPexpect: The command was not found or was not executable: phc.
sage: 

-- 
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] Bounds in coding theory are still a mess

2017-05-08 Thread 'Peter Mueller' via sage-support
The functions and their docs in codes.bounds.* still seem to be a mess (as 
they have been since many years now). Here a few findings from a recent 
attempt to use them in class:

(1) If the code parameters are n = length, d = minimum distance, and q = 
size of the alphabet, there seems to be no system about the order of the 
arguments n, q, and d in these functions. For instance plotkin_upper_bound 
and others expect the arguments in the order n, q, d, 
while codesize_upper_bound and others expect the arguments in the order n, 
d, q.

(2) To make the inconsistencies in (1) even worse, the docs of many of 
these functions *do not* tell the order of the arguments; instead one has 
to look into the source code, or figure it out with small examples.

(3) Even if  there is a doc which tells about the arguments, then it may 
contain some other nonsense.  For instance hamming_upper_bound says that q 
is the size of a field, while this bound actually holds for any finite 
alphabet of size q.

(4) Again, there seem to be wrong bounds. For instance, 
 codesize_upper_bound(19,10,2) yields 8, while there are easy examples of 
size 16, and it is known that there are even codes of size 20. Looking into 
the source code reveals that codesize_upper_bound erroneously uses the 
Griesmer bound, which works for linear codes only.

I'm not sure how to fix the mess in (1) without breaking compatibility. 
Maybe a solution could be to enhance these functions with keyword arguments.

-- Peter Mueller

-- 
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 g.character_table()

2016-04-27 Thread 'Peter Mueller' via sage-support
sage: AlternatingGroup(12).character_table()
  File "", line 2
-zeta35**Integer(27)-zeta35**Integer(29)-zeta35**Integer(33)
^
IndentationError: unexpected indent

Looking into the function character_table, there seems to be a problem in 
converting the Gap cyclotomic integer to Sage cyclotomic integer.

-- Peter Mueller

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