Skip to content

[GR-77580] Centralize handling of negated implication consequents.#13989

Closed
graalvmbot wants to merge 1 commit into
masterfrom
apecimut/GR-77580-negated-implies
Closed

[GR-77580] Centralize handling of negated implication consequents.#13989
graalvmbot wants to merge 1 commit into
masterfrom
apecimut/GR-77580-negated-implies

Conversation

@graalvmbot

Copy link
Copy Markdown
Collaborator

When an implication proof (LogicNode#implies) returns a true/false result for a particular consequent, it should return false/true for the negated consequent. For example:

x < 5 => x < 6        (true)
x < 5 => !(x < 6)     (false)

x |<| 5 => x < 5      (true)
x |<| 5 => !(x < 5)   (false)

It is unnecessary for every implies override to handle the negated cases separately. Instead, the override should match positive cases only and delegate to the superclass if the result is unknown. This PR moves the handling of negated consequents to LogicNode#implies, removes the CompareNode#implies logic that breaks the delegation chain, removes the duplicated negation handling from IntegerBelowNode, and documents the delegation contract in LogicNode.implies.

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jul 16, 2026
@graalvmbot graalvmbot closed this Jul 17, 2026
@graalvmbot
graalvmbot deleted the apecimut/GR-77580-negated-implies branch July 17, 2026 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants