Documentation

Cvc.Untyped.Theory.Tuple

Tuples, sort-erased #

mkTuple builds a tuple, tupleSelect (with fst and snd) reads one component, and tupleProject answers a tuple of the components selected: projecting a single index gives a one-component tuple, not that component.

The tuple whose components are the given terms, in order.

Equations
Instances For
    def Cvc.Untyped.Term.tupleProject [Ω] (indices : Array Nat) (tuple : Term) :

    The tuple of the components at the given indices, in the order given.

    Indices count from zero. They need be neither increasing nor distinct, so this reorders and duplicates as well as it selects: projecting #[2, 0] out of (Tuple Int Bool Real) gives (Tuple Real Int).

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      def Cvc.Untyped.Term.tupleSelect [Ω] (idx : Nat) (tuple : Term) :

      The component at the given index, at that component's own sort.

      Unlike tupleProject #[1], which answers (Tuple Bool) on a (Tuple Int Bool String), this answers Bool.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        @[reducible, inline]

        A tuple's first component.

        Equations
        Instances For
          @[reducible, inline]

          A tuple's second component.

          Equations
          Instances For

            Values #

            Determine if this term is a tuple value.

            Equations
            Instances For

              The components a constant tuple term denotes, failing if it denotes none.

              Equations
              Instances For

                How the last component of a product converts: a product there flattens into the tuple.

                α × β × γ is one tuple of three components, so converting α × β expands β when it is itself a product (or a OneTuple), and takes it as one component otherwise.

                • toTerms [Ω] : β → Env (List Term)

                  The terms of the components b stands for.

                • ofTerms [Ω] : List Term → Env β

                  Reads a value off the remaining components, all of them.

                Instances
                  @[instance_reducible, instance 100]
                  Equations
                  • One or more equations did not get rendered due to their size.
                  @[instance_reducible]
                  Equations
                  • One or more equations did not get rendered due to their size.
                  @[instance_reducible]
                  Equations
                  • One or more equations did not get rendered due to their size.
                  @[instance_reducible]
                  Equations
                  • One or more equations did not get rendered due to their size.
                  @[instance_reducible]
                  Equations
                  • One or more equations did not get rendered due to their size.
                  @[instance_reducible]
                  Equations
                  • One or more equations did not get rendered due to their size.
                  @[instance_reducible]
                  Equations
                  • One or more equations did not get rendered due to their size.