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
b480e17d
Commit
b480e17d
authored
Dec 21, 2020
by
Nicola Botta
Browse files
Initial.
parent
4f8a19f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Sigma/Operations.lidr
0 → 100644
View file @
b480e17d
> module Sigma.Operations
> import Data.Fin
> import Data.Vect
> import Sigma.Sigma
> import Finite.Predicates
> import Decidable.Predicates
> import Finite.Operations
> import Vect.Operations
> %default total
> %access public export
> |||
> outl : {A : Type} -> {P : A -> Type} -> Sigma A P -> A
> outl (MkSigma a _) = a
> |||
> outr : {A : Type} -> {P : A -> Type} -> (s : Sigma A P) -> P (outl s)
> outr (MkSigma _ p) = p
> ||| Maps a finite type |A| and a decidable predicate |P| to a vector |Sigma A P| values
> toVectSigma : {A : Type} ->
> {P : A -> Type} ->
> Finite A ->
> Dec1 P ->
> Sigma Nat (\ n => Vect n (Sigma A P))
> toVectSigma fA d1P = filterTagSigma d1P (toVect fA)
> {-
> ---}
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