izpis_h1_title_alt

Podatkovni tipi kot začetne algebre in končne koalgebre : delo diplomskega seminarja
ID Gec, Boštjan (Author), ID Simpson, Alex (Mentor) More about this mentor... This link opens in a new window

.pdfPDF - Presentation file, Download (396,59 KB)
MD5: 83D53612892744A98F453E73F772D554

Abstract
V delu dokažemo, da podatkovna tipa končnih seznamov in končnih binarnih dreves s celimi števili na listih ustrezata definiciji začetne algebre. Vidimo, da lahko v Haskellu enostavno definiramo sezname in drevesa, kakor tudi z njimi povezane funktorje in celo ključno preslikavo, ki nastopa v dokazu za začetno algebro. Opazimo, da sta si matematični jezik in Haskell izredno podobna. Podatkovni tipi v Haskellu so objekti v kategoriji, funkcije pa morfizmi med njimi. Dokažemo, da sta podatkovna tipa neskončnih seznamov in neskončnih dreves končni koalgebri, poleg tega pa ju v Haskellu lahko definiramo na isti način kot smo prej končne. Tako obstaja razkorak med matematiko in Haskellom, saj sta začetna algebra in končna koalgebra v Haskellu eno in isto, v matematiki pa očitno različna pojma.

Language:Slovenian
Keywords:Haskell, rekurzivni podatkovni tip, teorija kategorij, začetna algebra
Work type:Final seminar paper
Typology:2.11 - Undergraduate Thesis
Organization:FMF - Faculty of Mathematics and Physics
Year:2018
PID:20.500.12556/RUL-103407 This link opens in a new window
UDC:004
COBISS.SI-ID:18437721 This link opens in a new window
Publication date in RUL:17.09.2018
Views:1182
Downloads:352
Metadata:XML DC-XML DC-RDF
:
Copy citation
Share:Bookmark and Share

Secondary language

Language:English
Title:Data types as initial algebras and final coalgebras
Abstract:
In this work we show that data types of finite lists and finite binary trees with integers on leaves can in fact be defined as initial algebras. We can define lists and trees in Haskell effortlessly, as well as related functors and the mapping, essential in the proof of initial algebra. We notice great similarity between languages of mathematics and Haskell. Data types in Haskell can be seen as objects inside category, while functions can be seen as morphisms in between. We prove that data types of infinite lists and infinite trees are final coalgebras, while implementation in Haskell remains the same as before for the finite ones. Therefore there is a distinction between mathematics and Haskell, i.e. coincidence of initial algebra and final coalgebra in Haskell and obvious difference between the two in mathematics.

Keywords:Haskell, recursive data type, category theory, initial algebra

Similar documents

Similar works from RUL:
Similar works from other Slovenian collections:

Back