Opened 4 years ago

# deprecate module combinat.partition_algebra

Reported by: Owned by: Martin Rubey major sage-8.3 combinatorics Darij Grinberg, Aaron Lauve, Travis Scrimshaw, Mike Zabrocki Martin Rubey N/A u/mantepse/deprecate_module_combinat_partition_algebra 56c3ac41efa10b87fffb7e6e73bb70a8c7e69ffa #25659, #25462, #25642

### Description

After #25162, it seems that the content of `partition_algebra.py` is no longer needed, but when looking for partition algebras, one may be misled that this is what's implemented (also because of http://doc.sagemath.org/html/en/reference/algebras/sage/combinat/partition_algebra.html)

It is not clear to me whether we can simply remove this, or whether the classes should be deprecated, or somehow recycled.

For example:

```sage: import sage.combinat.diagram_algebras as da
sage: da.PartitionDiagrams(3/2)
Partition diagrams of order 3/2
sage: _.list()
[{{-2, -1, 1, 2}},
{{-2, 1, 2}, {-1}},
{{-2, 2}, {-1, 1}},
{{-2, -1, 2}, {1}},
{{-2, 2}, {-1}, {1}}]
sage: SetPartitionsAk(3/2)
Set partitions of {1, ..., 2, -1, ..., -2} with 2 and -2 in the same block
sage: SetPartitionsAk(3/2).list()
[{{-2, -1, 1, 2}},
{{-2, 1, 2}, {-1}},
{{-2, 2}, {-1, 1}},
{{-2, -1, 2}, {1}},
{{-2, 2}, {-1}, {1}}]
```

### comment:1 Changed 4 years ago by Mike Zabrocki

I think that this is probably a good idea. To deprecate we will need to ensure that there are equivalent function calls for all of these diagram classes and methods (I believe that most of them, but not all, are in `diagram_algebra.py`).

### comment:2 Changed 4 years ago by Martin Rubey

Branch: → u/mantepse/deprecate_module_combinat_partition_algebra

### comment:3 Changed 4 years ago by Martin Rubey

Commit: → df9f5dc870df00b8f1b5330486ce8959d81543dc

Do we need to keep/deprecate the classes

```class SetPartitionsXkElement(SetPartition):
```

and

```class SetPartitionsAk_k(SetPartitions_set):
class SetPartitionsAkhalf_k(SetPartitions_set):
```

etc., and

```class PartitionAlgebraElement_generic(CombinatorialAlgebraElement):
class PartitionAlgebraElement_ak(PartitionAlgebraElement_generic):
```

etc.?

They do not appear in any doctests, and look rather "private".

I want to add the doctests all to `diagram_algebras.py` though, because they are quite good!

Last 10 new commits:

 ​ca293e3 `avoid itertools and modify docstring` ​09bd542 `pyflakes fixes` ​823769c `Revert "pyflakes fixes"` ​0d901e6 `Merge branch 'u/mantepse/make_setpartition_much_faster' of git://trac.sagemath.org/sage into t/25637/deprecate_module_combinat_partition_algebra` ​9630c5a `fix cardinality for PartitionDiagrams, BrauerDiagrams, TemperleyLiebDiagrams and PlanarDiagrams, improve doctests` ​1afc047 `Merge branch 'u/mantepse/wrong_cardinality_in_partitiondiagrams' of git://trac.sagemath.org/sage into t/25637/deprecate_module_combinat_partition_algebra` ​1059d62 `Merge branch 'u/mantepse/make_setpartition_much_faster' of git://trac.sagemath.org/sage into t/25659/make_braueralgebra_faster` ​626ce17 `use fast iterator from perfect matchings for Brauer diagrams` ​d6f6e9c `Merge branch 'u/mantepse/make_braueralgebra_faster' of git://trac.sagemath.org/sage into t/25637/deprecate_module_combinat_partition_algebra` ​df9f5dc `add missing diagram classes from partition_algebra to diagram_algebras, start deprecation`

### comment:4 Changed 4 years ago by Martin Rubey

Dependencies: → #25659, #25462, #25642

### comment:5 Changed 4 years ago by git

Commit: df9f5dc870df00b8f1b5330486ce8959d81543dc → 04828397485166cbd10d8335833140a4f146e0b1

Branch pushed to git repo; I updated commit sha1. New commits:

 ​0482839 `Merge branch 'u/mantepse/deprecate_module_combinat_partition_algebra' of git://trac.sagemath.org/sage into HEAD`

### comment:6 Changed 4 years ago by git

Commit: 04828397485166cbd10d8335833140a4f146e0b1 → 56c3ac41efa10b87fffb7e6e73bb70a8c7e69ffa

Branch pushed to git repo; I updated commit sha1. New commits:

 ​56c3ac4 `remove unused stuff`

### comment:7 Changed 4 years ago by Martin Rubey

Authors: → Martin Rubey new → needs_review

### comment:8 Changed 4 years ago by Martin Rubey

Once #25662 is in, I will move those doctests which are useful into `diagram_algebras.py`

### comment:9 Changed 4 years ago by Travis Scrimshaw

All of those functions you are also removing you should also deprecate because even though they are not imported, they are part of the public documentation (so people may import them in the wild).

### comment:10 Changed 4 years ago by Martin Rubey

OK, will continue to work on this once #25662 is reviewed.

### comment:11 Changed 23 months ago by Frédéric Chapoton

Status: needs_review → needs_work

red branch => needs work

Note: See TracTickets for help on using tickets.