Theory Lower_Bound_Certificates
section ‹Lower-Bound Certificates›
theory Lower_Bound_Certificates
imports Main
begin
subsection ‹STRIPS Planning Tasks›
type_synonym 'v state = "'v set"
record ('v) action =
pre :: "'v set"
add :: "'v set"
del :: "'v set"
cost :: nat
record ('v) strips_task =
vars :: "'v set"
acts :: "('v action) set"
init :: "'v state"
goal :: "'v set"
definition evars :: "('v action) ⇒ 'v set" where
"evars a ≡ add a ∪ del a"
definition applicable :: "('v action) ⇒ 'v state ⇒ bool" where
"applicable a s ≡ pre a ⊆ s"
definition successor :: "('v action) ⇒ 'v state ⇒ 'v state" where
"successor a s ≡ (s - del a) ∪ add a"
inductive path ::
"('v action) set ⇒ 'v state ⇒ 'v state ⇒ ('v action) list ⇒ bool"
for A :: "('v action) set"
where
path_nil: "path A s s []"
| path_cons: "⟦applicable a s; path A (successor a s) t π; a ∈ A⟧
⟹ path A s t (a # π)"
definition is_goal_state :: "('v strips_task) ⇒ 'v state ⇒ bool" where
"is_goal_state Π s ≡ goal Π ⊆ s"
definition is_plan_for :: "('v strips_task) ⇒ ('v action) list ⇒ bool" where
"is_plan_for Π π ≡ ∃s. path (acts Π) (init Π) s π ∧ is_goal_state Π s"
definition plan_cost :: "('v action) list ⇒ nat" where
"plan_cost π ≡ sum_list (map cost π)"
definition optimal_plan :: "('v strips_task) ⇒ ('v action) list ⇒ bool" where
"optimal_plan Π π ≡ is_plan_for Π π ∧
(∀π'. is_plan_for Π π' ⟶ plan_cost π ≤ plan_cost π')"
definition solvable :: "('v strips_task) ⇒ bool" where
"solvable Π ≡ ∃π. is_plan_for Π π"
subsection ‹Pseudo-Boolean Formulas›