Documentation

Cvc.Typed.Theory.Set

Sets, typed #

def Cvc.Typed.Term.setInsert [Ω] {α : Type} [Ord α] (elm : Term α) (s : Term (Set α)) :
Env (Term (Set α))

Inserts elm into s; the element comes first, as in cvc5.

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

    Set intersection.

    Equations
    Instances For
      def Cvc.Typed.Term.setAll [Ω] {α : Type} [Ord α] (p : Term (α → Bool)) (s : Term (Set α)) :

      Whether every element of a set satisfies a predicate.

      Equations
      Instances For
        def Cvc.Typed.Term.setSingleton [Ω] {α : Type} [Ord α] (elm : Term α) :
        Env (Term (Set α))

        The singleton set containing one element.

        Equations
        Instances For
          def Cvc.Typed.Term.setFilter [Ω] {α : Type} [Ord α] (p : Term (α → Bool)) (s : Term (Set α)) :
          Env (Term (Set α))

          The elements of a set satisfying a predicate.

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

            setInter over two or more terms.

            Equations
            Instances For
              def Cvc.Typed.Term.setIsSingleton [Ω] {α : Type} [Ord α] (s : Term (Set α)) :

              Whether s has exactly one element.

              Equations
              Instances For
                def Cvc.Typed.Term.setCard [Ω] {α : Type} [Ord α] (s : Term (Set α)) :

                Cardinality.

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

                  The set of every element of sort α.

                  Equations
                  Instances For
                    def Cvc.Typed.Term.setComplement [Ω] {α : Type} [Ord α] (s : Term (Set α)) :
                    Env (Term (Set α))

                    Set complement, relative to the universe set of the element sort.

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

                      Set union.

                      Equations
                      Instances For
                        def Cvc.Typed.Term.setFold [Ω] {α β : Type} [Ord α] (f : Term (α → β → β)) (init : Term β) (s : Term (Set α)) :
                        Env (Term β)

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

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

                          Set difference.

                          Equations
                          Instances For
                            def Cvc.Typed.Term.setIsEmpty [Ω] {α : Type} [Ord α] (s : Term (Set α)) :

                            Whether s is empty.

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

                              The empty set of elements of sort α.

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

                                setUnion over two or more terms.

                                Equations
                                Instances For
                                  def Cvc.Typed.Term.setMap [Ω] {α β : Type} [Ord α] [Ord β] (f : Term (α → β)) (s : Term (Set α)) :
                                  Env (Term (Set β))

                                  The image of a set under a function.

                                  Equations
                                  Instances For
                                    def Cvc.Typed.Term.setSome [Ω] {α : Type} [Ord α] (p : Term (α → Bool)) (s : Term (Set α)) :

                                    Whether some element of a set satisfies a predicate.

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

                                      setMinus over two or more terms.

                                      Equations
                                      Instances For
                                        def Cvc.Typed.Term.setChoose [Ω] {α : Type} [Ord α] (s : Term (Set α)) :
                                        Env (Term α)

                                        An unspecified element of a non-empty set.

                                        Equations
                                        Instances For
                                          def Cvc.Typed.Term.setMember [Ω] {α : Type} [Ord α] (elm : Term α) (s : Term (Set α)) :

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

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

                                            Whether lft is a subset of rgt.

                                            Equations
                                            Instances For

                                              Set's operators with a result of sort Bool.

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

                                                Takes a term apart one level, at its sort, if Set 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

                                                  Set's operators with a result of sort Int.

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

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

                                                    Instances For
                                                      inductive Cvc.Typed.View.Set.OnSet [Ω] (γ : Type) [Ord γ] [ToTyp γ] :

                                                      Set's operators with a result of sort Set.

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

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

                                                        Instances For

                                                          Values #

                                                          def Cvc.Typed.Term.isSetValue [Ω] {α : Type} [Ord α] (term : Term (Set α)) :

                                                          Whether a term is a set value: a canonical union of singletons of values, as a model answers.

                                                          A set built from constructors is generally not one, and the universe set never is.

                                                          Equations
                                                          Instances For
                                                            def Cvc.Typed.Term.mkSetValue {α : Type} [Ω] [Ord α] [ToTyp α] [ValueToTerm α] (set : Set α) :
                                                            Env (Term (Set α))

                                                            The set term denoting a set of values.

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

                                                              The set of values a constant set term denotes.

                                                              Only a set value in cvc5's normal form, such as a model's answer, is accepted: a term built by mkSetValue is not one.

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

                                                                Comprehension #

                                                                { elem | bvs. pred }, whose index is the element's: the bound variables' sorts do not reach the result. See Cvc.Untyped.Term.setComprehension for what cvc5 supports of it.

                                                                def Cvc.Typed.Term.setComprehension [Ω] {β : Type} [ToTyp β] [Ord β] (bvs : BVars) (pred : Term Bool) (elem : Term β) (_nonEmpty : bvs ≠ [] := by (try simp) <;> fail "failed to prove a comprehension binds at least one variable") :
                                                                Env (Term (Set β))

                                                                The set of the values elem takes, over the bindings of bvs that satisfy pred.

                                                                Equations
                                                                Instances For