Sets over nullables, typed #
Each lifted operator has its plain counterpart's signature with an Option around every argument
and around the result, and nothing else changed. The lift is strict: none unless every
argument is some.
The set term becomes nullable, not its elements — Option (Set α), not Set (Option α). The
element type is untouched, so the Ord binders are the plain operators'.
def
Cvc.Typed.Term.setInterN?
[Ω]
{α : Type}
[Ord α]
(terms : Terms (Option (Set α)))
(atLeastTwoElements : 2 ≤ Array.size terms := by
(try grind) <;> fail "failed to prove term array has at least two elements")
:
setInter? over two or more terms.
Equations
- Cvc.Typed.Term.setInterN? terms atLeastTwoElements = Cvc.Untyped.Term.setInterN? terms atLeastTwoElements
Instances For
def
Cvc.Typed.Term.setUnionN?
[Ω]
{α : Type}
[Ord α]
(terms : Terms (Option (Set α)))
(atLeastTwoElements : 2 ≤ Array.size terms := by
(try grind) <;> fail "failed to prove term array has at least two elements")
:
setUnion? over two or more terms.
Equations
- Cvc.Typed.Term.setUnionN? terms atLeastTwoElements = Cvc.Untyped.Term.setUnionN? terms atLeastTwoElements
Instances For
def
Cvc.Typed.Term.setMinusN?
[Ω]
{α : Type}
[Ord α]
(terms : Terms (Option (Set α)))
(atLeastTwoElements : 2 ≤ Array.size terms := by
(try grind) <;> fail "failed to prove term array has at least two elements")
:
setMinus? over two or more terms.
Equations
- Cvc.Typed.Term.setMinusN? terms atLeastTwoElements = Cvc.Untyped.Term.setMinusN? terms atLeastTwoElements
Instances For
setSubset lifted over nullables, strictly: none unless every argument is some.
Equations
- lft.setSubset? rgt = Cvc.Untyped.Term.setSubset? lft rgt