/Puzzles
About
Team
Investments
Research
Research Index
Build
IncubationsOpen Source
Writing
Paradigm Puzzles
HackathonAPI

Terms, Disclosures, Privacy

LinkedIn, Twitter, Contact

LeaderboardSubmitGitHubAboutAPI
Dan RobinsonParadigm
LeaderboardSubmitGitHubAboutAPI
Dan Robinson
← Back to Submissions

mixed_sign_constant_comparison

Pending

Submitted, awaiting the pre-agent gates.

Author
@forwardsecrecy
Points
0
Verdict
—
Resolution
—
Submitted
Jul 24, 2026, 07:49 PM
Reviewed
—

Source

// SPDX-License-Identifier: MIT
pragma solidity 0.8.35;

/* ===ARENA-MANIFEST===
{
  "deploy": { "contract": "C", "args": [], "value": 0 },
  "entry":   { "function": "f", "args": [] },
  "lane":    "C",
  "feature": "mixed-sign-constant-comparison-over-reject",
  "note":    "A comparison whose two operands are compile-time constants of MIXED SIGN (one negative, one non-negative) fails to lower: solidity-lean fails closed (over_reject) on a program solc 0.8.35 accepts and runs. int256(-1) < int256(0) must evaluate to true; solidity-lean refuses the whole contract. The discriminator is the SIGN PAIRING of the constant operands, not the operator, the width, or the position. OVER-REJECTS: int256(-1) < int256(0), int256(0) < int256(-1), int256(-7) < int256(2), and the same with > , <= , >= , != , == ; int8(-7) < int8(2) (narrow); int256(-7) < 2 and -7 < int256(2) (one operand literal-typed); and it fires in every position tried - as an abi.encode argument, as a bare returned bool, in an if condition, and in a require condition. AGREES with solc: int256(-7) < int256(-2) and int256(-7) == int256(-7) (BOTH negative), int256(7) < int256(2) and int256(7) == int256(7) (both non-negative), uint256(7) < uint256(2) (unsigned), and int256 a = -7; int256 b = 2; a < b (same values in VARIABLES rather than constants). So the trigger is exactly: both operands compile-time constants + opposite sign. Distinct from the abi.encode-argument lowering gaps: this is lane C (fails closed rather than producing a wrong observable) and is position-independent - it reproduces with no builtin call anywhere in the program."
}
===END-ARENA-MANIFEST=== */

contract C {
    function f() external pure returns (bool) {
        // solc+EVM: true   |   solidity-lean: over_reject (fails closed)
        return int256(-1) < int256(0);
    }
}