Skip to content

Commit

Permalink
lookup for List and FinData. (#749)
Browse files Browse the repository at this point in the history
Co-authored-by: Andreas Nuyts <andreas.nuyts@vub.ac.be>
  • Loading branch information
anuyts and Andreas Nuyts authored Apr 4, 2022
1 parent 2315a8c commit fa0fa06
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Cubical/Data/List/FinData.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{-# OPTIONS --safe #-}
module Cubical.Data.List.FinData where

open import Cubical.Foundations.Prelude
open import Cubical.Data.List
open import Cubical.Data.FinData

variable
: Level
A : Type ℓ

-- copy-paste from agda-stdlib
lookup : (xs : List A) Fin (length xs) A
lookup (x ∷ xs) zero = x
lookup (x ∷ xs) (suc i) = lookup xs i

0 comments on commit fa0fa06

Please sign in to comment.