fixrec smap :: "('a → 'b) → 'a seq → 'b seq" where
smap_nil: "smap ⋅ f ⋅ nil = nil"
| smap_cons: "x ≠ UU ==> smap ⋅ f ⋅ (x ## xs) = (f ⋅ x) ## smap ⋅ f ⋅ xs"
lemma smap_UU [simp]: "smap ⋅ f ⋅ UU = UU" by fixrec_simp
subsubsection‹‹sfilter››
fixrec sfilter :: "('a → tr) → 'a seq → 'a seq" where
sfilter_nil: "sfilter ⋅ P ⋅ nil = nil"
| sfilter_cons: "x ≠ UU ==> sfilter ⋅ P ⋅ (x ## xs) = (If P ⋅ x then x ## (sfilter ⋅ P ⋅ xs) else sfilter ⋅ P ⋅ xs)"
lemma sfilter_UU [simp]: "sfilter ⋅ P ⋅ UU = UU" by fixrec_simp
subsubsection‹‹sforall2››
fixrec sforall2 :: "('a → tr) → 'a seq → tr" where
sforall2_nil: "sforall2 ⋅ P ⋅ nil = TT"
| sforall2_cons: "x ≠ UU ==> sforall2 ⋅ P ⋅ (x ## xs) = ((P ⋅ x) andalso sforall2 ⋅ P ⋅ xs)"
lemma sforall2_UU [simp]: "sforall2 ⋅ P ⋅ UU = UU" by fixrec_simp
definition"sforall P t ⟷ sforall2 ⋅ P ⋅ t ≠ FF"
subsubsection‹‹stakewhile››
fixrec stakewhile :: "('a → tr) → 'a seq → 'a seq" where
stakewhile_nil: "stakewhile ⋅ P ⋅ nil = nil"
| stakewhile_cons: "x ≠ UU ==> stakewhile ⋅ P ⋅ (x ## xs) = (If P ⋅ x then x ## (stakewhile ⋅ P ⋅ xs) else nil)"
lemma stakewhile_UU [simp]: "stakewhile ⋅ P ⋅ UU = UU" by fixrec_simp
subsubsection‹‹sdropwhile››
fixrec sdropwhile :: "('a → tr) → 'a seq → 'a seq" where
sdropwhile_nil: "sdropwhile ⋅ P ⋅ nil = nil"
| sdropwhile_cons: "x ≠ UU ==> sdropwhile ⋅ P ⋅ (x ## xs) = (If P ⋅ x then sdropwhile ⋅ P ⋅ xs else x ## xs)"
lemma sdropwhile_UU [simp]: "sdropwhile ⋅ P ⋅ UU = UU" by fixrec_simp
lemma Finite_upward: "Finite x ==> x ⊑ y ==> Finite y" apply (induct arbitrary: y set: Finite) apply (case_tac y, simp, simp, simp) apply (case_tac y, simp, simp) apply simp done
lemma adm_Finite [simp]: "adm Finite" by (rule adm_upward) (rule Finite_upward)
subsection‹Induction›
text‹Extensions to Induction Theorems.›
lemma seq_finite_ind_lemma: assumes"∧n. P (seq_take n ⋅ s)" shows"seq_finite s ⟶ P s" apply (unfold seq.finite_def) apply (intro strip) apply (erule exE) apply (erule subst) apply (rule assms) done
lemma seq_finite_ind: assumes"P UU" and"P nil" and"∧x s1. x ≠ UU ==> P s1 ==> P (x ## s1)" shows"seq_finite s ⟶ P s" apply (insert assms) apply (rule seq_finite_ind_lemma) apply (erule seq.finite_induct) apply assumption apply simp done
end
Messung V0.5 in Prozent
¤ 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.0.0Bemerkung:
(vorverarbeitet am 2026-06-30)
¤
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.