Skip to content

Main content

Quantifier Bound Variable Shadow Count Tool

Count shadowing in an explicitly ordered nested binder path, without parsing formulas or proving equivalence.

Loading tool…

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

  1. Enter boundVariables. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. 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 fieldMeaning and unitsAccepted input
boundVariablesBound VariablesRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
Output fieldInterpretationReturned shape
shadowingBindersShadowing BindersRequired. Safe integer.
distinctVariablesDistinct VariablesRequired. Safe integer.
deepestRepeatIndexLast repeated binder token index, or -1; assumes a nested binder path.Required. Safe integer.
json
{
  "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

  1. Calculation and input contract: philosophy/quantifier-bound-variable-shadow-count — tool.io

Similar or alternative tools