Sets, typed #
The singleton set containing one element.
Equations
Instances For
setInter over two or more terms.
Equations
- Cvc.Typed.Term.setInterN terms atLeastTwoElements = Cvc.Untyped.Term.setInterN terms atLeastTwoElements
Instances For
Whether s has exactly one element.
Equations
Instances For
The set of every element of sort α.
Equations
- Cvc.Typed.Term.setUniverse = do let srtOfα ← Cvc.Srt.of α Cvc.Untyped.Term.setUniverse srtOfα
Instances For
Set complement, relative to the universe set of the element sort.
Equations
Instances For
Whether s is empty.
Equations
Instances For
The empty set of elements of sort α.
Equations
- Cvc.Typed.Term.setEmpty = do let srtOfα ← Cvc.Srt.of α Cvc.Untyped.Term.setEmpty srtOfα
Instances For
setUnion over two or more terms.
Equations
- Cvc.Typed.Term.setUnionN terms atLeastTwoElements = Cvc.Untyped.Term.setUnionN terms atLeastTwoElements
Instances For
setMinus over two or more terms.
Equations
- Cvc.Typed.Term.setMinusN terms atLeastTwoElements = Cvc.Untyped.Term.setMinusN terms atLeastTwoElements
Instances For
Set's operators with a result of sort Bool.
- setMember
[Ω]
(α : Typ)
(elm : Term α.Denote)
(s : Term (Typ.set (Typ?.typ α)).Denote)
: OnBool
Whether
elmis ins; the element comes first, as in cvc5. - setSubset
[Ω]
(α : Typ)
(lft rgt : Term (Typ.set (Typ?.typ α)).Denote)
: OnBool
Whether
lftis a subset ofrgt. - setIsEmpty
[Ω]
(α : Typ)
(s : Term (Typ.set (Typ?.typ α)).Denote)
: OnBool
Whether
sis empty. - setIsSingleton
[Ω]
(α : Typ)
(s : Term (Typ.set (Typ?.typ α)).Denote)
: OnBool
Whether
shas exactly one element. - setAll
[Ω]
(α : Typ)
(p : Term (α.function (Typ?.typ Typ.bool)).Denote)
(s : Term (Typ.set (Typ?.typ α)).Denote)
: OnBool
Whether every element of a set satisfies a predicate.
- setSome
[Ω]
(α : Typ)
(p : Term (α.function (Typ?.typ Typ.bool)).Denote)
(s : Term (Typ.set (Typ?.typ α)).Denote)
: OnBool
Whether some element of a set satisfies a predicate.
Instances For
Set's operators whose result's sort is a type variable.
- setChoose
[Ω]
{β : Type}
[ToTyp β]
(s : Term (Typ.set (Typ?.typ (Typ.of β))).Denote)
: OnAny β
An unspecified element of a non-empty set.
- setFold
[Ω]
{β : Type}
[ToTyp β]
(α : Typ)
(f : Term (α.function (Typ?.typ ((Typ.of β).function (Typ?.typ (Typ.of β))))).Denote)
(init : Term β)
(s : Term (Typ.set (Typ?.typ α)).Denote)
: OnAny β
Folds
fover the elements ofsfrominit, in no specified order.
Instances For
Set's operators with a result of sort Set.
- setSingleton
[Ω]
{γ : Type}
[Ord γ]
[ToTyp γ]
(elm : Term γ)
: OnSet γ
The singleton set containing one element.
- setInsert
[Ω]
{γ : Type}
[Ord γ]
[ToTyp γ]
(elm : Term γ)
(s : Term (Set γ))
: OnSet γ
Inserts
elmintos; the element comes first, as in cvc5. - setUnion
[Ω]
{γ : Type}
[Ord γ]
[ToTyp γ]
(kids : Kids (Set γ))
: OnSet γ
Set union.
kidsholds every operand, two or more. - setInter
[Ω]
{γ : Type}
[Ord γ]
[ToTyp γ]
(kids : Kids (Set γ))
: OnSet γ
Set intersection.
kidsholds every operand, two or more. - setMinus
[Ω]
{γ : Type}
[Ord γ]
[ToTyp γ]
(kids : Kids (Set γ))
: OnSet γ
Set difference.
kidsholds every operand, two or more. - setComplement
[Ω]
{γ : Type}
[Ord γ]
[ToTyp γ]
(s : Term (Set γ))
: OnSet γ
Set complement, relative to the universe set of the element sort.
- setMap
[Ω]
{γ : Type}
[Ord γ]
[ToTyp γ]
(α : Typ)
(f : Term (α.function (Typ?.typ (Typ.of γ))).Denote)
(s : Term (Typ.set (Typ?.typ α)).Denote)
: OnSet γ
The image of a set under a function.
- setFilter
[Ω]
{γ : Type}
[Ord γ]
[ToTyp γ]
(p : Term (γ → Bool))
(s : Term (Set γ))
: OnSet γ
The elements of a set satisfying a predicate.
- setEmpty
[Ω]
{γ : Type}
[Ord γ]
[ToTyp γ]
: OnSet γ
The empty set of elements of sort
α. - setUniverse
[Ω]
{γ : Type}
[Ord γ]
[ToTyp γ]
: OnSet γ
The set of every element of sort
α.
Instances For
Set's operators, taken apart one level, indexed by the sort each produces.
- bool
[Ω]
: OnBool → View.Set Typ.bool
An operator with a result of sort
Bool. - set
[Ω]
(γ : Typ)
[Ord γ.Denote]
: OnSet γ.Denote → View.Set (Typ.set (Typ?.typ γ))
An operator with a result of sort
Set. - int
[Ω]
: OnInt → View.Set Typ.int
An operator with a result of sort
Int. - any
[Ω]
{τ : Typ}
: OnAny τ.Denote → View.Set τ
An operator whose result's sort is a type variable.
Instances For
Values #
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
- term.isSetValue = Cvc.Untyped.Term.isSetValue term
Instances For
The set term denoting a set of values.
Instances For
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.
Instances For
Equations
- Cvc.Typed.Term.instValueToTermSet = { valueToTerm := fun [Cvc.Ω] => Cvc.Typed.Term.mkSetValue }
Equations
- Cvc.Typed.Term.instTermToValueSet = { termToValue := fun [Cvc.Ω] => Cvc.Typed.Term.getSetValue }
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.
The set of the values elem takes, over the bindings of bvs that satisfy pred.
Equations
- Cvc.Typed.Term.setComprehension bvs pred elem _nonEmpty = Cvc.Untyped.Term.setComprehension bvs.erase pred elem ⋯