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

Conversion from symmetric polynomials to basis of monomial symmetric functions #8259

Closed
anneschilling opened this issue Feb 14, 2010 · 17 comments

Comments

@anneschilling
Copy link

Currently a function that converts a symmetric polynomial into a symmetric function is missing in sage.

-Added method to convert symmetric polynomial to a symmetric function in monomial basis

-Added shortcut to symmetric functions

-Small fix in crystals

CC: @jbandlow @sagetrac-sage-combinat

Component: combinatorics

Keywords: symmetric functions

Author: Anne Schilling

Reviewer: Jason Bandlow

Merged: sage-4.3.4.alpha0

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

@anneschilling
Copy link
Author

Author: Anne Schilling

@anneschilling
Copy link
Author

Reviewer: Jason Bandlow

@anneschilling

This comment has been minimized.

@anneschilling

This comment has been minimized.

@sagetrac-drkirkby
Copy link
Mannequin

sagetrac-drkirkby mannequin commented Feb 21, 2010

comment:4

Has this been checked on Solaris?

There's general information about building on Solaris at

http://wiki.sagemath.org/solaris

Information specifically for 't2' at

http://wiki.sagemath.org/devel/Building-Sage-on-the-T5240-t2

Both the source (4.3.0.1 is the latest to build on Solaris) and a binary which will run on any SPARC can be found at http://www.sagemath.org/download-source.html

Dave

@anneschilling
Copy link
Author

comment:5

Dave,

Are you sure you posted this comment to the correct ticket?

If so, could you please comment on the relevance of Solaris to
the code?

Thanks,

Anne

Replying to @sagetrac-drkirkby:

Has this been checked on Solaris?

There's general information about building on Solaris at

http://wiki.sagemath.org/solaris

Information specifically for 't2' at

http://wiki.sagemath.org/devel/Building-Sage-on-the-T5240-t2

Both the source (4.3.0.1 is the latest to build on Solaris) and a binary which will run on any SPARC can be found at http://www.sagemath.org/download-source.html

Dave

@jbandlow
Copy link

comment:6

Hi Anne,

The fix to crystals.py doesn't apply to either sage 4.3.2 or sage 4.3.3. Can it be removed from this patch?

Thanks,
Jason

@jbandlow jbandlow added this to the sage-4.3.4 milestone Feb 22, 2010
@jbandlow
Copy link

comment:7

One more thing. I would really like to have an option to verify that the input actually is a symmetric function. In fact I think this should be true by default. So the key function would look something like this:

def from_polynomial(self, f, check=True):        
    assert(self.base_ring() == f.base_ring()
    d = dict([(e,c) for e,c in f.dict().iteritems() if tuple(sorted(e)) == tuple(reversed(e))]) 
    if not check:
        return self.sum(d[la]*self(Partition(la)) for la in d.keys())
    out = self.sum(d[la]*self(Partition(la)) for la in d.keys())
    assert( out.expand(f.parent().ngens(),f.parent().gens()) == f )
    return out

@anneschilling
Copy link
Author

comment:8

Hi Jason,

I attached a revised patch which includes your suggestion to add the option to test
whether the polynomial is symmetric.

For me the patch applied to sage-4.3.3. It depends on trac tickets #7978 and #8154
which have been merged in sage-4.3.3. Hence it might not apply cleanly to sage-4.3.2.

Anne

@anneschilling
Copy link
Author

Attachment: trac_8259-from_poly_to_sym-as.patch.gz

@anneschilling
Copy link
Author

comment:9

Hi Jason,

As we just discussed on the phone, I did revert the indentation of class Element
in /combinat/sf/monomial.py back to the same level as
class SymmetricFunctionAlgebra_monomial

However, I did change the indentation to be multiples of 4 rather than multiples
of 3. I sent an e-mail to sage-combinat-devel to ask about the indentation issues
in sf.

Anne

@jbandlow
Copy link

comment:10

Thanks Anne! This looks good to me. Positive review.

-Jason

@nthiery
Copy link
Contributor

nthiery commented Feb 25, 2010

comment:11

Just two tiny remarks:

  • One can write assert a==b instead of assert(a==b)
  • One could be a bit more specific: `assert a==b, "not a symmetric polynomial"
  • Assertion are not always checked (see http://docs.python.org/reference/simple_stmts.html).
    So I am not sure it is the appropriate idiom here.

That's minor, so I let you see if you want to add a quick review patch, or just leave things as is.

Thanks!

@anneschilling
Copy link
Author

comment:12

Attachment: trac_8259-from_poly_to_sym-review-as.patch.gz

Replying to @nthiery:

Just two tiny remarks:

  • One can write assert a==b instead of assert(a==b)
  • One could be a bit more specific: `assert a==b, "not a symmetric polynomial"
  • Assertion are not always checked (see http://docs.python.org/reference/simple_stmts.html).
    So I am not sure it is the appropriate idiom here.

That's minor, so I let you see if you want to add a quick review patch, or just leave things as is.

Thanks!

Done! Please review the review of the review of the review ... oops! Infinite loop!

@nthiery
Copy link
Contributor

nthiery commented Feb 25, 2010

comment:13

Replying to @anneschilling:

Replying to @nthiery:

Just two tiny remarks:

  • One can write assert a==b instead of assert(a==b)
  • One could be a bit more specific: `assert a==b, "not a symmetric polynomial"
  • Assertion are not always checked (see http://docs.python.org/reference/simple_stmts.html).
    So I am not sure it is the appropriate idiom here.

That's minor, so I let you see if you want to add a quick review patch, or just leave things as is.

Thanks!

Done! Please review the review of the review of the review ... oops! Infinite loop!

Thanks! I haven't rerun the tests, but the review patch looks good to me.

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Mar 2, 2010

Merged: sage-4.3.4.alpha0

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Mar 2, 2010

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

3 participants