cvc5-cvc5-1.2.0.proofs.eo.cpc.theories.Bags.eo Maven / Gradle / Ivy
The newest version!
(include "../programs/Utils.eo")
(include "../theories/Builtin.eo")
(include "../theories/Arith.eo")
; disclaimer: >
; This sort is not in the SMT-LIB standard. All further
; function symbols over this sort are also not part of the SMT-LIB standard.
(declare-type Bag (Type))
; NOTE: permits non-set types
(declare-const bag.empty (-> (! Type :var T) T))
(declare-const bag.union_max (-> (! Type :var T :implicit) (Bag T) (Bag T) (Bag T)))
(declare-const bag.union_disjoint (-> (! Type :var T :implicit) (Bag T) (Bag T) (Bag T)))
(declare-const bag.inter_min (-> (! Type :var T :implicit) (Bag T) (Bag T) (Bag T)))
(declare-const bag.difference_subtract (-> (! Type :var T :implicit) (Bag T) (Bag T) (Bag T)))
(declare-const bag.difference_remove (-> (! Type :var T :implicit) (Bag T) (Bag T) (Bag T)))
(declare-const bag.subbag (-> (! Type :var T :implicit) (Bag T) (Bag T) Bool))
(declare-const bag.count (-> (! Type :var T :implicit) T (Bag T) Int))
(declare-const bag (-> (! Type :var T :implicit) T Int (Bag T)))
(declare-const bag.member (-> (! Type :var T :implicit) T (Bag T) Bool))
(declare-const bag.card (-> (! Type :var T :implicit) (Bag T) Int))
(declare-const bag.choose (-> (! Type :var T :implicit) (Bag T) T))
(declare-const bag.setof (-> (! Type :var T :implicit) (Bag T) (Bag T)))
(declare-const bag.is_singleton (-> (! Type :var T :implicit) (Bag T) Bool))
(declare-const bag.filter (-> (! Type :var T :implicit) (-> T Bool) (Bag T) (Bag T)))
(declare-const bag.map (-> (! Type :var T :implicit) (! Type :var U :implicit) (-> T U) (Bag T) (Bag U)))
(declare-const bag.fold (-> (! Type :var T :implicit) (! Type :var U :implicit) (-> T U U) U (Bag T) U))
(declare-const table.product (-> (! Type :var T :implicit) (! Type :var U :implicit) (Bag T) (Bag U) (Bag (eo::list_concat Tuple U T))))
(declare-const table.group (-> (! Type :var T :implicit) @List (Bag T) (Bag (Bag T))))
; Skolems for the theory of bags.
(declare-const @bags_deq_diff (-> (! Type :var T :implicit) (! (Bag T) :opaque) (! (Bag T) :opaque) T))
(declare-const @tables_group_part (-> (! Type :var T :implicit) (! (Bag (Bag T)) :opaque) T (Bag T)))
(declare-const @tables_group_part_element (-> (! Type :var T :implicit) (! (Bag (Bag T)) :opaque) (! (Bag T) :opaque) T))
(declare-const @bags_map_sum (->
(! Type :var T :implicit) (! Type :var U :implicit)
(! (-> T U) :opaque) (! (Bag T) :opaque) (! U :opaque) Int
Int))
(declare-const @bags_distinct_elements (-> (! Type :var T :implicit) (! (Bag T) :opaque) Int T))
(declare-const @bags_distinct_elements_size (-> (! Type :var T :implicit) (! (Bag T) :opaque) Int))
(declare-const @bags_map_preimage_injective (->
(! Type :var T :implicit) (! Type :var U :implicit)
(! (-> T U) :opaque) (! (Bag T) :opaque) (! U :opaque)
T))
;(declare-const bag.from_set (# x term (apply f_bag.from_set x)))
;(declare-const bag.to_set (# x term (apply f_bag.to_set x)))
; The following skolems are not handled currently:
;BAGS_CARD_CARDINALITY
;BAGS_DISTINCT_ELEMENTS_UNION_DISJOINT
;BAGS_CHOOSE
;BAGS_FOLD_CARD
;BAGS_FOLD_COMBINE
;BAGS_FOLD_ELEMENTS
;BAGS_FOLD_UNION_DISJOINT
;BAGS_DISTINCT_ELEMENTS
;BAGS_DISTINCT_ELEMENTS_SIZE
;BAGS_MAP_INDEX
;BAGS_MAP_SUM