Hi,

It seems you are passing 0 and 1 literally to create
the default field, in which case you will get the field
of rationals, in which of course 1 + 1 = 2 <> 0.

You can't refer to the zero and one of GF(2) literally by
0 and 1.  The zero is denoted by 0*Z(2), the one by Z(2)^0 (or
also just by Z(2)).  So the default field you want will
be obtained by

DefaultField( 0*Z(2), Z(2) )

FOr convenience you could just do

o := 0*Z(2); e := Z(2);

and then do your operations.

Sandeep.



Jianrong Li wrote:
Dear Sandeep,

Thank you very much. But how to make the default field to be GF(2)? I
use the command GF(2), and try 1+1, but it returns 2.

With best wishes,
Jianrong.



2012/12/31 Sandeep Murthy <sandeepr.mur...@gmail.com
<mailto:sandeepr.mur...@gmail.com>>

    Hi,

    Creating finite fields is described in section 59.3 of
    the GAP reference manual.

    GaloisField(2) (also GF(2)) will get you the field of
    two elements 0,1.

    Sandeep.


    Jianrong Li wrote:

        Dear Forum,

        I want to work over the field F_2 with only two elements 0, 1.
        1+1=0.

        I have matrices with entries 0, 1. The multiplication of the
        matrices are
        over F_2.

        I would like to define the default field as F_2. How could I do
        that in GAP?

        I tried DefaultField(Z(2)). But it seems that this doesn't work.

        Thank you very much.

        Best wishes,
        Jianrong.
        _________________________________________________
        Forum mailing list
        Forum@mail.gap-system.org <mailto:Forum@mail.gap-system.org>
        http://mail.gap-system.org/__mailman/listinfo/forum
        <http://mail.gap-system.org/mailman/listinfo/forum>



_______________________________________________
Forum mailing list
Forum@mail.gap-system.org
http://mail.gap-system.org/mailman/listinfo/forum

Reply via email to