# homology of simplicial complexes

I am building a simplicial complex as follows:

```
sage: S = range(1,7)
sage: Z = SimplicialComplex([S])
sage: T = Z.n_skeleton(1)
sage: T.faces()
{0: set([(4,), (5,), (3,), (1,), (6,), (2,)]), 1: set([(2, 4), (3, 6),
(5, 6), (2, 6), (1, 4), (3, 5), (3, 4), (2, 3), (4, 6), (2, 5), (1, 2),
(1, 3), (4, 5), (1, 5), (1, 6)]), -1: set([()])}
sage: T.homology()
{0: 0, 1: Z^10}
```

So far everything seems good. Then I try adding a face to T.

```
sage: T.add_face([1,2,6])
sage: T.faces()
{0: set([(4,), (5,), (3,), (1,), (6,), (2,)]), 1: set([(2, 4), (3, 6),
(5, 6), (1, 5), (1, 4), (3, 5), (3, 4), (2, 3), (4, 6), (2, 5), (1, 2),
(1, 3), (1, 6), (2, 6), (4, 5)]), 2: set([(1, 2, 6)]), -1: set([()])}
```

So the face seems to have been added.

But then:

```
sage: T.homology()
```

results in:

```
{0: 0, 1: Z^10, 2: 0}
```

But this doesn't make any sense --- it should say `0:0, 1:Z^9, 2:0`

, since adding a 2-face kills a class in $H_1(T)$.

Can anyone tell what I'm doing wrong?

[2015-01-05: Just fixed code formatting of this 2013 question. By the way, the patch from ticket #14354 mentioned in John Palmieri's answer was merged in Sage 5.9.beta2, and running the example in the question now gives the correct answer.] [Matt: you could mark John's answer as accepted by clicking the tick mark.]