This module defines many-sorted EPR problems and their BitVec encoding.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Information about a particular sort in a many-sorted EPR problem.
- type : Expr
The Lean level type of the elements in this sort.
- level : Level
The Level
uoftype : Type u. The elements of the sort as expressions. Every element is expected to have syntactically the same Lean type.
We would usually expect these to be free variables from the goal but this is not guaranteed.
Instances For
An expression representing the Nat cardinality value of the sort.
Equations
- info.cardExpr = Lean.toExpr info.card
Instances For
- prop : PredEncoding
- bool : PredEncoding
Instances For
Equations
Instances For
Information about a particular predicate in a many-sorted EPR problem.
For each of the predicate's arguments the sort it belongs to.
- encoding : PredEncoding
Whether the predicate goes to
ProporBool.
Instances For
A quantified fact in a many-sorted EPR problem.
- hyp : Normalize.Hyp
The fact itself, we expect that it has
boundSorts.sizeleading universal quantifiers, followed by an unquantified body. For each of the leading quantifiers the sort it belongs to.
Instances For
Equations
- fact.instantiateType args = (Lean.Expr.getForallBodyMaxDepth fact.boundSorts.size fact.hyp.type).instantiateRev args
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
A many-sorted EPR problem.
- sortInfo : Std.HashMap SortId SortInfo
Information about the sorts participating in the problem.
- sortMap : Std.HashMap Expr SortId
A map from sort element expressions to their associated sort.
- predInfo : Std.HashMap Expr PredInfo
Information about the predicates participating in the problem.
- groundFacts : Array Normalize.Hyp
The ground facts participating in the problem.
- quantifiedFacts : Array QuantifiedFact
The quantified facts participating in the problem. Expected to start with some amount of leading
∀followed by a quantifier free body.
Instances For
Information about a BitVec encoded sort in a many-sorted EPR problem.
- width : Nat
The chosen width for this sort.
- toBv : Expr
- toSort : Expr
- elemList : Expr
A reified list of all elements.
- elemListLt : Expr
A proof that elemList.length < 2^width
- elemListMemProofs : Std.HashMap Expr Expr
A map from elements to membership proofs in elemList.
Instances For
The BitVec type associated with the sort described by info.
Equations
- info.bvType = Lean.toTypeExpr (BitVec info.width)
Instances For
Apply the sorts BitVec injection to e.
Equations
- info.appToBv e = Lean.mkApp info.toBv e
Instances For
Instances For
A BitVec encoded many-sorted EPR problem.
- sortInfo : Std.HashMap SortId BvSortInfo
Information about the sorts participating in the problem as well as their BitVec encoding.
- sortMap : Std.HashMap Expr SortId
A map from sort element expressions to their associated sort.
- predInfo : Std.HashMap Expr BvPredInfo
Information about the predicates participating in the problem, as well as their BitVec encoding.
- groundFacts : Array Normalize.Hyp
The ground facts participating in the problem. All encoded as
BitVecfacts. - quantifiedFacts : Array QuantifiedFact
The quantified facts participating in the problem. All encoded as
BitVecfacts.