Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Characteristic Classes: Sequences #30211

Closed
mjungmath opened this issue Jul 24, 2020 · 32 comments
Closed

Characteristic Classes: Sequences #30211

mjungmath opened this issue Jul 24, 2020 · 32 comments

Comments

@mjungmath
Copy link

To each additive/multiplicative characteristic class corresponds a sequence. Namely, due to the fundamental theorem of symmetric polynomials, each symmetric polynomial can be expressed in terms of the elementary symmetric polynomials. In our setup, the k-th elementary symmetric polynomials corresponds to the k-th Chern class. This allows us to express additive/multiplicative characteristic classes in terms of Chern classes (or Pontryagin classes in the real case respectively). This is the sequence.

CC: @slel @egourgoulhon @tscrim

Component: manifolds

Author: Michael Jung

Branch/Commit: 7aa0ec5

Reviewer: Travis Scrimshaw

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

@mjungmath mjungmath added this to the sage-9.2 milestone Jul 24, 2020
@mjungmath
Copy link
Author

@mjungmath
Copy link
Author

Commit: 6972030

@mjungmath
Copy link
Author

New commits:

6972030Trac #30211: sequence function added

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 26, 2020

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

5f25df5Trac #30211: Merge branch 'develop' into characteristic_classes_sequence

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 26, 2020

Changed commit from 6972030 to 5f25df5

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 28, 2020

Changed commit from 5f25df5 to c7414bd

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 28, 2020

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

c7414bdTrac #30211: docstring syntax

@mjungmath
Copy link
Author

comment:5

This ticket is ready for review. Patchbot should turn green after this commit.

@tscrim
Copy link
Collaborator

tscrim commented Aug 3, 2020

comment:6

Do you have an example that gives something that is not a symmetric function over QQ?

Also, you are better off using

