Documentation

Strata.DL.Lambda.LSort

Sorts #

Ground monomorphic types. They name the sort of a value in the denotational semantics (Strata.DL.Lambda.Denote.LExprDenote) and the element types of collection literals (LConst.mapConst, LConst.sequenceConst). Their properties, and their decidable equality, are in Strata.DL.Lambda.LSortProps.

inductive Lambda.LSort :

A sort is a ground monomorphic type — an LMonoTy with no free type variables. We use a separate type rather than LMonoTy to avoid carrying around proofs that a type has no type variables.

  • tcons (name : String) (args : List LSort) : LSort

    A named type constructor applied to sort arguments.

  • bitvec (size : Nat) : LSort

    A bit vector sort of the given size.

Instances For
    @[instance_reducible]
    Equations
    @[reducible, inline]

    The Boolean sort.

    Equations
    Instances For
      @[reducible, inline]

      The integer sort.

      Equations
      Instances For
        @[reducible, inline]

        The real sort.

        Equations
        Instances For
          @[reducible, inline]

          The string sort.

          Equations
          Instances For
            @[reducible, inline]
            abbrev Lambda.LSort.map (k v : LSort) :

            The sort Map k v of the total maps from k to v.

            Equations
            Instances For
              @[reducible, inline]

              The sort Sequence a of the finite sequences of a.

              Equations
              Instances For
                def Lambda.LSort_eqb (s1 s2 : LSort) :

                Boolean equality of sorts, structurally.

                Equations
                Instances For
                  @[irreducible]
                  def Lambda.LSort.rec' (P : LSort → Sort u) (htcons : (name : String) → (args : List LSort) → ((x : LSort) → x ∈ args → P x) → P (tcons name args)) (hbitvec : (n : Nat) → P (bitvec n)) (s : LSort) :
                  P s

                  Recursion on sorts with the hypothesis on the arguments of a constructor stated by list membership.

                  Equations
                  Instances For

                    The monomorphic type (without type variables) naming a sort.

                    Equations
                    Instances For

                      Whether a sort mentions the Map type constructor anywhere. Two well-typed constants of a sort without Map are equal exactly when they denote the same value; map literals are not canonical (two different literals can denote the same map, e.g. when the key sort is finite), so for them only syntactic equality is known to imply semantic equality.

                      Equations
                      Instances For

                        The sort a monomorphic type names, if it has no type variables.

                        Equations
                        Instances For