Theoria.Equation.Matcher.Statement.Indexed (theoria v0.3.0)

Copy Markdown View Source

Shared helpers for indexed matcher statement planning.

Summary

Functions

Applies arguments left-to-right to a function term.

Collects a forall telescope into {name, domain} pairs.

Returns references to named binders in order.

Returns the binder telescope common to indexed matcher equations.

Derives current statement levels from parameter sorts.

Functions

apply_args(function, arguments)

@spec apply_args(Theoria.Term.t(), [Theoria.Term.t()]) :: Theoria.Term.t()

Applies arguments left-to-right to a function term.

collect_foralls(arg1)

@spec collect_foralls(Theoria.Term.t()) :: [{atom(), Theoria.Term.t()}]

Collects a forall telescope into {name, domain} pairs.

refs_for_names(frame, names)

@spec refs_for_names(Theoria.Equation.Matcher.Statement.Frame.t(), [atom()]) ::
  {:ok, [Theoria.Term.t()]} | {:error, term()}

Returns references to named binders in order.

statement_binders(shape)

@spec statement_binders(term()) :: [{atom(), Theoria.Term.t()}]

Returns the binder telescope common to indexed matcher equations.

statement_levels(shape)

@spec statement_levels(term()) :: [term()]

Derives current statement levels from parameter sorts.