 Hai, semua. Saya Jeanne. Saya seorang pelajar tahun yang teruk daripada NUS. Di NUS, ketika anda membuat komputer sains, anda tidak perlu memilih sebuah area fokus yang anda mahu lakukan dari tahun ke tahun lalu. Jadi saya memilih fokus pilihan P.L. Tidak mengagumkan. Ia adalah satu desain yang saya belajar tentang komputer sains di mana ia bergurau dengan sebuah kawasan dan sebuah area filosofi. Setiap hari apabila saya memilih pilihan Pilihan Pilihan, ia sangat menyerah. Ia merasa seperti sebuah magik. Jadi anda mesti memikirkan kenapa ada pilihan Pilihan Pilihan Pilihan yang saya menggunakan? Untuk yang tidak memilih pilihan, ia sebenarnya di belakang semasa Philip Wadler, pilihan, membuat pilihan tentangnya. Saya akan mendapatkan kemudian. Jadi pilihan Pilihan Wadler, ia Profesor di Universiti Edinburgh. Jika anda telah melakukannya di Haskell atau Java, anda mungkin menggunakan pilihan ini sebelumnya. Dia melakukan banyak kerja di klas dan monets dan generik di Java. Dia memberi banyak berkongsi dengan pilihan Pilihan Pilihan Pilihan Pilihan. Jadi dia nampak seperti itu. Dan itu pilihan Pilihan Pilihan Pilihan Pilihan Pilihan Pilihan. Saya tidak tahu jika anda dapat melihat itu online. Jadi pilihan Pilihan Pilihan Pilihan Pilihan Pilihan ini adalah sebenarnya apabila saya mencari pilihan ini, saya berharap ia menjadi teknikal kompleks tapi tiba-tiba lebih sebab pilihan hidup dan kejutan dari computer science daripada sebuah Pilihan Pilihan Pilihan Pilihan. Jadi sebagai seorang student saya fikir ini adalah pilihan yang baik untuk kemahiran tersebut. Jika anda berbicara, kita akan mulakan dengan pilihan yang pertama yang mengharapkan pilihan yang kuat dari dua pelik yang telah meletakkan kebelakaran dari sebuah pilihan. Kerana setiap orang memutuskan, setiap orang begini mempelajari pelajaran. Kamu tiba-tiba fokus dalam satu area. Dan apabila kamu percaya bahawa area ini datang... ...dan memperkenalkan dan memperkenalkan area itu yang berlaku. Ia membuat kamu... ...perkenalkan sedikit. Macam mana dua-duanya yang nampak... ...dengan kata-kata berlaku dengan baik-baik. Jadi... ...dia berkata-kata... ...dia berkata-kata... ...dia berkata-kata ini. Ia berkata-kata yang berlaku banyak-banyak. Hanya untuk membuatnya lebih mudah. Koneksi antara pelajaran. Jadi, bagaimanapun, kita mempunyai... ...pada kondom fisik, kita mempunyai... ...partikel dan kawasan... ...di mana... ...semasa hal ini berlaku, ada sebuah... ...revalasi di komuniti fisik. Geometry dan algebra menggunakan koordinat karting. Dan juga di komputer-science. Ini apa yang kita akan bercakap tentang. Terutamanya, kita akan bercakap tentang... ...logik luar biasa dan idea komputasi. Dan... ...yang berkata-kata dan kawasan. Jadi, kawasan dan kawasan... ...sebenarnya disebabkan oleh Philip Weller... ...dia adalah kawasan dengan banyak kawasan. Dalam bahawa... ...kita tidak hanya memikirkan kawasan ini... ...pada kawasan tersebut. Ia sebenarnya berjalan-jalan... ...pada kawasan ini. Saya akan bercakap tentang kawasan ini nanti. Ia juga berkata-kata dengan kawasan. Dalam bahawa... ...dia mempunyai banyak kawasan di komputer-science... ...dan logik. Jadi, jika kita mempunyai kawasan logik atau kawasan PL... ...sebenarnya kita akan bercakap tentang langkah fungsi. Mungkin ini beberapa kata-kata yang anda pernah lihat. Bagi contoh... ...pada logik kedua... ...yang berkata-kata dengan polymorphisme... ...dan parametrisiti. Ia hanya berkata-kata semuanya... ...yang jika anda pernah berprogram dalam langkah fungsi. Ia berkata-kata itu. Ini beberapa kata-kata yang berkata-kata... ...dan penyelamatkan. Dari contoh... ...Akda, Cog, New Pearl... ...dan semuanya... ...dan peribadi yang perlu dipercayai... ...dan mempercayai kod atau kekakuan yang telah dipercayai. Mereka sebenarnya mempercayai semua perkara ini. Jadi, di tempat di luar... ...yang mempercayai kod yang telah dipercayai... ...dan ini semuanya mempercayai... ...kod ini. Kemudian... ...saya juga mempercayai kekakuan yang telah dipercayai. Untuk menjelaskan kenapa ini adalah kekakuan yang telah dipercayai... ...saya perlu menjelaskan kekakuan yang telah dipercayai... ...dan kekakuan yang telah dipercayai. Jadi, sebenarnya ada banyak orang yang mempercayai... ...dalam kod ini. Jadi, kembali... ...pada kekakuan yang telah dipercayai... ...Arysoto, dan banyak orang yang mempercayai... ...dan kemudian, dalam kota 19, ada Bu, Piano, Dan Morgan. Ini hanya... ...tidak ada kekakuan yang telah dipercayai... ...untuk mungkin... ...sentuh kekakuan 20th... ...semasa... ...David Hubert datang dan tanya tentang kod ini... ...tidak ada kekakuan yang telah dipercayai... ...saya rasa... ...saya rasa ilyah lebih baik daripada orang yang berkakuan. Di sini adalah bagaimana kita boleh... ...formulasi semua matematik dengan爸爸 backpack cik. Berbentuk saya, jika saya salah... ...cika saya sangat reka pada perkara ini... ...tapi dia nak menerima program... ...yang dapat... ...menarik program di dunia... ...tidak ada kekakuan yang telah dipercayai. Dan kemudian, anda meminta apa yang mana. So basically if it's true or it's false. But turns out that Godot came in and said no you cannot do that with his incompleteness theorem that you cannot have any logic that can be represented as an arithmetic cannot be incomplete. This one. So this was a pretty big thing because after this, after Godot came out with the incompleteness theorem Alonzo Church actually came out with the lambda calculus which is kind of like a way to do, to represent computation if you are not familiar with lambda calculus this is like a modern like representation of lambda calculus where you have variable, you have functions detecting any variables and then you have function application at the back So any language, it's kind of like a universal representation of a computation and the thing is originally Alonzo Church didn't decide to use lambda calculus as a form of computation it's more like a new representation of logic and also there's this line at the back at the end of this paper that says lambda calculus and who knew so if you're familiar with Russell's paradox which is this whole thing just means R is a set of sets that do not include itself so if R includes itself it should not be in this set but it's in this set so there's a paradox involved and with this paradox you cannot use lambda calculus, the untied version of lambda calculus as a logic but he came out with a form of lambda calculus that represent numbers and if you have numbers, you have computation and then he came out with this term called lambda definability which is kind of like a way of saying if there's a computation that could solve a problem you can define it with lambda calculus so for example the original and Shiedong's problem there was a solution and then for the halting problem the solution oh sorry, for Shiedong's problem you could not define any solution but for the halting problem you might have a solution you might terminate or not terminate but it's not definable in the lambda calculus so Alonzo Church did this in 1933 and then 1934 Kurt Gerdo came in and met lambda and I don't believe that this is lambda calculus it's all that is to it so Alonzo Church was like why don't you come out with something else and we'll see maybe you can come out with something else better than mine so he came out with this thing called general recursive functions I still don't know what exactly it means but Gerdo showed that general recursive functions is equivalent you could rewrite general recursive functions into lambda calculus and bussy-versa and this kind of made Church he actually think that oh, because Gerdo came out with this thing maybe my result is wrong maybe lambda calculus isn't correct but anyway just a while after all this was happening the Alan Turing came with Turing machines so this was kind of most people know what Turing machines are but this is kind of the de facto way of representing a computer and we do computations on the tape so in the paper Philip Wattler no, before that when Alan Turing came with Turing machines Gerdo finally got convinced that maybe all three of our systems are the same we could use all three to represent computations so in the paper Philip Wattler use this joke that says if you're waiting for a bus you can wait for a long time and the bus never comes and then three comes together at the same time so you can see that at least all three got discovered within a few years of each other 1930s and all three of them discovered all their own systems independently so it's quite a big thing so during that time Hesel Curry actually notice that there's this equivalence thing where you have a function that goes from A to B it's the same as implication of A to B he didn't really explain or elaborate on that but this other guy called William Howard he was writing some books on Curry and then he actually extended Curry's thought from just the implications to conjunctions, disjunctions and various other things including dependent types so we will explain on this later oh ya, so in 1935 Jensen he came up with these two systems natural reduction and sequence calculus which is how most of us do logic now writing logic rules, axioms how do we prove something from this to this we use natural reduction mostly and so i can see there's really a lot of people involved in this whole short history of computer science and formal logic but right now we're going to focus on also the paper actually focus on two things natural reduction and lambda calculus specifically the simply type version of lambda calculus to show how this how logic can correspond with computation so ya, let's go into the mechanics so this whole thing is divided into two parts on the left side, it is what the logic part of it looks like and on the right side, it's what the computation part of it looks like let's dive a little bit deeper into this so for the natural reduction part which is the logic part okay, this is some logic thing it has some logic thing so Wattler actually just focus down to two operations one of them is the conjunction sign they use the ampersand so the idea is like for every logical connective you have so for this one it means conjunction and this one means conjunction elimination the introduction rules mean like how do you under what circumstances can you introduce a conjunction sign or implication sign and the elimination rule under what circumstances can you use conjunction so you can see that above the line, there are no conjunctions and below the line, you can introduce a new conjunction sign and then for this elimination rule above the line, you have conjunction sign but below the line, you don't have it so it's a way of introducing operator and using it so in this case, for this part A and B are all formulas that could either have a true or false value so this means that assuming A and B are both true somehow they're both true you can conclude A conjunction with B A and B and then for this case if you know that A and B you know that A is true this is pretty basic logic but we have to formalize these actions for this case, it's the same but goes for B for the implication introduction this whole thing means that we are introducing no, we are assuming A is true we don't know whether it's true or not but assuming A is true and then somehow we get B is true we can conclude with A implies B so the X here it just means something like kind of like binding it we will get to this later anyway so for this case given that if we have A implies B and A we know that B is true this is implication ammunition yeah so this is an example of a simple proof how you work out the idea that the formula B and A implies A and B to most of the people it seems pretty similar that B and A it should imply A and B but in order to formalize it we have to write down a proof so a proof is basically a combination of different actions put together it's kind of like Lego but you can trace up upwards and see so if we want to so if we assume B and A we can use conjunction ammunition on the left hand side and get B same thing goes for that conjunction ammunition on the right hand side we get A and then with A and B we can introduce N% and then once we conclude with this and we assume with B and A implies A and B so this is how you build out a basic proof in natural reduction so once you have a proof you might build out a very-very big proof but there are some parts in a proof where you might be doing roundabouts for example in this case say somehow in a proof you come to a conclusion that A is true and somewhere in a proof you conclude that B is true and then you use a conjunction introduction to build A and B and you emininate conjunction using conjunction elimination then get A again it's kind of the same as saying because you really got A just conclude with A simplify it you don't have to do roundabouts but this only works the pattern here is that so like this is conjunction elimination conjunction I and E and this is implication I and E ya so this means that for somehow or other we got to A being true and then we got to B being true no we got to this A implies B and then since we know that A is true we can apply implication eminination so it's the same as saying we since really know that A is true we can conclude that B is true simplify the proof okay this is just like this is basically saying that this whole thing using simplification rules we can simplify to this down and it means the same thing okay so that's the formal logic natural deduction part next we go into the computation part which is using simply type nanococcalus which is kind of like nanococcalus but we assign types to the lambda terms so you might realize that this looks pretty similar to the first the axions for natural deduction so instead of using n% we are using crosses to represent a pair type so for pair m&n we have a type A times B if a pair type A or B so in this case this is saying that to construct a pair type you need something of type A or something of type B and then by some computation you can construct a pair type B so for this so this means that given some pair type that you already have say int bo you can call you can create a function and just return to the first element which is int in this case and then for the same goes for this which is the second element and then this is how you construct a function nanococcalus this means that assuming there's some available x and then you can conclude that you'll return a type of B and then conclude a lambda calculus lambda function that takes in the x and return you something of type A and return you something of type B I hope that makes sense and then for this one it's very simple and you have something of you apply apply this thing to this thing and you get B so this is a program that just swap 2 elements in a pair starting off if you have if you have something called Z type B and A and then you get the first element and then you can construct the same you can construct another pair using these 2 elements A and B and then you can conclude I can create this program that this function that takes in a pair and then solves that element so this is how you normally evaluate or rather construct a program say you have a variable of type A a variable of type B then construct a pair A and B and you call the first function on it and you get back A so it's the same as if you the compiler will usually do this but you simplify this whole chunk down into this chunk so this is how a compiler works by evaluating programs and then optimising and simplifying it so this is also like a previous slide where you have a very big program using simplification rules of the axioms you can simplify that entire program down into justice using evaluation so after saying that much about all the logic stuff the idea here is that you can see that the shape of both sides is exactly the same except for some symbol swapping but the idea is that you can represent propositions as types and then if you simplify proofs it basically corresponds to evaluating programs and then sorry, you could basically construct proofs using axioms which is the same as constructing programs using pipes and then you could simplify proofs which corresponds directly to evaluating programs so so back to the part about notion and mystery about this whole thing it is this whole idea that you can link up logic and computation as a common pattern throughout the short history for this case curry and harward they both discovered this whole thing together but there are various other correspondence that you might have used before in computer science and logic that were discovered by two completely different people at two different times usually one by a logician and usually one by a computer scientist or a mathematician what I was talking about was natural reduction and simplified lamna calculus if you have used any form of ML you might have came into contact with type inference which is done with the Hinley-Muehner type inference system which is discovered by both Hinley and Muehner system math which is anything that has to do with polymorphism was discovered by Gerard Arenos and then you have various other correspondence as well I'm probably not explaining this very well but this is a very big thing so back to this picture this picture was actually sent out on a spaceship to some part space and the idea is that if an alien were to come across this picture they could see oh this is what this you probably have to guess what the thing on the right is they really don't know what the thing is but looking on the left if they are sufficiently advanced they might have done some space exploration it could possibly deduce that this is the distance of from some part in space from Earth so it's the idea that the thing on the left is kind of universe or rather within this universe that anything that leaves within this universe could kind of understand it but the thing on the right a bit hard that's what we look like imagine you could include stars in this plaque imagine if you send up a javascript program there's no way the aliens will be able to understand what the now pointer reference is and that's a hydrogen i think in the same hydrogen it's not just an atom it's supposed to it's the spins of the atom it's supposed to define the timing for the paltars so it's the length of the lines and the length of that line the ratio is equal to what's the spinning the paltars spin rate it's very smart it's super interesting how they encode all this information in very abstract forms is that related to information theory? not really but it's just what is in very global universal ways to define information by time and distance how would you explain kilometer to an alien you can't but you could explain time taken for light to travel one spin of an electron very abstract so so it's like how something is very universal and so i'll say imagine you were to set up a C program versus something within lambda calculus i would really it was not clear that the aliens would be able to understand the C program as much as trying to decipher what lambda calculus is or rather something in basic natural reduction that kind of makes a kind of universal concept but also because of recent quantum physics multi-versus theory what if there are other universes that have fundamentally different constants which makes the universe work a bit differently it is easy to imagine the universe having different constants but it is not that easy to imagine a universe that natural reduction doesn't work in so i mean this is probably a big claim but Philip Butler actually concludes the paper by saying that lambda calculus with all its correspondence with all the correspondence between logic and computation is actually more than just universal and calling it universal would be quite limiting so yeah so i guess like at the end of the day at least to me, this paper kind of opens up a lot of doors of like what computer science actually entails what the study of computer science actually entails and how many people were actually involved in this whole pursuit of understanding what is not obvious on the surface so i hope you actually got something out of this talk so if you have any questions please throw them at me if not, thank you so much for attention the motivation was purely mathematics motivation for what? for deriving some of those i think it's it's more like an accident kind of thing i'm not wrong like for example how curry discovered the implication thing being equivalent to a function it was kind of like i don't think they actually worked to find if there were any correspondence between logic and computation but once someone kicked it off this whole chain of like discoveries came out yeah so and because like between the 30s and 40s the pre in terms of date in the 70s so there is a before the war and after it becomes the 70s the space for me there is also like a time in type of history aspect so actually William Howard wrote everything on this in 1969 but he left the manuscripts on his table for 11 years until 1980 and only after 1980 the people start to read this stuff and then hey there is some kind of isomorphic connection between logic and computation which is how everything else came about so there is actually a third part to this it is not just logic and computation but also category theory so it is a trinitarianism kind of like a triangle relationship between all these concepts yeah actually when you say computation this is clearly only about type systems and there are computation that does not involve types guys it is a simplification hand wavy way of saying i guess i guess the way Wadler describe what are meant by computation was effectively calculable which was something that could give an answer to the Einstein deng that problem the Hilbert's problem so it is untyped it is simply typed which is purely typed so the correspondence is with logic and type systems logic and computation which is what you are saying at the end it is not odd for them how the stirring machine computation clearly and logic don't really have a very nice correspondence correspondence it is more like type systems so i guess i was wrong can't seem to find a better word to describe this concept type systems yeah this is where is it this thing so everything on the right has some kind of type system involved in it everything on the left is logic some kind of logic formal system so coming from a very engineer perspective what's the use of this ah no pressure but i can answer so basically the very hard correspondence is what all the type based correctness systems are based on so if you think about what is it if you think about like a dependency type language the reason that they are so powerful is simply because their corresponding logic on the left hand side is expressive enough that you can start encoding meaning to the properties of your programs in the types of your program five tracks is actually a very meaningful deep result because it proves that it's going to be correct according to the specification that you include it in the types but the only reason you can do that the only reason you can hope to write down a logic specification and then translate it into a type is because there is correspondence between between the two if you look at much simpler much less expressive type systems like system apps or whatever the thing is that Haskell these days even there you can encode some properties and you get them and then once you type something you know that it will have those properties so basically this is the reason that programming is such useful I guess one practical example what you brought up which was a lot of code is verified especially in critical kind of scenarios like for example this this is like a theorem system kind of what they call a theorem proof proof assistant where you could reason about things like like I can't see but it says for all and if you add anything with N if you add N0 you get N these are all very fundamental things that this is what we do in class to learn from logic but without the current isomorphism there's no way this can be done because eventually theorem proving systems translates into programs they are typed and then using the current asomorphism we can guarantee that this is correct it makes sense cool so what is that it's called COQ it's called ID it's called ID yeah it's developed by French people yes it's true it's a strange thing i've read some paper where they say they use some of these tools you're actually formalising the true net or whatever some of the yeah theory cocken theory cocken come from the in real people okay cool thank you