Experimental/internal API for 0.2; subject to change before 0.3. Small Theoria-side mirror of Lean matcher metadata.
Summary
Functions
Returns total matcher arity in Lean's broad shape: params + motive + discriminants + alternatives.
Returns the default generated matcher declaration name for a definition.
Builds matcher metadata from supported equation schema metadata.
Builds matcher metadata.
Returns the source definition prefix for a default generated matcher declaration.
Types
@type t() :: %Theoria.Equation.Matcher.Info{ alternatives: [Theoria.Equation.Matcher.Info.Alternative.t()], discriminants: [Theoria.Equation.Matcher.Info.Discriminant.t()], elim_level_position: non_neg_integer() | nil, name: atom(), num_discriminants: pos_integer(), num_params: non_neg_integer(), overlaps: %{optional(non_neg_integer()) => [non_neg_integer()]} }
Functions
@spec arity(t()) :: non_neg_integer()
Returns total matcher arity in Lean's broad shape: params + motive + discriminants + alternatives.
@spec default_name(atom(), pos_integer()) :: atom()
Returns the default generated matcher declaration name for a definition.
@spec for_schema(atom(), Theoria.Equation.Schema.t(), keyword()) :: t()
Builds matcher metadata from supported equation schema metadata.
@spec new( atom(), non_neg_integer(), pos_integer(), [Theoria.Equation.Matcher.Info.Alternative.t()], keyword() ) :: t()
Builds matcher metadata.
Returns the source definition prefix for a default generated matcher declaration.