{"id":"dimension-equation-check","version":"1.0.0","description":"Check both sides of an equation have the same dimension (optionally a claimed one); returns the first bad node or side.","supported_operations":["check an equation for dimensional homogeneity","do both sides of this equation have the same units","dimensional analysis of a physics equation","is E = m v dimensionally correct","find the inconsistent side of an equation","verify equation dimensions before using it","בדיקת הומוגניות ממדית של משוואה"],"unsupported_operations":["solving the equation or checking numeric correctness","inequalities, systems written in one string, or chained a = b = c","quantity kinds beyond dimension (torque versus energy)","unit conversion factors"],"semantics":["Reference: ISO 80000-1:2022 (both sides of a quantity equation have the same dimension; sums need equal dimensions; transcendental arguments have dimension one) and SI Brochure 9th ed. 2019 (section 2.3.3 dimension symbols, Table 4); every output carries reference_version \"iso-80000-1-2022+si-brochure-9e-2019\".","equation: two formulas joined by exactly one \"=\". Formula grammar, functions, symbol names, dimension strings and canonical output are those of dimension-expression-check (literal integer or (p/q) exponents only; dimension symbols L M T I Θ N J; no Unicode normalization).","Order: left side in post-order (side \"left\"), right side in post-order (side \"right\"), then unequal_sides {left, right}, then the optional claimed_dimension (omitted means no claim) -> dimension_mismatch {claimed, actual}. Node failures carry side, path (relative to the side root), start and end (code point offsets in the whole equation) and text.","dimension is the common dimension when both sides are consistent and equal (also on dimension_mismatch), else null; node_count counts nodes on both sides.","Limits: 2048 UTF-8 bytes, 512 nodes for the whole equation, nesting depth 64, 128 symbols (names at most 64 UTF-8 bytes), 200-character dimension strings; limit_exceeded is raised before evaluation."],"limits":{"max_expression_bytes":2048,"max_symbols":128,"max_symbol_bytes":64,"max_dimension_chars":200,"max_nodes":512,"max_depth":64},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["equation","symbols"],"properties":{"equation":{"type":"string","minLength":1},"symbols":{"type":"array","maxItems":128,"items":{"type":"object","additionalProperties":false,"required":["symbol","dimension"],"properties":{"symbol":{"type":"string","minLength":1},"dimension":{"type":"string","minLength":1,"maxLength":200}}}},"claimed_dimension":{"type":"string","minLength":1,"maxLength":200}}},"output_schema":{"type":"object","additionalProperties":false,"required":["valid","reason","first_discrepancy","dimension","node_count","reference_version"],"properties":{"valid":{"type":"boolean"},"reason":{"type":["string","null"],"enum":["unknown_symbol","unlike_addition","non_dimensionless_argument","unequal_sides","dimension_mismatch",null]},"first_discrepancy":{"type":["object","null"],"additionalProperties":false,"properties":{"side":{"type":"string","enum":["left","right"]},"path":{"type":"string"},"start":{"type":"integer","minimum":0},"end":{"type":"integer","minimum":0},"text":{"type":"string"},"operator":{"type":"string","enum":["+","-"]},"left":{"type":"string"},"right":{"type":"string"},"function":{"type":"string"},"argument":{"type":"string"},"symbol":{"type":"string"},"claimed":{"type":"string"},"actual":{"type":"string"}}},"dimension":{"type":["string","null"]},"node_count":{"type":"integer","minimum":0},"reference_version":{"type":"string","const":"iso-80000-1-2022+si-brochure-9e-2019"}}},"examples":[{"input":{"equation":"E = m*v^2/2","symbols":[{"symbol":"E","dimension":"L^2 M T^-2"},{"symbol":"m","dimension":"M"},{"symbol":"v","dimension":"L T^-1"}]},"output":{"valid":true,"reason":null,"first_discrepancy":null,"dimension":"L^2 M T^-2","node_count":7,"reference_version":"iso-80000-1-2022+si-brochure-9e-2019"}},{"input":{"equation":"E = m*v","symbols":[{"symbol":"E","dimension":"L^2 M T^-2"},{"symbol":"m","dimension":"M"},{"symbol":"v","dimension":"L T^-1"}]},"output":{"valid":false,"reason":"unequal_sides","first_discrepancy":{"left":"L^2 M T^-2","right":"L M T^-1"},"dimension":null,"node_count":4,"reference_version":"iso-80000-1-2022+si-brochure-9e-2019"}}],"execute_url":"/v1/tools/dimension-equation-check/versions/1.0.0/execute"}