Yeah, basically, the problem was that this first one was a category.
Well, everything was messy.
Basically, we have already considered an example.
I don't remember if it was that much popcorn.
So that was a part of the exercise to see that there are categories which are very different from the other ones.
So it's not like CERN, it's not like CPUs, and of course there are no things like points,
because the whole category is just many points, but these points are objects and they are not elements.
So mortises are also just one kind of organisms, so it either exists or it doesn't.
So what I'm proposing is that we maybe do the exercise still for an hour, and then switch to some new stuff.
So what I wanted to ask you, maybe you present your solution on this, that's in that room,
because I think it's very nice, one can do something with it.
How many colors?
No, it's just pretty messy in there.
I thought there were many colors, you can choose which one you want.
Is it alive or what?
I don't know.
Okay, so basically the idea was that a list is an inductive set, so it's a list over x.
So we say that the empty list is always an inductive set.
So whenever I have an element of x and a list over x, I get a new list by putting the element in front of the list.
Okay, and then, well part of the exercise was first to then define a monad from this.
So we said that eta x of x is just a singleton list,
and this is just the list you get from this construction by taking the empty list and putting x in front of it.
And then we define the Plyson Star, but what we first need is concatenation.
And for this I introduce the symbol plus with a circle around it, and so the thing is with this inductive structure of the list,
we can also define functions on them inductively.
And so we just have to say what we get when we concatenate an empty list with some list, and what we get when we concatenate a non-empty list.
So if we give these two, we have concatenation as a well-defined function on lists.
Well, and the definition is pretty much straightforward.
So this works like that.
And with this we can define a Plyson Star.
And so we say that a function f, which goes from x to the list over y,
we can then define f star, which goes from the list over x to the list over y.
And then we can use the same principle.
We can define this by saying what f star is on the empty list and what it is on a non-empty list.
So we say f star of the empty list, well, that would just be the empty list.
And f star on a constructed list is then given by, well, we can first take f of x.
And f of x is a list over y.
And x is also a list over y.
So what we then can do is concatenate those two, which is why we defined beforehand.
Right. So it's an inductive definition.
I wonder if this is how it's defined in Haskell, trying to find out the implementation of the monads,
or the monad operations of the lists.
Well, that's just concat math.
I think there is a function concat math.
Yes, yes, but concat is not the crisis star.
Yeah, but there is also a function concat math as far as I know.
Which does what?
And I think that's precisely the crisis star.
I might be wrong, but...
Yes, it's a crisis star, but how it's defined.
Presenters
Zugänglich über
Offener Zugang
Dauer
01:31:49 Min
Aufnahmedatum
2015-07-02
Hochgeladen am
2019-04-26 03:09:02
Sprache
en-US
The course provides a background to various topics of the theory of programming. As a guiding paradigm monad-based functional programming is chosen. The idea of the course is to provide clear computational insights to various concepts of computer science and to practice these by concrete implementations in suitable programming languages such as Haskell.
Lernziele und Kompetenzen:
Fachkompetenz Wissen Students demonstrate an understanding of the role of computational monads in the context of functional programming and as a semantic tool for programming and system specification; Students reproduce the main definitions and results on monads, monad combination, and further categorical constructions end explain them from a programming perspective. Anwenden Students use the monad-based approach to formalise examples involving various kinds of computational effects as monads. Students use monads for practical programming in programming languages, such as Haskell. Analysieren Students identify various computational effects as monads and provide an appropriate treatment of problems from various semantic domains (probabilistic, nondeterministic, concurrent), possibly providing a monad-based software implementation. Selbstkompetenz Students will be regularly provided with small challenges in form of exercises to be able to have a gradual progress with the lecture material.