Documentation

MeTTaIL.Semantics.Context

inductive MeTTaIL.RewStep (p : Presentation) :
ASTASTProp

One-step rewriting closed under context, the standard reduction relation of the presentation's rewrite system. The top rule embeds the existing top-level Reduces; the other rules let a step happen inside a sexp argument or a Subst component.

Instances For
    theorem MeTTaIL.reduces_of_mem_baseReducts {p : Presentation} {t t' : AST} (h : t' baseReducts p t) :
    Reduces p t t'

    Every member of baseReducts is a genuine top-level reduction.

    One leftmost-outermost rewrite step, or none if the term is in normal form. Try a base rewrite at the root; if none applies, descend left to right into the arguments, then into the Subst components.

    Equations
    Instances For

      One step inside the first reducible element of a list, or none if all are in normal form.

      Equations
      Instances For
        theorem MeTTaIL.oneStep_sound (p : Presentation) (t : AST) {t' : AST} :
        oneStep p t = some t'RewStep p t t'

        Soundness: every executable one-step reduct is a genuine context rewrite.

        theorem MeTTaIL.oneStepList_sound (p : Presentation) (args : List AST) {args' : List AST} :
        oneStepList p args = some args' (pre : List AST), (a : AST), (a' : AST), (post : List AST), args = pre ++ a :: post args' = pre ++ a' :: post RewStep p a a'

        Soundness for the list reducer: the result reduces exactly one element in place.