Opened 2 years ago
Closed 18 months ago
#30211 closed enhancement (fixed)
Characteristic Classes: Sequences
Reported by:  Michael Jung  Owned by:  

Priority:  major  Milestone:  sage9.4 
Component:  manifolds  Keywords:  
Cc:  Samuel Lelièvre, Eric Gourgoulhon, Travis Scrimshaw  Merged in:  
Authors:  Michael Jung  Reviewers:  Travis Scrimshaw 
Report Upstream:  N/A  Work issues:  
Branch:  7aa0ec5 (Commits, GitHub, GitLab)  Commit:  7aa0ec5d36f81048c53beca87bd2adfffbebba6f 
Dependencies:  Stopgaps: 
Description
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.
Change History (26)
comment:1 Changed 2 years ago by
Branch:  → u/ghmjungmath/characteristic_classes_sequence 

comment:2 Changed 2 years ago by
Commit:  → 6972030d8a15bf6c9371658826e35de746e4ab1b 

Status:  new → needs_review 
comment:3 Changed 2 years ago by
Commit:  6972030d8a15bf6c9371658826e35de746e4ab1b → 5f25df57fe1aa5576d295c7bfffbb5315472354d 

Branch pushed to git repo; I updated commit sha1. New commits:
5f25df5  Trac #30211: Merge branch 'develop' into characteristic_classes_sequence

comment:4 Changed 2 years ago by
Commit:  5f25df57fe1aa5576d295c7bfffbb5315472354d → c7414bdcd94df01d5ca6eacad9344f6243457b64 

Branch pushed to git repo; I updated commit sha1. New commits:
c7414bd  Trac #30211: docstring syntax

comment:5 Changed 2 years ago by
This ticket is ready for review. Patchbot should turn green after this commit.
comment:6 followup: 7 Changed 2 years ago by
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.
comment:7 followup: 9 Changed 2 years ago by
Replying to tscrim:
Do you have an example that gives something that is not a symmetric function over
Sure: xy
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.
comment:8 Changed 2 years ago by
Status:  needs_review → needs_work 

Apparently, there is something wrong with the code since some doctests fail. I'll check on this.
comment:9 followup: 13 Changed 2 years ago by
Replying to ghmjungmath:
Replying to tscrim:
Do you have an example that gives something that is not a symmetric function over
Sure:
xy
is no symmetric function over
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.
comment:10 Changed 2 years ago by
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
.
comment:11 Changed 2 years ago by
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.
comment:12 Changed 2 years ago by
Milestone:  sage9.2 → sage9.3 

comment:13 followup: 14 Changed 2 years ago by
Replying to tscrim:
Replying to ghmjungmath:
Replying to tscrim:
Do you have an example that gives something that is not a symmetric function over
Sure:
xy
is no symmetric function overI 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
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.
comment:14 Changed 2 years ago by
Replying to ghmjungmath:
Replying to tscrim:
Replying to ghmjungmath:
Replying to tscrim:
Do you have an example that gives something that is not a symmetric function over
Sure:
xy
is no symmetric function overI 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
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
.
comment:15 Changed 2 years ago by
Commit:  c7414bdcd94df01d5ca6eacad9344f6243457b64 → 21fee92369a6b47b5e07ba272e72bc195dd6c1f1 

Branch pushed to git repo; I updated commit sha1. New commits:
21fee92  Trac #30211: "ring=QQ"

comment:16 Changed 2 years ago by
Status:  needs_work → needs_review 

comment:17 Changed 2 years ago by
Commit:  21fee92369a6b47b5e07ba272e72bc195dd6c1f1 → 49d617b34d94aadeef080c34252826783a2fd58a 

Branch pushed to git repo; I updated commit sha1. New commits:
49d617b  Trac #30211: distinct_real

comment:18 Changed 2 years ago by
Commit:  49d617b34d94aadeef080c34252826783a2fd58a → 4765f29e000ba667e8099ff030d87ffe4bc66373 

comment:19 Changed 2 years ago by
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.
comment:20 Changed 2 years ago by
You will probably also want to do something similar for the additive case.
comment:21 Changed 2 years ago by
Commit:  4765f29e000ba667e8099ff030d87ffe4bc66373 → 7aa0ec5d36f81048c53beca87bd2adfffbebba6f 

Branch pushed to git repo; I updated commit sha1. New commits:
7aa0ec5  Trac #30211: symmetric polynomial via _from_dict

comment:22 Changed 2 years ago by
Here we go. Wait for patchbot.
@Travis: 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.
comment:23 Changed 21 months ago by
Milestone:  sage9.3 → sage9.4 

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.
comment:24 Changed 19 months ago by
Reviewers:  → Travis Scrimshaw 

Status:  needs_review → positive_review 
This will be good for now. If things get completely rewritten, then this can be modified/deprecated at that time.
comment:26 Changed 18 months ago by
Branch:  u/ghmjungmath/characteristic_classes_sequence → 7aa0ec5d36f81048c53beca87bd2adfffbebba6f 

Resolution:  → fixed 
Status:  positive_review → closed 
New commits:
Trac #30211: sequence function added