Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Set CoordFunctionSymbRing in the category of commutative algebras ove…
Browse files Browse the repository at this point in the history
…r SR; minor documentation changes
  • Loading branch information
egourgoulhon committed May 5, 2016
1 parent 57b7b7b commit f11df50
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 20 deletions.
4 changes: 2 additions & 2 deletions src/sage/manifolds/chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
REFERENCES:
- Chap. 2 of [Lee11]_ J.M. Lee: *Introduction to Topological Manifolds*,
- Chap. 2 of [Lee11]_ \J.M. Lee: *Introduction to Topological Manifolds*,
2nd ed., Springer (New York) (2011)
- Chap. 1 of [Lee13]_ J.M. Lee : *Introduction to Smooth Manifolds*,
- Chap. 1 of [Lee13]_ \J.M. Lee : *Introduction to Smooth Manifolds*,
2nd ed., Springer (New York) (2013)
"""

Expand Down
6 changes: 4 additions & 2 deletions src/sage/manifolds/coord_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@ class :class:`CoordFunction`.
AUTHORS:
- Eric Gourgoulhon, Michal Bejger (2013-2015) : initial version
- Travis Scrimshaw (2016) : make :class:`CoordFunction` inheritate from
:class:`~sage.structure.element.AlgebraElement`
"""
#*****************************************************************************
# Copyright (C) 2015 Eric Gourgoulhon <eric.gourgoulhon@obspm.fr>
# Copyright (C) 2015 Michal Bejger <bejger@camk.edu.pl>
# Copyright (C) 2016 Travis Scrimshaw <tscrimsh@umn.edu>
#
# Distributed under the terms of the GNU General Public License (GPL)
# as published by the Free Software Foundation; either version 2 of
Expand Down Expand Up @@ -61,8 +64,7 @@ class CoordFunction(AlgebraElement):
INPUT:
- ``chart`` -- :class:`~sage.manifolds.chart.Chart`;
the chart `(U, \varphi)`
- ``parent`` -- the algebra of coordinate functions on a given chart
"""
def __init__(self, parent):
Expand Down
40 changes: 35 additions & 5 deletions src/sage/manifolds/coord_func_symb.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@
AUTHORS:
- Eric Gourgoulhon, Michal Bejger (2013-2015) : initial version
- Travis Scrimshaw (2016) : make coordinate functions elements of
:class:`CoordFunctionSymbRing`.
"""
#*****************************************************************************
# Copyright (C) 2015 Eric Gourgoulhon <eric.gourgoulhon@obspm.fr>
# Copyright (C) 2015 Michal Bejger <bejger@camk.edu.pl>
# Copyright (C) 2016 Travis Scrimshaw <tscrimsh@umn.edu>
#
# Distributed under the terms of the GNU General Public License (GPL)
# as published by the Free Software Foundation; either version 2 of
Expand All @@ -41,7 +44,7 @@
from sage.structure.element import RingElement
from sage.structure.parent import Parent
from sage.structure.unique_representation import UniqueRepresentation
from sage.categories.algebras import Algebras
from sage.categories.commutative_algebras import CommutativeAlgebras
from sage.manifolds.coord_func import CoordFunction, MultiCoordFunction
from sage.manifolds.utilities import (ExpressionNice, simplify_chain_real,
simplify_chain_generic)
Expand All @@ -67,8 +70,8 @@ class CoordFunctionSymb(CoordFunction):
INPUT:
- ``chart`` -- :class:`~sage.manifolds.chart.Chart`;
the chart `(U, \varphi)`
- ``parent`` -- the algebra of coordinate functions on the chart
`(U, \varphi)`
- ``expression`` -- a symbolic expression representing
`f(x^1, \ldots, x^n)`, where `(x^1, \ldots, x^n)` are the
coordinates of the chart `(U, \varphi)`
Expand Down Expand Up @@ -1624,6 +1627,23 @@ def collect_common_factors(self):
class CoordFunctionSymbRing(Parent, UniqueRepresentation):
"""
Ring of all symbolic coordinate functions on a chart.
INPUT:
- ``chart`` -- a coordinate chart, as an instance of class
:class:`~sage.manifolds.chart.Chart`
EXAMPLES::
sage: M = Manifold(2, 'M', structure='topological')
sage: X.<x,y> = M.chart()
sage: FR = X.function_ring(); FR
Ring of coordinate functions on Chart (M, (x, y))
sage: type(FR)
<class 'sage.manifolds.coord_func_symb.CoordFunctionSymbRing_with_category'>
sage: FR.category()
Category of commutative algebras over Symbolic Ring
"""
def __init__(self, chart):
"""
Expand All @@ -1637,7 +1657,7 @@ def __init__(self, chart):
sage: TestSuite(FR).run()
"""
self._chart = chart
Parent.__init__(self, base=SR, category=Algebras(SR))
Parent.__init__(self, base=SR, category=CommutativeAlgebras(SR))

