Skip to content

Commit

Permalink
Merge pull request #4588 from clayrat/patch-13
Browse files Browse the repository at this point in the history
Cons is not Nil
  • Loading branch information
melted committed Nov 19, 2018
2 parents 347b63f + 7695883 commit a244099
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libs/prelude/Prelude/List.idr
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,12 @@ catMaybes (x::xs) =
-- Properties
--------------------------------------------------------------------------------

Uninhabited ([] = _ :: _) where
uninhabited Refl impossible

Uninhabited (_ :: _ = []) where
uninhabited Refl impossible

||| (::) is injective
consInjective : {x : a} -> {xs : List a} -> {y : b} -> {ys : List b} ->
(x :: xs) = (y :: ys) -> (x = y, xs = ys)
Expand Down

0 comments on commit a244099

Please sign in to comment.