CoCoA-5: Issueshttps://cocoa.dima.unige.it/redmine/https://cocoa.dima.unige.it/redmine/redmine/favicon.ico?15088260392024-02-08T21:02:19ZCoCoA Project
Redmine Bug #1781 (Feedback): GenReprCompute: SERIOUS ERRORhttps://cocoa.dima.unige.it/redmine/issues/17812024-02-08T21:02:19ZJohn Abbott
<p>I have just sync'ed with CVS, and <code>CoCoA5/tests/tut-CoCoLA3</code> gives <b>SERIOUS ERROR</b></p>
<p>Oops! Too late to invesigate now :-(</p> Support #1751 (In Progress): Manual of functions vs ManExampleshttps://cocoa.dima.unige.it/redmine/issues/17512023-07-03T16:13:29ZAnna Maria Bigatti
<p>In the manual we have things like these:<br /><pre>
/**/ define fn(X)
/**/ assert(X > 0);
/**/ return FloorSqrt(X);
/**/ enddefine;
</pre><br />so that ManExamples can extract the input code.<br />Should we have something like<br /><pre>
---- function definition ----
define fn(X)
assert(X > 0);
return FloorSqrt(X);
enddefine;
-----------------------------
</pre><br />(and the same for package) so that the manual looks more natural? (and with coloured syntax!)</p> Design #1709 (In Progress): Test tut-CoCoLA2https://cocoa.dima.unige.it/redmine/issues/17092022-11-11T21:21:55ZJohn Abbott
<p><code>tut-CoCoLa2.cocoa5</code><br />prints out the result of <code>LinKer</code> which may vary from call to call.</p>
<p>Change the test so that it does not print out values which may vary from run to run!</p>
<p>[2022-11-11: Recd by email from Ulrich]</p> Bug #1593 (New): CanonicalHomhttps://cocoa.dima.unige.it/redmine/issues/15932021-05-07T06:20:13ZJulian Danner
<p>Hi,</p>
<p>I was just playing around with the function <code>PolyAlgebraHom</code> and noticed that there is a weird behavior when working with an affine algebra over an extension field. In particular I constructed the following algebra:<br /><pre><code> use QQi_::=QQ[i];
Qi := QQi_/ideal(i^2+1);
use P::=Qi[x];
I:=ideal(x^2+x+1);
A:=P/I;
Kt := NewPolyRing(Qi, "t");
</code></pre></p>
<p>Now I want the hom phi: K[t] -> A given by phi(t)=x+I. The straightforward implementation <br /><pre><code> phi:=PolyAlgebraHom(Kt, A, "x");
</code></pre>however gives an error (<code>Unable to construct canonical homomorphism.</code>).<br />(Might it be fixed by just replacing some call to <code>CanonicalHom</code> with <code>ChainCanonicalHom</code>?<br />In general I do not quite see as to why there even is the function <code>CanonicalHom</code>, since <code>ChainCanonicalHom</code> can do the same, but kind of better.)</p>
<p>Anyway, as a workaround, one can construct phi as follows:<br /><pre><code> eps := QuotientingHom(A);
phi_:= PolyAlgebraHom(Kt, P, "x");
phi := eps(phi_);
</code></pre><br />But it would be a lot better if the 'obvious' implementation would just work as expected. (In particular it does for the 'standard' fields <code>QQ</code> and <code>ZZ/(p)</code>.)</p> Support #1586 (In Progress): Profiling with clanghttps://cocoa.dima.unige.it/redmine/issues/15862021-04-02T07:28:49ZAnna Maria Bigatti
<p>pg does not work.</p>
<pre>
clang: error: the clang compiler does not support -pg option on versions of OS X 10.9 and later
</pre>
<p>How can I do?</p> Bug #1502 (In Progress): SystemCommand in Microsoft versionhttps://cocoa.dima.unige.it/redmine/issues/15022020-10-08T10:29:01ZJohn Abbott
<p>Andraschko reports that <code>SystemCommand</code> does not work properly in the Microsoft release.</p> Feature #1304 (New): Hermite normal formhttps://cocoa.dima.unige.it/redmine/issues/13042019-08-29T12:43:59ZFlorian Walsh
<p>I created a prototype implementation for computing the Hermite normal form and for solving linear systems over the integers.<br />So far it only works for the ring of integers. It doesn't work for polynomial rings yet.</p> Slug #1228 (In Progress): SLUG: filling an arrayhttps://cocoa.dima.unige.it/redmine/issues/12282018-09-30T08:08:29ZJohn Abbott
<p>It seems that assigning to an array element is surprisingly slow.</p>
<p>Look at the timings in the following session:<br /><pre>
>>> t0 := CpuTime();
>>> c := 0; for J := 1 to N/2 do if gcd(J,N) = 1 then incr(ref c); endif endfor;
>>> TimeFrom(t0);
8.734
>>> t0 := CpuTime();
>>> d := 0; for J := 1 to N/2 do if gcd(J,N) = 1 then d := d+mod(J^2,N); endif endfor;
>>> TimeFrom(t0);
7.442
>>> sieve := NewList(N);
>>> t0 := CpuTime();
>>> for J := 1 to N/(17*38) do if gcd(J,N) = 1 then sieve[mod(J^2,N)]:=1; endif endfor;
>>> TimeFrom(t0);
42.705
</pre></p>
<p>There are 3 loops. Why is the first loop SLOWER than the second one??<br />Why is the third loop FAR SLOWER than either the first or second ones?<br />(note that the third loop does only about 0.3% of the iterations of the other loops)</p> Support #1175 (New): intersectionhttps://cocoa.dima.unige.it/redmine/issues/11752018-04-05T07:29:18ZElisa Palezzatopalezzato@dima.unige.it
<p>The intersection of MODULEs need to be exported.</p> Feature #770 (New): CoCoA type "cone"https://cocoa.dima.unige.it/redmine/issues/7702015-09-03T15:00:03ZAnna Maria Bigatti
<p>Make the type cone for CoCoA (when class cone is defined for CoCoALib)</p> Feature #633 (New): New operations? ScalarProduct(MODULELEM,LIST), MATRIX * MODULELEMhttps://cocoa.dima.unige.it/redmine/issues/6332014-10-14T11:05:36ZAnna Maria Bigatti
<p>I think that ScalarProduct(MODULELEM,LIST) is OK<br />but MATRIX * MODULELEM may be ambiguous (row or col?)<br />For sure we should add examples to the manual</p> Feature #453 (In Progress): Automatic conversion from INT (or RAT) to RINGELEMhttps://cocoa.dima.unige.it/redmine/issues/4532014-03-03T16:00:48ZJohn Abbott
<p>C5 does not allow computing <code>GenRepr(1, I)</code> because it wants a <code>RINGELEM</code> where I supplied the value <code>1</code> which has type <code>INT</code>.</p>
<p>I note that <code>1 IsIn I</code> is accepted -- this is inconsistent!</p>
<p>I'm sure these comments apply to several other fns too.</p> Bug #422 (New): Bug or feature for protected name? (Use command)https://cocoa.dima.unige.it/redmine/issues/4222014-01-06T23:35:07ZJohn Abbott
<p>From email of 2010-11-19</p>
<p>Is this the behaviour we want?<br /><pre>
Use A ::= QQ[P,Q,R];
Use R ::= QQ[x,y]; --> Gives error because R is protected.
</pre></p>
<p>JAA thinks this is a bug, but it is probably not very serious (how often would one use the same name for an indet in once ring, and then for the next ring?)</p>
<p>It is easy to work around: just execute <code>Use QQ;</code> in between!</p> Feature #421 (New): Allow user to give a name to a ring (in C5)https://cocoa.dima.unige.it/redmine/issues/4212014-01-06T23:26:30ZJohn Abbott
<p>In C4 the command <code>R ::= QQ[x,y];</code> automatically gave the name <code>R</code> to the created ring.<br />There was a <em>trick</em> to cater for several successive rings each called <code>R</code>, namely the name changed to <code>R#1</code>, <code>R#2</code> and so on.</p>
<p>Users should be allowed to specify (convenient) names for rings they create.<br />It does seem difficult to emulate the behaviour of C4, and I'm not sure we should even try to do so.<br />Perhaps there should be a new syntax? for instance <code>R :::= QQ[x,y];</code><br />Or maybe simply <code>R ::= QQ[x,y],printname="blah";</code></p> Slug #230 (New): More curiously slow code -- squaring a polynomialhttps://cocoa.dima.unige.it/redmine/issues/2302012-09-21T12:22:14ZJohn Abbott
<p>The function <code>SquaredPoly</code> should be of quadratic complexity, so doubling the degree should increase computation by about a factor of 4. Instead the time increases by a rather larger factor. Here is some sample code:<br /><pre>
Define SquaredPoly(V)
L := Len(V);
If Len(V) = 0 Then Return V; EndIf;
N := 0;
For I := L To 1 Step -1 Do If V[I] <> 0 Then N := I; Break; EndIf; EndFor;
If N = 0 Then Return [0]; EndIf;
N := N-1;
Q := NewList(2*N+1, 0);
For I := 0 To N-1
Do For J := I+1 To N
Do Q[I+J+1] := Q[I+J+1] + V[I+1]*V[J+1];
EndFor;
EndFor;
For I := 1 To 2*N+1 Do Q[I] := 2*Q[I]; EndFor;
For I := 0 To N Do Q[2*I+1] := Q[2*I+1] + V[I+1]^2; EndFor;
Return Q;
EndDefine;
Define L2F(L)
TopLevel x;
Return Sum([L[I]*x^(I-1) | I In 1..Len(L)]);
EndDefine; -- L2F
Define RndPoly(D)
TopLevel CurrentRing;
Return [Rand(-99,99)*one(CurrentRing) | I In 0..D];
EndDefine; -- RndPoly
Use ZZ/(29641)[x];
PolyDeg := 500;
NumberOfTests := 3;
PolyList := [RndPoly(PolyDeg*2^I) | I In 0..NumberOfTests-1];
For I := 1 To NumberOfTests Do
t0 := CpuTime();
S := SquaredPoly(PolyList[I]);
delta_t := DecimalStr(CpuTime()-t0);
PrintLn "SquaredPoly, polinomio ", I, ": ", delta_t;
F := L2F(PolyList[I]);
t0 := CpuTime();
S := F^2;
delta_t := DecimalStr(CpuTime()-t0);
PrintLn "Quadrato CoCoA, polinomio ", I, ": ", delta_t;
EndFor;
</pre></p>