Theory PDDL_STRIPS_Semantics
section ‹PDDL and STRIPS Semantics›
theory PDDL_STRIPS_Semantics
imports
"Propositional_Proof_Systems.Formulas"
"Propositional_Proof_Systems.Sema"
"Propositional_Proof_Systems.Consistency"
"Automatic_Refinement.Misc"
"Automatic_Refinement.Refine_Util"
begin
no_notation insert (‹_ ▹ _› [56,55] 55)
subsection ‹Utility Functions›
definition "index_by f l ≡ map_of (map (λx. (f x,x)) l)"
lemma index_by_eq_Some_eq[simp]:
assumes "distinct (map f l)"
shows "index_by f l n = Some x ⟷ (x∈set l ∧ f x = n)"
unfolding index_by_def
using assms
by (auto simp: o_def)
lemma index_by_eq_SomeD:
shows "index_by f l n = Some x ⟹ (x∈set l ∧ f x = n)"
unfolding index_by_def
by (auto dest: map_of_SomeD)
lemma lookup_zip_idx_eq:
assumes "length params = length args"
assumes "i<length args"
assumes "distinct params"
assumes "k = params ! i"
shows "map_of (zip params args) k = Some (args ! i)"
using assms
by (auto simp: in_set_conv_nth)
lemma rtrancl_image_idem[simp]: "R⇧* `` R⇧* `` s = R⇧* `` s"
by (metis relcomp_Image rtrancl_idemp_self_comp)
subsection ‹Abstract Syntax›
subsubsection ‹Generic Entities›
type_synonym name = string