Example. Wellformedness for oots [isa-002A]

We define well, an inductive wellformedness predicate for oots sequences, that state there are no segments of zero length, and that no two adjacent segments have the same oot value.

inductive well :: ‹oots ⇒ bool› where ‹well Empty› | ‹n > 0 ⟹ well (ONEs n Empty)› | ‹n > 0 ⟹ well (TWOs n Empty)› | ‹n > 0 ⟹ well (ONEs m r) ⟹ well (TWOs n (ONEs m r))› | ‹n > 0 ⟹ well (TWOs m r) ⟹ well (ONEs n (TWOs m r))›