www.wikidata.de-de.nina.az
Eine Monade ist im mathematischen Teilgebiet der Kategorientheorie eine Struktur die gewisse formale Ahnlichkeit mit den Monoiden der Algebra aufweist Inhaltsverzeichnis 1 Definition 2 Beispiel Listen 3 Eilenberg Moore Algebren 4 Weitere Beispiele 4 1 Linearkombinationen 4 2 Dcpos 5 Adjungierte Funktoren 6 Anwendung in der Informatik 7 Einzelnachweise 8 WeblinksDefinition BearbeitenEine Monade ist ein Tripel T h m displaystyle T eta mu nbsp aus einem Funktor T displaystyle T nbsp von einer Kategorie C displaystyle mathcal C nbsp in sich selbst das heisst T C C displaystyle T colon mathcal C to mathcal C nbsp einer naturlichen Transformation h 1 C T displaystyle eta colon 1 mathcal C to T nbsp dabei steht 1 C displaystyle 1 mathcal C nbsp fur den Identitatsfunktor C C displaystyle mathcal C to mathcal C nbsp einer naturlichen Transformation m T 2 T displaystyle mu colon T 2 to T nbsp dabei steht T 2 displaystyle T 2 nbsp fur T T displaystyle T circ T nbsp so dass die folgenden Bedingungen die man auch die Axiome der Monade nennt erfullt sind m T m m m T displaystyle mu circ T mu mu circ mu T nbsp das heisst das folgende Diagramm kommutiert nbsp dd m h T m T h 1 displaystyle mu circ eta T mu circ T eta 1 nbsp das heisst das folgende Diagramm kommutiert nbsp dd Explizit bedeutet die Kommutativitat der Diagramme dass fur jedes Objekt X displaystyle X nbsp in C displaystyle mathcal C nbsp die beiden Diagramme nbsp und nbsp kommutieren Dabei sind T m displaystyle T mu nbsp und m T displaystyle mu T nbsp die durch T m X T m X displaystyle T mu X colon T mu X nbsp und m T X m T X displaystyle mu T X mu T X nbsp definierten naturlichen Transformationen entsprechendes gilt fur T h displaystyle T eta nbsp und h T displaystyle eta T nbsp Die naturlichen Transformationen h displaystyle eta nbsp und m displaystyle mu nbsp nennt man auch Einheit und Multiplikation der Monade 1 2 Beispiel Listen BearbeitenEin Beispiel fur eine Monade sind Listen Es bezeichne x 1 x n displaystyle x 1 dotsc x n nbsp die Liste mit den Elementen x 1 displaystyle x 1 nbsp bis x n displaystyle x n nbsp wobei mit n 0 displaystyle n 0 nbsp auch die leere Liste zugelassen ist Listen sind Tupel die wir hier der Ubersichtlichkeit wegen mit eckigen Klammen schreiben Das folgende Tripel T h m displaystyle T eta mu nbsp ist eine Monade in der Kategorie der Mengen S e t displaystyle mathbf Set nbsp Der Listen Funktor Fur ein Objekt X displaystyle X nbsp aus S e t displaystyle mathbf Set nbsp das heisst fur eine Menge X displaystyle X nbsp sei T X x 1 x n n N x 1 x n X displaystyle T X x 1 dotsc x n mid n in mathbb N x 1 dotsc x n in X nbsp die Menge aller endlichen Listen deren Elemente aus X displaystyle X nbsp kommen Fur eine Abbildung f X Y displaystyle f colon X to Y nbsp zwischen zwei Mengen sei T f T X T Y displaystyle T f colon T X to T Y nbsp zwischen den Listenmengen durch T f x 1 x n f x 1 f x n displaystyle T f x 1 dotsc x n f x 1 dotsc f x n nbsp definiert Einheit und Multiplikation Die Einheit h displaystyle eta nbsp sei definiert durch h X x x displaystyle eta X x x nbsp das ist die Konstruktion einelementiger Listen Die Multiplikation ist die Konkatenation von Listen m X l 1 l n l 1 l n displaystyle mu X l 1 dotsc l n l 1 dotsm l n nbsp also m X x 11 x 1 m 1 x n 1 x n m n x 11 x 1 m 1 x n 1 x n m n displaystyle mu X x 11 dotsc x 1m 1 dotsc x n1 dotsc x nm n x 11 dotsc x 1m 1 dotsc x n1 dotsc x nm n nbsp dies ist gewissermassen das einstufige Zusammenfugen einer Liste von Listen zu einer Liste Diese Daten erfullen die Definition der Monade Die Gleichung m T m m m T displaystyle mu circ T mu mu circ mu T nbsp bedeutet fur eine Liste von Listen von Listen l T T T X displaystyle l in T T T X nbsp dass m X T m X l m X m T X l displaystyle mu X T mu X l mu X mu T X l nbsp das heisst dass es bei mehrfach verschachtelten Listen egal ist ob diese von innen oder von aussen beginnend zu einer zusammengefugt werden Betrachte zum Beispiel l x y x x y z x x displaystyle l x y x x y z x x nbsp wobei x y z X displaystyle x y z in X nbsp seien Das ist die Liste der beiden Listen von Listen x y x displaystyle x y x nbsp und x y z x x displaystyle x y z x x nbsp die ihrerseits aus den Listen x y displaystyle x y nbsp und x displaystyle x nbsp bzw x y z displaystyle x y z nbsp und x x displaystyle x x nbsp bestehen Dann istm X T m X l m X x y x x y z x x x y x x y z x x displaystyle mu X T mu X l mu X x y x x y z x x x y x x y z x x nbsp und m X m T X l m X x y x x y z x x x y x x y z x x displaystyle mu X mu T X l mu X x y x x y z x x x y x x y z x x nbsp Das zweite Axiom besagt in diesem Beispiel dass jede Liste durch Zusammenfugen einelementiger Listen entsteht m X h T X x 1 x n m X x 1 x n x 1 x n m X x 1 x n m X T h X x 1 x n displaystyle mu X eta T X x 1 dotsc x n mu X x 1 dotsc x n x 1 dotsc x n mu X x 1 dotsc x n mu X T eta X x 1 dotsc x n nbsp In einer algebraischen Sichtweise ist T X displaystyle T X nbsp die unterliegende Menge des freien Monoids uber X displaystyle X nbsp Die Einheit h X displaystyle eta X nbsp bettet das Erzeugendensystem in den Monoid ein die Multiplikation m X displaystyle mu X nbsp ist die Monoidmultiplikation Eilenberg Moore Algebren BearbeitenIst T C C h m displaystyle T colon mathcal C to mathcal C eta mu nbsp eine Monade so ist ein Paar A a T A A displaystyle A alpha colon T A to A nbsp eine Eilenberg Moore Algebra auch einfach nur Algebra genannt fur diese Monade wenn die Gleichungen a h A 1 A displaystyle alpha circ eta A 1 A nbsp und a m A a T a displaystyle alpha circ mu A alpha circ T alpha nbsp gelten das heisst wenn die folgenden beiden Diagramme kommutieren nbsp Ein Homomorphismus von A a displaystyle A alpha nbsp nach B b displaystyle B beta nbsp ist ein Pfeil h A B displaystyle h colon A to B nbsp in K displaystyle K nbsp mit h a b T h displaystyle h circ alpha beta circ T h nbsp das heisst dass nachstehendes Diagramm kommutiert nbsp Fur beliebige Objekte X displaystyle X nbsp aus C displaystyle mathcal C nbsp ist daher z B T X m X displaystyle T X mu X nbsp eine Algebra und m X displaystyle mu X nbsp ist ein Homomorphismus von T T X m T X displaystyle T T X mu T X nbsp nach T X m X displaystyle T X mu X nbsp Im obigen Beispiel der Listen sind die Algebren A a T A A displaystyle A alpha colon TA to A nbsp genau die Monoide A displaystyle A nbsp und a displaystyle alpha nbsp multipliziert alle Elemente der Liste Die Eilenberg Moore Algebren zur Monade T displaystyle T nbsp bilden mit den angegebenen Homomorphismen eine Kategorie die man die Kategorie der T displaystyle T nbsp Algebren nennt und mit C T displaystyle mathcal C T nbsp bezeichnet 3 Im Falle der Listen Monade T displaystyle T nbsp ist also S e t T displaystyle mathbf Set T nbsp die Kategorie der Monoide Weitere Beispiele BearbeitenLinearkombinationen Bearbeiten Es sei K displaystyle K nbsp ein Korper Legt man fur Mengen X displaystyle X nbsp fest dass L X v X K v 1 K 0 endlich displaystyle L X v colon X to K mid v 1 K setminus 0 text endlich nbsp sei also eine Kodierung fur die Menge der formalen K displaystyle K nbsp Linearkombinationen von Elementen von X displaystyle X nbsp lasst sich L displaystyle L nbsp als Objektabbildung eines Funktors L S e t S e t displaystyle L colon mathbf Set to mathbf Set nbsp auffassen dessen Pfeilabbildung einer Funktion f X Y displaystyle f colon X to Y nbsp die Funktion L f L X L Y displaystyle L f colon L X to L Y nbsp mit L f v y x f 1 y v x displaystyle L f v y sum x in f 1 y v x nbsp zuordnet L X displaystyle L X nbsp tragt eine naheliegende Vektorraumstruktur Fur l K displaystyle lambda in K nbsp und v T X displaystyle v in T X nbsp ist l v displaystyle lambda cdot v nbsp definiert durch l v x l v x displaystyle lambda cdot v x lambda cdot v x nbsp wieder Element von L X displaystyle L X nbsp und fur v w T X displaystyle v w in T X nbsp ist v w displaystyle v w nbsp definiert durch v w x v x w x displaystyle v w x v x w x nbsp ebenfalls wieder Element von L X displaystyle L X nbsp Der Funktor L displaystyle L nbsp wird zusammen mit den Festlegungen h X x y 1 x y 0 sonst displaystyle eta X x y begin cases 1 amp x y 0 amp text sonst end cases nbsp m X l v l 1 K 0 l v v displaystyle mu X l sum v in l 1 K setminus 0 l v cdot v nbsp hier verwenden wir der Ubersichtlichkeit halber displaystyle nbsp und displaystyle cdot nbsp aus dem vorangegangenen Satz zu einer Monade S e t S e t displaystyle mathbf Set to mathbf Set nbsp m X displaystyle mu X nbsp berechnet dabei auf naheliegende Weise aus einer Linearkombination von Linearkombinationen von Elementen von X displaystyle X nbsp die entsprechende Zusammenfassung als Linearkombination von Elementen von X displaystyle X nbsp Die Algebren der Monade L h m displaystyle L eta mu nbsp sind gerade K displaystyle K nbsp Vektorraume in der zur Monade gehorenden Kleisli Kategorie sind die Pfeile X Y displaystyle X to Y nbsp gerade Mengen indizierte X displaystyle X nbsp Y displaystyle Y nbsp Matrizen die sich als Codes fur lineare Abbildungen vom freien Vektorraum uber X displaystyle X nbsp zum freien Vektorraum uber Y displaystyle Y nbsp auffassen lassen Dcpos Bearbeiten Der Endofunktor I d l P o s P o s displaystyle mathrm Idl colon mathbf Pos to mathbf Pos nbsp auf der Kategorie der partiell geordneten Mengen und monotonen Abbildungen ordne jedem A displaystyle A leq nbsp die partiell geordnete Menge I d l A displaystyle mathrm Idl A subseteq nbsp der Ordnungsideale in A displaystyle A nbsp zu Seine Wirkung auf monotonen Abbildungen f A B displaystyle f colon A to B nbsp sei I d l f I f a a I displaystyle mathrm Idl f colon I mapsto downarrow f a mid a in I nbsp Fur eine partiell geordnete Menge X displaystyle X nbsp und eine Teilmenge U X displaystyle U subseteq X nbsp ist hierbei U x X u U x u displaystyle downarrow U x in X mid exists u in U x leq u nbsp Die Abbildungsfamilien m A I I displaystyle mu A colon mathcal I mapsto bigcup mathcal I nbsp und h A a a displaystyle eta A colon a mapsto downarrow a nbsp erganzen den Funktor I d l displaystyle mathrm Idl nbsp zu einer Monade Die Strukturabbildung a displaystyle alpha nbsp einer I d l displaystyle mathrm Idl nbsp Algebra A a I d l A A displaystyle A alpha colon mathrm Idl A to A nbsp ist nun gerade I sup I displaystyle I mapsto sup I nbsp Jedes Ideal in A displaystyle A nbsp und somit jede gerichtete Teilmenge hat also ein Supremum in A displaystyle A nbsp Das heisst eine I d l displaystyle mathrm Idl nbsp Algebra ist dasselbe wie eine Dcpo Ein Homomorphismus von I d l displaystyle mathrm Idl nbsp Algebren ist eine Scott stetige Abbildung Adjungierte Funktoren BearbeitenIst ein Funktor F C D displaystyle F colon mathcal C to mathcal D nbsp zu einem Funktor G D C displaystyle G colon mathcal D to mathcal C nbsp linksadjungiert und sind h 1 C G F displaystyle eta colon 1 mathcal C to GF nbsp bzw e F G 1 D displaystyle varepsilon colon FG to 1 mathcal D nbsp Einheit bzw Koeinheit der Adjunktion so ist T h m displaystyle T eta mu nbsp mit T G F C C displaystyle T GF colon mathcal C to mathcal C nbsp m G e F displaystyle mu G varepsilon F nbsp also m X G e F X displaystyle mu X G varepsilon F X nbsp fur Objekte X O b C displaystyle X in mathrm Ob mathcal C nbsp eine Monade Dies ist im gewissen Sinn auch schon das einzige Beispiel da jede Monade auf diese Weise entsteht jedenfalls bis auf Isomorphie Die Tripel D F G displaystyle mathcal D F G nbsp mit F C D displaystyle F colon mathcal C to mathcal D nbsp G D C displaystyle G colon mathcal D to mathcal C nbsp G F T displaystyle GF T nbsp und F G displaystyle F dashv G nbsp sind Objekte einer Kategorie A displaystyle mathfrak A nbsp In dieser Kategorie ist ein Morphismus von D 1 F 1 G 1 displaystyle mathcal D 1 F 1 G 1 nbsp nach D 2 F 2 G 2 displaystyle mathcal D 2 F 2 G 2 nbsp ein Funktor K D 1 D 2 displaystyle K colon mathcal D 1 to mathcal D 2 nbsp fur den K F 1 F 2 displaystyle KF 1 F 2 nbsp und G 2 K G 1 displaystyle G 2 K G 1 nbsp gelten nbsp Anfangsobjekt in A displaystyle mathfrak A nbsp ist C T F T G T displaystyle mathcal C T F T G T nbsp wobei C T displaystyle mathcal C T nbsp die Kleisli Kategorie zu T displaystyle T nbsp ist F T X X displaystyle F T X X nbsp fur f C X Y displaystyle f in mathcal C X Y nbsp ist F T f h Y f displaystyle F T f eta Y circ f nbsp G T X T X displaystyle G T X TX nbsp fur f C T X Y displaystyle f in mathcal C T X Y nbsp ist G T f m Y T f displaystyle G T f mu Y circ T f nbsp Endobjekt in A displaystyle mathfrak A nbsp ist C T F T G T displaystyle mathcal C T F T G T nbsp wobei C T displaystyle mathcal C T nbsp die Kategorie der Eilenberg Moore Algebren zu T displaystyle T nbsp ist F T X T X m X displaystyle F T X TX mu X nbsp fur f C X Y displaystyle f in mathcal C X Y nbsp ist F T f T f displaystyle F T f T f nbsp G T X a X displaystyle G T X alpha X nbsp G T f f displaystyle G T f f nbsp 4 Fur eine vorgegebene Adjunktion F G displaystyle F dashv G nbsp gibt es daher eindeutig existierende Funktoren J displaystyle J nbsp und K displaystyle K nbsp wie im nachfolgenden Diagramm so dass die oben genannten Gleichungen bestehen das heisst J F T F displaystyle JF T F nbsp G J G T displaystyle GJ G T nbsp K F F T displaystyle KF F T nbsp und G T K G displaystyle G T K G nbsp nbsp Den Funktor K displaystyle K nbsp nennt man auch den Vergleichsfunktor weil der die Kategorie D displaystyle mathcal D nbsp mit einer Kategorie von Algebren vergleicht Man nennt die Adjunktion F G displaystyle F dashv G nbsp monadisch wenn der Vergleichsfunktor eine Aquivalenz D C T displaystyle mathcal D simeq mathcal C T nbsp ist Man nennt einen Funktor G displaystyle G nbsp monadisch wenn es eine Linksadjungierte F displaystyle F nbsp gibt so dass die Adjunktion F G displaystyle F dashv G nbsp monadisch ist Anwendung in der Informatik BearbeitenMonaden werden in der Informatik besonders in funktionalen Programmiersprachen u a zur Abstraktion von Nebeneffekten verwendet Es ist Haskell hervorzuheben wo Monaden zur Integration von Ein und Ausgabe in die sonst komplett von Seiteneffekten freie Sprache verwendet werden Siehe dazu auch Monade Informatik Einzelnachweise Bearbeiten Saunders Mac Lane Categories for the Working Mathematician Springer Verlag Berlin 1971 ISBN 3 540 90035 7 Kap VI 1 Monads in a Category Definition auf S 137 Emily Riehl Category Theory in Context AMS Dover Publications 2016 ISBN 0 486 80903 X Definition 5 1 1 S 154 Saunders Mac Lane Categories for the Working Mathematician Springer Verlag Berlin 1971 ISBN 3 540 90035 7 Kap VI 1 Algebras for a Monad Definition auf S 140 Emily Riehl Category Theory in Context AMS Dover Publications 2016 ISBN 0 486 80903 X Satz 5 2 12 S 164 Weblinks BearbeitenLektion zu Monaden You Could Have Invented Monads And Maybe You Already Have Mehrteiliger Videokurs fur Mathematiker englisch Abgerufen von https de wikipedia org w index php title Monade Kategorientheorie amp oldid 239156645