Sets of Variables #
This file implements set of variables with the aim to be both easy to work with and effient at runtime.
Sets of variables #
@[implicit_reducible]
@[implicit_reducible]
Equations
@[reducible]
Equations
- STRIPS.VarSet.instHasSubset = { Subset := fun (V V' : STRIPS.VarSet n) => ∀ (i : Fin n), i ∈ V → i ∈ V' }
@[implicit_reducible]
Equations
- STRIPS.VarSet.instEmptyCollection = { emptyCollection := { toBitVec := BitVec.zero n } }
Return the VarSet containing all variables in V and the variable i.
Equations
- STRIPS.VarSet.insert i V = { toBitVec := V.toBitVec ||| BitVec.twoPow n ↑i }
Instances For
Return the VarSet containing all variables.
Equations
- STRIPS.VarSet.all = { toBitVec := BitVec.allOnes n }
Instances For
Return the VarSet containing all variables i for which f i is true.
Equations
- STRIPS.VarSet.ofFn f = { toBitVec := BitVec.ofFnLE f }
Instances For
@[implicit_reducible]
Equations
- STRIPS.VarSet.instUnion = { union := fun (V V' : STRIPS.VarSet n) => { toBitVec := V.toBitVec ||| V'.toBitVec } }
@[implicit_reducible]
Equations
- STRIPS.VarSet.instInter = { inter := fun (V V' : STRIPS.VarSet n) => { toBitVec := V.toBitVec &&& V'.toBitVec } }
@[implicit_reducible]
Equations
- STRIPS.VarSet.instCompl = { compl := fun (V : STRIPS.VarSet n) => { toBitVec := ~~~V.toBitVec } }
Folds a function over all variables in V with starting value init. The variables are combined
in increasing order.
Equations
Instances For
Return the VarSet containing the variables f i for every variable i in V.
Equations
- V.map f = STRIPS.VarSet.foldl (fun (V' : STRIPS.VarSet m) (i : Fin n) => STRIPS.VarSet.insert (f i) V') ∅ V
Instances For
@[implicit_reducible]
Equations
- One or more equations did not get rendered due to their size.
@[implicit_reducible]
Equations
- STRIPS.VarSet.instToString = { toString := fun (V : STRIPS.VarSet n) => (Std.format V).pretty }