-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Topos Institute - Applied Category Theory MIT Course 18.S097
- Applied Category Theory Munich www, wiki (in German)
- Maryland Applied Category Theory Group www, video
Chapter 1 of Seven Sketches in Compositionality
Examples of semilattice:
Chapter 1 (catch-up session)
- Piter's notes - (symmetric) monoidal preorders, enriched categories, metric spaces
- Piter's notes from TheCatsters: Metric Spaces Enriched Categories
- enriched categories are used in Profunctor optics, a categorical update by Bryce Clarke, Derek Elkins, Jeremy Gibbons, Fosco Loregian, Bartosz Milewski, Emily Pillmore, Mario Román
- calendar with online events around CT thanks to Ivano
- Partial encoding of chapter 1 & 2 in Scala (commit with refactor of laws - introduce helper method to V-Category)
- matrix n-exponent in quantales is like finding page rank - graph theory
- Markov process & probability as enrichement
Chapter 4: video 1
- Topics:
V-profunctor
,feasibility relations
,composition of V-profunctors
,identity V-profunctor
- composition is like
def phipsi(p, r) = Q.exists(q => phi(p, q) && psi(q, r))
but exists is more like forall and somehow integrated :) - Andrea Censi https://censi.science/ other publications at arxiv 1512.08055, 1609.03103, 2005.04715
- companion and cojoin looks like
cokleisli: F[A] => B
kleisli: A => F[B]
class Profunctor p where
dimap :: (aa -> a) -> (b -> bb) -> p a b -> p aa bb
-- companion
newtype Cokleisli p a b = Cokleisli { runCokleisli :: p a -> b }
instance Functor p => Profunctor (Cokleisli p) where
dimap f g (Cokleisli p) = Cokleisli (g . p . fmap f)
-- cojoin
newtype Kleisli p a b = Kleisli { runKleisli :: a -> p b }
instance Functor p => Profunctor (Kleisli p) where
dimap f g (Kleisli p) = Kleisli (fmap g . p . f)
Profunctor optics - use in FP PDF, video
Instead event Basic optics: lenses, prisms, and traversals, (video)
Profunctor optics - use in FP PDF, video
Profunctor optics - use in FP PDF, video
Profunctor optics - use in FP PDF, video Chapter 4.1-4.2
- WIP impl in Scala by lemastero
- more on existential types: Ghosts of Departed Proofs
Zuzia: Profunctor optics - use in FP PDF, video Chapter 5
- data lens has profunctor optics: https://github.com/ekmett/lens/pull/923
- Chris Penner implemented profunctor optics live on YouTube: https://www.youtube.com/watch?v=i0yMe7UQ9a0
- Program imperatively using Haskell lenses http://www.haskellforall.com/2013/05/program-imperatively-using-haskell.html
- Intro To Kaleidoscopes: Optics For Aggregating Data Through Applicatives https://chrispenner.ca/posts/kaleidoscopes
- zio-prelude talk: https://www.youtube.com/watch?v=OwmHgL9F_9Q
Tomasz: Relational Algebra by Way of Adjunctions, paper, video
RAbWoA Section 1, fragments from Section 2.4 (adjunctions)
Piter PR with notes
RAbWoA Sections 2.1 category, 2.2 functor 2.3 natural transformations up to horizontal composition
-
initial object - makes sense as you need dual concept to final (terminal) object
-
functor is two different mappings:
F_Obj(id(A)) = id(F_Obj(A))
F_Fun(f compose g) = F_Fun(f) compose F_Fun(g)
-
functor composition is nesting
F[G[A]]
-
natural transformation
Scala example: headOption
List(1,2,3) headOption == Option(1)
List() headOption == None
Haskell example:
safeHead: [] => Maybe
- naturality square
headOption
List(1,2,3) -------------> Option(1)
| |
| map(_ * 2) | map(_ * 2)
| |
\/ \/
List(2,6,8) -----------> Option(2)
headOption
-
mapping from Bag->Set is like distinct (in Scala/SQL) turns collection into collection without duplicates
-
horizontal composition of natural transformations
List[*] ~> Option[*] ~> Either[Throwable, *]
- TODO vertical composition of natural transformations
Some Scala encoding of: https://github.com/unktomi/stuff/blob/master/containers/AbstractNonsense.scala#L85-L125
-
explanations of Adjuctions
- (Runar talk) https://www.youtube.com/watch?v=TNtntlVo4LY
- (TheCatsters): https://www.youtube.com/watch?v=loOJxIOmShE&list=PL54B49729E5102248
-
just in case we want to watch sth - I tested https://sync-tube.de/ looks good
RAbWoA from horizontal composition at Sections 2.3