schmollf / gap

Main development repository for GAP - Groups, Algorithms, Programming, a System for Computational Discrete Algebra
http://www.gap-system.org
GNU General Public License v2.0
0 stars 0 forks source link

MitM_OM(GF(2)) recursion depth trap #3

Open markuspf opened 8 years ago

markuspf commented 8 years ago
gap> MitM_OM(GF(2));
Error, recursion depth trap (5000)
 in
  <compiled or corrupted statement>  called from 
p[1] = x at /home/makx/ac/gap/lib/dict.gi:201 called from
LookupDictionary( _GLOBAL_MITM_CONSTRUCTOR_TABLE, obj ) at /home/makx/ac/gap/lib/printConstructors.g:32 called from
CallFuncListWrap( arg[Length( arg )], local_arg ) at /home/makx/ac/gap/lib/annotateConstructors.g:17 called from
MitM_OM( arg ) at /home/makx/ac/gap/lib/printConstructors.g:24 called from
CallFuncListWrap( arg[Length( arg )], local_arg ) at /home/makx/ac/gap/lib/annotateConstructors.g:17 called from
...  at *stdin*:1
you may 'return;'
markuspf commented 8 years ago

For some reason GF(2) seems to be special in some way. GF(3) and GF(5) work.

markuspf commented 8 years ago

As does GF(9), but not GF(4).

markuspf commented 8 years ago

So the issue seems to be about the fact that Z(2) is the 1-element of GF(2), so the code stores constructorinfo for Z(2) as being OneImmutable(GF(2)), and GF(2) is constructed as FieldOverItselfByGenerators([Z(2)]) which leads to an infinite recursion.

One easy fix is to treat finite field elements (IsFFE) as atomic and just output them using the existing openmath CD.

olexandr-konovalov commented 8 years ago

:+1:

One easy fix is to treat finite field elements (IsFFE) as atomic and just output them using the existing openmath CD.