1 | initial version |

I am not sure about the notation $\lambda'$ so let me assume that it is the conjugate.

First, to build a matrix and to , you have to index the partitions, which is easy with the `enumerate`

function:
sage: n = 6
sage: P = Partitions(n)
sage: m = matrix(ZZ, P.cardinality())
sage: list(enumerate(P))
[(0, [6]),
(1, [5, 1]),
(2, [4, 2]),
(3, [4, 1, 1]),
(4, [3, 3]),
(5, [3, 2, 1]),
(6, [3, 1, 1, 1]),
(7, [2, 2, 2]),
(8, [2, 2, 1, 1]),
(9, [2, 1, 1, 1, 1]),
(10, [1, 1, 1, 1, 1, 1])]

In the other way, given a partition, you need to be able to find its index, which is doable with this dictionary:

```
sage: part_to_int = {p:i for i,p in enumerate(P)}
```

Now, you can construct your matrix:

```
sage: for i,p in enumerate(P):
....: j = part_to_int[p.conjugate()]
....: m[i,j] = 1
```

You have:

```
sage: m
[0 0 0 0 0 0 0 0 0 0 1]
[0 0 0 0 0 0 0 0 0 1 0]
[0 0 0 0 0 0 0 0 1 0 0]
[0 0 0 0 0 0 1 0 0 0 0]
[0 0 0 0 0 0 0 1 0 0 0]
[0 0 0 0 0 1 0 0 0 0 0]
[0 0 0 1 0 0 0 0 0 0 0]
[0 0 0 0 1 0 0 0 0 0 0]
[0 0 1 0 0 0 0 0 0 0 0]
[0 1 0 0 0 0 0 0 0 0 0]
[1 0 0 0 0 0 0 0 0 0 0]
sage: m^2
[1 0 0 0 0 0 0 0 0 0 0]
[0 1 0 0 0 0 0 0 0 0 0]
[0 0 1 0 0 0 0 0 0 0 0]
[0 0 0 1 0 0 0 0 0 0 0]
[0 0 0 0 1 0 0 0 0 0 0]
[0 0 0 0 0 1 0 0 0 0 0]
[0 0 0 0 0 0 1 0 0 0 0]
[0 0 0 0 0 0 0 1 0 0 0]
[0 0 0 0 0 0 0 0 1 0 0]
[0 0 0 0 0 0 0 0 0 1 0]
[0 0 0 0 0 0 0 0 0 0 1]
```

If $\lambda'$ does not denote the conjugate, you can adapt by replacing `p.conjugate()`

with your favorite function.

2 | No.2 Revision |

I am not sure about the notation $\lambda'$ so let me assume that it is the conjugate.

First, to build a ~~matrix and to , ~~matrix, you have to index the partitions, which is easy with the `enumerate`

~~function:
~~function:

```
sage: n = 6
```~~ ~~sage: P = Partitions(n)
~~ ~~sage: m = matrix(ZZ, P.cardinality())
~~ ~~sage: list(enumerate(P))
~~ ~~[(0, [6]),
~~ ~~(1, [5, 1]),
~~ ~~ (2, [4, 2]),
~~ ~~(3, [4, 1, 1]),
~~ ~~ (4, [3, 3]),
~~ ~~(5, [3, 2, 1]),
~~ ~~(6, [3, 1, 1, 1]),
~~ ~~ (7, [2, 2, 2]),
~~ ~~(8, [2, 2, 1, 1]),
~~ ~~(9, [2, 1, 1, 1, 1]),
~~ ~~(10, [1, 1, 1, 1, 1, ~~1])]~~1])]

In the other way, given a partition, you need to be able to find its index, which is doable with this dictionary:

```
sage: part_to_int = {p:i for i,p in enumerate(P)}
```

Now, you can construct your matrix:

```
sage: for i,p in enumerate(P):
....: j = part_to_int[p.conjugate()]
....: m[i,j] = 1
```

You have:

```
sage: m
[0 0 0 0 0 0 0 0 0 0 1]
[0 0 0 0 0 0 0 0 0 1 0]
[0 0 0 0 0 0 0 0 1 0 0]
[0 0 0 0 0 0 1 0 0 0 0]
[0 0 0 0 0 0 0 1 0 0 0]
[0 0 0 0 0 1 0 0 0 0 0]
[0 0 0 1 0 0 0 0 0 0 0]
[0 0 0 0 1 0 0 0 0 0 0]
[0 0 1 0 0 0 0 0 0 0 0]
[0 1 0 0 0 0 0 0 0 0 0]
[1 0 0 0 0 0 0 0 0 0 0]
sage: m^2
[1 0 0 0 0 0 0 0 0 0 0]
[0 1 0 0 0 0 0 0 0 0 0]
[0 0 1 0 0 0 0 0 0 0 0]
[0 0 0 1 0 0 0 0 0 0 0]
[0 0 0 0 1 0 0 0 0 0 0]
[0 0 0 0 0 1 0 0 0 0 0]
[0 0 0 0 0 0 1 0 0 0 0]
[0 0 0 0 0 0 0 1 0 0 0]
[0 0 0 0 0 0 0 0 1 0 0]
[0 0 0 0 0 0 0 0 0 1 0]
[0 0 0 0 0 0 0 0 0 0 1]
```

If $\lambda'$ does not denote the conjugate, you can adapt by replacing `p.conjugate()`

with your favorite function.

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.