Skip to content

Instantly share code, notes, and snippets.

@netogallo
Created February 27, 2014 20:58
Show Gist options
  • Select an option

  • Save netogallo/9259409 to your computer and use it in GitHub Desktop.

Select an option

Save netogallo/9259409 to your computer and use it in GitHub Desktop.
Agda loop
data _==_ {a} {A : Set a} (x : A) : A → Set a where
Refl : x == x
data SubList {a : Set} : List a -> List a -> Set where
Base : SubList Nil Nil
Keep : forall {x xs ys} -> SubList xs ys -> SubList (Cons x xs) (Cons x ys)
Drop : forall {y zs ys} -> SubList zs ys -> SubList zs (Cons y ys)
SubListAntiSym' : {a : Set} {xs ys : List a} -> SubList xs ys -> SubList ys xs -> xs == ys
SubListAntiSym' Base slb = Refl
SubListAntiSym' (Keep sla) slb = SubListAntiSym' (Keep sla) slb
SubListAntiSym' (Drop sla) slb = SubListAntiSym' (Drop sla) slb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment