IdrisDoc
: Control.Isomorphism.Fin
Index
Control.Isomorphism.Fin
rotatedDown
:
Iso
(
Fin
n
) (
Fin
n
)
Sends
FZ
to
last
, and
FS x
to
x
.
rotatedUp
:
Iso
(
Fin
n
) (
Fin
n
)
Sends
last
to
FZ
and every other
x
to
FS x
.
strengthenLast
:
(
n
:
Nat
) ->
strengthen
last
=
Left
last
strengthenLeft
:
(
i
:
Fin
(
S
n
)) -> (
prf
:
strengthen
i
=
Left
x
) ->
i
=
last
strengthenRight
:
(
i
:
Fin
(
S
n
)) -> (
prf
:
strengthen
i
=
Right
x
) ->
weaken
x
=
i
strengthenWeaken
:
(
n
:
Fin
k
) ->
strengthen
(
weaken
n
)
=
Right
n