Opened 7 years ago

Closed 7 years ago

# Multiplication by identity in tableau.py and tableau_tuple.py

Reported by: Owned by: darij tbd minor sage-5.12 combinatorics combinat, tableau, tableau tuple tscrim, sage-combinat sage-5.12.beta5 Darij Grinberg Travis Scrimshaw N/A #14101

### Description

This is similar to #14883 in that it removes a multiplication of a permutation by the identity permutation. This time the multiplication was not useless (it was meant to coerce the permutation into a symmetric group of large enough size), but that is easier done by just concatenating lists (given that the result is only needed as a list). There is a minor speedup (577µs to 496µs on the one of the doctested examples), but the purpose of this patch is really to replace a hack by a more logical manipulation.

Travis, feel free to fold this into your patch if you wish.

### comment:1 Changed 7 years ago by darij

• Status changed from new to needs_review

### comment:2 Changed 7 years ago by darij

• Component changed from PLEASE CHANGE to combinatorics

### comment:3 Changed 7 years ago by darij

• Dependencies changed from 14101 to #14101

### comment:4 Changed 7 years ago by tscrim

• Reviewers set to Travis Scrimshaw

Hey Darij,

I believe taking the copy slice `w[:]` of `w` is unnecessary.

```sage: L = [1, 2, 3]
sage: k = L + [3, 5, 6]
sage: L
[1, 2, 3]
```

Could you remove this and repost?

Thanks,
Travis

### Changed 7 years ago by darij

corrected version

### comment:5 Changed 7 years ago by darij

Good point; fixed. Thanks for checking this.

### comment:6 Changed 7 years ago by tscrim

• Status changed from needs_review to positive_review

Looks good to me. Thanks Darij.

### comment:7 Changed 7 years ago by jdemeyer

• Merged in set to sage-5.12.beta5
• Resolution set to fixed
• Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.