Skip to content

Replace "... is SR" by isinstance(..., sage.rings.abc.SymbolicRing) to handle symbolic subrings #32724

@mkoeppe

Description

@mkoeppe

There are a number of tests ... is SR in the Sage library, as found by git grep 'is SR' src/sage/

These tests ignore symbolic subrings, as constructed by SR.subring(...).

All or most of these uses should be changed to isinstance(..., sage.rings.abc.SymbolicRing) or isinstance(..., sage.symbolic.ring.SymbolicRing) (if the module already imports other things from sage.symbolic)

In addition to handling the case of subrings, this will help with modularization (#32601).

We leave a few uses of is SR to follow-up tickets #31988, #31999.

CC: @dkrenn @egourgoulhon @orlitzky

Component: symbolics

Author: Matthias Koeppe

Branch/Commit: ff83c4c

Reviewer: Michael Orlitzky

Issue created by migration from https://trac.sagemath.org/ticket/32724

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions