next | previous | forward | backward | up | top | index | toc | home

BettiTally -- the class of all Betti tallies

Description

A Betti tally is a special type of Tally that is printed as a display of graded Betti numbers. The class was created so the function betti could return something that both prints nicely and from which information can be extracted. The keys are triples (i,h,d), where i is the homological degree, d is a list of integers giving a multidegree, and h is the result of applying a weight covector to d. Only i and h are used in printing.
i1 : t = new BettiTally from { (0,{0},0) => 1, (1,{1},1) => 2, (2,{3},3) => 3, (2,{4},4) => 4 }

            0 1 2
o1 = total: 1 2 7
         0: 1 2 .
         1: . . 3
         2: . . 4

o1 : BettiTally
i2 : peek oo

o2 = BettiTally{(0, {0}, 0) => 1}
                (1, {1}, 1) => 2
                (2, {3}, 3) => 3
                (2, {4}, 4) => 4
For convenience, the operations of direct sum (++), tensor product (**), dual, and degree shifting (numbers in brackets), have been implemented for Betti tallies. These operations mimic the corresponding operations on chain complexes.
i3 : t ++ t[-5]

            0 1 2 3 4 5 6 7
o3 = total: 1 2 7 . . 1 2 7
        -5: . . . . . 1 2 .
        -4: . . . . . . . 3
        -3: . . . . . . . 4
        -2: . . . . . . . .
        -1: . . . . . . . .
         0: 1 2 . . . . . .
         1: . . 3 . . . . .
         2: . . 4 . . . . .

o3 : BettiTally
i4 : t ** t

            0 1  2  3  4
o4 = total: 1 4 18 28 49
         0: 1 4  4  .  .
         1: . .  6 12  .
         2: . .  8 16  9
         3: . .  .  . 24
         4: . .  .  . 16

o4 : BettiTally
i5 : dual t

            -2 -1 0
o5 = total:  7  2 1
        -2:  4  . .
        -1:  3  . .
         0:  .  2 1

o5 : BettiTally

Functions and methods returning a Betty tally :

Methods that use a Betty tally :

For the programmer

The object BettiTally is a type, with ancestor classes Tally < HashTable < Thing.