Search code examples
symbolic-mathalgebrasage

Let K be a field, in SageMath


How can I construct something that's analogous to the beginning of a proposition with "Let K be a field" -- some kind of field that isn't defined, but does have an arbitrary field's properties.

I've seen this symbolic ring documents page, but I am not sure if I can construct a symbolic ring that has .is_field() == True.

Can somebody help? I'd also be interested in doing the same for Let G be a group, or how one would go about more complicated symbolic algebraic objects, like let P be a PID.

Thanks.


Solution

  • In SageMath, a generic field is represented by sage.rings.ring.Field (source/docs). Similarly, PIDs are represented in sage.rings.ring.PrincipalIdealDomain, and groups in sage.groups.group.Group.