Documentation

Cvc.Typed.Theory.Bag

Bags, typed #

def Cvc.Typed.Term.bagFold [Ω] {α β : Type} [Ord α] (f : Term (α → β → β)) (init : Term β) (b : Term (Bag α)) :
Env (Term β)

Folds f over the elements of b from init, in no specified order.

Equations
Instances For
    def Cvc.Typed.Term.bagCount [Ω] {α : Type} [Ord α] (elm : Term α) (b : Term (Bag α)) :

    Multiplicity of elm in b; the element comes first, as in cvc5.

    Equations
    Instances For
      def Cvc.Typed.Term.bagMake [Ω] {α : Type} [Ord α] (elm : Term α) (count : Term Int) :
      Env (Term (Bag α))

      The bag holding elm count times; the element comes first, as in cvc5.

      Equations
      Instances For
        def Cvc.Typed.Term.bagAll [Ω] {α : Type} [Ord α] (p : Term (α → Bool)) (b : Term (Bag α)) :

        Whether every element of a bag satisfies a predicate.

        Equations
        Instances For
          def Cvc.Typed.Term.bagDifferenceRemove [Ω] {α : Type} [Ord α] (lft rgt : Term (Bag α)) :
          Env (Term (Bag α))

          Difference removing every element occurring on the right.

          Equations
          Instances For
            def Cvc.Typed.Term.bagMap [Ω] {α β : Type} [Ord α] [Ord β] (f : Term (α → β)) (b : Term (Bag α)) :
            Env (Term (Bag β))

            The image of a bag under a function.

            Equations
            Instances For
              def Cvc.Typed.Term.bagUnionMax [Ω] {α : Type} [Ord α] (lft rgt : Term (Bag α)) :
              Env (Term (Bag α))

              Union taking the maximum of the multiplicities.

              Equations
              Instances For
                def Cvc.Typed.Term.bagCard [Ω] {α : Type} [Ord α] (b : Term (Bag α)) :

                Cardinality, counting multiplicities.

                Equations
                Instances For
                  def Cvc.Typed.Term.bagMember [Ω] {α : Type} [Ord α] (elm : Term α) (b : Term (Bag α)) :

                  Whether elm is in b; the element comes first, as in cvc5.

                  Equations
                  Instances For
                    def Cvc.Typed.Term.bagInterMinN [Ω] {α : Type} [Ord α] (terms : Terms (Bag α)) (atLeastTwoElements : 2 ≤ Array.size terms := by (try grind) <;> fail "failed to prove term array has at least two elements") :
                    Env (Term (Bag α))

                    bagInterMin over two or more terms.

                    Equations
                    Instances For
                      def Cvc.Typed.Term.bagEmpty [Ω] {α : Type} [Ord α] [ToTyp α] :
                      Env (Term (Bag α))

                      The empty bag of elements of sort α.

                      Equations
                      Instances For
                        def Cvc.Typed.Term.bagPartition [Ω] {α : Type} [Ord α] (p : Term (α → α → Bool)) (b : Term (Bag α)) :
                        Env (Term (Bag (Bag α)))

                        Partitions a bag into the equivalence classes of a binary predicate.

                        The predicate is expected to be an equivalence relation; the result holds one bag per class.

                        Equations
                        Instances For
                          def Cvc.Typed.Term.bagInterMin [Ω] {α : Type} [Ord α] (lft rgt : Term (Bag α)) :
                          Env (Term (Bag α))

                          Intersection taking the minimum of the multiplicities.

                          Equations
                          Instances For
                            def Cvc.Typed.Term.bagChoose [Ω] {α : Type} [Ord α] (b : Term (Bag α)) :
                            Env (Term α)

                            An unspecified element of a non-empty bag.

                            Equations
                            Instances For
                              def Cvc.Typed.Term.bagDifferenceSubtract [Ω] {α : Type} [Ord α] (lft rgt : Term (Bag α)) :
                              Env (Term (Bag α))

                              Difference subtracting the multiplicities.

                              Equations
                              Instances For
                                def Cvc.Typed.Term.bagUnionDisjointN [Ω] {α : Type} [Ord α] (terms : Terms (Bag α)) (atLeastTwoElements : 2 ≤ Array.size terms := by (try grind) <;> fail "failed to prove term array has at least two elements") :
                                Env (Term (Bag α))

                                bagUnionDisjoint over two or more terms.

                                Equations
                                Instances For
                                  def Cvc.Typed.Term.bagUnionDisjoint [Ω] {α : Type} [Ord α] (lft rgt : Term (Bag α)) :
                                  Env (Term (Bag α))

                                  Union adding the multiplicities.

                                  Equations
                                  Instances For
                                    def Cvc.Typed.Term.bagUnionMaxN [Ω] {α : Type} [Ord α] (terms : Terms (Bag α)) (atLeastTwoElements : 2 ≤ Array.size terms := by (try grind) <;> fail "failed to prove term array has at least two elements") :
                                    Env (Term (Bag α))

                                    bagUnionMax over two or more terms.

                                    Equations
                                    Instances For
                                      def Cvc.Typed.Term.bagFilter [Ω] {α : Type} [Ord α] (p : Term (α → Bool)) (b : Term (Bag α)) :
                                      Env (Term (Bag α))

                                      The elements of a bag satisfying a predicate, with their multiplicities.

                                      Equations
                                      Instances For
                                        def Cvc.Typed.Term.bagSetof [Ω] {α : Type} [Ord α] (b : Term (Bag α)) :
                                        Env (Term (Bag α))

                                        Duplicate removal, yielding a bag whose multiplicities are all at most one.

                                        Equations
                                        Instances For
                                          def Cvc.Typed.Term.bagSome [Ω] {α : Type} [Ord α] (p : Term (α → Bool)) (b : Term (Bag α)) :

                                          Whether some element of a bag satisfies a predicate.

                                          Equations
                                          Instances For
                                            def Cvc.Typed.Term.bagSubbag [Ω] {α : Type} [Ord α] (lft rgt : Term (Bag α)) :

                                            Whether every multiplicity in lft is at most the one in rgt.

                                            Equations
                                            Instances For
                                              inductive Cvc.Typed.View.Bag.OnBag [Ω] (γ : Type) [Ord γ] [ToTyp γ] :

                                              Bag's operators with a result of sort Bag.

                                              Instances For
                                                inductive Cvc.Typed.View.Bag.OnAny [Ω] (β : Type) [ToTyp β] :

                                                Bag's operators whose result's sort is a type variable.

                                                Instances For

                                                  Bag's operators with a result of sort Int.

                                                  Instances For
                                                    inductive Cvc.Typed.View.Bag [Ω] :
                                                    Typ → Type

                                                    Bag's operators, taken apart one level, indexed by the sort each produces.

                                                    Instances For

                                                      Bag's operators with a result of sort Bool.

                                                      Instances For
                                                        def Cvc.Typed.View.Bag.of [Ω] (τ : Typ) (t : Term τ.Denote) :

                                                        Takes a term apart one level, at its sort, if Bag owns its operator and the term's sort fits it.

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

                                                          Values #

                                                          def Cvc.Typed.Term.mkBagValue {α : Type} [Ω] [Ord α] [ToTyp α] [ValueToTerm α] (bag : Bag α) :
                                                          Env (Term (Bag α))

                                                          The bag term denoting a bag of values.

                                                          Equations
                                                          Instances For
                                                            def Cvc.Typed.Term.getBagValue {α : Type} [Ω] [Ord α] [TermToValue α] :
                                                            Term (Bag α) → Env (Bag α)

                                                            The bag of values a constant bag term denotes.

                                                            Equations
                                                            Instances For
                                                              @[instance_reducible]
                                                              Equations
                                                              @[instance_reducible]
                                                              Equations