Repository navigation
Conversation
Section 10 of the paper enumerates Av(2314, 2143, 1 + P), but is_valid_extension removed a leading 1 without requiring one, so the strategy applied to classes it does not cover, such as Av(213) and Av(2314, 2143, 3214). It now returns False for a pattern that does not start with its minimum, as Rd2134CoreStrategy does, and a docstring says what it checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Av(2143, 2314, 3214) lists its patterns by length and then by their entries, as classes are written elsewhere. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ru2143CoreStrategynow applies only when each extra basis pattern starts with 1, as the result it cites requires. Itsis_valid_extension, inpermuta/enumeration_strategies/core_strategies.py, removed a leading 1 before checking a pattern but never required one, so the strategy claimed classes the paper does not enumerate, such as Av(213):On
developthe first two giveTrue, though neither Av(2143, 2314, 3214) nor Av(213) is of the form the paper enumerates. The third, Av(1324, 2143, 2314), where 1324 is 1 ⊕ 213, is of that form and still applies.Rd2134CoreStrategyand the other six core strategies already require the leading 1.Details
Why
Section 10 of "Enumeration of Permutation Classes and Weighted Labelled Independent Sets" (Bean, Nadeau and Ulfarsson, arXiv 1912.07503) enumerates the classes Av(2314, 2143, 1 ⊕ P) in which each π in P avoids a mesh pattern and does not end in an increasing skew component.
is_valid_extensiontested those two conditions onfstrip(patt), which removes a leading 1 when there is one, so it accepted a pattern without a leading 1 that met the two conditions as it stood. Its sibling for Section 9,Rd2134CoreStrategy, requirespatt[0] == 0, and the other six core strategies require the leading 1 throughzero_plus_perm,zero_plus_skewindandzero_plus_sumind.The fix is for anyone who asks Permuta which known results enumerate a class, as
find_strategiesdoes. Ondevelopit names Corollary 10.5 for Av(213) and its symmetries Av(132), Av(231) and Av(312). The corollary does not enumerate them. For Av(213), whose counts are the Catalan numbers, the corollary with the P thatdevelopreads, P = {213}, gives 1, 1, 2, 6, 21, 77, 287 , the counts of Av(1324, 2143, 2314).The paper's statement of Corollary 10.5 names Av(2134, 2413, 1 ⊕ P), as Corollary 9.5 does, while the sentence before it and its B(x) are about Av(2314, 2143, …). So the new docstring cites Section 10, whose opening states the class.
What changes
Ru2143CoreStrategy.is_valid_extensionreturnsFalsefor a pattern that does not start with its minimum, before it strips the 1. Its docstring, new, says what it checks, with two examples.tests/enumeration_strategies/test_core_strategies.py:TestRu2143getstest_applies_only_if_each_extra_pattern_starts_with_1, on Av(2143, 2314, 3214) and Av(213), refused, and Av(1324, 2143, 2314), accepted.test_is_valid_extensiongets 3214 and 1324.CHANGELOG.md: an entry under Unreleased, Fixed.A basis given with a redundant pattern that does not start with 1 is now refused too, as every other core strategy refuses it: none of them reduces the basis to its minimal one first.
Checks
develop: both changed tests fail at their new lines, on both Pythons.developwith this Permuta, on both Pythons.developaccepted is miscounted by the corollary with the Pdevelopreads.is_valid_extensionare killed, and so is each fault made by hand that is not equivalent: the check skipped, forced, made on the last entry, or made after the 1 is stripped.AI assistance: written with Claude Code (Opus 5.5) as the Permuta developer, and reviewed before submission by Claude Code (Opus 5.5) as an automated reviewer; Henning Ulfarsson checked and opened it.