Skip to content

Instantly share code, notes, and snippets.

@MarcelineVQ
Created November 25, 2019 23:32
Show Gist options
  • Save MarcelineVQ/8f53c5bfd5e86ce92bbb0868e5cdad30 to your computer and use it in GitHub Desktop.
Save MarcelineVQ/8f53c5bfd5e86ce92bbb0868e5cdad30 to your computer and use it in GitHub Desktop.
data Eventually_s : {p : a -> Type} -> Stream a -> Type where
Ev_b : p x -> Eventually_s {p} (x :: xs)
Ev_r : Not (p x) -> Eventually_s {p} xs -> Eventually_s {p} (x :: xs)
eventually_s_inv : Eventually_s {p} s -> s = x :: s' -> Not (p x) -> Eventually_s {p} s'
eventually_s_inv (Ev_b z) Refl y = void $ y z
eventually_s_inv (Ev_r f x) Refl y = x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment