text‹
Lifting an order to lists of elements, relating exactly one
element. ›
definition
step1 :: "('a => 'a => bool) => 'a list => 'a list => bool"where "step1 r =
(λys xs. ∃us z z' vs. xs = us @ z # vs \ r z' z ∧ ys =
us @ z' # vs)"
lemma Cons_step1_Cons [iff]: "(step1 r (y # ys) (x # xs)) =
(r y x ∧ xs = ys ∨ x = y ∧ step1 r ys xs)" apply (unfold step1_def) apply (rule iffI) apply (erule exE) apply (rename_tac ts) apply (case_tac ts) apply fastforce apply force apply (erule disjE) apply blast apply (blast intro: Cons_eq_appendI) done
lemma append_step1I: "step1 r ys xs \ vs = us \ ys = xs \ step1 r vs us
==> step1 r (ys @ vs) (xs @ us)" apply (unfold step1_def) apply auto apply blast apply (blast intro: append_eq_appendI) done
lemma Cons_step1E [elim!]: assumes"step1 r ys (x # xs)" and"!!y. ys = y # xs \ r y x \ R" and"!!zs. ys = x # zs \ step1 r zs xs \ R" shows R using assms apply (cases ys) apply (simp add: step1_def) apply blast done
lemma Snoc_step1_SnocD: "step1 r (ys @ [y]) (xs @ [x])
==> (step1 r ys xs ∧ y = x ∨ ys = xs ∧ r y x)" apply (unfold step1_def) apply (clarify del: disjCI) apply (rename_tac vs) apply (rule_tac xs = vs in rev_exhaust) apply force apply simp apply blast done
lemma ex_step1I: "[| x \ set xs; r y x |]
==> ∃ys. step1 r ys xs ∧ y ∈ set ys" apply (unfold step1_def) apply (drule in_set_conv_decomp [THEN iffD1]) apply force done
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.