Commit 2025-11-18 12:49 77560126

View on Github →

fix(to_dual): also store reorder for the reverse translation (#31716) This PR fixes the bug in to_dual that @[to_dual] forgets to add the reorder := ... flag to the reverse translation. The correct behaviour is that it adds the inverse of the reorder permutation for the reverse translation. To fix this, I refactor insertTranslation/insertTranslationAndInfo. Since insertTranslationAndInfo with an empty ArgInfo does the same as insertTranslation, I decided to merge these two into one function insertTranslation. I also merged the reorderAttr and relevantArgAttr environment extensions into a single argInfoAttr environment extension, because this is more convenient. I add a new ToDual test file which includes a test for this fix. I replace the implementation of insert_to_additive_translation with something more principled, instead of using insertTranslation.

Estimated changes