So good morning everybody, and it's a great honor to be here, to be invited for this, I've been working with OER for more than five years now, and it's just an amazing pleasure to be here, and thank you Scott and thank you David, I may be Scott off the blue many times saying what's happening now, what should I be doing now? So thank you for all that support, and so who is with me here? Who believes that public funded resources should be public access, should be OER? Right? David? Come on! Oh my God, good morning David! Okay again please, because I think David was sleeping already. Who believes that public... Thank you, so thank you very much. I owe you that David. I think we are in a world that information is an activity, information is a life form, and information is a relation, and I think we really need to be inspired by this phrase in every moment we live nowadays, in business, in education, in culture, in technology, in science. And who said that? It's John Perri Barlow who some of you may know, he's an American musician, and he's part of my board at EFF. I met him back in 2003, and he's an incredible guy. So for you that don't know the Electronic Frontier Foundation, it's an organization that exists for more than 20 years. We are actually a public interest law firm, but also we work with policy. So yeah, I'm a lawyer in my background. And we really try to defend your rights in the digital age, so that's our mission. And I do that internationally, fighting really walkie-treaties and trade agreements that many of us do not follow and come back to become laws in our countries, even when those countries have rejected those laws like soap and pip and US. And that's happening internationally. So that's one of my missions there. Going back to the presentation, so three takeaways that I would like you to take from this presentation is that open systems and open networks can create modes of innovation and collaboration. And we saw many examples in the presentation of John DeKino yesterday. New modes of innovation can be helped or heard by institutional and government policies and design, and policies and design will be my two core focus here. Brazil and Brazilians and many countries around the world that we're going to mention just a few, and I'm happy to talk about others. Institutions are experimenting with openness, but it's just the beginning. And you are part of that. So it's really amazing for me to be here because two, three years ago I was in OpenEd and you had a lot of ideas and brainstorm and things were being born, like peer-to-peer university and connections were like 10 years there and David was there already. And now I see who is implementing it.  So it's a great honor to see this happening. And why this is important? This is Sir John DeMell who's been working with UNESCO around these issues. And he points some data that accommodating these additional 105 million students around the world that are coming up to pressure education system would take more than four major universities to open every week for the next 15 days. So we have a demand pressure, but the demand pressure is not just from the new students, it's also from the students sometimes we forget about. So in Brazil, in terms of disability, the students with disabilities less than 30% go to our schools. And public education in Brazil, it's mandatory, it's obligatory. The family has to enroll kids in our public system. And these kids don't go because they feel frustrated or the school is not prepared or there are some other cultural barriers for that to happen. And I think you really need to look at all those groups and understand how OER can impact that. And we do have an environment, like an environmentalism for OER. And I think they keep down declaration and more recently the OER UNESCO declaration bring that environmentalists give us the core messages that put all of us together and also identify us with some sister communities like free software and open government and so on. The three main keys from the Cape Town declaration is open education policy. Governments, schools, boards, colleges, universities should make taxpayer funded educational resources OER. So we are on the same page on that. Open content license OER should be freely shared through open license which facilitates use revision translation improvement and sharing and collaborative production. Educators and students can participate in creating, using, adapting and improving. So again, we have the policy piece, we have the license piece, the design piece and we have the people's piece. And all of you may know, but I just really want to be sure that we are on the same page. There are four freedoms that OER enable. And that is very also a tradition that come from the free software communities. We use, revise, remix and distribute. If you don't have four freedoms, you are actually not really empowering or enabling or you are not actually OER. There is a path to that from less open to more open and there are a lot of cultural barriers and institutional barriers and fear. It's very funny like more than 10 years ago when I graduated from high school, IP was not taught in college, in many colleges in Brazil. So lawyers to understand that a certain license could be used to open up content and not protect the content was a rationale change in the way people see that. And imagine for the non lawyers, right? Even more when you have even ads in the TV saying IP, IP, IP, IP. And I'm not saying against IP, I'm just saying that there are many various ways to manage your intellectual property to make things open and legal. And we are here to discuss beyond content, right? And as I said in the beginning, we are talking about design, we are talking about people, we are talking about policy. In terms of design, I think there are three main issues here. And this is a very, very old slide that came from one of the Arash's presentation back when he was with Creative Commons. Where is Arash? Thank you Arash. It's in terms of content, technology and intellectual property. And this we talk a lot in Brazil. If you don't think about these three pieces, your OER may face some barriers later in terms of implementation and interoperability. So if you think that you want to create even collaboration between institutions, you really need to think on how you're going to make all this work. And when we develop policy around that, we also have to understand how this work. So we cannot just tackle the copyright issue. But you also need to tackle, will the government provide repositories? What are going to be the technical standards for those repositories? What is going to be the publishing standard for that repository? The access will be the federated. Will they communicate how it's going to be the search? So all of this thinking in long term, we need to think in long term to be sure that people will be able to access those contents. And that's the message here, right? Interoperability, legal and technical are essential conditions for these new institutions that we are building. And this is not new actually. This comes from the very core idea of the internet. These are some of the couple of the very early drawings of the internet. So you have the first one in 1969 that they moved to that one. And then there was a choice to be made. Are we going to make the internet open or closed? And what that's going to mean? And we have three options basically. We have the centralized and the decentralized and the distributed option. And there was a conscious choice for the distributed infrastructure. And we are fighting for that choice every day nowadays actually in the debate of net neutrality and some other debates at the logical level. And that was what we merged. For that conscious choice of design, the internet has been known nowadays and merged. And many projects like we saw yesterday, right? The free software and open source community, the free culture community, the free culture and educational community with Wikipedia around the world. The open science community that we saw yesterday from do-yourself biology to be open institutional open science with GSK that we heard yesterday. The homogenome project and all those projects that John went through yesterday. And it's really funny. This is not that new. Companies, they know when they need to collaborate to establish a standard in that market and then innovate and really be competitive. We had, for example, in alternative energy companies deciding 10 years ago to not patent new knowledge. It should be able to share and establish that industry would innovate from a base and so on. And of course in business, right? Innocentive coming from the pharmaceuticals has a crowd sourcing alternative to solve problems. And I was in a workshop with the guy that was responsible for inocentive. And it would take five years and millions of dollars and three million dollars to solve one problem. Nowadays take like a couple of months, four or five months and $50,000 to solve a big pharmaceutical problem through the inocentive platform. Threadless, green exchange, which is open license patent thing for alternative energy. And many other open business models coming from many theories. Open innovation, which has brought Berkeley crowd sourcing co-creation opens our software and open business. So the idea here is that under the right circumstances, and here I see this has a design circumstance, groups are remarkably intelligent and they are often smarter than the smartest people in that. You are really thinking about collaboration. So while I was at Harvard, I was in the cooperation group trying to understand how I've been impacting some innovation in some industries. They were alternative energy, biotech and educational resources. So we did a broad study of the educational resource market in U.S. And I think it is really that collaboration. All these projects that we see, they show the power and promise of human cooperation is transforming our business government and our society. And I had the honor to be working with your high banker there. And I think this picture always show me very clear what that means. And the opposite of open is not close, actually, if you think about design. And also about design and policy terms. The opposite of open is actually broken. And attribution, this is John Wilbanks, who is my husband, but he also works in open science. He's come from our world also. And Creative Commons enables that in various formats, right? We have the machine readable, we have the human readable, and we have the legal code here. How many of you saw this chart already? So this is like a crack, like it really cracks your head when you try to understand legal interoperability of Creative Commons license. But this is really important when you are developing your OER projects and you say, OK, is my repository interoperable with open course aware? Is my repository interoperable with Merleau? Can I deposit in connections? What does that mean? And we say that, for example, Creative Commons by one is one of the most recent people say, but Sherlock is the free because I am enabling like a viral effect of freedom. But the problem is how much more, how many more conditions you impose down that value chain, less freedom you are generating in terms of legal interoperability. So we need to have that conscious. And that's the issue for us, because in Brazil, the license that has been chose for the policies that I'm working with, and Deborah, who is here with me from Brazil, we are working with is the CCC by non-commercial Sherlock. And it was really hard. I helped to write the laws. And it's really hard, the fear that academics have coming from the public sector, saying that the ideas will be privatized. And it's really hard to break that. So we are in a path to openness. And it's important to make this design choice so you can change that later. And I think all this design recognize that we actually learn differently. We need to be prepared to absorb this demand and the different students that come to our system. And what are the reasons, right? What are the reasons to adopt who we are? What are public funded, as we said? Digital technology will super parse current teaching and learning structures somehow. Cost implications on constituent, on reliant on statutory license schemes, and only various restrictive use permitted. Like in Australia, they pay millions. Is anybody here from Australia? Like they pay millions. Like I'm working with some folks at the Ministry of Education. Dalia Brown, who's actually has been many times to the open ed. She was one of the founders of Pure University. She showed me the numbers of why you guys pay statutory license, even with public domain materials. It's crazy. And OER is easier to manage, not complex copying limits, no restrictions. You take the lawyer out of the equation, no restrictions in agents. And this is really important when you want to engage even more communities in the developing world. How you're going to engage the community and the parents to really be sure that the key is still in the system. Allows teachers and students to modify, as you know. Education institutions should leverage taxpayer money even more if they are public funded. And the numbers are really incredible in some countries on how much the government invests in education directly and through tax exemption. And quality can be improved. Cost of content supposedly is going to reduce the time. And David's bringing a lot of research on that. And open sharing will speed up the development of learning resources. And there is a funny joke coming from Brazil. Like we printed some textbooks in geography. We change our books every three years. And they printed Paraguay twice in the South America map. And Pluto is still a planet and things like that. So if you have or you have that, that could be fixed. And you didn't have to collect back all the textbooks which had huge printing costs and distribution costs, more than printing costs actually to fix. And the message here that we were talking about is that implementation needs to be a relevant nation by nation. So the policy we develop in Brazil that I'm going to show you a little bit may work or may not work to our country. You need to understand your publishing market. You need to understand how much money your government puts in educational resources. And you need to understand what are all the levels of decisions from the government to institutions, to projects, to schools. And you need to work differently in all these different levels. And you need to find your heroes. So that's why I said you guys are heroes. You are like the chain to make this happen in your institutions. And if your institutions are adopting, the government will look at it. Because sometimes the government don't want to be the first mover. In some countries they do. Thankfully in Brazil they did. But in some other countries they don't. And we need to build capacity inside the institutions. And in terms of heroes, for example, in the open access movement, we have Stuart Shibard, a professor that came from the librarian department in Harvard. And he took a sabbatical here and he actually knocked every door of professors in Harvard. And that every door was actually what made possible the open access movement in Harvard as it is today. And luckily we also have Peter Subard there at the Berkman Center for a couple of years now. And people, that's what I'm saying, people, we need to actually multiply this effect. Because you are here and I'm happy. And this movement is also growing in Brazil and in many other countries. But we need to bring more people. We need to bring our colleagues. And we need to empower them. And we need to generate engagement. And sometimes this needs to be provoked. This needs, has to be a conscious choice. And who are our people? Everybody. Everybody. Even my mom goes to our workshops, you know. Like everybody. And my mom suffered through a lot of this because like she's a virologist. She works in HIV in AIDS in Brazil. And she didn't have access to many of the research, right? And she's in a top institution in Brazil. So that actually affects her. So she got it, you know.  And that has to be a parallel movement, right? You have to work with government, but you have to work with people. And those structures need to support each other in developing this policy. And you have to partner with lasers later. You have to identify what are your heroes. You need to like put the names in and map them and see who has done what. What is the history of each with whom I can engage with. And luckily in Brazil, we could do that and we could identify some folks that are really caring our message. And these politicians are the ones that care, really care with the efficient use of national and state money coming from taxes. They really care with saving students' money, as Nicole was pointing to us. Good morning, Nicole. Was pointed to us yesterday. They are the ones that really care with access to education. In Brazil, more like even private schools like FGV and top schools, they should not have the money to buy materials. And there was a big problem with a big issue of copy test books, which we have in US too. We don't have the secondary market for test books as we have the rental market. We don't have that in Brazil unfortunately. So students do have to buy books every time, every year. And we end up, Brazil ended up being the 301 specialist, which is the blacklist that US put other countries that consider infringing IP standards all over the world, right? For copies of test books. Understand the need to innovate in educational technology. And how much we are spending. And this slide I need to attribute to Cable from a previous presentation he did. And we are spending almost like average of 6, 5, 6% of GDP. And in Brazil now, the fight is to spend 10% of our GDP in education through the new national plan of education that's going to set the 10 next years of educational policy in Brazil. And the efficient use of this public funds to increase student success and access to quality is what matters. We need to understand how public funded is invested. And talking a little bit about Brazil. So Brazil is really bad in terms of intellectual property, in terms of our copyright. We come from European tradition with exceptions and limitations, different from many of you that come from a fair use or fair dealing tradition. Anglo-Saxon tradition. And our exceptions and limitations are really restrictive. We were classified among the bottom five countries in terms of flexibilities, including for education. Even being like a very proactive country in the World Intellectual Property Organizations and other multilateral forums, our laws are just really restrictive. And we stop it and say we need to reform this. And we are almost eight years trying to reform our copyright law and due to the change of head in the government that was stopped for a year, unfortunately. But there was new change and we hope that's going to move again. And as I was saying, we do have a lot of trouble in terms of access to books. The average of 30% of our books are out of print. The government provides tax exemptions that are huge. I'm going to show you some data. All the value chain of the publishing industry in Brazil is exempt from the paper, to the printing, to the distribution, everything. 90% covered by state through scholarship. So for example, when you have a thesis completed, the cost that was paid for that through scholarships and support materials and everything, 90% was covered by the state while the publishers put only 10% on packaging that. And selling it has a book or a textbook. So there is a huge issue there in terms of identifying that actually the government is the biggest payer here. And who did these researches? It was a department at the University of São Paulo. And they have incredible data. So in terms of exemption, and that's millions of dollars, has 2006. And we've been trying to get new data and the government and the publishers, associations, they are not giving us new data. But we're still going to get that. So in 2006, there was more than $565 million of tax exemptions for the publishing industry in Brazil. And why that exists? Because by our constitution, the tax exception was given by our constitution to the publishing industry to be sure that students would have cheaper test books and would access those books. That was a specific justification for that article to be in our constitution. And who pays? I think I cover most of it and the presentation will be available. But the conclusion is, yeah, we pay twice. We pay through taxes that are invested directly through salaries and scholarships and infrastructure. And then we pay again to buy those books. And that was one of the biggest reasons that really motivated us to start the OER Brazil project back in 2008. So the first thing we needed was actually try to understand all of this. So we really mapped what was going on in Brazil, the economic cycle, the projects, how many projects were using open license or not. What was the mess? Because Brazil is really actually famous for digital repositories for learning objects. But if you go deep on that, it's a mess in terms of legal and technical interpretability. And so it's all mapped. It's deposited in the SSRN that the paper, so you guys want to look at that data. We needed materials. There was no information about OER. So we did like one pages in OER, really talking to the teacher, one pages really talking to the students, really talking to the different audiences. We did a website that brings what is OER, all the public policies so people can follow and participate on building these open policies. We mapped OER in Brazil and in the world and we classify what is open, what is mixed because it allows many licenses within the same repository and in Brazil and in the world. We have many documents and interviews and press and IFAQ with 47 questions and answers from what it is to what are the business models, why I care. It was a huge effort to really bring information and awareness raising on OER in Brazil. And we finally have people. I was building this presentation and I said, wow, this slide has changed so much over the years. One of the first pictures was this down here. It was a group of people back in 2008 and some of you were there in Brazil. So Robert was there, Arash was there, a couple of people were there in that conference and from that conference that community started growing. So for the first time we started developing OER community there all together and that was very, it's very amazing. Like now we have other heroes that are really taking the work and moving ahead and working with sister communities. And we really wanted to engage the teacher so I don't know if you can see there, there is like a little basket with apple. We went to the conference of national education which was discussing the plan of national education and we distributed like a thousand apples. And we talked to almost a thousand professors and I know that because we handed material and we had a count of that. And the apple was an idea to bring people to say, look, if I give you an apple, I lose that apple. But if I give you an idea, if we share an idea, we both have that idea now. And that was really like a starter conversation to raise awareness around those teachers that were there fighting for better conditions and better salary. And they said, wow, I want to leave the shadow of piracy, right? Because they are bombarded every day that they are pirates by the American Chamber of Commerce and other international IP enforcement that occur in developing countries. And that's the message. And they say, I don't want to be a pirate. How do I do this? So it was a really good engagement there. And some of our hero politicians. So this here, Alexandre Schneider, he was the secretary of Sao Paulo city. He was the one that did with us the decree that declared that every pedagogical and test book and complementary material from the city of Sao Paulo, which is the richest in Sao Paulo, in Brazil, would be open license. So they are online and they are open license. Later, sometimes they said, if I had understood exactly what you guys were asking me, I probably would not have done the decree. I said, now it's done. Don't go back. But now he's engaged, right? Now that's part of his political platform and that's what we want. He is a guy that really want to bring technology and good technology and good curriculum for the class. Brazil spent millions bringing tablets and computers and laptops to school. We have the smart blackboards. But what happened? There is no curriculum and there is no electricity in some schools. So the blackboard is there, has a God or something. So we need to break that. And these politicians are helping. Like Hal Plotkin is here. We took him a couple of times to Brazil. He also helped and has inspired some politicians there. And that's in UNESCO's Angelo Vagnoni, who is the House of Representatives. That's the reporter for the federal bill. And we took him to Paris last June. And that, I think, seeing that is a worldwide movement really motivated him to engage and help new fronts in Brazil. So you need to engage those politicians. On the top corner, we have a meeting with Deborah that is here too. And Simone Pedro and the Secretary of State of São Paulo, who has billions investing education. We're going to have a five billion investment in technology and education in the next four or five years in São Paulo. And we are there discussing the state bill that was approved already by all the legislative committees. He's up to the final vote and final signature. So send good energies down there. And again, that's another slide that really makes me really emotional and honored. A couple of years ago, you just had two or three logos there. And now we have all these projects emerging with indigenous communities. With communities from like riversides and things like that. We also produced a book that's open-licensed and free. And Simone is going to be in Spanish and English, and it's available online. So this was how we also engage community and experts in academia to say, tell us your story about who we are. So it's here, if you guys want to see, is in Portuguese, this version. And public policies. So as I say, just going a little faster, because I already mentioned, in the national plan of education, we were able to insert two mandates for OER at the K-12 level. The plan was a very participatory project. Brazil is in a very interesting, amazing moment in terms of participatory democracy and how people are actually working with the government to build laws. And that's what I say, you need people. And you need to be smart on how you engage people building this. We have in Utah crowd sourcing legislation being built. We have some initiatives from the Obama government and so on. So this is possible. The platforms are there. The platforms for people to comment article by article are there. So behind our lobby is still necessary, but it's not just the only route anymore. And that was why, like, we had more than 3,000 changes in our plan. And we were able to include two articles on OER. The OER Brazilian Federal Bill that says that things paid by public money need to be public licensed also deals with repositories and so on. And now we have a task force to really push this bill along the chain. And this is Paulo Teixeira, which is the author of the bill with whom we all worked with. And he said, like, for many years I worked with the issue of access to knowledge. He worked with urbanism, he worked with access to medicine, and he works with access to technology. He gets it, how it's important. And he gets how the internet can change people's life. And our government, he recognizes, saw the numbers. He almost fell out of his chair, right, in terms of the numbers that the University of Sao Paulo folks brought. It's huge. And he said, we need to do something here. In the state of Sao Paulo, again, we have the bill, and I'm happy to provide all the language that you guys have, the OER bill, the federal one, we have our English version. And that bill is going to a portal in Brazil that's called Democracy, which is this participatory moment where everybody can actually suggest changes and improve the legislation. So let's see what's going to happen. We didn't have any strong pushback from the publishers. And for you to see, for example, the copyright law that I said is under reform for some time received almost a thousand suggestions. So the community is really participating. And the Marcos Civil Internet, which is our bill that we're going to regulate internet in Brazil to have a free internet, like it's a positive bill that came reacting to some criminalization of activities in internet, also was highly participatory. Like it's an example worldwide on what happened. So people really got engaged. People want to get engaged in making policy. And some examples in the U.S. I'm going to pass that. In open access, you have people also pushing for policies. So we are the people who, do you guys know the system, the only petition that if you get over 25,000 signatures, the White House is kind of obliged to consider that policy. So the open access community did do that. And they have more than 25,000 signatures. And they are talking with the White House about a wide broad policy in open access in the United States. And for the first time in history in the United States, you guys have a great chance to really implement what we are through the curriculum setting process and so on. And really move OER in the mainstream. And you are the proof. Like OER is moving in the mainstream here. So anyway, to start wrapping up the presentation. So I think we all agree that OER do support personalization, right? Who agree with that? Yeah, that's a process, right? Promote education collaboration. Who are you feel like engaged and collaborating with your students? How difficult is that, right? Providing a pathway to support educational development. This is really important in developing countries because when you bring technology, you really need to bring a curriculum to train the teachers and to really support the teacher has a core center of this ecosystem. And it does support any time, any place learning models. And this is really important for the community with disabilities. So you have the Department of Labor. You have the Washington State policy. And you have the Utah policy. Now you have the BC policy that was just announced when we are here. So I'm just bringing this. I'm passing fast because you guys know about this. They are happening everywhere. They happen in South Africa. The government adopted the Ciavulla books. They are happening in India. They are happening in South Africa. Europe has a consultation on open education right now. So if you guys, when I work with Europe at all, is there a chance to really push that in the European government? Cristobal who is here from the Oxford Internet Institute is working on that. And it's a really good moment to collaborate. And why that's necessary? I don't know if you guys know. I don't know if you buy materials in your school. Have you read the contracts that come with the books that you buy? Like they are, you can't do anything. You cannot index. You cannot crawl. You cannot do anything. And there is another thing. With the move from analog to digital. Have you ever read the contracts coming to public libraries on the e-books? You can land that e-book just to one people at a time for 21 times in U.S. After the 21, it expires. You lose the book. It's not in your library anymore. This is crazy people. Okay, who say this is crazy? My God! Seriously, I get goosebumps. It's a crazy reality if we don't understand what's coming from the market. And we don't play with these policies. Our libraries will be empty. The books are, we already have any, well at least the Google decision recently was good. So maybe we have some hope. But we cannot do e-landing. We cannot do cross-library in exchange of these digital books. Oh my God! Seriously. And now we are discussing the word, the International Security Organization in Waipo, in Geneva, which a lot of people feel it's very distant, but for the first time has a proactive agenda, a treaty for exceptional limitations for librarians. The International Associations of Librarians are there. We are also discussing a treaty for exceptional limitations for the blind. The blind unions are there. They kept really hard the American blind unions out of it, not the unions, but the American government, which is part of the Dark Force internationally in this area, actually. The dark side of the force. And it's really sad because you guys have amazing fair use, amazing fair dealing. But you don't export that. You just export these enforcement rules. I'm sorry. If you read ACTA, if you read CPP, which is the treaty being negotiated in the Pacific region, it's really frustrating. And that's what you see in the digital. You see the end of the first sale doctrine. You see the end of e-landing. You cannot donate your books. So that culture I have, okay, I have a book. I bought a book. I think I have it. And I'm going to donate to my library. Or I'm going to give it to a friend. You can't do that. So what are we going to do about it, right? These are broken business models that we need to partner with the publishers to help them figure out something that's better for education and for consumers. And I think it's a partnership. Okay. And OER has impact. Many of us are researching the OER impact. And for example, in Open Access, they already have numbers. So in terms of how personally, how motivated you are to adopt OER, when you talk to teachers, when you talk to your heroes, that are people that will make the chain move, you can say, look, you may not make a lot of money with it, which would not make in the publishing industry, right? You all know the long-tailed doctrine probably, right? But it does generate recognition. It does generate adoption, connections, open stacks, and all these guys are providing really good numbers, flat words, and all those guys are providing really good numbers. And now I ask your help, actually. So Creative Commons has put an open policy registry together where you can follow all these policies that are being built around the world. And the great news also is that Creative Commons, with some of us, many of us are funding the Open Policy Institute to really help people around the world to really work together on finding good language, on understanding what research needs to be done, on really partnering and working together to move this, and raise awareness. You know, a lot of people when I say you can get your book just 20, one four times, like, nobody knows that. Nobody re-reads the contracts, just us boring loyals. Well, not even I read all they call it, right? Anyway, Survey Ungoverned, like, yeah, okay. I phone, yes, I agree, download the app. Anyway, Survey Ungovernment on Open Educational Research, so we are policy, so UNESCO is interested in that. They are mapping. You just have to be a little careful here, because they were based on a survey coming from governments, and many governments said, oh, we have this open, and when you look, it's actually not. So look with a little careful here, conclusions. So if you care about the emergency of knowledge, federation systems, and that allow broader access to knowledge, you may have to have some kind of intervention, and not wait for just organic. So all of you, I really ask for help. All of you, or some of you, try to convince the person on your side. Okay, look to your side, Deborah. Convince him. You already convinced, right? He's been to Brazil, so yeah, you know this. So anyway, so let's try to move this chain. If you don't have a year sabbatical, just knock on the door of your colleague on the room by your side. That is the chain. Sometimes you'll find heroes that will just care their work, and you don't need to do it. And this means inclusion. That's mean cooperation. Wide dissemination of education contributes to more inclusive and cohesive societies, and we need that. Foster equal opportunities, and innovation in line with priorities of a renewed social agenda, and I would say social contract. Focus on the knowledge society. In this sense, look at that part. And that is now really part of the Brazilian international agenda. So I was really happy when we engaged the Foreign Affairs Ministers in our discussions with UNESCO, and they really bought that. They are really making official positions that the OER will be part of the Brazilian international policy in IP and access to knowledge. And I think that should be the dirty of all the governments to be sure that we are not being hypocrites. Many governments actually sign recently the open government partnership, and it's not just about or should not just be about opening information to access information to government information. It should be about understanding where the money goes and having the possibility to interfere there. US, Brazil, and some of those countries there that I list are founding partners of the open government partnership. It's about transparency, it's about inclusion, it's about how technology can enable democracy right now. And the commitment is to action. And there are many more countries already in this partnership. So as I said in the beginning, I have three takeaways for you. Open system and open networks can create modes of innovation and collaboration. New modes of innovation can be helped or hurt by institutional and government policies and design. Brazil and Brazilian institutions and institutions and countries all over the world are experimenting with this. And it just takes some, and it just takes all of some of us. And that's what I ask you. I ask your help to move that chain forward. So thank you so much. So, Carol, you're one of the greatest advocates in the world for working with policymakers to help them understand why open policy is important and to help them craft an open policy that's possible within the political environment that they exist. I want to talk a little bit about for those of us who don't have as much experience as you do in this, how do you go about that? How do you find the right politicians? How do you look for the opportunities? Where do you, how do you negotiate with them to get them to understand that this is actually in their best interest and in the best interest of the country or the province that they're in? So I think we, as I said, I think we are in an amazing moment when countries are bringing, are taking technology to the classroom and you have opportunity there. You have a window of opportunity to work with them and probably some of you do work in Brazil who have partnerships here in Brazil. I found some of you, maybe people already left, but they are looking for help and the politicians are looking for help. They are looking for help from the World Bank and many other organizations, they are looking for help from institutions. So you find them because they are looking for help. That's one step. The other step is to identify them who are the ones that supported sister communities. So who are the champions in free software? Which is how they say in English, like above a party discussion, right? These discussions need to be like above party disputes, right? In the US they were defeated by both Republicans and Democrats. Actually a Republican started that. Wyden, Issa and other representatives and senators they understood that this is something above. So if you identify who are the champions already close to the technology discussion debate to sister communities and that are sometimes even with the entrepreneurship community. Like we need to force entrepreneurship here. We have new business models emerging all over the world. Lacani from Harvard Business School has mapped how much money the free software community has been doing. Even IBM is not just like the grassroots entrepreneurship thing. So who are your usual suspects? So that's the first level, right? And then the second level you're going to have to map through their allies. Because sometimes it's exchange. And then you need to understand that. You and some others in the last few days keep using the term intellectual property. In Canada and in the United States there are court decisions stating that copyright material is not property. And yet we continue to use these terms. And it seems to me it's an Orwellian term that it's something we should use the terms of what it is. It's a privilege monopoly. You're our friends that are pretty sure it's common, right? And intellectual it's not property and most of the copyrighted material is not particularly intellectual. The education itself is you know. And if I go, you know, what a Bing Bang, who are we this is not intellectual. But I am releasing it on a Creative Commons license. Zero do not attribute me. Thank you. Yeah. Awesome. Thank you. Yeah, that's our old debate, right? Are we going to, like that was the name adopted forever. And you're right. You know, actually before in some older laws with statute of aim that was the first copyright viewing the world like in England in the word was monopoly. So that has changed around with time and it's really brought together the discussions around creativity to the discussions around trade and that brought a lot of difficulties in how we see ideas being shared and how we see innovation in this space and how we actually measure all of this. So I agree with you. There are a lot of problems using this word. It's just the way we communicate. But yeah, the discussion is there. You're right.


