You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I personally don't like adding RealSet to TopologicalSpaces. Imo the difference between RealSet and OpenInterval should be exactly that: seeing them as sets or manifolds (i.e. top. spaces).
Then a forgetful functor would also make more sense.
A RealSet instance is a union of finitely many (possibly degenerate) intervals, so it is always a topological subspace of the real line, but not always a manifold. It would belong to the category of manifolds with corners of mixed dimension, but I think it's a long way until we have implemented that.
I think this is good. As Matthias said, they are naturally topological spaces from the subspace topology. The only question I have is why is ambient() a @staticmethod? I feel like it should be a normal method because the ambient space is associated with the instance rather than as a constructor function (cf. open_closed).
@mjungmath I don't understand what you mean by forgetful functor. These are parents, and have nothing to do with functors. For example, there is a forgetful functor from Rings -> Sets, and applying that functor to ZZ still obtains ZZ. It still has all of the behavior of an object in Sets, but there is no reason to actually forget about the ring structure.
I don't understand what you mean by forgetful functor. These are parents, and have nothing to do with functors. For example, there is a forgetful functor from Rings -> Sets, and applying that functor to ZZ still obtains ZZ. It still has all of the behavior of an object in Sets, but there is no reason to actually forget about the ring structure.
I think the idea would be that after applying the functor to the parent, asking for example for the homset would give a different answer.
I don't understand what you mean by forgetful functor. These are parents, and have nothing to do with functors. For example, there is a forgetful functor from Rings -> Sets, and applying that functor to ZZ still obtains ZZ. It still has all of the behavior of an object in Sets, but there is no reason to actually forget about the ring structure.
I think the idea would be that after applying the functor to the parent, asking for example for the homset would give a different answer.
IMO, it is better to pass that category information to the homset construction (which you can do) if you want to consider morphisms in a weaker category. This way you have less proliferation of "equal" parents and dealing with elements that maybe shouldn't have the additional structure. In this example, should you be able to add two integers that are in the ZZ as a Sets object? Plus, the category you want for the morphisms is a property of the morphism, not the parent.
I think this is good. As Matthias said, they are naturally topological spaces from the subspace topology.
Just because it comes with a natural topology doesn't mean it is the topology the user wants.
If you argument like that, every set must be seen in the category of topological spaces, because every set is endowed with a topology.
@mjungmath I don't understand what you mean by forgetful functor. These are parents, and have nothing to do with functors. For example, there is a forgetful functor from Rings -> Sets, and applying that functor to ZZ still obtains ZZ. It still has all of the behavior of an object in Sets, but there is no reason to actually forget about the ring structure.
IMO, it is better to pass that category information to the homset construction (which you can do) if you want to consider morphisms in a weaker category. This way you have less proliferation of "equal" parents and dealing with elements that maybe shouldn't have the additional structure. In this example, should you be able to add two integers that are in the ZZ as a Sets object? Plus, the category you want for the morphisms is a property of the morphism, not the parent.
Then I don't understand why we even have a forgetful functor if it technically just represents the identity functor...
But I agree, for structures like rings, groups etc. this approach makes total sense. Though, I still don't understand why ForgetfulFunctor was introduced in the first place.
But for manifolds, things are slightly different. It would be good to have a functor that forgets about the topological structure, for example to impose another one. Like I said, I don't like the idea of enforcing a preferred topology on a set if we see it just as set (what we clearly do with RealSet as the name indicates).
I think this is good. As Matthias said, they are naturally topological spaces from the subspace topology.
Just because it comes with a natural topology doesn't mean it is the topology the user wants.
RealSet provides constructors for certain subsets of the reals. The "set" of real numbers comes with a distinguished topology, which is reflected by the names of the RealSet constructors for intervals such as open, closed.
In #31881 (RealSet: Extend constructors so that they can build manifold objects) I plan to add a category keyword argument. Then also the rather specialized use case that a subset of the real numbers is to be treated merely as a set can be achieved by passing category=Sets() to the constructors.
RealSet provides constructors for certain subsets of the reals. The "set" of real numbers comes with a distinguished topology, which is reflected by the names of the RealSet constructors for intervals such as open, closed.
Good point!
In #31881 (RealSet: Extend constructors so that they can build manifold objects) I plan to add a category keyword argument. Then also the rather specialized use case that a subset of the real numbers is to be treated merely as a set can be achieved by passing category=Sets() to the constructors.
Just because it acts as the identity on parents, doesn't mean it is the identity functor. Be very careful with confusing abstract and concrete mathematics. If I said ZZ the set is the same as ZZ the ring, would you agree or disagree? Or would you be like Bill Clinton and state "That depends on what the definition of 'is' is."? The forgetful functor does carry some information, and that is the category you obtain at the end. It could also be used as a base class when you do have some more canonical implementations, but currently it doesn't seem to be used.
By being in the category of topological spaces, you are stating there is a preferred topology. This is akin to the WithBasis category saying there is a distinguished basis. This is why TopologicalSpaces is constructed as a functor construction category.
For the manifold code, while it is dynamic, each manifold is not meant to be treated as something that can change. So if you go from differentiable to topological, you either are actually constructing a different object because the maximal atlas is different or it has the same maximal atlas and you still require the maps to be differentiable. We just may not have provided enough information yet to see that difference.
Activity
mjungmath commentedon May 29, 2021
Possibly a good idea to consider: #30832 comment:6.
mkoeppe commentedon May 29, 2021
Branch: u/mkoeppe/refine_category_of_realset
mkoeppe commentedon May 29, 2021
New commits:
4b09685RealSet: Put it in a suitable subcategory of TopologicalSpaces()mkoeppe commentedon May 29, 2021
Commit:
4b09685mkoeppe commentedon May 29, 2021
Author: Matthias Koeppe
mjungmath commentedon May 30, 2021
I personally don't like adding
RealSettoTopologicalSpaces. Imo the difference betweenRealSetandOpenIntervalshould be exactly that: seeing them as sets or manifolds (i.e. top. spaces).Then a forgetful functor would also make more sense.
mkoeppe commentedon May 30, 2021
A
RealSetinstance is a union of finitely many (possibly degenerate) intervals, so it is always a topological subspace of the real line, but not always a manifold. It would belong to the category of manifolds with corners of mixed dimension, but I think it's a long way until we have implemented that.tscrim commentedon May 30, 2021
I think this is good. As Matthias said, they are naturally topological spaces from the subspace topology. The only question I have is why is
ambient()a@staticmethod? I feel like it should be a normal method because the ambient space is associated with the instance rather than as a constructor function (cf.open_closed).@mjungmath I don't understand what you mean by forgetful functor. These are parents, and have nothing to do with functors. For example, there is a forgetful functor from
Rings -> Sets, and applying that functor toZZstill obtainsZZ. It still has all of the behavior of an object inSets, but there is no reason to actually forget about the ring structure.tscrim commentedon May 30, 2021
Reviewer: Travis Scrimshaw
mkoeppe commentedon May 30, 2021
Replying to @tscrim:
OK, I'll make this change.
sagetrac-git commentedon May 30, 2021
Branch pushed to git repo; I updated commit sha1. New commits:
46eed0eRealSet.ambient: Change to a normal methodsagetrac-git commentedon May 30, 2021
Changed commit from
4b09685to46eed0emkoeppe commentedon May 30, 2021
Replying to @tscrim:
I think the idea would be that after applying the functor to the parent, asking for example for the homset would give a different answer.
tscrim commentedon May 31, 2021
Replying to @mkoeppe:
IMO, it is better to pass that category information to the homset construction (which you can do) if you want to consider morphisms in a weaker category. This way you have less proliferation of "equal" parents and dealing with elements that maybe shouldn't have the additional structure. In this example, should you be able to add two integers that are in the
ZZas aSetsobject? Plus, the category you want for the morphisms is a property of the morphism, not the parent.tscrim commentedon May 31, 2021
Thanks for the change.
2 remaining items
mkoeppe commentedon May 31, 2021
Thanks!
mjungmath commentedon May 31, 2021
Replying to @tscrim:
Just because it comes with a natural topology doesn't mean it is the topology the user wants.
If you argument like that, every set must be seen in the category of topological spaces, because every set is endowed with a topology.
Then I don't understand why we even have a forgetful functor if it technically just represents the identity functor...
mjungmath commentedon May 31, 2021
But I agree, for structures like rings, groups etc. this approach makes total sense. Though, I still don't understand why
ForgetfulFunctorwas introduced in the first place.But for manifolds, things are slightly different. It would be good to have a functor that forgets about the topological structure, for example to impose another one. Like I said, I don't like the idea of enforcing a preferred topology on a set if we see it just as set (what we clearly do with
RealSetas the name indicates).mkoeppe commentedon May 31, 2021
Replying to @mjungmath:
RealSetprovides constructors for certain subsets of the reals. The "set" of real numbers comes with a distinguished topology, which is reflected by the names of theRealSetconstructors for intervals such asopen,closed.In #31881 (
RealSet: Extend constructors so that they can build manifold objects) I plan to add acategorykeyword argument. Then also the rather specialized use case that a subset of the real numbers is to be treated merely as a set can be achieved by passingcategory=Sets()to the constructors.mjungmath commentedon May 31, 2021
Replying to @mkoeppe:
Good point!
+1
tscrim commentedon May 31, 2021
Just because it acts as the identity on parents, doesn't mean it is the identity functor. Be very careful with confusing abstract and concrete mathematics. If I said
ZZthe set is the same asZZthe ring, would you agree or disagree? Or would you be like Bill Clinton and state "That depends on what the definition of 'is' is."? The forgetful functor does carry some information, and that is the category you obtain at the end. It could also be used as a base class when you do have some more canonical implementations, but currently it doesn't seem to be used.By being in the category of topological spaces, you are stating there is a preferred topology. This is akin to the
WithBasiscategory saying there is a distinguished basis. This is whyTopologicalSpacesis constructed as a functor construction category.For the manifold code, while it is dynamic, each manifold is not meant to be treated as something that can change. So if you go from differentiable to topological, you either are actually constructing a different object because the maximal atlas is different or it has the same maximal atlas and you still require the maps to be differentiable. We just may not have provided enough information yet to see that difference.
mkoeppe commentedon Jun 19, 2021
Dependencies: #31880
sagetrac-git commentedon Jun 19, 2021
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:
5b8cecaInternalRealInterval, RealSet: Add `_latex_` methods69ca854RealSet._repr_: Use unicode cup sign instead of +dbdfc06InternalRealInterval, RealSet: Remove extra whitespace in latex, add documentation7f56338PiecewiseFunction: Adjust doctests for changed RealSet repr8abdc8bsrc/sage/functions/piecewise.py: Add coding header5b0f85dMerge #31880sagetrac-git commentedon Jun 19, 2021
Changed commit from
46eed0eto5b0f85dmkoeppe commentedon Jun 19, 2021
Merged to resolve merge conflict
vbraun commentedon Jun 29, 2021
Changed branch from u/mkoeppe/refine_category_of_realset to
5b0f85d