Skip to content

Split tuple_insert_static into two paths#15518

Merged
josevalim merged 1 commit into
elixir-lang:mainfrom
lukaszsamson:ls-tuple-insert-bug
Jul 16, 2026
Merged

Split tuple_insert_static into two paths#15518
josevalim merged 1 commit into
elixir-lang:mainfrom
lukaszsamson:ls-tuple-insert-bug

Conversation

@lukaszsamson

Copy link
Copy Markdown
Contributor
  • bdd_map on pure positive disjunction
  • expand to the exact negation-free positive DNF, insert and union on negations and/or implicit :bdd_top

Fixes #15517

Assisted-by: Claude Opus 4.8 & GPT 5.5

- bdd_map on pure positive disjunction
- expand to the exact negation-free positive DNF, insert and union on negations and/or implicit :bdd_top

Fixes elixir-lang#15517
@gldubc

gldubc commented Jun 26, 2026

Copy link
Copy Markdown
Member

This fix is correct.

This is the usual way to perform operations on tuple types in the theory (eliminate negations then do the operation on the disjunction of positives). The previous implementation was faster but incorrect, probably dated to before the elimination of negation was implemented.

@lukaszsamson
lukaszsamson marked this pull request as ready for review June 26, 2026 15:48
@josevalim
josevalim merged commit 0821930 into elixir-lang:main Jul 16, 2026
13 of 15 checks passed
@josevalim

Copy link
Copy Markdown
Member

💚 💙 💜 💛 ❤️

josevalim pushed a commit that referenced this pull request Jul 16, 2026
- bdd_map on pure positive disjunction
- expand to the exact negation-free positive DNF, insert and union on negations and/or implicit :bdd_top

Fixes #15517
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

tuple_insert_at loses the inserted element and misapplies it at wrong index

3 participants