Opened 6 years ago

Closed 5 years ago

## #20584 closed defect (fixed)

# Regular partitions: 1-regular partitions are mishandled on occasion

Reported by: | Darij Grinberg | Owned by: | |
---|---|---|---|

Priority: | major | Milestone: | sage-8.2 |

Component: | combinatorics | Keywords: | partition, regular partition, border case |

Cc: | Travis Scrimshaw | Merged in: | |

Authors: | Travis Scrimshaw | Reviewers: | Darij Grinberg |

Report Upstream: | N/A | Work issues: | |

Branch: | 7ba506c (Commits, GitHub, GitLab) | Commit: | 7ba506c69802fb3a259020d7b0cf41767c5cb248 |

Dependencies: | Stopgaps: |

### Description

1-regular partitions exist (although there is just one of them -- the empty one). Not all of the code behaves well at \ell=1, though; e.g., the iterator runs infinite loops once it's past [].

### Change History (7)

### comment:1 Changed 5 years ago by

Authors: | → Travis Scrimshaw |
---|---|

Branch: | → public/combinat/fix_1_regular_partitions-20584 |

Commit: | → 2f0f912920687460bda5ae5c246dea1981d98fed |

Milestone: | sage-7.3 → sage-8.2 |

Status: | new → needs_review |

### comment:2 Changed 5 years ago by

Component: | PLEASE CHANGE → combinatorics |
---|

### comment:3 Changed 5 years ago by

Commit: | 2f0f912920687460bda5ae5c246dea1981d98fed → 7ba506c69802fb3a259020d7b0cf41767c5cb248 |
---|

### comment:4 follow-up: 5 Changed 5 years ago by

Fixed a couple little things, one of which predated this ticket.

I don't know if there is an established way of guaranteeing that any function/method that takes a regular partition will still work with a 1-regular partition. Barring that, the only criterion are the doctests, right? Everything else LGTM.

### comment:5 Changed 5 years ago by

Reviewers: | → Travis Scrimshaw |
---|---|

Status: | needs_review → positive_review |

Replying to darij:

Fixed a couple little things, one of which predated this ticket.

Thanks.

I don't know if there is an established way of guaranteeing that any function/method that takes a regular partition will still work with a 1-regular partition. Barring that, the only criterion are the doctests, right? Everything else LGTM.

No, I don't think there is such a way other than those functions/methods having explicit checks. This is a degenerate case in terms of my applications (there is not really an [affine] sl_{1}), so I'm not really worried.

### comment:6 Changed 5 years ago by

Reviewers: | Travis Scrimshaw → Darij Grinberg |
---|

### comment:7 Changed 5 years ago by

Branch: | public/combinat/fix_1_regular_partitions-20584 → 7ba506c69802fb3a259020d7b0cf41767c5cb248 |
---|---|

Resolution: | → fixed |

Status: | positive_review → closed |

**Note:**See TracTickets for help on using tickets.

Hey, I finally remembered to fix this.

`^^;;`

New commits:

`Better handle 1-regular partitions.`