In examples like this:
sage: f(x)=matrix()
sage: bool(f(x)-f(x)==0)
...
TypeError: mutable matrices are unhashable
sage: f(x)*1
...
TypeError: mutable matrices are unhashable
a Pynac bug manifests, see pynac/pynac#34
This ticket should provide doctests, it depends on pynac-0.4.2/0.3.9.2.
Depends on #17321
CC: @nbruin
Component: symbolics
Author: Ralf Stephan
Branch/Commit: 919b954
Reviewer: Frédéric Chapoton
Issue created by migration from https://trac.sagemath.org/ticket/18360