ShotTx.Generation.TypeUniverse (ShotTx v0.0.1)

Copy Markdown View Source

Collects and maintains the set of types relevant to a proof.

The type universe determines which polymorphic constants ($=_\tau$, $\Pi_\tau$, $\Sigma_\tau$) are available as heads in general bindings for primitive substitution. It contains every type and sub-type occurring in the problem signature as well as every type introduced at runtime by skolemization or renaming.

A type $\alpha_1\to\cdots\to\alpha_n\to\gamma$ decomposes into:

  • the type itself,
  • every proper suffix $\alpha_k\to\cdots\to\alpha_n\to\gamma$,
  • the base type $\gamma$, and
  • recursively, the sub-types of each $\alpha_i$.

Summary

Functions

Decomposes a type into itself, every proper suffix and recursively all sub-types of its arguments.

Extends an existing universe with all sub-types of type. Returns the universe unchanged when nothing new is introduced.

Computes the initial type universe from a list of problem formula IDs.

Functions

decompose(type)

@spec decompose(ShotDs.Data.Type.t()) :: [ShotDs.Data.Type.t()]

Decomposes a type into itself, every proper suffix and recursively all sub-types of its arguments.

extend(universe, type)

Extends an existing universe with all sub-types of type. Returns the universe unchanged when nothing new is introduced.

from_formulas(formula_ids)

@spec from_formulas([ShotDs.Data.Term.term_id()]) :: MapSet.t(ShotDs.Data.Type.t())

Computes the initial type universe from a list of problem formula IDs.