Hi!

On Aug 25, 2:47 pm, "J. Cooley" <[email protected]> wrote:
> Is there a function that will tell you the characteristic of a field?

Yes, and it is called "characteristic":

sage: RR.characteristic()
0
sage: GF(64,'a').characteristic()
2

It also works for rings:

sage: ZZ.characteristic()
0
sage: GF(64,'a')['t'].characteristic()
2

Generally, if you have a guess how a method of an object (say, ZZ) is
called, you may use tab-completion:

  sage: R = GF(64,'a')['t']
  sage: R.cha<press tab-key>
  R.change_ring     R.change_var      R.characteristic

And you can also do some search:
  sage: search_def('characteristic')
  sage: search_src('characteristic')
  sage: search_doc('characteristic')

which in this case would probably not be helpful since it gives too
many answers.

Cheers,
Simon

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to