### Navigation

- index
- modules |
- next |
- previous |
- Combinatorics »
- Crystals »

# Affine factorization crystal of type \(A\)

class `sage.combinat.crystals.affine_factorization.``AffineFactorizationCrystal`(w, n, x=None)

  Bases: `sage.structure.unique_representation.UniqueRepresentation`, `sage.structure.parent.Parent`

  This is an implementation of the crystal on affine factorizations with a cut-point, as introduced by Morse and Schilling, “Crystal operators and flag Gromov-Witten invariants”.

  INPUT:

  - `w` – an element in an (affine) Weyl group or a skew shape of \(k\)-bounded partitions (if \(k\) was specified)
  - `n` – the number of factors in the factorization
  - `x` – (default: `None`) the cut point; if not specified it is determined as the minimal missing residue in `w`
  - `k` – (default: `None`) positive integer, specifies that `w` is \(k\)-bounded or a \(k+1\)-core when specified

  EXAMPLES:

      sage: W = WeylGroup(['A',3,1], prefix='s')
      sage: w = W.from_reduced_word([2,3,2,1])
      sage: B = crystals.AffineFactorization(w,3); B
      Crystal on affine factorizations of type A2 associated to s2*s3*s2*s1
      sage: B.list()
      [(1, s2, s3*s2*s1),
       (1, s3*s2, s3*s1),
       (1, s3*s2*s1, s3),
       (s3, s2, s3*s1),
       (s3, s2*s1, s3),
       (s3*s2, s1, s3),
       (s3*s2*s1, 1, s3),
       (s3*s2*s1, s3, 1),
       (s3*s2, 1, s3*s1),
       (s3*s2, s3, s1),
       (s3*s2, s3*s1, 1),
       (s2, 1, s3*s2*s1),
       (s2, s3, s2*s1),
       (s2, s3*s2, s1),
       (s2, s3*s2*s1, 1)]

  We can also access the crystal by specifying a skew shape in terms of \(k\)-bounded partitions:

      sage: crystals.AffineFactorization([[3,1,1],[1]], 3, k=3)
      Crystal on affine factorizations of type A2 associated to s2*s3*s2*s1

  We can compute the highest weight elements:

      sage: hw = [w for w in B if w.is_highest_weight()]
      sage: hw
      [(1, s2, s3*s2*s1)]
      sage: hw[0].weight()
      (3, 1, 0)

  And show that this crystal is isomorphic to the tableau model of the same weight:

      sage: C = crystals.Tableaux(['A',2],shape=[3,1])
      sage: GC = C.digraph()
      sage: GB = B.digraph()
      sage: GC.is_isomorphic(GB, edge_labels=True)
      True

  The crystal operators themselves move elements between adjacent factors:

      sage: b = hw[0];b
      (1, s2, s3*s2*s1)
      sage: b.f(1)
      (1, s3*s2, s3*s1)

  The cut point \(x\) is not supposed to occur in the reduced words for \(w\):

      sage: B = crystals.AffineFactorization([[3,2],[2]],4,x=0,k=3)
      Traceback (most recent call last):
      ...
      ValueError: x cannot be in reduced word of s0*s3*s2

  class `Element`

    Bases: `sage.structure.element_wrapper.ElementWrapper`

    EXAMPLES:

        sage: from sage.structure.element_wrapper import DummyParent
        sage: a = ElementWrapper(DummyParent("A parent"), 1)

    TESTS:

        sage: TestSuite(a).run(skip = "_test_category")

        sage: a = ElementWrapper(1, DummyParent("A parent"))
        doctest:...: DeprecationWarning: the first argument must be a parent
        See http://trac.sagemath.org/14519 for details.

    Note

    `ElementWrapper` is not intended to be used directly, hence the failing category test.

    `bracketing`(i)

      Removes all bracketed letters between \(i\)-th and \(i+1\)-th entry.

      EXAMPLES:

          sage: B = crystals.AffineFactorization([[3,1],[1]], 3, k=3, x=4)
          sage: W = B.w.parent()
          sage: t = B((W.one(),W.from_reduced_word([3]),W.from_reduced_word([2,1]))); t
          (1, s3, s2*s1)
          sage: t.bracketing(1)
          [[3], [2, 1]]

    `e`(i)

      Return the action of \(e_i\) on `self`.

      EXAMPLES:

          sage: B = crystals.AffineFactorization([[3,1],[1]], 4, k=3)
          sage: W = B.w.parent()
          sage: t = B((W.one(),W.one(),W.from_reduced_word([3]),W.from_reduced_word([2,1]))); t
          (1, 1, s3, s2*s1)
          sage: t.e(1)
          (1, 1, 1, s3*s2*s1)

    `f`(i)

      Return the action of \(f_i\) on `self`.

      EXAMPLES:

          sage: B = crystals.AffineFactorization([[3,1],[1]], 4, k=3)
          sage: W = B.w.parent()
          sage: t = B((W.one(),W.one(),W.from_reduced_word([3]),W.from_reduced_word([2,1]))); t
          (1, 1, s3, s2*s1)
          sage: t.f(2)
          (1, s3, 1, s2*s1)
          sage: t.f(1)
          (1, 1, s3*s2, s1)

`sage.combinat.crystals.affine_factorization.``affine_factorizations`(w, l, weight=None)

  Return all factorizations of `w` into `l` factors or of weight `weight`.

  INPUT:

  - `w` – an (affine) permutation or element of the (affine) Weyl group
  - `l` – nonegative integer
  - `weight` – (default: None) tuple of nonnegative integers specifying the length of the factors

  EXAMPLES:

      sage: W = WeylGroup(['A',3,1], prefix='s')
      sage: w = W.from_reduced_word([3,2,3,1,0,1])
      sage: from sage.combinat.crystals.affine_factorization import affine_factorizations
      sage: affine_factorizations(w,4)
      [[s2, s3, s0, s2*s1*s0],
      [s2, s3, s2*s0, s1*s0],
      [s2, s3, s2*s1*s0, s1],
      [s2, s3*s2, s0, s1*s0],
      [s2, s3*s2, s1*s0, s1],
      [s2, s3*s2*s1, s0, s1],
      [s3*s2, s3, s0, s1*s0],
      [s3*s2, s3, s1*s0, s1],
      [s3*s2, s3*s1, s0, s1],
      [s3*s2*s1, s3, s0, s1]]

      sage: W = WeylGroup(['A',2], prefix='s')
      sage: w0 = W.long_element()
      sage: affine_factorizations(w0,3)
      [[1, s1, s2*s1],
      [1, s2*s1, s2],
      [s1, 1, s2*s1],
      [s1, s2, s1],
      [s1, s2*s1, 1],
      [s2, s1, s2],
      [s2*s1, 1, s2],
      [s2*s1, s2, 1]]
      sage: affine_factorizations(w0,3,(0,1,2))
      [[1, s1, s2*s1]]
      sage: affine_factorizations(w0,3,(1,1,1))
      [[s1, s2, s1], [s2, s1, s2]]
      sage: W = WeylGroup(['A',3], prefix='s')
      sage: w0 = W.long_element()
      sage: affine_factorizations(w0,6,(1,1,1,1,1,1))
      [[s1, s2, s1, s3, s2, s1],
      [s1, s2, s3, s1, s2, s1],
      [s1, s2, s3, s2, s1, s2],
      [s1, s3, s2, s1, s3, s2],
      [s1, s3, s2, s3, s1, s2],
      [s2, s1, s2, s3, s2, s1],
      [s2, s1, s3, s2, s1, s3],
      [s2, s1, s3, s2, s3, s1],
      [s2, s3, s1, s2, s1, s3],
      [s2, s3, s1, s2, s3, s1],
      [s2, s3, s2, s1, s2, s3],
      [s3, s1, s2, s1, s3, s2],
      [s3, s1, s2, s3, s1, s2],
      [s3, s2, s1, s2, s3, s2],
      [s3, s2, s1, s3, s2, s3],
      [s3, s2, s3, s1, s2, s3]]
      sage: affine_factorizations(w0,6,(0,0,0,1,2,3))
      [[1, 1, 1, s1, s2*s1, s3*s2*s1]]

### Navigation

- index
- modules |
- next |
- previous |
- Combinatorics »
- Crystals »