Bags, typed #
Difference removing every element occurring on the right.
Equations
- lft.bagDifferenceRemove rgt = Cvc.Untyped.Term.bagDifferenceRemove lft rgt
Instances For
Union taking the maximum of the multiplicities.
Equations
- lft.bagUnionMax rgt = Cvc.Untyped.Term.bagUnionMax lft rgt
Instances For
bagInterMin over two or more terms.
Equations
- Cvc.Typed.Term.bagInterMinN terms atLeastTwoElements = Cvc.Untyped.Term.bagInterMinN terms atLeastTwoElements
Instances For
The empty bag of elements of sort α.
Equations
- Cvc.Typed.Term.bagEmpty = do let srtOfα ← Cvc.Srt.of α Cvc.Untyped.Term.bagEmpty srtOfα
Instances For
Intersection taking the minimum of the multiplicities.
Equations
- lft.bagInterMin rgt = Cvc.Untyped.Term.bagInterMin lft rgt
Instances For
Difference subtracting the multiplicities.
Equations
- lft.bagDifferenceSubtract rgt = Cvc.Untyped.Term.bagDifferenceSubtract lft rgt
Instances For
bagUnionDisjoint over two or more terms.
Equations
- Cvc.Typed.Term.bagUnionDisjointN terms atLeastTwoElements = Cvc.Untyped.Term.bagUnionDisjointN terms atLeastTwoElements
Instances For
Union adding the multiplicities.
Equations
- lft.bagUnionDisjoint rgt = Cvc.Untyped.Term.bagUnionDisjoint lft rgt
Instances For
bagUnionMax over two or more terms.
Equations
- Cvc.Typed.Term.bagUnionMaxN terms atLeastTwoElements = Cvc.Untyped.Term.bagUnionMaxN terms atLeastTwoElements
Instances For
Bag's operators with a result of sort Bag.
- bagMake
[Ω]
{γ : Type}
[Ord γ]
[ToTyp γ]
(elm : Term γ)
(count : Term Int)
: OnBag γ
The bag holding
elmcounttimes; the element comes first, as in cvc5. - bagSetof
[Ω]
{γ : Type}
[Ord γ]
[ToTyp γ]
(b : Term (Bag γ))
: OnBag γ
Duplicate removal, yielding a bag whose multiplicities are all at most one.
- bagUnionMax
[Ω]
{γ : Type}
[Ord γ]
[ToTyp γ]
(kids : Kids (Bag γ))
: OnBag γ
Union taking the maximum of the multiplicities.
kidsholds every operand, two or more. - bagUnionDisjoint
[Ω]
{γ : Type}
[Ord γ]
[ToTyp γ]
(kids : Kids (Bag γ))
: OnBag γ
Union adding the multiplicities.
kidsholds every operand, two or more. - bagInterMin
[Ω]
{γ : Type}
[Ord γ]
[ToTyp γ]
(kids : Kids (Bag γ))
: OnBag γ
Intersection taking the minimum of the multiplicities.
kidsholds every operand, two or more. - bagDifferenceSubtract
[Ω]
{γ : Type}
[Ord γ]
[ToTyp γ]
(lft rgt : Term (Bag γ))
: OnBag γ
Difference subtracting the multiplicities.
- bagDifferenceRemove
[Ω]
{γ : Type}
[Ord γ]
[ToTyp γ]
(lft rgt : Term (Bag γ))
: OnBag γ
Difference removing every element occurring on the right.
- bagMap
[Ω]
{γ : Type}
[Ord γ]
[ToTyp γ]
(α : Typ)
(f : Term (α.function (Typ?.typ (Typ.of γ))).Denote)
(b : Term (Typ.bag (Typ?.typ α)).Denote)
: OnBag γ
The image of a bag under a function.
- bagFilter
[Ω]
{γ : Type}
[Ord γ]
[ToTyp γ]
(p : Term (γ → Bool))
(b : Term (Bag γ))
: OnBag γ
The elements of a bag satisfying a predicate, with their multiplicities.
- bagPartition
[Ω]
{γ : Type}
[Ord γ]
[ToTyp γ]
(α : Typ)
{h0 : Typ.of γ = Typ.bag (Typ?.typ α)}
(p : Term (α.function (Typ?.typ (α.function (Typ?.typ Typ.bool)))).Denote)
(b : Term (Typ.bag (Typ?.typ α)).Denote)
: OnBag γ
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.
- bagEmpty
[Ω]
{γ : Type}
[Ord γ]
[ToTyp γ]
: OnBag γ
The empty bag of elements of sort
α.
Instances For
Bag's operators whose result's sort is a type variable.
- bagChoose
[Ω]
{β : Type}
[ToTyp β]
(b : Term (Typ.bag (Typ?.typ (Typ.of β))).Denote)
: OnAny β
An unspecified element of a non-empty bag.
- bagFold
[Ω]
{β : Type}
[ToTyp β]
(α : Typ)
(f : Term (α.function (Typ?.typ ((Typ.of β).function (Typ?.typ (Typ.of β))))).Denote)
(init : Term β)
(b : Term (Typ.bag (Typ?.typ α)).Denote)
: OnAny β
Folds
fover the elements ofbfrominit, in no specified order.
Instances For
Bag's operators with a result of sort Int.
- bagCount
[Ω]
(α : Typ)
(elm : Term α.Denote)
(b : Term (Typ.bag (Typ?.typ α)).Denote)
: OnInt
Multiplicity of
elminb; the element comes first, as in cvc5. - bagCard
[Ω]
(α : Typ)
(b : Term (Typ.bag (Typ?.typ α)).Denote)
: OnInt
Cardinality, counting multiplicities.
Instances For
Bag's operators, taken apart one level, indexed by the sort each produces.
- bool
[Ω]
: OnBool → View.Bag Typ.bool
An operator with a result of sort
Bool. - bag
[Ω]
(γ : Typ)
[Ord γ.Denote]
: OnBag γ.Denote → View.Bag (Typ.bag (Typ?.typ γ))
An operator with a result of sort
Bag. - int
[Ω]
: OnInt → View.Bag Typ.int
An operator with a result of sort
Int. - any
[Ω]
{τ : Typ}
: OnAny τ.Denote → View.Bag τ
An operator whose result's sort is a type variable.
Instances For
Bag's operators with a result of sort Bool.
- bagMember
[Ω]
(α : Typ)
(elm : Term α.Denote)
(b : Term (Typ.bag (Typ?.typ α)).Denote)
: OnBool
Whether
elmis inb; the element comes first, as in cvc5. - bagSubbag
[Ω]
(α : Typ)
(lft rgt : Term (Typ.bag (Typ?.typ α)).Denote)
: OnBool
Whether every multiplicity in
lftis at most the one inrgt. - bagAll
[Ω]
(α : Typ)
(p : Term (α.function (Typ?.typ Typ.bool)).Denote)
(b : Term (Typ.bag (Typ?.typ α)).Denote)
: OnBool
Whether every element of a bag satisfies a predicate.
- bagSome
[Ω]
(α : Typ)
(p : Term (α.function (Typ?.typ Typ.bool)).Denote)
(b : Term (Typ.bag (Typ?.typ α)).Denote)
: OnBool
Whether some element of a bag satisfies a predicate.
Instances For
Values #
The bag term denoting a bag of values.
Instances For
The bag of values a constant bag term denotes.
Instances For
Equations
- Cvc.Typed.Term.instValueToTermBag = { valueToTerm := fun [Cvc.Ω] => Cvc.Typed.Term.mkBagValue }
Equations
- Cvc.Typed.Term.instTermToValueBag = { termToValue := fun [Cvc.Ω] => Cvc.Typed.Term.getBagValue }