#31691 closed enhancement (fixed)

Turn mixed form algebra into de Rham complex

Reported by: Michael Jung Owned by:
Priority: major Milestone: sage-9.4
Component: manifolds Keywords: chain_complex
Cc: Eric Gourgoulhon, Travis Scrimshaw, Matthias Köppe, John Palmieri Merged in:
Authors: Michael Jung Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 566176a (Commits, GitHub, GitLab) Commit: 566176a74a480456b7836c13a173e217b721b70a
Dependencies: Stopgaps:

Status badges

Description (last modified by Michael Jung)

We turn the algebra of mixed differential forms into a de Rham complex and add it to the category of ChainComplexes, see #31669.

Furthermore, we add de Rham cohomology to SageManifolds? with limited functionality. For now, the implementation will only consist of abstract elements that are given by representatives of mixed forms, i.e. we take closed mixed forms, put a bracket around it and do all computations in the algebra of mixed forms.

Change History (37)

comment:1 Changed 20 months ago by Michael Jung

Summary: Make mixed forms to de Rham complexTurn mixed forms into de Rham complex

comment:2 Changed 20 months ago by Michael Jung

Description: modified (diff)

comment:3 Changed 20 months ago by Michael Jung

Branch: public/31691_de_rham_complex

comment:4 Changed 20 months ago by git

Commit: eeeadf5aa539af8eb994705093f9972d12281c82

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

a050f71Trac #31691: add category and differential
eeeadf5Trac #31691: more concrete examples

comment:5 Changed 20 months ago by Michael Jung

Here is a first draft. Unfortunately I get an error with the current test:

sage: M = Manifold(2, 'M')
sage: X.<x,y> = M.chart()
sage: C = M.de_rham_complex()
sage: d0 = C.differential(0); d0
Exception raised:
...
ValueError: Algebra of differentiable scalar fields on the 2-dimensional differentiable manifold M is not in Category of modules over Algebra of differentiable scalar fields on the 2-dimensional differentiable manifold M

This is somewhat peculiar. Each algebra should automatically be a module over itself... Should I simply add the category to the scalar field algebra or does that need a broader fix?

comment:6 Changed 20 months ago by git

Commit: eeeadf5aa539af8eb994705093f9972d12281c82252cb8f157e8df943f2666ae1683397adb61ff79

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

252cb8fTrac #31691: invoke derivative instead of differential

comment:7 Changed 20 months ago by Michael Jung

Cc: Matthias Köppe added

comment:8 in reply to:  5 Changed 20 months ago by Michael Jung

Replying to gh-mjungmath:

Here is a first draft. Unfortunately I get an error with the current test:

sage: M = Manifold(2, 'M')
sage: X.<x,y> = M.chart()
sage: C = M.de_rham_complex()
sage: d0 = C.differential(0); d0
Exception raised:
...
ValueError: Algebra of differentiable scalar fields on the 2-dimensional differentiable manifold M is not in Category of modules over Algebra of differentiable scalar fields on the 2-dimensional differentiable manifold M

This is somewhat peculiar. Each algebra should automatically be a module over itself... Should I simply add the category to the scalar field algebra or does that need a broader fix?

See #31713.

comment:9 Changed 20 months ago by git

Commit: 252cb8f157e8df943f2666ae1683397adb61ff79ab3d601704d47453641f4e1a225a596784507a4b

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

ab3d601Trac #31691: de Rham cohomology ring

comment:10 Changed 20 months ago by Michael Jung

This draft should already reflect what I have in mind. Comments are welcome.

comment:11 Changed 20 months ago by Michael Jung

I must apologize. I was extremely sloppy here: differentials are no morphisms in the category of modules over scalar fields, they are morphisms in the category of modules over K!

I'll fix this.

comment:12 Changed 19 months ago by Michael Jung

That was expected. Same problem, but now with differential form modules not considered as vector spaces.

There should be some way to define these morphisms, no?

Last edited 19 months ago by Michael Jung (previous) (diff)

comment:13 Changed 19 months ago by git

Commit: ab3d601704d47453641f4e1a225a596784507a4b4746ddb61e6d2da8e7d7b5e76d39772b286f56a2

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

4746ddbTrac #31691: turn mixed form algebra into de rham complex

comment:14 Changed 19 months ago by Michael Jung

Status: newneeds_review

Ready for review.

comment:15 Changed 19 months ago by Michael Jung

This is just a first step.

My idea (not for this ticket): Optimally, we want to cover our manifold by contractible chart domains. Therefore it would be helpful if we could determine whether an open subset is contractible or not. Perhaps this needs some input from the user. But then, we can probably check for exactness (I still have to think about it) and, other than that, construct Cech cohomology.

Last edited 19 months ago by Michael Jung (previous) (diff)

comment:16 Changed 19 months ago by Michael Jung

P.S. I said "simply connected" in the first place, but of course I meant contractible.

comment:17 Changed 19 months ago by Michael Jung

Authors: Michael Jung

comment:18 Changed 19 months ago by Michael Jung

Summary: Turn mixed forms into de Rham complexTurn mixed form algebra into de Rham complex

comment:19 Changed 19 months ago by Michael Jung

Description: modified (diff)

comment:20 Changed 19 months ago by Michael Jung

Description: modified (diff)

comment:21 Changed 19 months ago by git

