Defining a protected division operator
Is it possible to define a protected division operator in SageMath that turns division by zero into the constant 1? I want to be able to do this when simplifying an expression in Sage. What would be the best approach to it?
It sounds like you would like to change the behaviour of division in "SymbolicRing" (where simplification is explicitly available). The result would be that you cannot trust the answer at all. Perhaps it is possible to replace the zeros you end up dividing by with a variable, say "zero" and simplify that expression? Then "zero/zero" gets simplified to 1. Then you could substitute "zero=0" afterwards.