text‹
theory introduces the graph to be marked as a relation next on
(addresses). We assume that we have a special node nil (the
address). We have a node root from which we start marking the graph.
also assume that nil is not related by next to any node and any node is
related by next to nil. ›
locale graph = node + fixes"next" :: "('node × 'node) set" assumes next_not_nil_left: "(!! x . (nil, x) ∉ next)" assumes next_not_nil_right: "(!! x . (x, nil) ∉ next)" begin
text‹
lists of nodes we introduce two operations similar to
hd and tl for getting the head and the tail of
list. The new function head applied to a nonempty list
the head of the list, and it reurns nil when
to the empty list. The function tail returns the
of the list when applied to a non-empty list, and
returns the empty list otherwise. › definition "head S ≡ (if S = [] then nil else (hd S))"
definition "tail (S::'a list) ≡ (if S = [] then [] else (tl S))"
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.