m = Sym.m()
m._from_dict({p: prod(ring(coeff[i]) for i in p)
              for k in range(len(coeff))
              for p in Partitions(k))

which is faster as it more directly creates the symmmetric function you want.

@mjungmath
Copy link
Author

comment:7

Replying to @tscrim:

Do you have an example that gives something that is not a symmetric function over QQ?

Sure: x-y is no symmetric function over QQ.

Also, you are better off using

m = Sym.m()
m._from_dict({p: prod(ring(coeff[i]) for i in p)
              for k in range(len(coeff))
              for p in Partitions(k))

which is faster as it more directly creates the symmmetric function you want.

Thanks, I'll try this.

@mjungmath
Copy link
Author

comment:8

Apparently, there is something wrong with the code since some doctests fail. I'll check on this.

@tscrim
Copy link
Collaborator

tscrim commented Aug 4, 2020

comment:9

Replying to @mjungmath:

Replying to @tscrim:

Do you have an example that gives something that is not a symmetric function over QQ?

Sure: x-y is no symmetric function over QQ.

I know what a symmetric function is (that is basically my main research area). What I want is a symmetric function over some other base ring besides QQ. Can you add an example where this happens? In the branch, you say don't assume QQ, so I want a doctest where that actually occurs.

@mjungmath
Copy link
Author

comment:10

Ah, I see. I was already wondering. :D

Well yes, the standard case is QQ but at the moment, there is nothing that prevents you having a parameter in SR. This might come in useful (I don't know when exactly, but I want to keep the possibility open). Now, I wanted to make sure that the algorithm always works, even in that case, so I chose SR.

@mjungmath
Copy link
Author

comment:11

I will try another attempt using power series only. I hope this simplifies the code significantly. Furthermore, this could improve the performance since power series compute things faster than symbolic expressions; also the use of power series is mathematically more rigorous. Finally, power series (over the symbolic ring) allow to distinct between parameters and the actual variable.

@mkoeppe mkoeppe modified the milestones: sage-9.2, sage-9.3 Sep 5, 2020
@mjungmath
Copy link
Author

comment:13

Replying to @tscrim:

Replying to @mjungmath:

Replying to @tscrim:

Do you have an example that gives something that is not a symmetric function over QQ?

Sure: x-y is no symmetric function over QQ.

I know what a symmetric function is (that is basically my main research area). What I want is a symmetric function over some other base ring besides QQ. Can you add an example where this happens? In the branch, you say don't assume QQ, so I want a doctest where that actually occurs.

General question: do the examples have to be mathematically sensible? For instance, there are plenty of examples where the coefficients of the Taylor expansion are not rationals and SR is then a reasonable choice, but such examples are very uncommon in the application of characteristic classes.

@tscrim
Copy link
Collaborator

tscrim commented Sep 22, 2020

comment:14

Replying to @mjungmath:

Replying to @tscrim:

Replying to @mjungmath:

Replying to @tscrim:

Do you have an example that gives something that is not a symmetric function over QQ?

Sure: x-y is no symmetric function over QQ.

I know what a symmetric function is (that is basically my main research area). What I want is a symmetric function over some other base ring besides QQ. Can you add an example where this happens? In the branch, you say don't assume QQ, so I want a doctest where that actually occurs.

General question: do the examples have to be mathematically sensible? For instance, there are plenty of examples where the coefficients of the Taylor expansion are not rationals and SR is then a reasonable choice, but such examples are very uncommon in the application of characteristic classes.

Uncommon is different than mathematically sensible. Since it something you are supporting, it should be tested, even if it is uncommon. Something you could do is have ring being None and then have the code first try QQ, and if that doesn't work, do it again with SR. However, that would mean the code becomes more complicated. Another option would be to default to QQ with the documentation saying that if it fails over QQ, try SR.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 25, 2020

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

21fee92Trac #30211: "ring=QQ"

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 25, 2020

Changed commit from c7414bd to 21fee92

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 25, 2020

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

49d617bTrac #30211: distinct_real

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 25, 2020

Changed commit from 21fee92 to 49d617b

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 25, 2020

Changed commit from 49d617b to 4765f29

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 25, 2020

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

6687d0cTrac #30211: Merge branch 'develop' into t/30211/characteristic_classes_sequence
4765f29Trac #30211: distinct real

@tscrim
Copy link
Collaborator

tscrim commented Oct 26, 2020

comment:19

Thanks. This will be good. Just one comment on the code:

             from sage.combinat.partition import Partitions
             # Get the multiplicative sequence in the monomial basis:
-            mon_pol = Sym.m().sum(prod(ring(coeff[i]) for i in p) * Sym.m()[p]
+            mon_pol = Sym.m()._from_dict({p: sum(prod(ring(coeff[i]) for i in p)
                                   for k in range(len(coeff))
-                                  for p in Partitions(k))
+                                  for p in Partitions(k)})

This will create the element faster with far less temporary objects.

@tscrim
Copy link
Collaborator

tscrim commented Oct 26, 2020

comment:20

You will probably also want to do something similar for the additive case.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 27, 2020

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

7aa0ec5Trac #30211: symmetric polynomial via _from_dict

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 27, 2020

Changed commit from 4765f29 to 7aa0ec5

@mjungmath
Copy link
Author

comment:22

Here we go. Wait for patchbot.

@tscrim: However, I am not sure whether this ticket is still useful since I plan to reconstruct the whole architecture of characteristic classes. Perhaps it is good if you could join my talk on Friday because I plan to explain the rough idea of the current implementation and an outline of what I have in mind.

@mkoeppe
Copy link
Contributor

mkoeppe commented Mar 15, 2021

comment:23

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.

@mkoeppe mkoeppe modified the milestones: sage-9.3, sage-9.4 Mar 15, 2021
@tscrim
Copy link
Collaborator

tscrim commented May 13, 2021

comment:24

This will be good for now. If things get completely rewritten, then this can be modified/deprecated at that time.

@tscrim
Copy link
Collaborator

tscrim commented May 13, 2021

Reviewer: Travis Scrimshaw

@mjungmath
Copy link
Author

comment:25

Thank you for the review!

@vbraun
Copy link
Member

vbraun commented May 27, 2021

Changed branch from u/gh-mjungmath/characteristic_classes_sequence to 7aa0ec5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants