Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Merge in sage-5.13.rc0
Browse files Browse the repository at this point in the history
  • Loading branch information
ohanar committed Dec 12, 2013
2 parents 1e9e230 + cd237e7 commit 4b0912c
Show file tree
Hide file tree
Showing 79 changed files with 5,651 additions and 1,365 deletions.
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Sage version 5.13.beta5, released 2013-12-05
Sage version 5.13.rc0, released 2013-12-11
4 changes: 4 additions & 0 deletions build/pkgs/gcc/SPKG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ http://gcc.gnu.org/

== Changelog ==

=== gcc-4.7.3.p1 (R. Andrew Ohana, 26 November 2013) ===
* Trac #15433: work around for incompatiblity between g++ and
an OS X 10.9 header

=== gcc-4.7.3.p0 (Jeroen Demeyer, 11 April 2013) ===
* Trac #14441: upgrade to version 4.7.3.

Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/gcc/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.7.3.p0
4.7.3.p1
6 changes: 6 additions & 0 deletions build/pkgs/gcc/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ EOF
export LD=ld
fi

# On OS X 10.9, g++ and the cdefs.h header are currently incompatible
# Temporary workaround posted at http://trac.macports.org/ticket/41033
if { uname -sr | grep 'Darwin 13\.' ;} &>/dev/null; then
mkdir -p "$SAGE_LOCAL/include/sys"
sed 's+defined(__GNUC_STDC_INLINE__)+& \&\& !defined(__cplusplus)+' /usr/include/sys/cdefs.h > "$SAGE_LOCAL/include/sys/cdefs.h"
fi

if [ "$SAGE_CHECK" = yes ]; then
# Enable internal checks in GCC. These checks do not affect the
Expand Down
3 changes: 3 additions & 0 deletions build/pkgs/scipy/SPKG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ BSD terms. See http://www.scipy.org/License_Compatibility

== Changelog ==

=== scipy-0.12.0.p1 (R. Andrew Ohana, 26 November 2013) ===
* #15433: define __ACCELERATE__ on OSX

=== scipy-0.12.0.p0 (Jean-Pierre Flori, 20 May 2013) ===
* #14617: update to version 0.12.0.
* Removed default_dir.patch which is now upstream.
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/scipy/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.12.0.p0
0.12.0.p1
1 change: 1 addition & 0 deletions build/pkgs/scipy/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ if [ "$UNAME" = "Darwin" ]; then
unset BLAS
unset LAPACK
export LDFLAGS="-bundle -undefined dynamic_lookup $LDFLAGS"
export CPPFLAGS="-D__ACCELERATE__ $CPPFLAGS"
else
export ATLAS="$SAGE_LOCAL"
export BLAS="$SAGE_LOCAL"
Expand Down
5 changes: 5 additions & 0 deletions build/pkgs/sqlite/SPKG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ None

== Changelog ==

=== sqlite-3.7.17.p1 (R. Andrew Ohana, 11 November 2013) ===
* #15433: don't build sqlite on OS X 10.9, as it can cause issues
for the system libraries that link against Apple's custom
version of sqlite

=== sqlite-3.7.17 (Jeroen Demeyer, 24 May 2013) ===
* #14629: upgrade to version 3.7.17
* Use standard template for SPKG.txt and spkg-install, use $MAKE instead of make
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/sqlite/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.7.17
3.7.17.p1
13 changes: 13 additions & 0 deletions build/pkgs/sqlite/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ if [ -z "$SAGE_LOCAL" ]; then
exit 1
fi

# OS X already has sqlite3 which includes some non-standard
# modules to support their frameworks -- our own copy would
# create issues since we set *_LIBRARY_PATH
if { uname -sr | grep 'Darwin 1[3-9][.]' ;} &>/dev/null; then
ln -s /usr/bin/sqlite3 "$SAGE_LOCAL/bin"

# only exit if we actually linked it, otherwise we might
# break an upgrade
if [ -h "$SAGE_LOCAL/bin/sqlite3" ]; then
exit 0
fi
fi

cd src

# Apply patches. See SPKG.txt for information about what each patch
Expand Down
2 changes: 1 addition & 1 deletion src/bin/sage-banner
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
┌────────────────────────────────────────────────────────────────────┐
│ Sage Version 5.13.beta5, Release Date: 2013-12-05
│ Sage Version 5.13.rc0, Release Date: 2013-12-11
│ Type "notebook()" for the browser-based notebook interface. │
│ Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
Expand Down
1 change: 1 addition & 0 deletions src/doc/en/reference/combinat/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ Combinatorics
tableaux
symmetric_functions
ncsf_qsym
ncsym
root_systems

sage/combinat/kazhdan_lusztig
Expand Down
10 changes: 10 additions & 0 deletions src/doc/en/reference/combinat/ncsym.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Symmetric Functions in Non-Commuting Variables
==============================================

.. toctree::
:maxdepth: 2

../sage/combinat/ncsym/bases
../sage/combinat/ncsym/dual
../sage/combinat/ncsym/ncsym

2 changes: 1 addition & 1 deletion src/doc/en/website/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ <h1>{{ docstitle|e }}</h1>
<a class="biglink" href="prep/index.html">
PREP Tutorials
</a>
<a title="Download PDF" class="pdf" href="../../pdf/en/prep/prep_tutorial.pdf">
<a title="Download PDF" class="pdf" href="../../pdf/en/prep/prep_tutorials.pdf">
<img class="icon" src="_static/pdf.png"></img>
</a>
<br>
Expand Down
2 changes: 1 addition & 1 deletion src/module_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
elif os.path.exists('/usr/lib/libcblas.dylib') or \
os.path.exists('/usr/lib/libcblas.so'):
BLAS='cblas'
BLAS2='atlas'
BLAS2='cblas'
elif os.path.exists('/usr/lib/libblas.dll.a'):
BLAS='gslcblas'
BLAS2='gslcblas'
Expand Down
1 change: 0 additions & 1 deletion src/sage/coding/binary_code.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ cdef int *hamming_weights():
ham_wts[i] = ham_wts[i & 255] + ham_wts[(i>>8) & 255]
return ham_wts

include 'sage/misc/bitset_pxd.pxi'
include 'sage/misc/bitset.pxi'
def weight_dist(M):
"""
Expand Down
1 change: 1 addition & 0 deletions src/sage/combinat/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
from root_system.all import *
from sf.all import *
from ncsf_qsym.all import *
from ncsym.all import *
from matrices.all import *
# Posets
from posets.all import *
Expand Down
1 change: 0 additions & 1 deletion src/sage/combinat/debruijn_sequence.pxd

This file was deleted.

146 changes: 145 additions & 1 deletion src/sage/combinat/ncsf_qsym/ncsf.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,71 @@ def to_symmetric_function(self):
codomain = on_basis(self.one_basis()).parent()
return self.module_morphism(on_basis=on_basis, codomain=codomain)

def to_ncsym_on_basis(self, I):
r"""
The image of the basis element indexed by ``I`` under the
map `\kappa` to the symmetric functions in non-commuting
variables such that for the natural maps `\chi : NCSym \to Sym`
and `\rho : NSym \to Sym`, we have `\chi \circ \kappa = \rho`.
This default implementation does a change of basis and
computes the image in the complete basis.
INPUT:
- ``I`` -- a composition
EXAMPLES::
sage: S = NonCommutativeSymmetricFunctions(QQ).S()
sage: S.to_ncsym(S[2,1])
1/2*m{{1}, {2}, {3}} + 1/2*m{{1}, {2, 3}} + m{{1, 2}, {3}}
+ m{{1, 2, 3}} + 1/2*m{{1, 3}, {2}}
sage: R = NonCommutativeSymmetricFunctions(QQ).R()
sage: R.to_ncsym_on_basis(Composition([2,1]))
1/3*m{{1}, {2}, {3}} + 1/6*m{{1}, {2, 3}} + 2/3*m{{1, 2}, {3}} + 1/6*m{{1, 3}, {2}}
"""
S = self.realization_of().complete()
return S.to_ncsym(S(self[I]))

@lazy_attribute
def to_ncsym(self):
r"""
Morphism `\kappa` of ``self`` to the algebra of symmetric
functions in non-commuting variables that for the natural
maps `\chi : NCSym \to Sym` and `\rho : NSym \to Sym`, we
have `\chi \circ \kappa = \rho`.
This is constructed by extending the method
:meth:`to_ncsym_on_basis` linearly.
EXAMPLES::
sage: N = NonCommutativeSymmetricFunctions(QQ)
sage: R = N.ribbon()
sage: x = R.an_element(); x
2*R[] + 2*R[1] + 3*R[1, 1]
sage: R.to_ncsym(x)
2*m{} + 2*m{{1}} + 3/2*m{{1}, {2}}
sage: S = N.complete()
sage: S.to_ncsym(S[1,2])
1/2*m{{1}, {2}, {3}} + m{{1}, {2, 3}} + 1/2*m{{1, 2}, {3}}
+ m{{1, 2, 3}} + 1/2*m{{1, 3}, {2}}
sage: Phi = N.Phi()
sage: Phi.to_ncsym(Phi[1,3])
-1/4*m{{1}, {2}, {3, 4}} - 1/4*m{{1}, {2, 3}, {4}} + m{{1}, {2, 3, 4}}
+ 1/2*m{{1}, {2, 4}, {3}} - 1/4*m{{1, 2}, {3, 4}} - 1/4*m{{1, 2, 3}, {4}}
+ m{{1, 2, 3, 4}} + 1/2*m{{1, 2, 4}, {3}} + 1/2*m{{1, 3}, {2, 4}}
- 1/4*m{{1, 3, 4}, {2}} - 1/4*m{{1, 4}, {2, 3}}
sage: R.to_ncsym
Generic morphism:
From: Non-Commutative Symmetric Functions over the Rational Field in the Ribbon basis
To: Symmetric functions in non-commuting variables over the Rational Field in the monomial basis
"""
from sage.combinat.ncsym.ncsym import SymmetricFunctionsNonCommutingVariables
codomain = SymmetricFunctionsNonCommutingVariables(self.base_ring()).monomial()
return self.module_morphism(self.to_ncsym_on_basis, codomain=codomain)

class ElementMethods:

def verschiebung(self, n):
Expand Down Expand Up @@ -729,6 +794,26 @@ def to_symmetric_function(self):

chi = to_symmetric_function

def to_ncsym(self):
r"""
Return the image of ``self`` in the symmetric functions in
non-commuting variables under the map that fixes the usual
symmetric functions.
EXAMPLES::
sage: N = NonCommutativeSymmetricFunctions(QQ)
sage: R = N.ribbon()
sage: x = R.an_element(); x
2*R[] + 2*R[1] + 3*R[1, 1]
sage: x.to_ncsym()
2*m{} + 2*m{{1}} + 3/2*m{{1}, {2}}
sage: y = N.Phi()[1,2]
sage: y.to_ncsym()
m{{1}, {2, 3}} + m{{1, 2, 3}}
"""
return self.parent().to_ncsym(self)

class MultiplicativeBases(Category_realization_of_parent):
"""
Category of multiplicative bases of non-commutative symmetric functions.
Expand Down Expand Up @@ -1353,7 +1438,6 @@ def __init__(self, NCSF):
sage: S = NonCommutativeSymmetricFunctions(QQ).complete()
sage: TestSuite(S).run()
"""
CombinatorialFreeModule.__init__(self, NCSF.base_ring(), Compositions(),
prefix='S', bracket=False,
Expand Down Expand Up @@ -1497,6 +1581,66 @@ def _to_symmetric_group_algebra_on_basis(self, I):
x += sga(p)
return x

def to_ncsym_on_basis(self, I):
r"""
Return the image of the complete non-commutative symmetric function
in the symmetric functions in non-commuting variables under the
embedding `\mathcal{I}` which fixes the symmetric functions.
This map is defined by
.. MATH::
S_n \mapsto \sum_{A \vdash [n]}
\frac{\lambda(A)! \lambda(A)^!}{n!} \mathbf{m}_A
and extended as an algebra homomorphism.
EXAMPLES::
sage: S = NonCommutativeSymmetricFunctions(QQ).S()
sage: S.to_ncsym_on_basis(Composition([2]))
1/2*m{{1}, {2}} + m{{1, 2}}
sage: S.to_ncsym_on_basis(Composition([1,2,1]))
1/2*m{{1}, {2}, {3}, {4}} + 1/2*m{{1}, {2}, {3, 4}} + m{{1}, {2, 3}, {4}}
+ m{{1}, {2, 3, 4}} + 1/2*m{{1}, {2, 4}, {3}} + 1/2*m{{1, 2}, {3}, {4}}
+ 1/2*m{{1, 2}, {3, 4}} + m{{1, 2, 3}, {4}} + m{{1, 2, 3, 4}}
+ 1/2*m{{1, 2, 4}, {3}} + 1/2*m{{1, 3}, {2}, {4}} + 1/2*m{{1, 3}, {2, 4}}
+ 1/2*m{{1, 3, 4}, {2}} + 1/2*m{{1, 4}, {2}, {3}} + m{{1, 4}, {2, 3}}
sage: S.to_ncsym_on_basis(Composition([]))
m{}
TESTS:
Check that the image under `\mathcal{I}` fixes the
symmetric functions::
sage: S = NonCommutativeSymmetricFunctions(QQ).S()
sage: m = SymmetricFunctionsNonCommutingVariables(QQ).monomial()
sage: mon = SymmetricFunctions(QQ).monomial()
sage: all(S[c].to_ncsym().to_symmetric_function() == S[c].to_symmetric_function()
....: for i in range(5) for c in Compositions(i))
True
We also check that the `NCSym` monomials agree on the homogeneous
and complete basis::
sage: h = SymmetricFunctions(QQ).h()
sage: all(m.from_symmetric_function(h[i]) == S[i].to_ncsym() for i in range(6))
True
"""
from sage.combinat.ncsym.ncsym import SymmetricFunctionsNonCommutingVariables
m = SymmetricFunctionsNonCommutingVariables(self.base_ring()).m()
if I == []:
return m.one()

from sage.combinat.set_partition import SetPartitions
R = self.base_ring()
P = SetPartitions()
c_num = lambda A: prod([factorial(i) for i in A.shape()], R.one())
return prod(m.sum_of_terms([(P(A), R(c_num(A) / factorial(n))) for A in SetPartitions(n)], distinct=True)
for n in I)

S = complete = Complete

class Elementary(CombinatorialFreeModule, BindableClass):
Expand Down
Empty file.
3 changes: 3 additions & 0 deletions src/sage/combinat/ncsym/all.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from ncsym import SymmetricFunctionsNonCommutingVariables
from dual import SymmetricFunctionsNonCommutingVariablesDual

0 comments on commit 4b0912c

Please sign in to comment.