Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nicola Botta
IdrisLibs2
Commits
3f88ca4e
Commit
3f88ca4e
authored
Dec 21, 2020
by
Nicola Botta
Browse files
Initial.
parent
ab915621
Changes
1
Hide whitespace changes
Inline
Side-by-side
Tuple/Properties.lidr
0 → 100644
View file @
3f88ca4e
> module Tuple.Properties
> import Control.Isomorphism
> %default total
> %access public export
> %auto_implicits off
> |||
> tuplePairIso3 : {A, B, C : Type} -> Iso (A, B, C) ((A, B), C)
> tuplePairIso3 {A} {B} {C} = MkIso to from ok1 ok2
> where to : (A, B, C) -> ((A, B), C)
> to (x, y, z) = ((x, y), z)
> from : ((A, B), C) -> (A, B, C)
> from ((x, y), z) = (x, y, z)
> ok1 : (x : ((A, B), C)) -> to (from x) = x
> ok1 ((x, y), z) = Refl
> ok2 : (x : (A, B, C)) -> from (to x) = x
> ok2 (x, y, z) = Refl
> |||
> tuplePairIso4 : {A, B, C, D : Type} -> Iso (A, B, C, D) ((A, B, C), D)
> tuplePairIso4 {A} {B} {C} {D} = MkIso to from ok1 ok2
> where to : (A, B, C, D) -> ((A, B, C), D)
> to (a, b, c, d) = ((a, b, c), d)
> from : ((A, B, C), D) -> (A, B, C, D)
> from ((a, b, c), d) = (a, b, c, d)
> ok1 : (x : ((A, B, C), D)) -> to (from x) = x
> ok1 ((a, b, c), d) = Refl
> ok2 : (x : (A, B, C, D)) -> from (to x) = x
> ok2 (a, b, c, d) = Refl
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment