Opened 22 months ago
Closed 12 months ago
#30211 closed enhancement (fixed)
Characteristic Classes: Sequences
Reported by:  ghmjungmath  Owned by:  

Priority:  major  Milestone:  sage9.4 
Component:  manifolds  Keywords:  
Cc:  slelievre, egourgoulhon, tscrim  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 22 months ago by
 Branch set to u/ghmjungmath/characteristic_classes_sequence
comment:2 Changed 22 months ago by
 Commit set to 6972030d8a15bf6c9371658826e35de746e4ab1b
 Status changed from new to needs_review
comment:3 Changed 22 months ago by
 Commit changed from 6972030d8a15bf6c9371658826e35de746e4ab1b to 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 22 months ago by
 Commit changed from 5f25df57fe1aa5576d295c7bfffbb5315472354d to c7414bdcd94df01d5ca6eacad9344f6243457b64
Branch pushed to git repo; I updated commit sha1. New commits:
c7414bd  Trac #30211: docstring syntax

comment:5 Changed 22 months ago by
This ticket is ready for review. Patchbot should turn green after this commit.
comment:6 followup: ↓ 7 Changed 22 months 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 in reply to: ↑ 6 ; followup: ↓ 9 Changed 22 months 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 22 months ago by
 Status changed from needs_review to needs_work
Apparently, there is something wrong with the code since some doctests fail. I'll check on this.
comment:9 in reply to: ↑ 7 ; followup: ↓ 13 Changed 22 months 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 22 months 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 22 months 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 21 months ago by
 Milestone changed from sage9.2 to sage9.3
comment:13 in reply to: ↑ 9 ; followup: ↓ 14 Changed 21 months 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 in reply to: ↑ 13 Changed 20 months 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 19 months ago by
 Commit changed from c7414bdcd94df01d5ca6eacad9344f6243457b64 to 21fee92369a6b47b5e07ba272e72bc195dd6c1f1
Branch pushed to git repo; I updated commit sha1. New commits:
21fee92  Trac #30211: "ring=QQ"

comment:16 Changed 19 months ago by
 Status changed from needs_work to needs_review
comment:17 Changed 19 months ago by
 Commit changed from 21fee92369a6b47b5e07ba272e72bc195dd6c1f1 to 49d617b34d94aadeef080c34252826783a2fd58a
Branch pushed to git repo; I updated commit sha1. New commits:
49d617b  Trac #30211: distinct_real

comment:18 Changed 19 months ago by
 Commit changed from 49d617b34d94aadeef080c34252826783a2fd58a to 4765f29e000ba667e8099ff030d87ffe4bc66373
comment:19 Changed 19 months 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 19 months ago by
You will probably also want to do something similar for the additive case.
comment:21 Changed 19 months ago by
 Commit changed from 4765f29e000ba667e8099ff030d87ffe4bc66373 to 7aa0ec5d36f81048c53beca87bd2adfffbebba6f
Branch pushed to git repo; I updated commit sha1. New commits:
7aa0ec5  Trac #30211: symmetric polynomial via _from_dict

comment:22 Changed 19 months 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 15 months ago by
 Milestone changed from sage9.3 to sage9.4
Setting new milestone based on a cursory review of ticket status, priority, and last modification date.
comment:24 Changed 13 months ago by
 Reviewers set to Travis Scrimshaw
 Status changed from needs_review to positive_review
This will be good for now. If things get completely rewritten, then this can be modified/deprecated at that time.
comment:25 Changed 13 months ago by
Thank you for the review!
comment:26 Changed 12 months ago by
 Branch changed from u/ghmjungmath/characteristic_classes_sequence to 7aa0ec5d36f81048c53beca87bd2adfffbebba6f
 Resolution set to fixed
 Status changed from positive_review to closed
New commits:
Trac #30211: sequence function added