section ‹Singly Linked List Segments› theory List_Seg imports "../Sep_Main" begin subsection ‹Nodes› text ‹ We define a node of a list to contain a data value and a next pointer. As Imperative HOL does not support null-pointers, we make the next-pointer an optional value, ‹None› representing a null pointer. Unfortunately, Imperative HOL requires some boilerplate code to define a datatype. › setup ‹Sign.add_const_constraint (@{const_name Ref}, SOME @{typ "nat ⇒ 'a::type ref"})›