Description
Count shadowing in an explicitly ordered nested binder path, without parsing formulas or proving equivalence.
A logical calculation operates on a stated representation: truth values, token lists, counts, or an explicitly supplied relation. Checking one assignment, pair, trace, or witness is different from proving a formula or validating an entire argument. Empty domains, duplicate tokens, and scope conventions can change the result.
Count shadowing in an explicitly ordered nested binder path, without parsing formulas or proving equivalence.
When to use this tool
Use Quantifier Bound Variable Shadow Count when you need this exact local truth, count, token, relation, or witness check within a larger logic workflow.
How to use the tool and how it works
- Enter boundVariables. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read shadowingBinders, distinctVariables, deepestRepeatIndex. Use the output convention below.
Scan boundVariables in order, counting each occurrence of a previously seen token as shadowingBinders. Return distinctVariables and deepestRepeatIndex as the final repeated token's zero-based index, or -1 if none.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| boundVariables | Bound Variables | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| shadowingBinders | Shadowing Binders | Required. Safe integer. |
| distinctVariables | Distinct Variables | Required. Safe integer. |
| deepestRepeatIndex | Last repeated binder token index, or -1; assumes a nested binder path. | Required. Safe integer. |
{
"input": {
"boundVariables": [
"x",
"y",
"x"
]
},
"output": {
"shadowingBinders": 1,
"distinctVariables": 2,
"deepestRepeatIndex": 2
}
} Limitations and assumptions
- The list is assumed to be an ordered nested binder path. Repetition in arbitrary separate scopes need not be shadowing, and no formula or scope tree is parsed.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Use a parser, scope-aware representation, model checker, or proof procedure when the supplied token or witness representation is insufficient. A local passing check should not be promoted to global validity.
References
Similar or alternative tools
- Alpha Equivalence Bound Variable Pair
Compare flat single-binder token bodies, rejecting potential free-variable capture; nested binders are outside this model.
- Formula Free Variable Count
Count explicitly annotated variable occurrences; binding scope is supplied rather than parsed.