def _repr_(self):
"""
Expand Down Expand Up @@ -1709,6 +1729,14 @@ def from_base_ring(self, r):
- ``r`` -- an element of ``self.base_ring()``
EXAMPLES::
sage: M = Manifold(2, 'M', structure='topological')
sage: X.<x,y> = M.chart()
sage: FR = X.function_ring()
sage: f = FR.from_base_ring(x*y)
sage: f.display()
(x, y) |--> x*y
"""
return self.element_class(self, r)

Expand All @@ -1721,12 +1749,14 @@ def is_integral_domain(self):
sage: M = Manifold(2, 'M', structure='topological')
sage: X.<x,y> = M.chart()
sage: FR = X.function_ring()
sage: FR.is_integral_domain()
False
sage: FR.is_field()
False
"""
return False

is_commutative = is_field = is_integral_domain
is_field = is_integral_domain

Element = CoordFunctionSymb

2 changes: 1 addition & 1 deletion src/sage/manifolds/manifold.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@
are set, then the function returns a copy of the options dictionary.
The ``options`` to manifolds can be accessed as the method
:obj:`TopologicalManifolds.global_options`.
:obj:`Manifold.global_options`.
""",
end_doc=r"""
EXAMPLES::
Expand Down
4 changes: 2 additions & 2 deletions src/sage/manifolds/point.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
REFERENCES:
- [Lee11]_ J.M. Lee : *Introduction to Topological Manifolds*, 2nd ed.,
- [Lee11]_ \J.M. Lee : *Introduction to Topological Manifolds*, 2nd ed.,
Springer (New York) (2011)
- [Lee13]_ J.M. Lee : *Introduction to Smooth Manifolds*, 2nd ed.,
- [Lee13]_ \J.M. Lee : *Introduction to Smooth Manifolds*, 2nd ed.,
Springer (New York, 2013)
EXAMPLES:
Expand Down
10 changes: 6 additions & 4 deletions src/sage/manifolds/scalarfield.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,21 @@
AUTHORS:
- Eric Gourgoulhon, Michal Bejger (2013-2015): initial version
- Travis Scrimshaw (2016): review tweaks
REFERENCES:
- [Lee11]_ : *Introduction to Topological Manifolds*, 2nd ed., Springer (New
York) (2011)
- [KN63]_ : *Foundations of Differential Geometry*, vol. 1,
Interscience Publishers (New York) (1963)
- [Lee11]_ \J.M. Lee : *Introduction to Topological Manifolds*, 2nd ed.,
Springer (New York) (2011)
- [KN63]_ \S. Kobayashi & K. Nomizu : *Foundations of Differential Geometry*,
vol. 1, Interscience Publishers (New York) (1963)
"""

#******************************************************************************
# Copyright (C) 2015 Eric Gourgoulhon <eric.gourgoulhon@obspm.fr>
# Copyright (C) 2015 Michal Bejger <bejger@camk.edu.pl>
# Copyright (C) 2016 Travis Scrimshaw <tscrimsh@umn.edu>
#
# Distributed under the terms of the GNU General Public License (GPL)
# as published by the Free Software Foundation; either version 2 of
Expand Down
10 changes: 6 additions & 4 deletions src/sage/manifolds/scalarfield_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,21 @@
AUTHORS:
- Eric Gourgoulhon, Michal Bejger (2014-2015): initial version
- Travis Scrimshaw (2016): review tweaks
REFERENCES:
- [Lee11]_ : *Introduction to Topological Manifolds*, 2nd ed., Springer (New
York) (2011)
- [KN63]_ : *Foundations of Differential Geometry*, vol. 1,
Interscience Publishers (New York) (1963)
- [Lee11]_ \J.M. Lee : *Introduction to Topological Manifolds*, 2nd ed.,
Springer (New York) (2011)
- [KN63]_ \S. Kobayashi & K. Nomizu : *Foundations of Differential Geometry*,
vol. 1, Interscience Publishers (New York) (1963)
"""

#******************************************************************************
# Copyright (C) 2015 Eric Gourgoulhon <eric.gourgoulhon@obspm.fr>
# Copyright (C) 2015 Michal Bejger <bejger@camk.edu.pl>
# Copyright (C) 2016 Travis Scrimshaw <tscrimsh@umn.edu>
#
# Distributed under the terms of the GNU General Public License (GPL)
# as published by the Free Software Foundation; either version 2 of
Expand Down
2 changes: 2 additions & 0 deletions src/sage/manifolds/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
- Michal Bejger (2015) : class :class:`ExpressionNice`
- Eric Gourgoulhon (2015) : simplification functions
- Travis Scrimshaw (2016): review tweaks
"""

#******************************************************************************
#
# Copyright (C) 2015 Michal Bejger <bejger@camk.edu.pl>
# Copyright (C) 2015 Eric Gourgoulhon <eric.gourgoulhon@obspm.fr>
# Copyright (C) 2016 Travis Scrimshaw <tscrimsh@umn.edu>
#
# Distributed under the terms of the GNU General Public License (GPL)
# as published by the Free Software Foundation; either version 2 of
Expand Down

0 comments on commit f11df50

Please sign in to comment.