{"id":"rational-equation-check","version":"1.0.0","description":"Check a chained claim like 1/2 + 1/3 = 5/6 < 1 exactly; returns the first false relation or division by zero.","supported_operations":["verify a chain of fraction equalities","check an equation between fraction expressions","is this fraction identity true","validate an inequality between fractions exactly","check each step of a fraction equation chain","confirm egyptian fraction decomposition","אימות שוויון בין ביטויי שברים"],"unsupported_operations":["solving for an unknown","approximate (≈) or tolerance-based comparison","decimal literals or exponents","symbolic identities with variables"],"semantics":["Reference: ISO/IEC 10967-2:2001 (LIA-2) exact-result terminology; exact arithmetic over the rationals with canonical reduced form; RFC 8259 sec. 6 integer grammar and sec. 7 strings.","equation := expr (REL expr)+ with REL = != < <= > >= or U+2260, U+2264, U+2265; a REL b REL c means (a REL b) and (b REL c). ==, =>, =< and relations inside parentheses are invalid_input.","Each expr uses the integer/fraction grammar of rational-expression-check: + - * / ( ), unary minus, RFC 8259 int literals, U+2212 U+00D7 U+00F7 accepted, positions as 0-based code point offsets.","Check order: the whole equation is tokenised and parsed first (errors); then segments are evaluated left to right and, after segment i, link i - 1 is checked. The first division_by_zero or relation_false stops the check.","relation_false reports segment_index (right side), link_index, the ASCII relation, both canonical values and difference = left - right; division_by_zero reports the position and divisor_text of the zero divisor. relations_checked counts links that held; segment_values lists the segments evaluated.","Limits: 4096 UTF-8 bytes, 1024 tokens, 64 segments, nesting depth 64, 500 digits per literal or reduced intermediate value; over a limit is limit_exceeded."],"limits":{"max_expression_bytes":4096,"max_tokens":1024,"max_depth":64,"max_value_digits":500,"max_segments":64},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["equation"],"properties":{"equation":{"type":"string","minLength":1}}},"output_schema":{"type":"object","additionalProperties":false,"required":["valid","reason","relations_checked","segment_values","first_discrepancy","reference_version"],"properties":{"valid":{"type":"boolean"},"reason":{"type":["string","null"],"enum":[null,"division_by_zero","relation_false"]},"relations_checked":{"type":"integer","minimum":0},"segment_values":{"type":"array","maxItems":64,"items":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)(/[1-9][0-9]*)?$"}},"first_discrepancy":{"type":["object","null"],"additionalProperties":false,"required":["segment_index","link_index","relation","left_value","right_value","difference","position","divisor_text"],"properties":{"segment_index":{"type":"integer","minimum":0},"link_index":{"type":["integer","null"],"minimum":0},"relation":{"type":["string","null"],"enum":[null,"=","!=","<","<=",">",">="]},"left_value":{"type":["string","null"]},"right_value":{"type":["string","null"]},"difference":{"type":["string","null"]},"position":{"type":["integer","null"],"minimum":0},"divisor_text":{"type":["string","null"]}}},"reference_version":{"type":"string","const":"ISO/IEC 10967-2:2001 (LIA-2) exact-result terminology; exact arithmetic over the rationals with canonical reduced form; RFC 8259 sec. 6 integer grammar and sec. 7 strings"}}},"examples":[{"input":{"equation":"2/5 = 1/3 + 1/15"},"output":{"valid":true,"reason":null,"relations_checked":1,"segment_values":["2/5","2/5"],"first_discrepancy":null,"reference_version":"ISO/IEC 10967-2:2001 (LIA-2) exact-result terminology; exact arithmetic over the rationals with canonical reduced form; RFC 8259 sec. 6 integer grammar and sec. 7 strings"}},{"input":{"equation":"1/2 + 1/3 = 5/6 = 2/5"},"output":{"valid":false,"reason":"relation_false","relations_checked":1,"segment_values":["5/6","5/6","2/5"],"first_discrepancy":{"segment_index":2,"link_index":1,"relation":"=","left_value":"5/6","right_value":"2/5","difference":"13/30","position":null,"divisor_text":null},"reference_version":"ISO/IEC 10967-2:2001 (LIA-2) exact-result terminology; exact arithmetic over the rationals with canonical reduced form; RFC 8259 sec. 6 integer grammar and sec. 7 strings"}}],"execute_url":"/v1/tools/rational-equation-check/versions/1.0.0/execute"}