Everyone, all of my lovely 340 students, this is the recorded lecture for March 28th. Unfortunately, I will be out of town, so what we're going to do is we're going to keep the momentum of the class going, and we're going to continue right where we left off. So if you recall on the Monday before the midterm, we were talking about type equivalents. So specifically here we're talking about in a type system, how can the type system tell if two types are the same? So we've looked at various types of type systems. We looked at type name equivalents, which specifies that for two types to be equivalent, they must have exactly the same name. So if we define a new type, even if that type is the same as a basic type, that because that new type no longer has the same name as the basic type, that that is not name equivalent. And we saw an interesting case of what happens when you have anonymous types. So anonymous type is a type with no name. So in that case, even two variables with the same anonymous type will not be name equivalent because there is no name. They cannot be name equivalent because anonymous types do not have a name. So we said, okay, this is probably a little bit too restrictive. So what can we do? So how can we improve this? So in the next step of the evolution, we then looked at internal name equivalents. So we looked at two things can be equivalent if the compiler would give them the same internal name, right? And this comes up specifically with anonymous types and specifically with multiple variables that are declared to have the same anonymous type. So those types are type equivalent. And then on Monday, we continued looking forward and we said, well, but you know, these rules are very restrictive, right? So what if we try to give the programmer more expressivity, right? Then how can they how can the type system tell if two types are equivalent based on really the underlying structure of the data type? So for instance, if one type is an int and the other type is also an int, but different names, we maybe still want that to be the same. But we have to look at what happens? How do we deal with structures and pointers and structures and pointers and functions, right? How do we determine the type equivalents of them? So this brings us to today. So we've been talking about on Monday, we've talked about structural equivalents, right? So we've looked at we want to look at these two structures A and B and determine that A and B are both the same, right? So we're defining a new structure A and a new structure B. We define two new variables foo and bar that have the type A and B. And we want to answer the question, is foo and bar the same thing, right? And so this is where we get into the structural equivalents rules of determining that, right? So we went through the rules for the basic types. So basic types are structurally equivalent if they're the same. Pointers to basic pointers are the same if the types that they're pointing to are the same. Structures as we saw, remember we talked on Monday that structures can be structurally equivalent if and only if the types in the order are the same. So the key here is that as we can see here, we have the structure field names. Here are x1, x2, all the way to xk. Here in structure two is y1, y2 all the way to yk. But we're ignoring to tell if two structures are structurally equivalent. We ignore the name of the field and we just want to look at the types. So we say, are the types of the first field structurally equivalent? W1 structurally equivalent to WQ1. And we do this for W2 structurally equivalent to Q2. And we keep going through all of them until all the way to the end. So this condition must hold. For two structures to be structurally equivalent, this must hold. So we saw that. And so we saw that here we have a structure A with field A int followed by field B float. Here structure B followed by B, a field B which is an int, and field A which is a float. And so if we have two structures, foo which is type A, bar which is type B, and we want to ask the question is foo equal to bar, under structural equivalents these are structurally equivalent because the first two types, the first two fields are structurally equivalent and the second two fields are also structurally equivalent. So the important thing here is that the name doesn't matter. And so similarly if we have the same thing, struct A and struct B where A has a field int, B has a field float, and struct B where B has a field float, where the first one, the field name is B which is a float, and the second structure name is an A which type is an int. And here even though we can see A int, A int, B float, B float, the order in structural equivalents is what matters. So foo and bar here would not be structurally equivalent. And we can just quickly update this, see these are how problems get fixed. Awesome. So we also saw that two arrays, if we want to determine if two arrays can be structurally equivalent. So if you have two arrays, remember and in this kind of fake type system that we're defining, right, we say that arrays have a certain range. So T1 has an array of range one of some type T1, T2 are arrays of some range two of type T2. And so we say that T1 and T2 are structurally equivalent if and only if the ranges are the same number of dimensions and the same number of entries. So essentially the ranges are identical. And T1 and T2 are structurally equivalent. Right, seems pretty straightforward. And we saw that two functions are structurally equivalent if they have the same number of parameters. And all of those parameters are structurally equivalent, right. So in order, so the first parameters are structurally equivalent, the types of the first parameters, the types of the second parameters are structurally equivalent, the types of the third parameters are structurally equivalent, all the way to the end of the very last type are structurally equivalent. And finally also the return values are structurally equivalent. So now we get to today's topic is how do we actually determine what's the algorithm for determining if types are structurally equivalent. And so the goal is to determine we want to be able to try to understand for every pair of types in the program are they structurally equivalent. And we want to be able to calculate this because we want to be able to answer the question, are these two types structurally equivalent? Does the types system allow this assignment operator because these two types are structurally equivalent? So the outcome of our algorithm we want to know for every type in the program with every other type if they're structurally equivalent. So when you see something like this we want to see for every pair of types we want to think a table right we want to make a two-dimensional table to try to understand the structural equivalents of the types. And so in a naive way how you may do this is fairly simple. So we saw for all the rules they are all recursive rules right. So in functions as we just saw functions are structurally equivalent if the types of the function parameters are structurally equivalent. Arrays or pointers are structurally equivalent if they point if what they point to are structurally equivalent. And so it seems really straightforward right we should be able to just keep applying these five rules over and over until we get to our base case of one and two right. So the base case of types being equal and the other base case. So let's look at one and two here right. So one are same built-in types and actually so one is actually the base case right pointers are structurally equivalent types. So I will update this right one is our base case great. But we run into a problem so let's let's look at what would happen. So right so let's say we have over here so from this example we have some type t1 and t1 is we're defining as a struct right where the first field we'll call it a is an int right and the second field p is a pointer to t2 and here we have t2 or this is a struct where we have a is an int and p is a pointer to t1 right okay. So once we get here right so the question is how do we determine so let's apply our rules to determine if these are structurally equivalent right. So we want to ask we want to ask the question are t1 and t2 structurally equivalent right. So we know from rule three right that t1 and t2 are so just keep applying these rules right. So t1 and t2 are structurally equivalent if the first fields are structurally equivalent. So to satisfy this first one w1 is structurally equivalent to q1 so the first field type is in t1 is the same as the first field type in t2 so the first field type in t1 is an int the first field type in t2 is also an int so we say our two int structurally equivalent yes so this is structurally equivalent so this condition passes and then here we have are the second parameter structurally equivalent pointer to t2 pointer to t1. So now we want to ask the question right so applying these rules here forces us to ask the question are these two types this equivalent right are structurally equivalent so is pointer to t2 is that equivalent to pointer to t1 right so that's the question that we want to answer. So okay let's look at our pointer rule right we have our pointer rule is number two so pointer to t2 pointer to t1 pointers are pointers are structurally equivalent if what they point to is structurally equivalent oops I just hit some button here that I don't know what it was that's fine right so these are structurally equivalent pointer to t2 to pointer to t1 if what they point to are structurally equivalent right so we say is t2 structurally equivalent to t1 right well how do we do that well let's go back here so we say okay they're structurally equivalent if they're structures so we know the rules for structural equivalents are there we go found the button okay right so let me go back to our rule for structural equivalents and we say okay how do we determine these two structures are equivalent well if the first two fields are equivalent int and int then they're structurally equivalent great those are good let me check pointer to t2 pointer to t1 our pointer to t2 pointer to t1 right pointer to t2 is that structurally equivalent to right pointer to t1 well these are going to be structurally equivalent if and only if these are structurally equivalent so we go is t2 structurally equivalent to t1 and hopefully at this point you're screaming at your computer please Adam stop doing this you're gonna keep going forever right we can see we've already reached this point and so we're gonna keep looping here trying to determine if these structures are structurally equivalent right so how can we fix this right so when we apply these rules we're saying that well t2 is structurally equivalent to t1 is structurally equivalent to t2 if and only if pointer to t1 is structurally equivalent to pointer to t2 which is true if and only if t1 is structurally equivalent to t2 dot dot dot on and on again forever right so now we kind of reach a conundrum so are these two structures structurally equivalent and this is actually something I want you to kind of maybe you can pause the video for a little bit and think hmm intuitively should these two structures be structurally equivalent right could you use in place of t1 right where your program is expecting a t1 could you give it a t2 and have that execute the same right so think about it like this so I have those two types and now here in my program I'm declaring a variable of type t1 called foo right I do stuff with foo then later on I'm declaring a variable of type t2 called bar right and now I want to say well I want to use right I want to copy foo into bar so can I do that or to put another way let's say I have some function right Baz and let's say Baz takes in an argument of type t2 right it's written to take in and I'm gonna call it a because I'm running out of variable names it takes in something of type t2 so it knows it can do t2 dot a dot a to get an int right so let's set this to be 42 and we'll have a dot p right which is a pointer to a t1 and let's say I want to get the in it after that so I know it's a pointer so I'm gonna need to if I'm writing kind of see pseudo code right I'm gonna need the arrow operator here so a dot p arrow a right so I said that equal to a hundred so the question is so clearly I can call Baz with bar right we can see bar is of type t2 the function Baz accepts parameters of type t2 clearly I should be able to do this right but the question is can I call Baz with foo right is this a valid call can I every place in this function right that I use t2 could I use a t1 interchangeably well it should be clear from where we're trying to calculate this that yes we have an a structure the a field is the first field here so clearly I can use that here that's gonna be an integer that's not gonna be a problem right and the other thing is so it has a p field right which is gonna be a pointer to here t1 to t2 so I can dereference that pointer and then access the a field set that to be equal to a hundred so really I can use a t1 here when I was expecting a t2 right because the pointers here are pointing to types so it's kind of almost as you can see we get into this infinite recursive thing well t1 and t2 are structured equivalent right if the pointers to t2 and the pointers to t1 are structured equivalent and those are only gonna be structured equivalent if and only if t2 and t1 are structured equivalent which is the whole question that we're trying to resolve in the first place so what we're going to do is we're gonna what if we assume that t1 and t2 are structurally equivalent right then pointers to t1 and pointers to t2 is fine because t1 and t2 are structurally equivalent right so that's how we're gonna do this and that's how we're actually gonna break this logjam that we get in is we're going to assume from the start that t1 and t2 are structurally equivalent right because when we start we know nothing about the types so we just assume that all the types are structurally equivalent right and then what we're gonna do is we're gonna go through and try to prove that types are not structured equivalent because they don't follow the rules right so you can see how the alternative our previous way that we were thinking about this is well we first assume that you know this doesn't say that there's an assumption necessarily in here but there is right there's an assumption here that the types are all types are not structurally equivalent and we need to apply our rules to prove that they are structurally equivalent well an alternative way of thinking about that right is well why don't we do this from the other way assume that all the types are not structurally equivalent or sorry assume that all the types are structurally equivalent and if any type violates one of those rules then we say that it is not structurally equivalent right so you can see that we're trying to get to these get to the actual rules the actual structural equivalent from two different directions either assuming that they're all the same or assuming that none of them are the same and we're gonna use those rules to work towards the actual type system sorry the actual structural equivalents so like I mentioned right our goal is to create an end-by-end table where n is the number of types in the program and we want each entry in the table is going to be true if the types are structurally equivalent or false if the types are not structurally equivalent and so in order to support this cyclical definitions right this is why we're gonna do it this way is we're gonna assume that all everything is structurally equivalent so we're gonna create our table and we're gonna set every element in that table to be true and so the way to think about this is right where we know nothing before we approach this types we know nothing we have to assume that they're all the same or they're all different right so we're gonna assume that they're all the same until we have proof otherwise because they contradict one of the rules and so once we have this once we start here so this is this key idea is starting here then the algorithm itself is fairly simple so we first set the end-by-end table to have each entry is true and while the table has not changed so this should be very similar sorry this should be very familiar to you right what think about what other algorithms we've talked about that we keep executing and going until nothing has changed right so hopefully right in your head popped in oh yes first and follow sets right when we calculated first and follow sets we did those until the table until our first and follow sets had not changed right and I think at the time I mentioned that this is a technique called a fixed point so we're continually applying an algorithm until nothing changes of the mathematical term for that is a fixed point so this structural equivalence algorithm is the same so we're gonna keep applying these rules until we haven't changed anything so you can see this kind of pseudo code right so while the table is not changed check each entry i and j in the table so each pair of types right and if ti and tj are not structural equivalent so you check using the rules the structural equivalent of the two types then you set the entry in the table to be false right and so ti and tj are the ith and jth types in the programs right it doesn't really matter what you name them as so let's go through an example using that logjam example that we had right so here we have a structure t1 is a structure it has a field a as an int b a field p which is a pointer to t2 t2 is a structure which has a field c which is an int and a field q which is a pointer to t3 and t3 is a structure that has a the first field is a float and the second field p is a pointer to t1 right and so the question is are these structurally equivalent and so hopefully by looking at this you can see it's actually not clear right away what the answer is going to be right and you can imagine if there's more types it's gonna be even more confusing so this is why we have this algorithm to calculate this so we're first going to create our table right and what's and in this case and is the number of types in the program so we have three types so we're gonna have a three by three table and we're gonna write each of the types right t1 t2 t3 along the top here and t1 t2 t3 along the side here and remember the first step of the structure equivalence algorithm we're going to assume that everything is true that every type is true is structure equivalent and then what we want to do right we're gonna go through each of these types t1 t1 t1 t2 t1 t3 and see are they actually structurally equivalent right and so this is what we're gonna do we're gonna say our t1 and t1 structure equivalent well yes they're the exact same type they are definitely structure equivalent right that's one way to do it we can actually go through this right and say well an int is structure equivalent to an int a pointer to t2 is that structure equivalent to pointer to t2 well pointed to t2 is structure equivalent to point to t2 if t2 and t2 are structure equivalent so how do we determine if t2 and t2 are structure equivalent we look at our table and we see t2 t2 yes that's true yes at this point they're structurally equivalent so we say yes t1 is structured equivalent to t1 then we go on to something more interesting we say our t1 and t2 structure equivalent right so we look here and we say okay well they're both structures so we know that two structures are structured equivalent if and only if the first field types are structured equivalent so is an int structure equivalent to an int yes that's rule one those are structured equivalent then we say let's look at the next field are they equivalent we have pointer to t2 and pointer to t3 so we know from rule two that pointers are structured equivalent if and only if the types that they point to our structure equivalent so we say is t2 structure equivalent to t3 now this is the very important thing right just like when we're calculating first and follow we always refer to the previously calculated value of t2 and t3 right we don't go through and try to recalculate new values for t2 and t3 or try to determine if t2 and t3 are structured equivalent we have this beautiful table that we're building about the structural equivalent of all the types in the program so we look up in the table the types so we say is t2 structure equivalent to t3 and we say yes right we say the the entry here is true which means at this point t2 and t3 are structurally t2 and t3 are structurally equivalent and then we say okay great that means t1 and t2 are structurally equivalent right so we check these fields check these fields check those and say great they are structurally equivalent so now we move on to t1 and t3 so we first look right at the first fields int and float are ints and floats structurally equivalent they are not structurally equivalent so then we change this entry to be false so you can think of it as we've essentially at this point proved to ourselves that t1 and t3 are not possibly structurally equivalent right because that first structure field is not structurally equivalent now the other thing that we have to keep in mind right is we really only care about half of this table right because structural equivalents is I cannot remember the term for it right now if we're in class one of you could definitely help me out I want to say communicative or associative so if t1 is not structurally equivalent to t3 then t3 is not going to be structurally equivalent to t1 so we need to make sure to update in our table the reflective one right just to make sure that we have that great so we did all t1 against all the other types so now we're going to do t2 against all the other types right once again we're not going to start with t1 t2 t2 t1 because we've already calculated that so and you can kind of see hopefully you can convince yourself that along the diagonal here right there's always going to be true because a type is always going to be structurally equivalent to itself so the only other one to check here is is t2 structure equivalent to t3 so then we look is the first field their structures is the first field in t2 equivalent to the t3 so I have an infinite float so it tells me that nope they are not structurally equivalent and I have to update in my table t3 t2 so now I've gone through all the pairs I've gone through t1 against t2 t3 t2 against t3 right so I've compared all the pairs and now I say well am I done have I I've gone through all of them have I calculated have I properly calculated all the structural equivalents here remember and just like first and follow sets the answer is no because we we went through applied all the rules and we made changes to this table so we have to make sure we go through again and calculate apply the rules again so we do exactly what we did so let's check t1 and t2 and say are these structure equivalent so let's look at our types t1 and t2 so we have t1 which is an int t2's first field type is an int as well so we say those two are structurally equivalent great so now we check the other one pointer to t2 pointer to t3 well we know okay good they're both pointers and pointers are going to be structure equivalent if and only if t2 is structurally equivalent to t3 now we look up in our field is t2 structurally equivalent to t3 false it is not which means t1 is not structurally equivalent to t2 so that's going to be false so we update that in our table and then we'd go and check t1 t3 and we'd see t1 t3 those are definitely still not structure equivalent we check t2 t3 and say yes these are not structure equivalent we'd say I made changes I have to do it again so we go through it one more time and if you go through it you will get this exact same table right and so we can see here now that this example shows how we can calculate that so let's do a few more examples of this let's say we have types let's say t1 is a string t2 is going to be a pointer to t1 and t3 is going to be a pointer to a string right so just like before so and then let's clear some variables so here I have my types and then I have my variables so let's say I have x and y are both of type x let's see x is type t2 right y and z are both types of pointers oops pointers is not a type it's pointer to string right okay so now I want to say okay so what are what types are structure equivalent right so that's one way to think about this what types are structure equivalent the other way to think about it is can I do this oh let's I'm going to learn other variable w that's type t3 right so can I do x equals w under let's say structure uh name equivalents right can I do this under name equivalents under internal name internal name equivalents structural right this is something that definitely you could get asked on a midterm right so this demonstrates that you understand how to apply these type equivalence rules so you think about what actually is this question asking right so this question is asking is the type of x is t2 the type of w is t3 so it's asking all of these questions assuming name equivalents is t2 name equivalent to t3 right so it should be very clear is t2 the same name as t3 no no not equivalent are they internal name equivalent right no they're declared as different types they are not internal name equivalent either are they structurally equivalent this is when we need to create our table but before we do we have let's look at maybe another question that they could ask us right or I guess when I say they I kind of mean me so let's have y equal w right can I do that so name internal structural right so y and z name equivalent so the name of type so right when we think about y is w remember we're talking about the types so w's type is t3 but what's y's type so hopefully you can realize at this point that the type of y right here right this has no name there is no pointer to a string type uh this is not a name so it's an anonymous type so when we say are they name equivalent no they have no name they are not name equivalent are they internal name equivalent no right this is declared here this is declared here so internally they're gonna have different names so no they're not an internal name equivalent finally are they structurally equivalent so what this means is looking at the types here right let's see can I move this to get more no it's just gonna zoom okay that's fine well now I have a mouse so now I can do stuff like move things down okay so fancy right so now I can move this down sweet but now I want to remember I want to be able to answer this question so how do I determine if these are structurally equivalent well remember as we said to determine structural equivalents you have to put all of the types in your type system in your program you have to put them in this table right so the types in the program are t1 t2 t3 and this anonymous type here so let's give it a name we're gonna call it let's call it alpha because it's one of the greek letters that I can draw so we'll call this alpha and alpha is going to be this type here so we have four types in this program that we want to determine the type the structural equivalents right so let's build the table we'll do t1 t2 t3 and alpha along the top and then we will tax my straight line drawing abilities not so bad if I do say so myself all right and then we'll need another line here and then we also put these same types along the line here t1 right t2 t3 and alpha all right great here's our table now remember what are we assuming about all the types in the program when we compute structural equivalents we are assuming that everything in this is structured equivalent everything is structured equivalent to everything else right so you can see here I'm I'm only drawing the upper half here so that should be very clear about why I'm doing that now then we want to go through and say and I'm going to write alpha up here right so alpha doesn't have an explicit name but the usage of the program is as if alpha is pointer to string right okay so I'm going to look at t1 and t2 so I go through so I've set them all to be true they're all structurally equivalent and I'm going to go through for t1 through all the other ones and say are they structure equivalent and prove it from the rule or ask if any of the rules contradict this statement so I have t1 and I'm going to go to t2 and I'm going to say is a string structure equivalent to a pointer to t1 no that is false right strings are not the same thing as pointers and I just got rid of my beautiful line there we go awesome even better line right so this is false they are not structure equivalent then I go t1 t3 is t1 structure equivalent to t2 string and a pointer to a string no pointers and strings cannot be structure equivalent so that's false t1 and alpha alpha is a pointer to a string t1 is a string nope cannot be structure equivalent right great t2 t3 t2 pointer to t1 t3 pointer to string okay they're both pointers so they're structure equivalent if and only if the types that they're pointing to are structure equivalent so is t1 structure equivalent to a string so we see t1 and we see t1 and string so t1 and string so t string is a basic type and t1 is a basic type string so we use rule one to say yes those are structure equivalent so we say then t2 and t3 are structure equivalent based on what we know let me say t2 and alpha t2 is pointer to t1 alpha is pointer to string we pointers are the same string and t1 so string is a string t1 is a string we compare string and string those are structure equivalent so we say yes t2 and alpha are structure equivalent we look at t3 we say t3 and alpha are they structure equivalent well pointer to string they're they're both pointers they're going to be the same if what they point to is the same so string structure equivalent to string means that yes, these are structurally equivalent. Then I change something in this table, so I have to go through it again. So T1, T2, still not structurally equivalent. T1, T3, still not structurally equivalent. And this should be very clear why, right? This is a string, and these are all pointers. There's no way these can be structurally equivalent. So it's going to be false all here. T2, T3, T1 and string are still the same. So T2 and T3 are still structurally equivalent. T2 and alpha are both point. T2 is a pointer to T1, alpha is a pointer to a string. These are still structurally equivalent, so these are structurally equivalent. T3, alpha, pointer to string, pointer to string, both structurally equivalent, bang. So here I have all of the structural equivalents in the program, right? So now when I say our T2 and T3 structurally equivalent, I don't even need to think about it, right? I've already calculated it. So T2 and T3 are in this table. We look T2, T3, yes, structurally equivalent. We would write yes, and we would get all the points in the world here, and we would be very happy students. And I would be a happy instructor. Okay. Now in this other problem, remember, we're asking, can y equal to w? So the type of y, remember, is alpha and the type which we gave the internal name alpha. The type of w is T3. So we ask, are they structurally equivalent? Alpha, well, T3, alpha, true. So yes, they're structurally equivalent. Also, very good, right, correct answer. Awesome. So just for, so let's ask one more question here. So now that you've computed this, now you can answer pretty much any question about assignment operators or an equivalence, right? So is y equals z allowed under name equivalence? I want you to think about that. So what's the type of z, right? Well, remember, we gave it the name alpha, but it is an anonymous type. z has no name. So z has no name, and y has no name. And if you have two types that have no name, they are not name equivalent. So they are not gonna be name equivalent. Are they internal name equivalent? So we look at y and z. You see, y and z are both pointers of string, but they're the same anonymous type pointer to string. So we know that internally the compiler is gonna have to give them the same type name, alpha. And so we'll say that yes, they are internal name equivalent. Then structural equivalence, well, we can look at our table and we know alpha and alpha is always gonna be structural equivalent. So we say yes, and then we are happy, happy students. Cool, all right, so that is it. We've reached the end of the type system for right now. There'll be obviously homeworks on this to help reinforce the concepts. And on Wednesday, we're gonna talk about something very, very interesting. We're gonna go over Hindley-Milner type inference. So this is a really important, very cool topic that I'm very excited to start talking about on Wednesday. So thank you, and I will see you then.


The three basic states of matter are solid, liquid, and gas. The main differences between these states of matter are the closeness of the molecules and the energy of the molecules. In solids, the molecules are packed tightly together and remain in a fixed position relative to each other. In the solid state, the molecules have the least amount of energy and move very little. In liquids, the molecules are close together but are not in a fixed position. In the liquid state, the molecules have more energy than in a solid, which allows the molecules to move around each other. In gases, the molecules are very far apart and move randomly. In the gas state, the molecules have the greatest amount of energy which keeps the molecules in constant motion. For changes of state to occur, the molecules will need to gain or lose energy, which affects the amount of movement and the closeness of the molecules to each other, thus determining the state. When heat is removed from a liquid, the molecules lose energy, which decreases the amount of movement and the molecules pack tightly together, forming a solid. This is called freezing. In the reverse process, called melting, heat is added to a solid, causing the molecules to gain energy, which increases the amount of movement and molecules move a little further apart, thus forming a liquid. When heat is added to a liquid, the molecules gain even more energy and the molecules move even faster and farther apart, thus forming a gas. This process is called vaporization. During the process of condensation, heat is removed from a gas to form a liquid. When energy is removed from a gas, the molecules do not move as fast and move closer together, forming the liquid. Under certain conditions, substances can change between the states of solid and gas without going through the liquid state. Sublimation occurs when a solid gains enough energy to be converted directly into a gas. If you have ever seen dry ice turn into a smoky looking fog, you have observed the sublimation of solid carbon dioxide into carbon dioxide gas. In the reverse process, called deposition, a gas loses enough energy to be converted directly to a solid. This occurs when frost forms on grass on a cold morning. The warm water vapor in the air comes in contact with the very cold grass, which turns the water vapor into solid ice crystals. Changes of state involve the loss or gain of energy, in turn changing the amount of movement and closeness of the molecules.


Steve, you talked earlier about, you know, you were worried maybe there could be complacency. You talked to them about that.  And what changes did you guys make to get back in this game and pull it out?  And, you know, we challenged them. Told them it wasn't going to be easy and that we had to really scrap tonight if we wanted to win.  You know, everyone, everyone took their turn making plays for the team, putting in a good shift and, you know, took a lot of guts to win that game. So I'm really proud of the guys overall for their effort, but I think we did have a slow start and then we're really good after that.