if not A.base_ring().is_field():
raise ValueError('The base ring of ``A`` must be a field.')
if not A.base_ring() is SR:
# Change the base field of ``A`` so that we are sure we can take
if not A.base_ring().is_field():
raise ValueError('The base ring of ``A`` must be a field.')
if not A.base_ring() is SR:
# Change the base field of ``A`` so that we are sure we can take