mirror of
https://github.com/idris-lang/Idris2.git
synced 2025-01-03 12:33:26 +03:00
Merge pull request #372 from ohad/export-length-correct
Export the `lengthCorrect` proof, as users might want to use it
This commit is contained in:
commit
f31318f5e6
@ -23,8 +23,8 @@ length [] = 0
|
||||
length (x::xs) = 1 + length xs
|
||||
|
||||
||| Show that the length function on vectors in fact calculates the length
|
||||
private
|
||||
lengthCorrect : (len : Nat) -> (xs : Vect len elem) -> length xs = len
|
||||
export
|
||||
lengthCorrect : (0 len : Nat) -> (xs : Vect len elem) -> length xs = len
|
||||
lengthCorrect Z [] = Refl
|
||||
lengthCorrect (S n) (x :: xs) = rewrite lengthCorrect n xs in Refl
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user