Commit: 4746ddb61e6d2da8e7d7b5e76d39772b286f56a2fb8331abc00f6886b511819bff1e4116bb2e6d30

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

fb8331aTrac #31691: fix doctest in manifold.py

comment:22 Changed 19 months ago by Michael Jung

Patchbot green.

comment:23 Changed 19 months ago by Michael Jung

Cc: John Palmieri added

comment:24 Changed 19 months ago by Travis Scrimshaw

I think it would be best to split off the cohomology ring into a separate file.

Do you want to give a special (latex) name to zero and one?

For the class-level docstring of DeRahmComologyRing:

-Define the de Rham cohomology ring of a de Rham complex.
The de Rham cohomology ring of a de Rham complex.

I don't think you should assume that the parents are the same for cup (unlike what you can do for _mul_).

In your cohomology() method, you have both \left. and \right.. I don't understand the point of this.

The input block to differential() is over-indented. Also, remove the full-stop/period.

comment:25 in reply to:  24 ; Changed 19 months ago by Michael Jung

Replying to tscrim:

I think it would be best to split off the cohomology ring into a separate file.

Sounds reasonable.

Do you want to give a special (latex) name to zero and one?

I don't think so. That would make more sense if we can distinguish cohomology classes properly.

For the class-level docstring of DeRahmComologyRing:

-Define the de Rham cohomology ring of a de Rham complex.
The de Rham cohomology ring of a de Rham complex.

Thanks, done.

I don't think you should assume that the parents are the same for cup (unlike what you can do for _mul_).

What do you mean?

In your cohomology() method, you have both \left. and \right.. I don't understand the point of this.

The point is that \middle/ has the appropriate size.

The input block to differential() is over-indented. Also, remove the full-stop/period.

Thanks, done.

comment:26 in reply to:  25 ; Changed 19 months ago by Travis Scrimshaw

Replying to gh-mjungmath:

Replying to tscrim:

I don't think you should assume that the parents are the same for cup (unlike what you can do for _mul_).

What do you mean?

If you take the cup with something the coerces in (perhaps 2?) but is not actually an element of the same parent, then it will either fail or could end up with an element that is not actually in the ring. However, for _mul_, this can never happen because the coercion framework would make sure both arguments belong to the same parent.

comment:27 in reply to:  26 ; Changed 19 months ago by Michael Jung

Replying to tscrim:

Replying to gh-mjungmath:

Replying to tscrim:

I don't think you should assume that the parents are the same for cup (unlike what you can do for _mul_).

What do you mean?

If you take the cup with something the coerces in (perhaps 2?) but is not actually an element of the same parent, then it will either fail or could end up with an element that is not actually in the ring. However, for _mul_, this can never happen because the coercion framework would make sure both arguments belong to the same parent.

Currently, there is not even a natural coercion implemented. The only coercion that would be admissible is the one from closed differential forms (and everything that is contained in it) into cohomology, but we don't have that subspace implemented. Therefore, it wouldn't even work with _mul_.

comment:28 in reply to:  27 ; Changed 19 months ago by Travis Scrimshaw

Replying to gh-mjungmath:

Replying to tscrim:

Replying to gh-mjungmath:

Replying to tscrim:

I don't think you should assume that the parents are the same for cup (unlike what you can do for _mul_).

What do you mean?

If you take the cup with something the coerces in (perhaps 2?) but is not actually an element of the same parent, then it will either fail or could end up with an element that is not actually in the ring. However, for _mul_, this can never happen because the coercion framework would make sure both arguments belong to the same parent.

Currently, there is not even a natural coercion implemented. The only coercion that would be admissible is the one from closed differential forms (and everything that is contained in it) into cohomology, but we don't have that subspace implemented. Therefore, it wouldn't even work with _mul_.

However, it will fail with a much more reasonable message and it will be all setup for when there is a coercion implemented. Most importantly, it will handle the natural coercion from the scalar field into the ring, but cup will not. You should have cup simply redirect to *. This will also make it easier if this ever gets subclassed too.

comment:29 in reply to:  28 Changed 19 months ago by Michael Jung

Replying to tscrim:

However, it will fail with a much more reasonable message and it will be all setup for when there is a coercion implemented. Most importantly, it will handle the natural coercion from the scalar field into the ring, but cup will not. You should have cup simply redirect to *. This will also make it easier if this ever gets subclassed too.

It will get subclassed. My idea is that a characteristic class becomes a subclass of DeRhamCohomologyClass with a dedicated representative method.

comment:30 Changed 19 months ago by Michael Jung

So your idea is good. I will redirect cup to the product.

comment:31 Changed 19 months ago by git

Commit: fb8331abc00f6886b511819bff1e4116bb2e6d30566176a74a480456b7836c13a173e217b721b70a

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

566176aTrac #31691: new file + improved doc + cup product delegates to *

comment:32 Changed 19 months ago by Michael Jung

Commit pushed. Wait for patchbot.

comment:33 Changed 19 months ago by Travis Scrimshaw

Reviewers: Travis Scrimshaw

Green bot => positive review

comment:34 Changed 19 months ago by Michael Jung

Morally green?

comment:35 Changed 19 months ago by Travis Scrimshaw

Status: needs_reviewpositive_review

comment:36 Changed 19 months ago by Michael Jung

Thanks for the review!

comment:37 Changed 18 months ago by Volker Braun

Branch: public/31691_de_rham_complex566176a74a480456b7836c13a173e217b721b70a
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.