Skip to content

Commit

Permalink
remove spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
clayrat committed Aug 29, 2019
1 parent ad451e5 commit 5a8944d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
12 changes: 6 additions & 6 deletions src/Free/FreeFunctor.lidr
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,29 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
\fi

> module Free.FreeFunctor
>
>
> import Basic.Category
> import Basic.Functor
> import Free.Graph
> import Free.Path
> import Free.PathCategory
>
>
> %access public export
> %default total
>
>
> record GraphEmbedding (g : Graph) (cat : Category) where
> constructor MkGraphEmbedding
> mapVertices : vertices g -> obj cat
> mapEdges : (i, j : vertices g) -> edges g i j -> mor cat (mapVertices i) (mapVertices j)
>
>
> foldPath :
> (g : Graph)
> -> (ge : GraphEmbedding g cat)
> -> Path g i j
> -> mor cat (mapVertices ge i) (mapVertices ge j)
> foldPath _ {cat} ge {i} [] = identity cat (mapVertices ge i)
> foldPath g {cat} ge {i} ((::) {j} x xs) = compose cat _ _ _ (mapEdges ge i j x) (foldPath g ge xs)
>
>
> freeFunctorCompose :
> (g : Graph)
> -> (ge : GraphEmbedding g cat)
Expand All @@ -63,7 +63,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
> freeFunctorCompose g {cat} ge i j k ((::) {j=l} x xs) h =
> trans (cong {f = compose cat _ _ _ (mapEdges ge i l x)} $ freeFunctorCompose g ge _ _ _ xs h)
> (associativity cat _ _ _ _ (mapEdges ge i l x) (foldPath g ge xs) (foldPath g ge h))
>
>
> freeFunctor : (g : Graph) -> GraphEmbedding g cat -> CFunctor (pathCategory g) cat
> freeFunctor g ge = MkCFunctor
> (mapVertices ge)
Expand Down
4 changes: 2 additions & 2 deletions src/Free/Graph.lidr
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
\fi

> module Free.Graph
>
>
> %access public export
> %default total
>
>
> record Graph where
> constructor MkGraph
> vertices : Type
Expand Down
12 changes: 6 additions & 6 deletions src/Free/Path.lidr
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,27 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
\fi

> module Free.Path
>
>
> import Free.Graph
>
>
> %access public export
> %default total
>
>
> data Path : (g : Graph) -> vertices g -> vertices g -> Type where
> Nil : Path g i i
> (::) : edges g i j -> Path g j k -> Path g i k
>
> edgeToPath : {g : Graph} -> edges g i j -> Path g i j
> edgeToPath a = [a]
>
>
> joinPath : Path g i j -> Path g j k -> Path g i k
> joinPath [] y = y
> joinPath (x :: xs) y = x :: joinPath xs y
>
>
> joinPathNil : (p : Path g i j) -> joinPath p [] = p
> joinPathNil Nil = Refl
> joinPathNil (x :: xs) = cong $ joinPathNil xs
>
>
> joinPathAssoc :
> (p : Path g i j)
> -> (q : Path g j k)
Expand Down
6 changes: 3 additions & 3 deletions src/Free/PathCategory.lidr
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
\fi

> module Free.PathCategory
>
>
> import Basic.Category
> import Data.Vect
> import Free.Graph
> import Free.Path
>
>
> %access public export
> %default total
>
>
> pathCategory : Graph -> Category
> pathCategory g = MkCategory
> (vertices g)
Expand Down

0 comments on commit 5a8944d

Please sign in to comment.