mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-24 20:23:11 +03:00
16 lines
383 B
Idris
16 lines
383 B
Idris
data Fin : Nat -> Type where
|
|
Z : Fin (S n)
|
|
|
|
irrelevantFin : (k, l : Fin m) -> k === l
|
|
irrelevantFin Z Z = Refl
|
|
|
|
test : (m, n : Nat) -> m === n -> (k : Fin m) -> (l : Fin n) -> k ~=~ l
|
|
test m .(m) Refl k l =
|
|
rewrite irrelevantFin k l in
|
|
Refl
|
|
|
|
test2 : (m, n : Nat) -> m === n -> (k : Fin m) -> (l : Fin n) -> k ~=~ l
|
|
test2 .(m) m Refl k l =
|
|
rewrite irrelevantFin l k in
|
|
Refl
|