Documentation

Cslib.Semantics.ReductionSystem.Basic

Reduction System #

A reduction system is an operational semantics expressed as a relation between terms.

structure ReductionSystem (Term : Type u) :

A reduction system is a relation between Terms.

  • Red : TermTermProp

    The reduction relation.

Instances For

    Multi-step reductions #

    @[reducible, inline]
    abbrev ReductionSystem.MRed {Term : Type u_1} (rs : ReductionSystem Term) (a : Term) :
    TermProp

    Multi-step reduction relation.

    Equations
    Instances For
      theorem ReductionSystem.MRed.refl {Term : Type u_1} (rs : ReductionSystem Term) (t : Term) :
      rs.MRed t t

      All multi-step reduction relations are reflexive.

      theorem ReductionSystem.MRed.single {Term : Type u_1} {a b : Term} (rs : ReductionSystem Term) (h : rs.Red a b) :
      rs.MRed a b

      Any reduction is a multi-step

      instance instTransRedMRed {Term : Type u_1} (rs : ReductionSystem Term) :
      Trans rs.Red rs.MRed rs.MRed
      Equations
      instance instTransMRedRed {Term : Type u_1} (rs : ReductionSystem Term) :
      Trans rs.MRed rs.Red rs.MRed
      Equations

      A command to create a ReductionSystem from a relation, robust to use of variable

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        This command adds notations for a ReductionSystem.Red and ReductionSystem.MRed. This should not usually be called directly, but from the reduction_sys attribute.

        As an example reduction_notation foo "β" will add the notations "⭢β" and "↠β".

        Note that the string used will afterwards be registered as a notation. This means that if you have also used this as a constructor name, you will need quotes to access corresponding cases, e.g. «β» in the above example.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          This attribute calls the reduction_notation command for the annotated declaration, such as in:

          @[reduction rs "ₙ", simp]
          def PredReduction (a b : ℕ) : Prop := a = b + 1
          
          Equations
          • One or more equations did not get rendered due to their size.
          Instances For