summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Gourgoulhon <eric.gourgoulhon@obspm.fr>2016-05-05 22:56:02 +0200
committerEric Gourgoulhon <eric.gourgoulhon@obspm.fr>2016-05-05 22:56:02 +0200
commitf11df50d2cd87172375db7d3c88e420ebb09d721 (patch)
tree725e9b7b7745752957718b0d35bb82f70ff8705d
parentImplementing global_options for display formatting. (diff)
Set CoordFunctionSymbRing in the category of commutative algebras over SR; minor documentation changes
-rw-r--r--src/sage/manifolds/chart.py4
-rw-r--r--src/sage/manifolds/coord_func.py6
-rw-r--r--src/sage/manifolds/coord_func_symb.py40
-rw-r--r--src/sage/manifolds/manifold.py2
-rw-r--r--src/sage/manifolds/point.py4
-rw-r--r--src/sage/manifolds/scalarfield.py10
-rw-r--r--src/sage/manifolds/scalarfield_algebra.py10
-rw-r--r--src/sage/manifolds/utilities.py2
8 files changed, 58 insertions, 20 deletions
diff --git a/src/sage/manifolds/chart.py b/src/sage/manifolds/chart.py
index 4c074b8..7e1610b 100644
--- a/src/sage/manifolds/chart.py
+++ b/src/sage/manifolds/chart.py
@@ -16,10 +16,10 @@ AUTHORS:
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)
"""
diff --git a/src/sage/manifolds/coord_func.py b/src/sage/manifolds/coord_func.py
index 8e54e20..5bb4712 100644
--- a/src/sage/manifolds/coord_func.py
+++ b/src/sage/manifolds/coord_func.py
@@ -27,11 +27,14 @@ the coordinates of a chart, with `m` a positive integer.
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
@@ -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):
diff --git a/src/sage/manifolds/coord_func_symb.py b/src/sage/manifolds/coord_func_symb.py
index ffc1e75..551dda8 100644
--- a/src/sage/manifolds/coord_func_symb.py
+++ b/src/sage/manifolds/coord_func_symb.py
@@ -24,11 +24,14 @@ This module implements symbolic coordinate functions via the class
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
@@ -41,7 +44,7 @@ from sage.symbolic.ring import SR
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)
@@ -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)`
@@ -1624,6 +1627,23 @@ class CoordFunctionSymb(CoordFunction):
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):
"""
@@ -1637,7 +1657,7 @@ class CoordFunctionSymbRing(Parent, UniqueRepresentation):
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):
"""
@@ -1709,6 +1729,14 @@ class CoordFunctionSymbRing(Parent, UniqueRepresentation):
- ``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)
@@ -1721,12 +1749,14 @@ class CoordFunctionSymbRing(Parent, UniqueRepresentation):
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
diff --git a/src/sage/manifolds/manifold.py b/src/sage/manifolds/manifold.py
index 81c4e1b..c5cbcc4 100644
--- a/src/sage/manifolds/manifold.py
+++ b/src/sage/manifolds/manifold.py
@@ -349,7 +349,7 @@ ManifoldOptions=GlobalOptions(name='manifolds',
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::
diff --git a/src/sage/manifolds/point.py b/src/sage/manifolds/point.py
index 8fdb6d4..2959942 100644
--- a/src/sage/manifolds/point.py
+++ b/src/sage/manifolds/point.py
@@ -14,9 +14,9 @@ AUTHORS:
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:
diff --git a/src/sage/manifolds/scalarfield.py b/src/sage/manifolds/scalarfield.py
index a784571..cb67373 100644
--- a/src/sage/manifolds/scalarfield.py
+++ b/src/sage/manifolds/scalarfield.py
@@ -14,19 +14,21 @@ Scalar fields are implemented by the class :class:`ScalarField`.
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
diff --git a/src/sage/manifolds/scalarfield_algebra.py b/src/sage/manifolds/scalarfield_algebra.py
index 5231cbb..d0a8e16 100644
--- a/src/sage/manifolds/scalarfield_algebra.py
+++ b/src/sage/manifolds/scalarfield_algebra.py
@@ -11,19 +11,21 @@ multiplication of `K`-valued functions, which is clearly commutative.
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
diff --git a/src/sage/manifolds/utilities.py b/src/sage/manifolds/utilities.py
index ed4b99c..59f4e75 100644
--- a/src/sage/manifolds/utilities.py
+++ b/src/sage/manifolds/utilities.py
@@ -8,6 +8,7 @@ AUTHORS:
- Michal Bejger (2015) : class :class:`ExpressionNice`
- Eric Gourgoulhon (2015) : simplification functions
+- Travis Scrimshaw (2016): review tweaks
"""
@@ -15,6 +16,7 @@ AUTHORS:
#
# 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