def __init__(self, parent, coord_functions=None, name=None, latex_name=None, is_isomorphism=False, is_identity=False): r""" Construct a differentiable map. TESTS:: sage: M = Manifold(2, 'M') sage: X.<x,y> = M.chart() sage: N = Manifold(3, 'N') sage: Y.<u,v,w> = N.chart() sage: f = Hom(M,N)({(X,Y): (x+y, x*y, x-y)}, name='f') ; f Differentiable map f from the 2-dimensional differentiable manifold M to the 3-dimensional differentiable manifold N sage: f.display() f: M --> N (x, y) |--> (u, v, w) = (x + y, x*y, x - y) sage: TestSuite(f).run() The identity map:: sage: f = Hom(M,M)({}, is_identity=True) ; f Identity map Id_M of the 2-dimensional differentiable manifold M sage: f.display() Id_M: M --> M (x, y) |--> (x, y) sage: TestSuite(f).run() """ ContinuousMap.__init__(self, parent, coord_functions=coord_functions, name=name, latex_name=latex_name, is_isomorphism=is_isomorphism, is_identity=is_identity)
def _init_derived(self): r""" Initialize the derived quantities. TESTS:: sage: M = Manifold(2, 'M') sage: X.<x,y> = M.chart() sage: f = M.diffeomorphism(M, [x+y, x-y]) sage: f._init_derived() sage: f._restrictions {} sage: f._inverse """ ContinuousMap._init_derived(self) # derived quantities of the mother # class self._diff = {} # dict. of the coord. expressions of the differential
def _del_derived(self): r""" Delete the derived quantities. TESTS:: sage: M = Manifold(2, 'M') sage: X.<x,y> = M.chart() sage: f = M.diffeomorphism(M, [x+y, x-y]) sage: f^(-1) Diffeomorphism of the 2-dimensional differentiable manifold M sage: f._inverse # was set by f^(-1) Diffeomorphism of the 2-dimensional differentiable manifold M sage: f._del_derived() sage: f._inverse # has been set to None by _del_derived() """ ContinuousMap._del_derived(self) # derived quantities of the mother # class self._diff.clear()