Dimension assignment check
dimension-assignment-check · version 1.0.0 · Numbers & math · free, no key needed
Check claimed dimensions of unknown symbols make every given equation homogeneous; returns the first failure.
Use when you need to: check the dimension of a constant from its equation · verify claimed dimensions of unknown parameters · what dimension must G have check my answer.
Decide before calling
Read the versioned contract and the supported scope below. Reuse dimension-assignment-check@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.
Explain the choice
"I can use dimension-assignment-check@1.0.0 for check the dimension of a constant from its equation. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."
Supported
- check the dimension of a constant from its equation
- verify claimed dimensions of unknown parameters
- what dimension must G have check my answer
- dimensional analysis certificate for several equations
- check that an assignment makes all equations homogeneous
- verify units of a fitted coefficient
- בדיקת ממדים של קבוע פיזיקלי
Not supported
- solving for the unknown dimensions (supply the assignment to check)
- Buckingham pi groups or dimensionless-group enumeration
- numeric values of constants
- quantity kinds beyond dimension
Behavior
- Reference: ISO 80000-1:2022 (homogeneity of quantity equations; dimension one) and SI Brochure 9th ed. 2019 (section 2.3.3 dimension symbols; Table 1 constant units, Table 4); every output carries reference_version "iso-80000-1-2022+si-brochure-9e-2019".
- equations: 1..32 strings, each with exactly one "=" and the grammar of dimension-equation-check (at most 2048 UTF-8 bytes and 512 nodes each). symbols: known {symbol, dimension}; assignment: the claimed {symbol, dimension} certificate for the unknowns. A name may appear in only one list (duplicate_symbol is invalid_input); each list has at most 128 entries.
- All equations are parsed first. Then equations in array order: left side post-order, right side post-order, unequal_sides {left, right}; each discrepancy carries equation_index and, for node failures, side, path, start, end and text. Finally assignment entries in array order that no equation uses -> unused_assignment {assignment_index, symbol}.
- Dimension strings use L, M, T, I, Θ (U+0398), N, J with exact integer or (p/q) exponents; outputs are canonical. Symbols are not Unicode-normalized.
- equation_count is the number of equations and node_count the total number of parsed nodes.
Input
equations(array of string, required): min items 1; max items 32; each min length 1symbols(array of object, required): max items 128assignment(array of object, required): max items 128
Output
valid(boolean, required)reason(one of "unknown_symbol", "unlike_addition", "non_dimensionless_argument", "unequal_sides", "unused_assignment", null, required)first_discrepancy(object or null, required)equation_count(integer, required): min 0node_count(integer, required): min 0reference_version(constant "iso-80000-1-2022+si-brochure-9e-2019", required)
Limits
- max expression bytes: 2048
- max symbols: 128
- max symbol bytes: 64
- max dimension chars: 200
- max nodes: 512
- max depth: 64
- max equations: 32
Example
Request input:
{
"equations": [
"E = h*f"
],
"symbols": [
{
"symbol": "E",
"dimension": "L^2 M T^-2"
},
{
"symbol": "f",
"dimension": "T^-1"
}
],
"assignment": [
{
"symbol": "h",
"dimension": "L^2 M T^-1"
}
]
}
Response:
{
"result": {
"valid": true,
"reason": null,
"first_discrepancy": null,
"equation_count": 1,
"node_count": 4,
"reference_version": "iso-80000-1-2022+si-brochure-9e-2019"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "dimension-assignment-check",
"version": "1.0.0",
"input": {
"equations": [
"E = h*f"
],
"symbols": [
{
"symbol": "E",
"dimension": "L^2 M T^-2"
},
{
"symbol": "f",
"dimension": "T^-1"
}
],
"assignment": [
{
"symbol": "h",
"dimension": "L^2 M T^-1"
}
]
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/dimension-assignment-check/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"equations":["E = h*f"],"symbols":[{"symbol":"E","dimension":"L^2 M T^-2"},{"symbol":"f","dimension":"T^-1"}],"assignment":[{"symbol":"h","dimension":"L^2 M T^-1"}]}'
The machine-readable contract is at /v1/tools/dimension-assignment-check/versions/1.0.0.
CLI
node cli.mjs run dimension-assignment-check 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Dimension equation check: Check both sides of an equation have the same dimension (optionally a claimed one); returns the first bad node or side.
- Dimension expression check: Check a formula over dimensioned symbols is consistent and has the claimed dimension; returns the first bad node.
- Maximum flow certificate check: Check a claimed max flow with a min-cut certificate or residual search; reports the first failure or augmenting path.
- Chromatic certificate check: Check a claim chi(G) = k: a proper k-colouring plus a clique or bounded exhaustive proof; returns the first discrepancy.
- Linear inconsistency certificate check: Check a witness y that A x = b has no solution (yA = 0, yb != 0) or no x >= 0 solution (Farkas: yA >= 0, yb < 0).
- Linear residual check: Check a claimed residual r = b - A x (per component and/or its max norm) exactly for an approximate solution x.