The unsafety is already there. The fact that overlapping overloads cannot express the way that existing libraries work is a bug in the type system. Those libraries are not going to change their handling of these types:
>>> import numpy as np
>>> np.array([True])
array([ True])
>>> np.array([1])
array([1])
>>> np.array([1.0])
array([1.])
>>> np.array([1.0j])
array([0.+1.j])
Those things are just facts that Python’s type system needs to accommodate.
I think it is better if TypeMap can express an exact mapping between types as the dict syntax it uses suggests. It can just be a map A -> B, C -> D, ... and I think my_type_map[A | C] -> my_type_map[A] | my_type_map[C] is really the only symbolic manipulation that is needed.
In practice I would expect to make a really big TypeMap that includes many seemingly redundant subtypes and other things so that it isn’t necessary for the type checker to do much more than map the types directly.