Skip to content

Commit

Permalink
Trac #31323: Make self-diffeomorphisms default
Browse files Browse the repository at this point in the history
Currently, if you construct a diffeomorphism from a manifold to itself,
you have to specify the manifold as the codmain. With the changes in
this ticket, this is no longer necessary and we assume that the user
want's to specify a self-diffeomorphism if no codomain is given.

URL: https://trac.sagemath.org/31323
Reported by: gh-tobiasdiez
Ticket author(s): Tobias Diez
Reviewer(s): Travis Scrimshaw
  • Loading branch information
Release Manager committed Mar 8, 2021
2 parents e53a1ad + 54d4cd3 commit f68cc14
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/sage/manifolds/differentiable/manifold.py
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ def diff_map(self, codomain, coord_functions=None, chart1=None,
coord_functions = {(chart1, chart2): coord_functions}
return homset(coord_functions, name=name, latex_name=latex_name)

def diffeomorphism(self, codomain, coord_functions=None, chart1=None,
def diffeomorphism(self, codomain=None, coord_functions=None, chart1=None,
chart2=None, name=None, latex_name=None):
r"""
Define a diffeomorphism between the current manifold and another one.
Expand All @@ -962,8 +962,8 @@ def diffeomorphism(self, codomain, coord_functions=None, chart1=None,
INPUT:
- ``codomain`` -- codomain of the diffeomorphism (the arrival manifold
or some subset of it)
- ``codomain`` -- (default: ``None``) codomain of the diffeomorphism (the arrival manifold
or some subset of it). If ``None``, the current manifold is taken.
- ``coord_functions`` -- (default: ``None``) if not ``None``, must be
either
Expand Down Expand Up @@ -1030,6 +1030,9 @@ def diffeomorphism(self, codomain, coord_functions=None, chart1=None,
examples.
"""
if codomain is None:
codomain = self

homset = Hom(self, codomain)
if coord_functions is None:
coord_functions = {}
Expand Down

0 comments on commit f68cc14

Please sign in to comment.