Documentation

Cvc.Types.Tuple

Product-indexed tuples #

A Lean product indexes a tuple: α × β × γ is one three-component tuple, as products flatten to the right, while (α × β) × γ has two components, the first a tuple. OneTuple α is the one-component tuple. Relations and tables use the list-shaped Tup of Cvc.Types.Relation.

A tuple's value is the Lean product it is indexed by, converted with the same flattening.

@[reducible, inline]
abbrev Cvc.Typ.isFlat :
Typ → Bool

Whether a sort is a single tuple component rather than a tuple of its own.

A product cannot be a tuple's last component: its own components would flatten into the tuple.

Equations
Instances For
    def Cvc.Srt.prod (α β : Typ) :

    The tuple Typ of α then β, flattening a tuple β into its components.

    Equations
    Instances For
      @[instance_reducible]
      instance Cvc.Srt.instToTypProd {α β : Type} [A : ToTyp α] [B : ToTyp β] :
      ToTyp (α × β)
      Equations
      @[instance_reducible, instance 100]
      instance Cvc.instOrdProd {α : Type u_1} {β : Type u_2} [Ord α] [Ord β] :
      Ord (α × β)

      Lexicographic order on pairs, so that a set, bag or array index of tuples can be written.

      A global instance: importing the library brings it into scope.

      Equations
      structure Cvc.OneTuple (α : Type) :

      A tuple of one component, denoting the one-component SMT tuple sort (Tuple α).

      Like any product it nests as a first component and flattens as a last: OneTuple α × β is (Tuple (Tuple α) β) while α × OneTuple β is (Tuple α β).

      • value : α

        The component.

      Instances For
        def Cvc.instDecidableEqOneTuple.decEq {α✝ : Type} [DecidableEq α✝] (x✝ x✝¹ : OneTuple α✝) :
        Decidable (x✝ = x✝¹)
        Equations
        Instances For
          @[instance_reducible]
          instance Cvc.instOrdOneTuple {α✝ : Type} [Ord α✝] :
          Ord (OneTuple α✝)
          Equations
          def Cvc.instOrdOneTuple.ord {α✝ : Type} [Ord α✝] :
          OneTuple α✝ → OneTuple α✝ → Ordering
          Equations
          Instances For
            def Cvc.instHashableOneTuple.hash {α✝ : Type} [Hashable α✝] :
            OneTuple α✝ → UInt64
            Equations
            Instances For
              @[instance_reducible]
              instance Cvc.instHashableOneTuple {α✝ : Type} [Hashable α✝] :
              Equations
              @[instance_reducible]
              instance Cvc.instReprOneTuple {α✝ : Type} [Repr α✝] :
              Repr (OneTuple α✝)
              Equations
              def Cvc.instReprOneTuple.repr {α✝ : Type} [Repr α✝] :
              OneTuple α✝ → Nat → Std.Format
              Equations
              Instances For
                @[instance_reducible]
                instance Cvc.OneTuple.instToTyp {α : Type} [A : ToTyp α] :
                Equations