All variables i have a primed and an unprimed version,
represented by 2 * i + 1 and 2 * i respectively.
@[simp]
@[simp]
Equations
- STRIPS.VarSet.unprimedVars n = STRIPS.VarSet.ofFn fun (i : Fin (2 * n)) => decide (Even ↑i)
Instances For
Equations
- M.unprimedState = {i : Fin n | M i.toUnprimed}
Instances For
Swap the primed and unprimed versions of the variables in V and replace the other primed variables with their even version.
Equations
Instances For
theorem
Validator.Formula.Model.exists_model_of_state
{n : ℕ}
(s : STRIPS.State n)
:
∃ (M : Model (2 * n)), s = M.unprimedState
class
Validator.Formalism
{n : ℕ}
(pt : STRIPS.PlanningTask n)
(R : Type)
extends Validator.Formula (2 * n) R :
- toStates (φ : R) : STRIPS.States n
Instances
@[implicit_reducible]
instance
Validator.instFormalismStates
{n : ℕ}
{pt : STRIPS.PlanningTask n}
:
Formalism pt (STRIPS.States n)
Equations
- One or more equations did not get rendered due to their size.
@[reducible, inline]
abbrev
Validator.Formalism.Variable
{n : ℕ}
(pt : STRIPS.PlanningTask n)
(R : Type)
[Formalism pt R]
:
Equations
- Validator.Formalism.Variable pt R = R
Instances For
def
Validator.Formalism.Variable.models
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
:
Variable pt R → Formula.Models (2 * n)
Instances For
@[reducible, inline]
abbrev
Validator.Formalism.Variable.vars
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
:
Variable pt R → STRIPS.VarSet (2 * n)
Instances For
def
Validator.Formalism.Variable.toStates
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
:
Variable pt R → STRIPS.States n
Instances For
theorem
Validator.Formalism.Variable.toStates_eq
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
{x : Variable pt R}
:
@[implicit_reducible]
instance
Validator.Formalism.Variable.instMembershipFinHMulNatOfNat
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[F : Formalism pt R]
:
Membership (Fin (2 * n)) (Variable pt R)
Equations
- Validator.Formalism.Variable.instMembershipFinHMulNatOfNat = { mem := fun (x : Validator.Formalism.Variable pt R) (i : Fin (2 * n)) => i ∈ x.vars }
@[reducible, inline]
abbrev
Validator.Formalism.UnprimedVariable
{n : ℕ}
(pt : STRIPS.PlanningTask n)
(R : Type)
[F : Formalism pt R]
:
Equations
- Validator.Formalism.UnprimedVariable pt R = { x : Validator.Formalism.Variable pt R // x.vars.IsUnprimed }
Instances For
def
Validator.Formalism.UnprimedVariable.ofVarSet
{n : ℕ}
{pt : STRIPS.PlanningTask n}
(R : Type)
[Formalism pt R]
[h : Formula.OfPartialModel (2 * n) R]
(V : STRIPS.VarSet n)
(pos : Bool := true)
:
UnprimedVariable pt R
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]
theorem
Validator.Formalism.UnprimedVariable.mem_vars_ofVarSet
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
[h : Formula.OfPartialModel (2 * n) R]
{V : STRIPS.VarSet n}
{pos : Bool}
{i : Fin (2 * n)}
:
@[simp]
theorem
Validator.Formalism.UnprimedVariable.mem_models_ofVarSet
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
[h : Formula.OfPartialModel (2 * n) R]
{V : STRIPS.VarSet n}
{pos : Bool}
{M : Formula.Model (2 * n)}
:
theorem
Validator.Formalism.UnprimedVariable.mem_models_of_eq_toState
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
{x : UnprimedVariable pt R}
{M M' : Formula.Model (2 * n)}
:
M.unprimedState = M'.unprimedState → M ∈ (↑x).models → M' ∈ (↑x).models
theorem
Validator.Formalism.UnprimedVariable.mem_models_iff_of_eq_unprimedState
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
{x : Variable pt R}
{M M' : Formula.Model (2 * n)}
:
x.vars.IsUnprimed → M.unprimedState = M'.unprimedState → (M ∈ x.models ↔ M' ∈ x.models)
def
Validator.Formalism.UnprimedVariable.toPrimed
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
[Formula.Rename (2 * n) R]
(x : UnprimedVariable pt R)
(V : STRIPS.VarSet n)
:
Variable pt R
Equations
Instances For
theorem
Validator.Formalism.UnprimedVariable.mem_models_toPrimed_iff
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
[Formula.Rename (2 * n) R]
{x : UnprimedVariable pt R}
{V : STRIPS.VarSet n}
{M : Formula.Model (2 * n)}
:
inductive
Validator.Formalism.Literal
{n : ℕ}
(pt : STRIPS.PlanningTask n)
(R : Type)
[Formalism pt R]
:
- pos {n : ℕ} {pt : STRIPS.PlanningTask n} {R : Type} [Formalism pt R] : Variable pt R → Literal pt R
- neg {n : ℕ} {pt : STRIPS.PlanningTask n} {R : Type} [Formalism pt R] : Variable pt R → Literal pt R
Instances For
def
Validator.Formalism.Literal.models
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
:
Literal pt R → Formula.Models (2 * n)
Equations
Instances For
def
Validator.Formalism.Literal.toStates
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
:
Literal pt R → STRIPS.States n
Equations
Instances For
inductive
Validator.Formalism.UnprimedLiteral
{n : ℕ}
(pt : STRIPS.PlanningTask n)
(R : Type)
[Formalism pt R]
:
- pos {n : ℕ} {pt : STRIPS.PlanningTask n} {R : Type} [Formalism pt R] : UnprimedVariable pt R → UnprimedLiteral pt R
- neg {n : ℕ} {pt : STRIPS.PlanningTask n} {R : Type} [Formalism pt R] : UnprimedVariable pt R → UnprimedLiteral pt R
Instances For
def
Validator.Formalism.UnprimedLiteral.val
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
:
UnprimedLiteral pt R → Literal pt R
Equations
Instances For
@[simp]
theorem
Validator.Formalism.UnprimedLiteral.val_pos
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
{x : UnprimedVariable pt R}
:
@[simp]
theorem
Validator.Formalism.UnprimedLiteral.val_neg
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
{x : UnprimedVariable pt R}
:
theorem
Validator.Formalism.UnprimedLiteral.toStates_eq
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
{l : UnprimedLiteral pt R}
:
theorem
Validator.Formalism.UnprimedLiteral.subset_states_iff_subset_models
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R1 R2 : Type}
[Formalism pt R1]
[Formalism pt R2]
(l1 : UnprimedLiteral pt R1)
(l2 : UnprimedLiteral pt R2)
:
@[reducible, inline]
abbrev
Validator.Formalism.Variables
{n : ℕ}
(pt : STRIPS.PlanningTask n)
(R : Type)
[Formalism pt R]
:
Equations
Instances For
def
Validator.Formalism.Variables.single
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
:
Instances For
def
Validator.Formalism.Variables.inter
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[F : Formalism pt R]
(X : Variables pt R)
:
Equations
- X.inter = {s : STRIPS.State n | ∃ (M : Validator.Formula.Model (2 * n)), M.unprimedState = s ∧ ∀ x ∈ X, M ∈ x.models}
Instances For
theorem
Validator.Formalism.Variables.mem_inter
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
{X : Variables pt R}
(s : STRIPS.State n)
:
def
Validator.Formalism.Variables.union
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[F : Formalism pt R]
(X : Variables pt R)
:
Equations
- X.union = {s : STRIPS.State n | ∃ (M : Validator.Formula.Model (2 * n)), M.unprimedState = s ∧ ∃ x ∈ X, M ∈ x.models}
Instances For
theorem
Validator.Formalism.Variables.mem_union
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
{X : Variables pt R}
(s : STRIPS.State n)
:
@[reducible, inline]
abbrev
Validator.Formalism.UnprimedVariables
{n : ℕ}
(pt : STRIPS.PlanningTask n)
(R : Type)
[Formalism pt R]
:
Equations
Instances For
def
Validator.Formalism.UnprimedVariables.val
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
:
UnprimedVariables pt R → Variables pt R
Instances For
def
Validator.Formalism.UnprimedVariables.single
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
:
UnprimedVariable pt R → UnprimedVariables pt R
Instances For
@[simp]
theorem
Validator.Formalism.UnprimedVariables.val_single
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
{x : UnprimedVariable pt R}
:
theorem
Validator.Formalism.UnprimedVariables.val_append
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
{L1 L2 : UnprimedVariables pt R}
:
@[simp]
theorem
Validator.Formalism.UnprimedVariables.mem_inter
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[F : Formalism pt R]
{X : UnprimedVariables pt R}
{s : STRIPS.State n}
:
theorem
Validator.Formalism.UnprimedVariables.inter_subset_union_iff_models
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[F : Formalism pt R]
(X1 : Variables pt R)
(X2 : UnprimedVariables pt R)
:
X1.inter ⊆ X2.val.union ↔ ∀ (M : Formula.Model (2 * n)), (∀ x ∈ X1, M ∈ Formula.models x) → ∃ x ∈ X2, M ∈ (↑x).models
def
Validator.Formalism.UnprimedVariables.toPrimed
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[F : Formalism pt R]
[Formula.Rename (2 * n) R]
(X : UnprimedVariables pt R)
(V : STRIPS.VarSet n)
:
Variables pt R
Equations
- X.toPrimed V = List.map (fun (x : Validator.Formalism.UnprimedVariable pt R) => x.toPrimed V) X
Instances For
theorem
Validator.Formalism.UnprimedVariables.mem_inter_toPrimed
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[F : Formalism pt R]
[Formula.Rename (2 * n) R]
{X : UnprimedVariables pt R}
{V : STRIPS.VarSet n}
{s : STRIPS.State n}
:
@[reducible, inline]
abbrev
Validator.Formalism.Literals
{n : ℕ}
(pt : STRIPS.PlanningTask n)
(R : Type)
[Formalism pt R]
:
Equations
Instances For
def
Validator.Formalism.Literals.pos
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
(X : Variables pt R)
:
Literals pt R
Instances For
@[implicit_reducible]
instance
Validator.Formalism.Literals.instAppend
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
:
Equations
- Validator.Formalism.Literals.instAppend = { append := fun (L1 L2 : Validator.Formalism.Literals pt R) => (L1.1 ++ L2.1, L1.2 ++ L2.2) }
@[simp]
theorem
Validator.Formalism.Literals.append_pos
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
{L1 L2 : Literals pt R}
:
@[simp]
theorem
Validator.Formalism.Literals.append_neg
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
{L1 L2 : Literals pt R}
:
def
Validator.Formalism.Literals.union
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
(L : Literals pt R)
:
Equations
Instances For
@[simp]
theorem
Validator.Formalism.Literals.mem_union
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
{ls : Literals pt R}
{s : STRIPS.State n}
:
def
Validator.Formalism.Literals.inter
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
(L : Literals pt R)
:
Equations
Instances For
@[simp]
theorem
Validator.Formalism.Literals.mem_inter
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
{L : Literals pt R}
{s : STRIPS.State n}
:
@[reducible, inline]
abbrev
Validator.Formalism.UnprimedLiterals
{n : ℕ}
(pt : STRIPS.PlanningTask n)
(R : Type)
[Formalism pt R]
:
Equations
Instances For
def
Validator.Formalism.UnprimedLiterals.val
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
:
UnprimedLiterals pt R → Literals pt R
Equations
Instances For
@[reducible, inline]
abbrev
Validator.Formalism.UnprimedLiterals.empty
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
:
UnprimedLiterals pt R
Instances For
def
Validator.Formalism.UnprimedLiterals.single
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
:
UnprimedLiteral pt R → UnprimedLiterals pt R
Equations
Instances For
@[simp]
theorem
Validator.Formalism.UnprimedLiterals.union_single
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
{l : UnprimedLiteral pt R}
:
@[simp]
theorem
Validator.Formalism.UnprimedLiterals.inter_single
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
{l : UnprimedLiteral pt R}
:
@[implicit_reducible]
instance
Validator.Formalism.UnprimedLiterals.instAppend
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
:
Append (UnprimedLiterals pt R)
Equations
- Validator.Formalism.UnprimedLiterals.instAppend = { append := fun (L1 L2 : Validator.Formalism.UnprimedLiterals pt R) => (L1.1 ++ L2.1, L1.2 ++ L2.2) }
@[simp]
theorem
Validator.Formalism.UnprimedLiterals.append_def
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
(L1 L2 : UnprimedLiterals pt R)
:
@[simp]
theorem
Validator.Formalism.UnprimedLiterals.val_append
{n : ℕ}
{pt : STRIPS.PlanningTask n}
{R : Type}
[Formalism pt R]
{L1 L2 : UnprimedLiterals pt R}
:
inductive
Validator.Formalism.IsVariable
{n : ℕ}
(pt : STRIPS.PlanningTask n)
(R : Type)
[Formalism pt R]
:
STRIPS.States n → Prop
- empty {n : ℕ} {pt : STRIPS.PlanningTask n} {R : Type} [Formalism pt R] : IsVariable pt R ∅
- init {n : ℕ} {pt : STRIPS.PlanningTask n} {R : Type} [Formalism pt R] : IsVariable pt R {pt.init}
- goal {n : ℕ} {pt : STRIPS.PlanningTask n} {R : Type} [Formalism pt R] : IsVariable pt R pt.goalStates
- explicit {n : ℕ} {pt : STRIPS.PlanningTask n} {R : Type} [Formalism pt R] (φ : R) : IsVariable pt R (toStates pt φ)
Instances For
inductive
Validator.Formalism.IsLiteral
{n : ℕ}
(pt : STRIPS.PlanningTask n)
(R : Type)
[Formalism pt R]
:
STRIPS.States n → Prop
- pos {n : ℕ} {pt : STRIPS.PlanningTask n} {R : Type} [Formalism pt R] {S : STRIPS.States n} : IsVariable pt R S → IsLiteral pt R S
- neg {n : ℕ} {pt : STRIPS.PlanningTask n} {R : Type} [Formalism pt R] {S : STRIPS.States n} : IsVariable pt R S → IsLiteral pt R Sᶜ
Instances For
inductive
Validator.Formalism.IsLiteralUnion
{n : ℕ}
(pt : STRIPS.PlanningTask n)
(R : Type)
[Formalism pt R]
:
STRIPS.States n → Prop
- single {n : ℕ} {pt : STRIPS.PlanningTask n} {R : Type} [Formalism pt R] {S : STRIPS.States n} : IsLiteral pt R S → IsLiteralUnion pt R S
- union {n : ℕ} {pt : STRIPS.PlanningTask n} {R : Type} [Formalism pt R] {S S' : STRIPS.States n} : IsLiteralUnion pt R S → IsLiteralUnion pt R S' → IsLiteralUnion pt R (S ∪ S')
Instances For
inductive
Validator.Formalism.IsVariableInter
{n : ℕ}
(pt : STRIPS.PlanningTask n)
(R : Type)
[Formalism pt R]
:
STRIPS.States n → Prop
- single {n : ℕ} {pt : STRIPS.PlanningTask n} {R : Type} [Formalism pt R] {S : STRIPS.States n} : IsVariable pt R S → IsVariableInter pt R S
- inter {n : ℕ} {pt : STRIPS.PlanningTask n} {R : Type} [Formalism pt R] {S S' : STRIPS.States n} : IsVariableInter pt R S → IsVariableInter pt R S' → IsVariableInter pt R (S ∩ S')
Instances For
inductive
Validator.Formalism.IsLiteralInter
{n : ℕ}
(pt : STRIPS.PlanningTask n)
(R : Type)
[Formalism pt R]
:
STRIPS.States n → Prop
- single {n : ℕ} {pt : STRIPS.PlanningTask n} {R : Type} [Formalism pt R] {S : STRIPS.States n} : IsLiteral pt R S → IsLiteralInter pt R S
- inter {n : ℕ} {pt : STRIPS.PlanningTask n} {R : Type} [Formalism pt R] {S S' : STRIPS.States n} : IsLiteralInter pt R S → IsLiteralInter pt R S' → IsLiteralInter pt R (S ∩ S')
Instances For
inductive
Validator.Formalism.IsProgrInter
{n : ℕ}
(pt : STRIPS.PlanningTask n)
(R : Type)
[Formalism pt R]
:
STRIPS.States n → Prop
- empty {n : ℕ} {pt : STRIPS.PlanningTask n} {R : Type} [Formalism pt R] {S : STRIPS.States n} {A : STRIPS.Actions n} : IsVariableInter pt R S → IsProgrInter pt R (STRIPS.progression S A)
- inter {n : ℕ} {pt : STRIPS.PlanningTask n} {R : Type} [Formalism pt R] {S S' : STRIPS.States n} {A : STRIPS.Actions n} : IsVariableInter pt R S → IsLiteralInter pt R S' → IsProgrInter pt R (STRIPS.progression S A ∩ S')
Instances For
inductive
Validator.Formalism.IsRegrInter
{n : ℕ}
(pt : STRIPS.PlanningTask n)
(R : Type)
[Formalism pt R]
:
STRIPS.States n → Prop
- empty {n : ℕ} {pt : STRIPS.PlanningTask n} {R : Type} [Formalism pt R] {S : STRIPS.States n} {A : STRIPS.Actions n} : IsVariableInter pt R S → IsRegrInter pt R (STRIPS.regression S A)
- inter {n : ℕ} {pt : STRIPS.PlanningTask n} {R : Type} [Formalism pt R] {S S' : STRIPS.States n} {A : STRIPS.Actions n} : IsVariableInter pt R S → IsLiteralInter pt R S' → IsRegrInter pt R (STRIPS.regression S A ∩ S')