Opened 15 months ago

Closed 5 months ago

#30211 closed enhancement (fixed)

Characteristic Classes: Sequences

Reported by: gh-mjungmath Owned by:
Priority: major Milestone: sage-9.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:

Status badges

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 15 months ago by gh-mjungmath

  • Branch set to u/gh-mjungmath/characteristic_classes_sequence

comment:2 Changed 15 months ago by gh-mjungmath

  • Commit set to 6972030d8a15bf6c9371658826e35de746e4ab1b
  • Status changed from new to needs_review

New commits:

6972030Trac #30211: sequence function added

comment:3 Changed 15 months ago by git

  • Commit changed from 6972030d8a15bf6c9371658826e35de746e4ab1b to 5f25df57fe1aa5576d295c7bfffbb5315472354d

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

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

comment:4 Changed 15 months ago by git

  • Commit changed from 5f25df57fe1aa5576d295c7bfffbb5315472354d to c7414bdcd94df01d5ca6eacad9344f6243457b64

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

c7414bdTrac #30211: docstring syntax

comment:5 Changed 15 months ago by gh-mjungmath

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

comment:6 follow-up: Changed 15 months ago by tscrim

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 ; follow-up: Changed 15 months ago by gh-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.

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 15 months ago by gh-mjungmath

  • 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 ; follow-up: Changed 15 months ago by tscrim

Replying to gh-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.

comment:10 Changed 15 months ago by gh-mjungmath

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 15 months ago by gh-mjungmath

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.

Last edited 15 months ago by gh-mjungmath (previous) (diff)

comment:12 Changed 14 months ago by mkoeppe

  • Milestone changed from sage-9.2 to sage-9.3

comment:13 in reply to: ↑ 9 ; follow-up: Changed 13 months ago by gh-mjungmath

Replying to tscrim:

Replying to gh-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.

comment:14 in reply to: ↑ 13 Changed 13 months ago by tscrim

Replying to gh-mjungmath:

Replying to tscrim:

Replying to gh-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.

comment:15 Changed 12 months ago by git

  • Commit changed from c7414bdcd94df01d5ca6eacad9344f6243457b64 to 21fee92369a6b47b5e07ba272e72bc195dd6c1f1

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

21fee92Trac #30211: "ring=QQ"

comment:16 Changed 12 months ago by gh-mjungmath

  • Status changed from needs_work to needs_review
Last edited 12 months ago by gh-mjungmath (previous) (diff)

comment:17 Changed 12 months ago by git

  • Commit changed from 21fee92369a6b47b5e07ba272e72bc195dd6c1f1 to 49d617b34d94aadeef080c34252826783a2fd58a

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

49d617bTrac #30211: distinct_real

comment:18 Changed 12 months ago by git

  • Commit changed from 49d617b34d94aadeef080c34252826783a2fd58a to 4765f29e000ba667e8099ff030d87ffe4bc66373

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

comment:19 Changed 12 months ago by tscrim

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.

Last edited 12 months ago by tscrim (previous) (diff)

comment:20 Changed 12 months ago by tscrim

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

comment:21 Changed 12 months ago by git

  • Commit changed from 4765f29e000ba667e8099ff030d87ffe4bc66373 to 7aa0ec5d36f81048c53beca87bd2adfffbebba6f

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

7aa0ec5Trac #30211: symmetric polynomial via _from_dict

comment:22 Changed 12 months ago by gh-mjungmath

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.

Last edited 12 months ago by gh-mjungmath (previous) (diff)

comment:23 Changed 7 months ago by mkoeppe

  • Milestone changed from sage-9.3 to sage-9.4

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

comment:24 Changed 5 months ago by tscrim

  • 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.

Last edited 5 months ago by tscrim (previous) (diff)

comment:25 Changed 5 months ago by gh-mjungmath

Thank you for the review!

comment:26 Changed 5 months ago by vbraun

  • Branch changed from u/gh-mjungmath/characteristic_classes_sequence to 7aa0ec5d36f81048c53beca87bd2adfffbebba6f
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.