sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.22k stars 427 forks source link

Implement categories for topological and metric spaces and related categories #18175

Closed tscrim closed 8 years ago

tscrim commented 9 years ago

After a discussion at Sage Days 64, we decided to implement a variety of categories pertaining to geometry and topology to lend assistance to SageManifolds (#18528) and to generalize idioms in the hyperbolic geometry (#9439). This implements the following categories:

and axioms:

Depends on #18174 Depends on #17160

CC: @nthiery @egourgoulhon

Component: categories

Keywords: topology, sd67

Author: Travis Scrimshaw

Branch/Commit: f6fdd7d

Reviewer: Eric Gourgoulhon

Issue created by migration from https://trac.sagemath.org/ticket/18175

tscrim commented 9 years ago

Branch: public/categories/topological_metric_spaces-18175

tscrim commented 9 years ago
comment:1

I've implemented a bunch of stub categories as an overall layout guide. My method stubs and documentation will need to be expanded upon, including adding (more) tests, along with lifting methods from the hyperbolic geometry module. There is currently an abuse of Finite for CW complexes as they are not typically finite as sets (in fact, the only finite CW complexes are a finite collection of 0-cells), but the terminology is finite CW complex meaning a finite number of cells.

Eric, hopefully this is enough to get you started on what you'd want/need for SageManifolds. I probably won't work much more on this for a while.


New commits:

77b801cInital stubs
0e78e25Implement generic functorial construction base class magic.
96547d2Merge branch 'public/categories/functorial_magic-18174' into public/categories/topological_metric_spaces-TBA
bdb08fbSome cleanup and getting category stubs ready.
68b85e9Adding some more stubs for categories.
tscrim commented 9 years ago

Commit: 68b85e9

tscrim commented 9 years ago

Dependencies: #18174

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Changed commit from 68b85e9 to aea3a7d

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

cf9b429Fixed ReST typo
aff268917160: fixed category for finite set endomaps + minor `__init__` refactoring
4b3d74cMerge branch 'develop' into categories/finitely-generated-magmas-17160
ad5d6c08678: permutation groups are finitely generated, finite fields are enumerated, fixes
839200e8678: More doctest updates. Should almost pass all tests.
919a215Merge branch 'develop = sage 6.6 beta6' into categories/finitely-generated-magmas-17160
ef01ef0Merge branch 't/18012/sphinx_depends_on_jinja2' into categories/finitely-generated-magmas-17160
975c008Merge branch 'u/nthiery/categories/finitely-generated-magmas-17160' of trac.sagemath.org:sage into categories/finitely-generated-magmas-17160
19ceb81Merge branch 'u/nthiery/categories/finitely-generated-magmas-17160' of trac.sagemath.org:sage into public/categories/finitely_generated_magma-17160
aea3a7dMerge branch 'public/categories/finitely_generated_magma-17160' of trac.sagemath.org:sage into public/categories/topological_metric_spaces-18175
tscrim commented 9 years ago

Changed dependencies from #18174 to #18174 #17160

tscrim commented 9 years ago
comment:4

Handled conflicts with #17160.

egourgoulhon commented 9 years ago
comment:5

Hi Travis,

Replying to @tscrim:

Eric, hopefully this is enough to get you started on what you'd want/need for SageManifolds. I probably won't work much more on this for a while.

That's great! Many thanks for implementing this. In a week or two, I'll start to split SageManifolds in small tickets and will of course use your category framework.

Eric.

nthiery commented 9 years ago

Changed keywords from topology to topology, sd67

egourgoulhon commented 9 years ago
comment:7

Hi Travis,

I gave a look at the category Manifolds; it looks nice and I have the following comments:

Eric.

tscrim commented 9 years ago
comment:8

Replying to @egourgoulhon:

  • the methods dimension() and FiniteDimensional(), and well as the class FiniteDimensional, are defined only at the level of Connected; shouldn't they be at the level of Manifolds itself ?

I wasn't sure about the dimension making sense for manifolds unless they are connected as far as my definition. Mainly do we want the disjoint union of a 1-sphere and 2-sphere be a manifold? (Current definition is yes). If so, then is the dimension the maximal dimension of each component? I will leave the decision up to you.

  • in the docstring of Manifolds, I think the phrase "such that the neighborhood of any point x \in M is homeomorphic to k^d" should be changed to something like "such that any point x\in M admits a neighborhood homeomorphic to k^d"

Feel free to change the docstrings and categories as much as you want. However if you just want to get these category stubs into Sage as a smaller step, we can do that too.

egourgoulhon commented 9 years ago
comment:9

Replying to @tscrim:

Replying to @egourgoulhon:

  • the methods dimension() and FiniteDimensional(), and well as the class FiniteDimensional, are defined only at the level of Connected; shouldn't they be at the level of Manifolds itself ?

I wasn't sure about the dimension making sense for manifolds unless they are connected as far as my definition. Mainly do we want the disjoint union of a 1-sphere and 2-sphere be a manifold? (Current definition is yes). If so, then is the dimension the maximal dimension of each component? I will leave the decision up to you.

For all the textbook definitions I am aware of, the disjoint union of a 1-sphere and a 2-sphere is not a manifold. In other words, the dimension is unique among all the connected components of the manifold. So I think the dimension should be at the level of Manifolds.

  • in the docstring of Manifolds, I think the phrase "such that the neighborhood of any point x \in M is homeomorphic to k^d" should be changed to something like "such that any point x\in M admits a neighborhood homeomorphic to k^d"

Feel free to change the docstrings and categories as much as you want. However if you just want to get these category stubs into Sage as a smaller step, we can do that too.

Apart from the dimension issue discussed above, the current categories seems fine to rebase SageManifolds on them, thanks. I'll try soon and let you know.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

349fe0fMerge branch 'public/categories/topological_metric_spaces-18175' of trac.sagemath.org:sage into public/categories/topological_metric_spaces-18175
fcc3273Move dim to all manifolds, move methods from H-plane to metric spaces, some fixes.
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Changed commit from aea3a7d to fcc3273

tscrim commented 9 years ago
comment:11

Replying to @egourgoulhon:

Replying to @tscrim:

I wasn't sure about the dimension making sense for manifolds unless they are connected as far as my definition. Mainly do we want the disjoint union of a 1-sphere and 2-sphere be a manifold? (Current definition is yes). If so, then is the dimension the maximal dimension of each component? I will leave the decision up to you.

For all the textbook definitions I am aware of, the disjoint union of a 1-sphere and a 2-sphere is not a manifold. In other words, the dimension is unique among all the connected components of the manifold. So I think the dimension should be at the level of Manifolds.

I split the difference in that I kept a more general definition, but I had dimension be the maximum of the dimensions of each connected component so you don't necessarily have to specify connected.

  • in the docstring of Manifolds, I think the phrase "such that the neighborhood of any point x \in M is homeomorphic to k^d" should be changed to something like "such that any point x\in M admits a neighborhood homeomorphic to k^d"

Feel free to change the docstrings and categories as much as you want. However if you just want to get these category stubs into Sage as a smaller step, we can do that too.

Apart from the dimension issue discussed above, the current categories seems fine to rebase SageManifolds on them, thanks. I'll try soon and let you know.

I made some fixes, specifically I stopped an infinite recursion with metric spaces caused by some of my last-minute refactoring. I forgot to make the other change to the manifold's doc, but I want to make sure you're okay with my definition of a manifold before I keep changing it. This is almost ready for review up to some methods not containing doctests.

egourgoulhon commented 9 years ago
comment:12

Replying to @tscrim:

Replying to @egourgoulhon:

Replying to @tscrim:

I wasn't sure about the dimension making sense for manifolds unless they are connected as far as my definition. Mainly do we want the disjoint union of a 1-sphere and 2-sphere be a manifold? (Current definition is yes). If so, then is the dimension the maximal dimension of each component? I will leave the decision up to you.

For all the textbook definitions I am aware of, the disjoint union of a 1-sphere and a 2-sphere is not a manifold. In other words, the dimension is unique among all the connected components of the manifold. So I think the dimension should be at the level of Manifolds.

I split the difference in that I kept a more general definition, but I had dimension be the maximum of the dimensions of each connected component so you don't necessarily have to specify connected.

Do you have a reference for such a definition of a manifold ? It seems non-standard () to me, but I might be wrong. () the standard being that the dimension is the same for all the connected components.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

5796cbdMerge branch 'public/categories/topological_metric_spaces-18175' of trac.sagemath.org:sage into public/categories/topological_metric_spaces-18175
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Changed commit from fcc3273 to 5796cbd

tscrim commented 9 years ago
comment:14

On Wikipedia (http://en.wikipedia.org/wiki/Dimension), they are careful to say a connected manifold. I do agree with you that the standard definition, but the usual case only considers connected manifolds. I did find some papers which don't assume each component has the same dimension, but I can't find them in minute I have to write this. I will look later though. For this, I wanted to be general and consistent with CW complexes. I think SageManifolds can create connected components with different dimension, but I haven't tried.

egourgoulhon commented 9 years ago
comment:15

Replying to @tscrim:

On Wikipedia (http://en.wikipedia.org/wiki/Dimension), they are careful to say a connected manifold.

Yes. I've looked a little further and found that some authors do allow for different dimensions on different connected components; they then define a pure manifold as a manifold for which the dimension is the same among all connected components. On the other side, other authors refuse to do this: for instance, J.M. Lee, in his Introduction to Topological Manifolds (2nd ed., 2011) says on p. 39: "the first remark is that the definition of a manifold requires that every manifold have a specific, well-defined dimension. This rules out, for example, spaces such as a disjoint union of a line and a plane in R3 ". Since there is no consensus in the literature, it's fine to take either definition, as long as it is clearly stated. I therefore agree with your definition, especially since it is consistent with CW complexes.

jhpalmieri commented 9 years ago
comment:16

My professional opinion as a topologist is that a manifold should have a well-defined dimension n, and every point of that manifold should have a neighborhood homeomorphic to Rn. So even if it's not connected, the different components should have the same dimension.

I think that more people would be unpleasantly surprised if we allowed different components to have different dimensions than if we had the more relaxed version. (There is no similar discomfort for CW complexes or simplicial complexes: topologists are perfectly happy having a CW complex with maximal cells of different dimensions.)

tscrim commented 9 years ago
comment:17

I don't really hold a strong opinion on the definition of a manifold, so perhaps for the sake of clarity, we'll make this be local homeomorphic to kn, where k is a topological field.

However this brings up another point in the design for manifolds. When I first wrote this category, I was thinking all manifolds would be real and a subcategory for those who allow carry a complex structure. The reason for this is I was thinking of complex Lie groups, which can behave differently than their real/rational/positive-char counterparts. Yet I'm wondering if we should instead just parameterize the category and this gives a more consistent interface (and if we need a special complex subcategory, we still might want that parameterized by the complex field).

A more concrete (better) question is what do you want a complex manifold to be? Wikipedia says it is a manifold with holomorphic transition maps. Or should this be a smooth manifold over the complex numbers? In other words, should the notion of differentiability be inherent in the base field?

Thoughts?

egourgoulhon commented 9 years ago
comment:18

IMHO, a complex manifold should be a topological manifold over C (i.e. locally homeomorphic to Cn) with holomorphic transition maps. In the refactoring/split of SageManifolds I am preparing in #18528, I have relaxed the assumption of real manifolds used up to now and have introduced topological manifolds over a generic topological field, having in mind complex manifolds, in addition to real ones. In the implementation, each object of the class ComplexManifold could have an attribute which is an almost complex manifold. The latter would be a real smooth manifold of dimension 2n with an almost complex structure and would be implemented as a subclass of SmoothManifold. I have the impression that the category Manifolds that you are introducing in the current ticket is sufficient for this, i.e. it can be used for any topological manifold over a topological field. I plan to set the TopManifold objects of #18529 in this category. Then, the class ComplexManifold would inherit from TopManifold and would be set in the category Manifolds.Complex().

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

95a30aaAdding examples of categories and full coverage.
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Changed commit from 5796cbd to 95a30aa

tscrim commented 9 years ago
comment:20

It still seems like we are having an assumption that all manifolds can inherently be realized over R. This was my initial assumption too, and so manifolds that could be locally homoemorphic to Cd were a special case.

However I feel like it would be best for Manifolds to be over an arbitrary topological field (which will require some very mild changes). So then the heirarchy for manifolds would be:

     Manifolds
        |
  Differentiable
        |
      Smooth
   /         \
Analytic    AlmostComplex
                |
             Complex

Do you think this what we want?

Also do we think we should add a stub category for PL and/or (pseudo) Riemannian manifolds? How about ManifoldsWithBoundary as a supercategory of Manifolds (and how many of these extra structures lift to the boundary)?

A question for CW complexes, should the elements of a CW complex be the cells or the points of the topological space? Right now, I'm taking the former approach, but I feel this might be an abuse as these should be subobjects of the category (Nicolas, any wisdom to impart on this?). If this seems like a non-trivial issue, I can split this ticket into 2 parts; one for the manifolds and one for the CW complexes.

egourgoulhon commented 9 years ago
comment:21

Replying to @tscrim:

However I feel like it would be best for Manifolds to be over an arbitrary topological field (which will require some very mild changes). So then the heirarchy for manifolds would be:

     Manifolds
        |
  Differentiable
        |
      Smooth
   /         \
Analytic    AlmostComplex
                |
             Complex

Do you think this what we want?

If manifolds are distinguished by their base field (after all, this is the base field that defines the dimension), an alternative hierarchy would be

            Manifolds
             /    \
        Complex  Differentiable
                       |
                     Smooth
                    /      \
                Analytic  AlmostComplex

with the understanding that

Also do we think we should add a stub category for PL and/or (pseudo) Riemannian manifolds? How about ManifoldsWithBoundary as a supercategory of Manifolds (and how many of these extra structures lift to the boundary)?

Probably at some point, ManifoldsWithBoundary will be necessary, but this could be left for a second stage...

tscrim commented 9 years ago
comment:22

Replying to @egourgoulhon:

  • Manifolds: topological manifolds over a topological field K
  • Complex: topological manifolds over K=C with a holomorphic atlas
  • Differentiable: topological manifolds over K=R with a differentiable atlas
  • Smooth: topological manifolds over K=R with a Coo atlas
  • Analytic: topological manifolds over K=R with an analytic atlas
  • AlmostComplex: smooth manifolds with an almost complex structure

However, I don't think we should impose the restriction for differentiable/smooth/analytic as being over R. See for instance http://www.iecn.u-nancy.fr/~bertram/simfin.pdf. Specifically, it would allow us to work over Q, where arithmetic is exact.

In particular, it seems to me that in the literature, "differentiable manifold" and "smooth manifold" always mean a real manifold. As mentionned in comment:18, in the implementation a complex manifold of dimension n would be canonically associated to an almost complex manifold of dimension 2n.

This says that complex should be a subcategory of almost complex. However by parameterizing the manifolds category by the base field (like, e.g., Algebras), there will be no danger of ambiguity of considering an almost complex manifold as being over C or over R. This also means we could do the hierarchy I previously suggested (with a minor adjustment):

      Manifolds
          |
    Differentiable
          |
        Smooth
       /      \
  Analytic   AlmostComplex
       \      /
        Complex

In particular, this would allow us to consider a manifold over R that supports a complex structure (for instance, C considered as a 2-dim real manifold). Thus natural identifications could be given by functors.

egourgoulhon commented 9 years ago
comment:23

Replying to @tscrim:

However, I don't think we should impose the restriction for differentiable/smooth/analytic as being over R. See for instance http://www.iecn.u-nancy.fr/~bertram/simfin.pdf.

If we can reach this level of generality, why not? I guess that when defining new categories for Sage, it's better to be as general as possible.

Specifically, it would allow us to work over Q, where arithmetic is exact.

In particular, it seems to me that in the literature, "differentiable manifold" and "smooth manifold" always mean a real manifold. As mentionned in comment:18, in the implementation a complex manifold of dimension n would be canonically associated to an almost complex manifold of dimension 2n.

This says that complex should be a subcategory of almost complex. However by parameterizing the manifolds category by the base field (like, e.g., Algebras), there will be no danger of ambiguity of considering an almost complex manifold as being over C or over R. This also means we could do the hierarchy I previously suggested (with a minor adjustment):

      Manifolds
          |
    Differentiable
          |
        Smooth
       /      \
  Analytic   AlmostComplex
       \      /
        Complex

In particular, this would allow us to consider a manifold over R that supports a complex structure (for instance, C considered as a 2-dim real manifold). Thus natural identifications could be given by functors.

OK. I realize that my concern was more about the implementation of the Parent classes than about the categories: a priori, a complex manifold class cannot inherit from an almost complex class (despite of the name!) because it probably does not have any vanishing complex Nijenhuis tensor (although it has a vanishing real one), does it? BTW what is the opinion of John Palmieri about all this?

4ef8de49-cce1-4eb7-a9f4-dc9f16cbfc75 commented 9 years ago
comment:24

Hi,

I believe Almost Complex manifolds are real manifolds with added structure (namely a [1,1]-tensor), meanwhile complex manifolds can either be seen as

Another consequence : Complex manifolds must have complex holomorphic coordinates hence it inherits from the analytic category. But should its coordinates seen as real analytic or complex analytic ?

I don't really know anything about manifolds over Q, but I fear transitions maps should also satisfy some rationality conditions, and more generally over any field, one have to take the good functions. Hence making the category looks like Algebra might be more difficult. Another example : over the "ring" of quaternions, what would be the good functions ? Actually, there are several definitions possible each yielding different theories.

Basile

tscrim commented 9 years ago
comment:25

Hey Basile,

I'm not quite sure what you're proposing we should do for organizing the manifolds category. For the (a) <=> (b) condition, we aren't doing any sort of checking. By a user constructing a object (parent) in a category, the user is simply promising that it carries that structure.

We could make it so there is no parameterization of the categories (on the underlying field), but instead have the condition for objects to be in the category that their base field be R or C as appropriate. However I think this leads to ambiguity of dimension (e.g., for complex manifolds, do you want the real or complex dimension?) and what you want your charts to be.

I think for fields like Q, the metric gives a good notation of convergence, limits, and hence differential calculus. So, e.g., for smooth manifolds, the transition maps would still be smooth maps (just now in terms of Q calculus instead of R calculus).

Are you perhaps suggesting we should do something like the digram in comment:21?

4ef8de49-cce1-4eb7-a9f4-dc9f16cbfc75 commented 9 years ago
comment:26

Replying to @tscrim:

Hey Basile,

Hi,

I'm not quite sure what you're proposing we should do for organizing the manifolds category. For the (a) <=> (b) condition, we aren't doing any sort of checking. By a user constructing a object (parent) in a category, the user is simply promising that it carries that structure.

We could make it so there is no parameterization of the categories (on the underlying field), but instead have the condition for objects to be in the category that their base field be R or C as appropriate. However I think this leads to ambiguity of dimension (e.g., for complex manifolds, do you want the real or complex dimension?) and what you want your charts to be.

I'm sorry I was not very clear. In my opinion it is important to distinguish manifolds over R and over C. AlmostComplex should be seen as manifolds over R enriched, but ComplexManifold should not inherit from AlmostComplex. At least so that dimension or charts would be unambiguous. (There would still exist a coercion from ComplexManifold to AlmostComplex but not coming from class heritage).

Are you perhaps suggesting we should do something like the digram in comment:21?

Yes actually. Because in the following diagram where everything is parametrised on the underlying field, the case F=C makes no sense. Indeed Differentiable/C cannot exist since usual differentiable maps are not C-linear. Or else if you define it to be C-differentiable then it is the same as Smooth/C and Analytic/C

   Manifolds/F
       |  
Differentiable/F
       |
    Smooth/F
       |
   Analytic/F

I'm not sure, where, in the implementation the issue may appear... For example, in the case of finite fields : x --> xp is not smooth on F_p but it is analytic, which contradicts the heritage.

Basile

tscrim commented 9 years ago
comment:27

For the record, I'm not much of an expert in manifolds; most of my knowledge comes from reading wikipedia.

So you're saying there should be a canonical functor from complex manifolds to almost complex manifolds given by changing the base field from C to R (as opposed to it being a subcategory)? From what you said, this seems to be the best course of action.

For the example with finite fields, do they have a reasonable topology and could that define a transition map? If so, then I think we should enforce differentiable as being over R.

egourgoulhon commented 9 years ago
comment:28

Replying to @tscrim:

So you're saying there should be a canonical functor from complex manifolds to almost complex manifolds given by changing the base field from C to R (as opposed to it being a subcategory)? From what you said, this seems to be the best course of action.

This seems also the best to me.

For the example with finite fields, do they have a reasonable topology and could that define a transition map? If so, then I think we should enforce differentiable as being over R.

If we enforce this, then we are back to the diagram of comment:21. But I wonder now if a best strategy would be to leave instead the base field generic, with the understanding that differentiable means K-differentiable, where K stands for the base field. Then the diagram becomes

            Manifolds
               |
         Differentiable
               |
            Smooth
           /      \
      Analytic   AlmostComplex
         |
      Complex

with

4ef8de49-cce1-4eb7-a9f4-dc9f16cbfc75 commented 9 years ago
comment:29

Hi Eric,

Replying to @egourgoulhon:

[...] I wonder now if a best strategy would be to leave instead the base field generic, with the understanding that differentiable means K-differentiable, where K stands for the base field.

As I said, there are case for some fields K where K-analytic is weaker than expected : For example I can make a change of charts x --> xp over F_p which is actually invertible since xp is the identity on F_p but when computing its differential it vanishes identically since pxp-1 = 0 in caracteristic p.

In my opinion (which is strongly disputable as I don't have a very wide knowledge of the existing theories) differential geometry is meant for R and C (or maybe in extremal cases over p-adic fields) but over other field the right way of doing geometry is through algebraic geometry : Manifolds or varieties are no longer given by charts but by equations.

However, there is still hope of having K-manifolds : The essential piece of information on a scheme (the algebraic geometry object generalising manifolds) is the seaf of functions. But we do have, within Sage Manifolds, a similar object : The set of ScalarFields over an open domain. The rest is just algebra over that (sheaf of) ring. Yet I don't have any idea whether it is actually possible to implement algebraic geometry, and if there would be any use of such (gigantic) work.

Replying to @tscrim:

So you're saying there should be a canonical functor from complex manifolds to almost complex manifolds given by changing the base field from C to R (as opposed to it being a subcategory)? From what you said, this seems to be the best course of action.

Yes and actually this is easy : Take a complex manifold with chart over U given by complex valued functions zk and let xk + i yk their decompositions into real and imaginary parts. Then (x1,y1, ... , xn,yn) is a chart over U of the underlying real manifold. On which we get an almost complex structure for free, given by J \partial{xk} = \partial{yk} (Structure recalling which coordinate x and y are to be glued together to make complex coordinates)

This can be seen at the level of the most elementary examples : The class Manifold has a single object subclass : RealLine (of dimension 1) which encodes the manifold R. For the complex there should be 2 cases :

The functor applied to ComplexLine would yield the ComplexPlane.

egourgoulhon commented 9 years ago
comment:30

Hi Basile,

Replying to @sagetrac-bpillet:

As I said, there are case for some fields K where K-analytic is weaker than expected : For example I can make a change of charts x --> xp over F_p which is actually invertible since xp is the identity on F_p but when computing its differential it vanishes identically since pxp-1 = 0 in caracteristic p.

Thanks for this example!

In my opinion (which is strongly disputable as I don't have a very wide knowledge of the existing theories) differential geometry is meant for R and C (or maybe in extremal cases over p-adic fields) but over other field the right way of doing geometry is through algebraic geometry : Manifolds or varieties are no longer given by charts but by equations.

Yes, you are right, for differentiable manifolds, we should probably limit ourselves to K=C or K=R (at least in a first stage). In the refactoring of SageManifolds I am preparing for #18528, I leave the base field generic anyway. In the documentation of class TopManifold in #18529, you can see already an example with K=C (the Riemann sphere as a topological manifold of dimension 1 over C).

egourgoulhon commented 9 years ago

Description changed:

--- 
+++ 
@@ -1,4 +1,4 @@
-After a discussion at Sage Days 64, we decided to implement a variety of categories pertaining to geometry and topology to lend assistance to [SageManifolds](http://sagemanifolds.obspm.fr) (#14865) and to generalize idioms in the hyperbolic geometry (#9439). This implements the following categories:
+After a discussion at Sage Days 64, we decided to implement a variety of categories pertaining to geometry and topology to lend assistance to [SageManifolds](http://sagemanifolds.obspm.fr) (#18528) and to generalize idioms in the hyperbolic geometry (#9439). This implements the following categories:

 - topological spaces
 - metric spaces
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Changed commit from 95a30aa to 29a97a7

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

31ba0b5Merge branch 'public/categories/topological_metric_spaces-18175' of trac.sagemath.org:sage into public/categories/topological_metric_spaces-18175
da729ccAdded more axioms and reworked the manifolds category structure.
20a71aeMerge branch 'develop' into public/categories/topological_metric_spaces-18175
5418b0fMerge branch 'develop' into public/categories/topological_metric_spaces-18175
29a97a7Minor fixes and reorganizing the manifolds categories.
tscrim commented 9 years ago
comment:33

Given our discussion, I have reorganized the manifolds category as:

        Manifolds
         /    \
    Complex   Real
               |
          Differentiable
               |
             Smooth
            /      \
       Analytic  AlmostComplex

I've added full doctest coverage and some examples. So ready for proper review.

PS - Sorry it took so long to get back to this.

tscrim commented 9 years ago

Description changed:

--- 
+++ 
@@ -9,8 +9,11 @@

 and axioms:

+- real
 - complex
 - compact
+- analytic
 - differentiable
 - smooth
+- almost complex
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

e6076d2Fixing failing doctests and last tweaks.
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Changed commit from 29a97a7 to e6076d2

tscrim commented 9 years ago
comment:35

Nicolas, question for you. I'm not sure that the subcategories of Manifolds should be subclasses of CategoryWithAxiom. In particular, the Complex and Real and if they should be axioms. Would they still work with FiniteDimensional and Connected axioms?

egourgoulhon commented 9 years ago
comment:36

Hi Travis,

Replying to @tscrim:

Given our discussion, I have reorganized the manifolds category as:

        Manifolds
         /    \
    Complex   Real
               |
          Differentiable
               |
             Smooth
            /      \
       Analytic  AlmostComplex

It seems to me that Real should not be atop Differentiable in this hierarchy. Indeed, there exist differentiable manifolds over fields other than R or C: for instance differentiable manifolds over the field of p-adic numbers, Q_p: see e.g. Part II of J.-P. Serre's book Lie Algebras and Lie Groups (1992), where differentiable (actually analytic) manifolds over Q_p are introduced. For this reason, in the refactoring of SageManifolds I am preparing in #18783, I have left the base field generic (notice that we do have the fields of p-adic numbers in Sage). So it would be nice to be able to set the category to Manifolds().Differentiable() without having to assume that the base field is R. Similarly, I think that Complex should be a subcategory of Analytic. As you suggest in comment:35, maybe Complex and Real should be axioms, rather than appearing in the above hierarchy...

I've added full doctest coverage and some examples. So ready for proper review.

PS - Sorry it took so long to get back to this.

Thank you for working on this!

tscrim commented 9 years ago
comment:37

So then you'd do the diagram in comment:28, in contrast to your statement in comment:30? Or did you mean something different in comment:30? I can also make it so the hierarchy is dynamic, in that if k has characteristic p, then analytic does not imply smooth. The category hierarchy does not have to be static (for the record, these are not subclasses, but subcategories in the mathematical sense).

I don't really care what the final hierarchy looks like, but I want it to be as mathematically correct as possible and you (and Michal) and Basile agree. (Although I do have a bias towards making things as general as possible.)

As far as making them be axioms vs singleton categories, this is more of an implementation detail.

egourgoulhon commented 9 years ago
comment:38

Replying to @tscrim:

So then you'd do the diagram in comment:28, in contrast to your statement in comment:30?

Yes this is more or less what I mean. Sorry for the confusion... Actually in preparing the code for differentiable manifolds in #18783, I realize that (i) we can allow very easily for a base field different from R or C and (ii) differentiable manifolds over fields different from R or C are not so uncommon in the literature, in particular manifolds over Q_p. Basically the topological field has to be a complete metric space (as Q_p is), so that the notion of differentiability makes sense.

tscrim commented 9 years ago
comment:39

So it seems like I should add an additional axiom "complete" and have it apply to metric spaces and then check that the field passed to Manifolds should be a complete metric space. On a followup ticket, we will change the category of those fields which are (models for) complete metric spaces, such as R variants like RealField.

tscrim commented 9 years ago
comment:40

Just to make sure, so should we only allow complete metric fields as input for differentiable manifolds? The alternative seems to be we allow more general topological fields with perhaps some machinery to make analytic manifolds over finite fields be non-smooth. Let me know what you think is best.