§ Simulating List from Stream

type Church = (a -> a) -> (a -> a)zero :: Churchzero f = idsucc :: Church -> Churchsucc n f = (n f) . f
type Tuple a b where  fst :: a  snd :: b-- Final encoding of option.type Option a = {b : Type} -> Tuple b (a -> b) -> bnone :: Option anone tup = tup.fstsome :: a -> Option anone a tup = tup.snd a
-- List, final encoding.type List a = (b : Type) -> (hnil : b) -> (hcons : b -> a -> b)
coinductive OnlyNone (s : Stream (Option a)) : Prop where  hdNone :: (hd s) = none  tailNone :: OnlyNone (tail s)
type EventuallyNone (s : Stream (Option a)) : Prop :=   ∃ (n : Church), OnlyNone ((n Stream.tail) s)