lemma subtract_simps[simp]: "left (subtract n I) = left I - n" "right (subtract n I) = right I - n" "subtract 0 I = I" "subtract x (point y) = point (y - x)" by (transfer; auto)+
definition shifted :: "I==>I set"where "shifted I = (λn. subtract n I) ` {0 .. (case right I of ∞==> left I | enat n ==> n)}"
lemma subtract_too_much: "i > (case right I of ∞==> left I | enat n ==> n) ==> subtract i I = subtract (case right I of ∞==> left I | enat n ==> n) I" by transfer (auto split: enat.splits)
lemma subtract_shifted: "subtract n I ∈ shifted I" by (cases "n ≤ (case right I of ∞==> left I | enat n ==> n)")
(auto simp: shifted_def subtract_too_much)
lemma finite_shifted: "finite (shifted I)" unfolding shifted_def by auto
definition interval :: "nat ==> enat ==>I"where "interval l r = (if l ≤ r then Abs_I (l, r) else undefined)"
lemma [code abstract]: "Rep_I (interval l r) = (if l ≤ r then (l, r) else Rep_I undefined)" unfolding interval_def using Abs_I_inverse by simp
(*<*) end (*>*)
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet am 2026-06-10)
¤
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.