Dwi'n rhaid i'r ffrwng y Plutuscore. Fe yma, y Plutuscore, gilydd y hwnnw i'r targetau teulu o plutus Tx. Plutuscore yn system F. Mae'r apology o gywlai ddefnyddio yn amhwymoedd yn iawn. Mynd i'n digwydd prygu ar rai gyda sormy mewn, a mae'n gwneud o ddechrau ond. Plutuscore ymlaen i'r drynu yn bwysig a'i ddefnyddio'r bwysig bod mae'n cyfrifwyrd. OK, so you might wonder why should we formalise this? Well we want to move from pen and paper specifications to having machine checked specifications and machine checked proofs, so that's so that we can have higher assurance. So quite often when you have a programming language you might, if you are lucky you might get the grammar in the appendix in the back of the book. And there are some programming languages where they have a formal specification like standard ML. That's a pen and paper specification essentially. You can't get away with that these days. I think you really need to have machine check proofs. Another benefit to doing this is that we can write an extremely precise specific implementation to use for testing. So instead of saying for example that you have an evaluator where we just say we're only ever going to run this on well type terms because we don't really know what it does if you give it a badly type term. Ond we can actually guarantee that we have an evaluator that will only ever run on the world title term by using the typing in the same way as if you write the function which expects the list. You can't give it a string or something or an integer. So an this approach has been used quite a bit for some quite impressive to produce and quite impressive results. So there's the four color theorem, which has been formalized in Coq, that's a theorem that you can't check by hand because it has so many cases. There is the very impressive concert C compiler which is an industry standard C compiler. There is also the SE-L4 OS kernel which was used very successfully in the Hackham's DARPA project, and there is KKML which is a formalised functional language that has been formalised in Isabel. You might also wonder why do we want to use Edward Magdal. Edward Magdal is a really nice interactive theme, improving like pok. It is a really nice project language As raman has just demonstrated, is a nice dependently type language. Haskell is acquiring some of these capabilities, some of those ideas have come from Agde. Much in the same ways Cok, Prussian programmes are really the same thing, because they are based on the same underlying type of theory. But differently to Coc, proving and programming are the same in Agde – the same activity. I think this makes it more readable and understandable to programmers. Also, I think it's especially suitable for working with programming language semantics because it has a really rich system for working with data types where you can be, it has a very expressive system, you can be very precise. A very nice feature is that it interoperates very nicely with Haskell so you can actually use real Haskell libraries. It has a foreign y dweud o'r ffordd, i'r cyfnodd ychydig i Haskell. A dyna fydd yn gweld yn yr adeilad. Mae'r adeiladau fyddiad yn agdur yn y twyd i'r gweithredu. Felly, mae'n gweithio'n gweithio'n fwyaf i'r ardal, a bod yna'n gwybod i'r amser. Felly, mae'n gweithio'n gweithredu o'r gweithredu ar Eishir. ac mae'n gweithredu ar gyfer y cyfrifredig o'r enghraeg a'r enghraeg. Mae'n gwybod i ddod o fwyod o'r ffrifredig. Ond ym mhobb yn ddceltydd. Ac mae'n dywedd iddyn nhw'r lleiddau ar gyfer cael eu cael ei bod yn gweithio'r llywiau, diadwyd perioedwiaid a'r effeithio'r maen nhw'n hoffiessau'r llywiau a'i fod yn beth o'i cyhoedd ychydig sy'n meddwl ar gael y greaddau. Yn y rhwng hon i'r gwanfod eraill i'r proj hypellio'r llywiau a'r prodiau ar gyfer IOHK, neu ddisgrifetau'r prosesiol i'r meddyl Isobel, oedd ychydig o falm ddau cyfrifiadau, gyda'r symud hwn o wgwmnigydd ymddangos, a oedd y ffwrdd os yw fforddysgwyl yn Coc. Felly wrth gyd, rydyn nhw'n gobeithio y dyfodill i ddiwethaf yw wneud, yw'r oeddoedd ichi'r gefychol a wnaeth ganddo i'r mynd i'r felch. Rydyn nhw'n ganddo i'r rhaglen y cyntax i'r syniad a'r wylchol. Rydyn nhw'n ganddo i'r hyforddiad cyffredig ac nhw'n cy fry'r syniad yn bryd. Ie, chwy fydda i'r dynamos, mae gennym ni'n fyrdd i'r ffordd y ffordd y Llywodraeth Llywodraeth yn ei angen yn ysgolod y Sam's Creson, mae'n gynhyrchu cyffredin a gynhyrchu cyffredin, yna ymwneud cyffredin a gynhyrchu cyffredin. Mae gennym ni wedi'u gweithio'r prysgau o'r gyferrwynt o'r system Ffyn yw ysgolodau. Felly, mae'n gobl ar gweithio'r gweithio'r gweithio, can use this to hook up an evaluated by iterating that. We can compile to Haskell for testing and this gives you a sort of, you can't exactly replace the Haskell implementation because it's really, you can generate a sort of prototype Haskell programme that is almost certain to not be as efficient and not as reliable and the Haskell code won't be readable but it's just a compilation target. So to an extend this doesn't really matter. And of course you could go on and do lots more things if you want to have a deeper formalisation. Right, so I'm going to look in detail at the systemf fragment of please call which is in a sense the core. I will mention the extensions afterwards but let's just look at systemf omega. So it has three levels. So it has kinds which are just base kind and function kind so that's exactly like Fritz said it's the, these are just the types of simply type lambda calculus. And on the type level we have lambda application and variables so we have the terms of simply type lambda calculus on the type level and then we have the for all that's from the polymorphic bit from systemf and we have function type. So you can think that simply type lambda calculus fits into this at the kind and type level. And then at terms we have regular lambda application. We also have big lambda so you can abstract over a type and we have instantiation which is like, which is really the application but for a type variable and we have variables. So you can think again system, sorry, you can think that lambda calculus fits in at this level so there's sort of two overlapping copies of lambda calculus here. And it's important to bear in mind so that's my executive summary that we do have, we have bindings in types and we have computation types but we don't have any dependency. So you don't have terms appearing in types so the sort of information goes down. So types can refer to kinds, terms can refer to types and kinds but there's no, there's no sort of circularity which makes it not as hard as dependent types. Okay, so let's have a look at the syntax of this in detail and so this is both the syntax and the type system so this is another kind of version of propositions as types. So if you think about it in terms of syntax what this means is it's impossible to construct a term which is ill typed so this makes it very, very precise. You can also just think of this as a straightforward formalisation of the type system and of course we are interested in properties of the type system. So let's look at it in detail so we have kinds at the top, I can use my pointer, so we have kinds, this is the kind of types and then we have function kind, that's the f omega part right. And then here we have types and this is written in a way to remind us of the type system so we have variables and we have lambda and here you can see that the result is in context phi but the body has an additional variable. So that gives us guarantees that things are in scope. And here with application you can see the guarantee of well typedness because you have something or well kindedness I guess. So here you have something of function kind, something of the appropriate arguments and then you get something of the appropriate result and you cannot fit together things that are not supposed to be fitted together. And here we have the binder rule or pi and that the body of that is abstracted over an additional variable. And you notice that pi constructs something of kind star and so does the arrow type so in a way these are like the two base types. And then in the syntax, so this is indexed over a context and a type and here we have variables, we have application, variables, lambda, application, we have big lambda and instantiation and then we have this rather annoying thing called the conversion rule and this is a typing rule and we need this because we've got computation at types because you might have a type which is really the same, somebody hasn't reduced a bit of it yet, you can have a beta reduction in a type and we want to make sure those things are the same otherwise the system is not going to work. So that actually appears as a syntactic constructor if you work in this way. I would say this is the standard presentation of system F omega with the conversion rule. Right, so then we need some functionality, we've written the type system down. We need to implement substitution for types because we need it and we also have to prove stuff about a substitution, we want to know it's correct and my favourite way of doing this is because you only have to prove there are just three properties is just that you prove this forms a relative monad. So substitution is bind and the variable constructor is return. So I think that's a nice way of presenting it and then the funny thing is we actually need to use both of those things, the operations on types and the proofs when we define substitution on terms and that means that our proofs have to compute. We can't postulate something or use a principle which is okay but doesn't have any computational behaviour. So we really need that the proofs compute so that's an essential property. And Colin McBride taught me a nice trick which allowed me to do this because we represent substitutions as functions and we're still able to avoid using extensionality. Okay, so that's that, that's fine. However we run into a halt here because we can't prove progress and preservation for this system and that sort of stops us in our tracks and that's because we don't really know what to do with this conversion rule because we need to kind of somehow push it through the terms and it's not clear at all how to do that. But there is a solution. We can normalise the types. So here is a presentation of the type system again with normalised types. So this has got rid of all the beta reductions. And because we're using the broyn indices for variables that means that normal forms are really unique. So if you normalise two things that are beta-e to equal, if you normalise them then if they're beta-e to equal in the first place you literally get identical normal forms. So this gives us sort of unique representatives of types. And so the way we do that is we define normal forms in neutral terms. So a normal form is something that's sort of in constructive form so it's either a lambda or a pi or an arrow. And a neutral term is a stuck term. In particular it's something where the thing in the function position in an application is a variable or some other stacked sequence of things applied to a variable. So we have neutral terms which are either variables or they're an application where the thing in the function position is neutral. And then we have the normal forms which are in constructive form basically or neutral term. So we replace types with normal types and that means that we're indexing by normal types in the type of terms. And it's great because we can get rid of the conversion rule all together. It disappears because it means that this A and B, they're not just B to equal, they're actually identical so we don't need the rule at all. So yes, yes. In fact that's an important point I'll come to in a minute. Okay so then so what do we want to do? Well we want to implement substitution right but now, so that's fine we can do that except we need to make sure that our substitution operation is normalising. And there are various ways you can do that. You can use for editory substitutions, I've used MBE and accommodation of MBE and substitutions. And so that works, that's fine except so now the sort of you actually need to have proofs about normalisation potentially in your proofs about substitution but that all works. And then we can do progress and progress says so we've got a term, a well-typed term, then either it's already a value so we can't compute it any further or it can make a step to another term. And we don't actually need to even talk about preservation which is saying that when we do reduction the type is the same as the one we started with because this is guaranteed because we're in a dependently type language. So when we specify reduction we just say that it goes from one term in a particular type to another term in the same type so that's just built in. And a nice thing that I learnt from Phil is that we can iterate this and write an evaluator. So we just say if you have a well-typed term and you're allowing evaluation of a certain number of reduction steps then we're either going to get a new term that it reduces to in zero or more steps and we might get a value out as well.  Well, you can do this if you didn't want to bother with termination but let me try to be clear. So what I meant was we can do this, I have done it for the full system but here I'm talking about the smaller system so I'm maybe being overly pedantic but it works, it is done for the full system. At the type level the type language is normalising. The term language yes because you just have this constructor mu and it doesn't do anything, it's just a binder. Do you then really capture the full conversion theory? I believe so, so there's an isomorphism but we have wrap and unwrap constructors at the term level so there's no weird computation happening at the type level. So basically this is the key thing is that you're not treating types de facto recursively as you do with other types. We're using iso recursion rather than iso recursion because they're all very different types. Yes, yes, so we have witnesses of the isomorphism, we're not doing equi recursive. If we have time I'll have a slide somewhere at the end. Anyway, so we can come back to that. I've solved the problem, so I had a type system I couldn't work with, now I've got another type system that I can work with. So what should I do? Should I just chuck away the first one and forget about it and say it was wrong and just work with the... Kenneth is nodding enthusiastically and then just work with the new one? Well, I think the original one is kind of like the standard textbook definition of what system f omega is supposed to be. So instead we should prove how they're related and the way we should do that is you can think of the second type system as like being the type checker and we are trying to prove that our type checker, we should prove it sound and complete. So soundness says if our type checker, which is this normal version, says yes, then the original system should say yes as well. And here we have this weird situation where so we've got gamma and out and A are normal things. So gamma is a context of normal stuff and we then have to write a function that embeds those normal things back into the syntax to be able to talk about this syntactic judgment. So we have to embed both of those. But that's just saying if our type checker says yes, then the real system should say yes. Otherwise our type checker is doing something weird and completeness says that if something is really well typed then our type checker should say yes as well. Otherwise it's missing some stuff. And the way this is specified, you're allowed a bit of wiggle room. So you don't have to, if the original type system says something has a particular type, you don't have to say that my new type checker says it has the same type. You just have to say it has A type and that they are B2E2Eq and they would normalise to the same thing. So you have that extra bit of wiggle room. So interestingly, if we're thinking about type systems, these are kind of theorems we would need to prove. But if we think about programmes, then they're sort of interesting programmes. And one of them does exactly what Sam just mentioned, which is the second one takes a term and normalises its type. So that's just kind of a useful thing you might want to do, particularly if you want to store something with a normalised type on the block check. And the other one takes a normalised thing and then just converts it back to an ordinary thing. And this extra property, that A is B2E2Eq to its normal form, is a property or is the soundness property from a standard normalisation proof. And then there's a kind of a, I really like this one line of this function. So the way it normalises a type, so here we've got a conversion. So we've got sort of A is of type A, this says that A is equal to B and the whole thing is of type B. So then we need to produce something of the type normalised B and we've got something of type normalised A. So that's the problem, that doesn't seem to work. But we've proved that if A is B2E2Eq to B, then their normal forms are identical. And we've got exactly, this P is exactly of this form. So we can apply this thing and rewrite the goal and then magically A is exactly of the right type to put into the goal. So this proof or this program just goes through by collapsing all the conversions until there are none left. So I think that's really nice. And if we just take a step back for a minute and think, what do we just do? Well I would argue that this is IOHK's formal methods approach in miniature. It's like one step of it because we started with this standard definition from a textbook and we've converted it to a version that actually works. And it's algorithmic, we can implement a type checker using it. And we've proved that this step was valid with our soundness and completeness proofs. So I'm short of time. So that was, we just had a kind of a deep dive into the core of Plutus core, which is system F omega. So now let's just think about what we need to add. Well we need to add recursive types and we need to add built-in types which are size integers, size byte strings, and we need to add some other operations that work with these byte strings, etc. So let me say a little bit about system. This is maybe not going to satisfy Fritz because I'm not going to go into enough detail. But we need these iso recursive types as you've heard a lot about because we want to translate data types. They also give us general recursion because you can type the Y combinator or variations on it like the Z combinator using these types. And you can, Scott Numer was an example of that and does that mean that type evaluation might not terminate? It doesn't because it's still normalising. And then so how do we work with built-ins? So for integers, they're size, and you can just think of that as like a pair of... Ah, I edited my slide just before my talk and I've introduced a mistake. So you have an integer and it has a size and I represent that as being basically a pair of that integer, not a natural number, and a proof that it's within the bounds. And the bounds are specified in bytes and this is a calculation to give that it's within the maximum minimum value. And then with byte strings, the size is the length. So when you have a byte string, we also have a proof that it's shorter than a particular length. And when we implement operations on those things, we check the bounds. So when you add two numbers together, the type of addition says that the two things you take have to be of the same size and the result has to be of the same size. And we check if the result is within the bounds. And if it's not, then this operation fails. And if you want to produce something bigger, you have to explicitly resize it using a resizing operation. And then when we compile these, we can compile these built-in things to the same Agda library operations that the proper implementation uses. It just says error. So the whole thing computes to an error. So errors bubble up to the top. So I want to say a little bit, I'm already over time, but I want to say a little bit about compilation to Agda, sorry, compilation to Haskell. So you can take any Agda program and you can try to compile it to Haskell. And it can use Haskell libraries when compiled. And so I want to kind of like with integers, I want them to be compiled to Haskell integers. But there's a question about how do you represent this in Agda? And there are sort of two ways and I've actually used both of them. So you can model them in Agda and that means that you can then use them sort of in Agda. You can write proofs, you can run programs in Agda like adding integers, et cetera. So you can model them. But you don't really have a guarantee that when the thing you modeled, when you compile it, when you compile your version of addition to the Haskell version, that the Haskell version is the same. So there's also a sort of conceptual thing about what are we actually trying to formalise. Are we trying to formalise as much as possible? Or are we trying to formalise Plutus Core and how it interacts with the real world? So this is kind of an approach where you try to model everything. So I'm experimenting with that. Whereas for byte strings, I've represented them opaqually, which is we just say there's a set which is basically a type in Agda called byte string. It has a length operation and, of course, it has some other operations on it as well. And when we compile byte string, it gets compiled to the Haskell byte string from the byte string library. And when we compile the length function, it gets compiled to the length function. And we can still, even though we're doing it opaqually, it still means that we can think about what properties of these things we need to have and we can write them down. So that's already helpful. And we can also just give us some clarity about what we're expecting from this interface to the real world. I would like to connect proving and testing in the following way. So I would like the Plutus Core built-in operations, I would like to check that they have the right properties.  So that property should hold for Plutus byte strings. We also expect that it would hold for the Haskell implementation and that's something you can actually just quick check in with the Haskell implementation. So I think this is a nice way of connecting proving and testing. Right, I've got to the end of my talk. So I'd say the contributions are that we've got a machine-checked version of the meta-theory for intrinsically typed and intrinsically sized Plutus Core. We can compile to Haskell, execute small examples. And this is a nice thing because this means we can sort of compare the real implementation. We can test the real implementation against this version. And I'm extremely happy with my MBE proof because it had to be really good because it gets used at, it actually had to run it. So I'm very happy with that and I'd maybe like to try to publish that on its own. And I should also, I'd like to acknowledge that two people, so James McKinnon was extremely helpful talking to me about pure type systems where some of these issues with conversion come up. System ffomega is one of the systems which fit into this much more general version of pure type systems. And also Guillaume Alley helped me out when I ran headfirst into an agdo compiler bug, which is not hard to do. So, okay. Thank you. Okay, and some quick final thoughts as closure of the academic track that, first of all, thank you everyone for joining the track today and for all the discussions. Maybe just a few thoughts from my point of view. I was a PhD student back in the end of the 90s when I became familiar with Lawrence Lessig's code and other laws of cyberspace and the now famous Code is Law Tenet that he popularized at the time. And what a better example 20 years fast forward to deal with smart contracts and what a great manifestation of this powerful idea. So looking back, it was programming languages and programming practices at the time and even today after the challenge for this. And the answer is clearly no as we've seen on and on with all the failures we've seen in systems that are being developed. But this is changing and today this event is also a testament on that. So it's very, very inspiring to be here and thank you all for joining the academic track of Lotus Fest. There is now lunch and Lotus Fest continues on the main track. So thank you everyone.


Welcome back to Think Tech. I'm Jay Fidel. It's Monday morning. Okay, we're talking about the middle way, not the middle kingdom, although that's relevant to this discussion is the middle way. And we're talking about, you know, current events, important current events. And we've entitled the show China EU deal the China EU deal what it means to the US. It opens up all kinds of other issues.  I get that more hour. Sorry. Alexander is the lawyer in Phoenix, Arizona where it gets hot. Okay. All right. Russell, up to you now as our regular contributor here to introduce Alexander, and to introduce the subject of our discussion. Good morning, everyone. Good morning, Jay. I'd like to introduce Alex Marawa. Alex comes with a very, very interesting background. Alex is a international law professor. He teaches in the faculty in Europe in Vienna. He's also teaching in Washington, D.C. is the American law professor. And he's also taught and lectured in China, just like myself. And today we're going to hear from Alexander and in this discussion, really about the EU-China investment deal. It's made really big news, especially in Europe and China, maybe not so much. It's hidden on the radar in the US. One of the things that President Biden had promised to do after the Trump years was to build a coalition of like alliance with the EU in dealing and tackling with some of the problems, such as investments in China, intellectual property protections, so forth. However, it's interesting that just before Biden came and stepped into the office, the deal was signed. It was not signed, but it was concluded between the EU and China. And the interesting part about it is that the US is nowhere in sight. And so now President Biden has a formal task of figuring out how to restructure the relationship with China after the Trump years, without the EU's coalition and support. It might make it very interesting, and maybe it complicated. So we're going to talk about how this EU-China investment deal, how does it affect the US? How does it affect President Biden? So Alexander's going to give us some thoughts about it, and we're going to hear about what is this agreement about. Maybe I'll turn it back to you, Jay, if you have any questions or Alex, and talk about just what is this agreement? Yeah, let's start with that, Alexander.  But, you know, what is the significance of it? And also, let me add, what is the significance of it, that it was inked just before Biden was inaugurated? Thank you, Jay. That's all very good questions. This has been in the making for quite a while, and the negotiations been running for about seven years. So it predates Trump, actually. So it's not an exclusive reaction to the Trump four years. But as you said, it's certainly remarkable that it happened late December of last year after the elections had been won. I guess we all agree that it has been won actually November 7th or so. The timing is quite remarkable. I believe it was intended to be concluded before Biden enters into office, and that's for political reasons as well. I do not think this is an intentional European affront against the United States. It certainly follows European interests in this respect. You also see quite a lot of differences really between our framework number one agreement that we concluded with China about a year ago. And this one structurally, as far as how the mechanisms operate, but also with what is covered. I mean, this is basically a liberalization agreement. It doesn't qualify as a trade agreement in the traditional sense. So there is no exchange of goods that's been talked about. It just allows EU companies and trainees companies to operate more freely and with fewer barriers in the respective other markets. What it adds and framework one doesn't have much of that it adds mechanisms for implementation and mechanisms for conflict resolution, which is quite remarkable here. It's lacking if you if you go and review what commentators have said recently, human rights is an issue, labor standards is an issue. The environment is mentioned, which is quite remarkable, but not necessarily in the form of binding arrangements more aspirations and intentions in the agreement itself. It refers to existing international law including the Paris Agreement, but in itself the agreement speaks more of intentions in this area. Well, you know the thing about it is over time, whether it's Trump or Biden or for that matter any American president. Over time, we lose our primacy by virtue of this agreement. And maybe it was long and coming as you say. But over the years, the EU, which needs trading partners, especially in view of Brexit, you know, they probably hungry to make trading arrangements everywhere and and China fell right into that seems to me that over time this will this will actually undermine the US primacy that primacy we used to have in global economics. So you think we use the term middle kingdom I think it increasingly becomes a kingdom that is truly in the center of global trade and global business. So now the US China agreement is one of several that China has with others previously it was the United States in the middle that have various agreements with others. And the United States alone shows that China certainly maneuvers towards a center of international economic exchange and then political realities there to this not just economic this is to you political as well. Yeah, and this just takes me to a thought I've had for a long time and that is, although you know there were processes and no ongoing processes before Trump. So he got into office and first thing he did is you blame them for the virus he called it the China virus, and then he got to a trade war which seemed to me to be completely unnecessary. What I'm saying is that while Trump was in the office he was doing like everything he could seem to me just as an observer to alienate China to put stress and tension into the relationship, without any significant thinking of a single benefit. Meanwhile, you know everyone said well you know Xi Jinping is a very smart guy, and the Politburo knows how to act as one will under Xi Jinping. And so they said, Okay, this is really an opportunity every every, you know, kind of disruption like this is an opportunity. So we are going to do everything we can. While Trump is standing still are going backward in terms of national management in the US, we're going to do everything we can to advance China's interest. And this the deal with the EU is one of them the race of deal in Asia is another cut the US out. And last night on 60 minutes it was it was clear that they have gone ahead of us in biotech. For many reasons, they have gone ahead of us in 5G, Russell sent an article about Megalith trains that run that will run Beijing to Shanghai in 3.5 hours. And they have taken the opportunity. Maybe while Trump wasn't watching if you ever was watching to advance their interest way ahead of ours is no single issue no single initiative that I can think of where they have not done remarkable things, even in the last four years. What do you think Alexander. I agree I certainly the kind of agreements that are concluding and the kind of political stance they're taking is based on a solid foundation of technology, economic strength and and also in many ways dealing with catastrophes in a way that is significantly more effective than we are co with the co would respond certainly was not a prime example and predicting individual rights in China but it was effective as far as controlling the pandemic was very Chinese solution in a way. I would agree that whatever the intentions of the US were in dealing with China for the past four years, the way the conversation was going was in every single way alienating China you don't bully China you negotiate in China. You show respect and allow people to preserve the face when you negotiate. China is an agreement in China is really the starting point for further agreements and ultimately a relationship. And if you just come in bullying that's not going to that's not going to work but I agree with you it's certainly a position of strength I mean China is now considering itself a valid partner for many others. I will stand it's I'm not an economist but many people say will surpass the US and in significance as a hub of trade and innovation and technology very soon. So, absolutely, they can afford that. There are certain elements of this that are that I don't think the American public realizes, for example, AI is a new technology I mean is it 10 years old is it 15 years old. China saw that and China moved ahead and China is ahead of us in AI, and some people feel that AI will ultimately rule the world, because you can you can do so much management with AI. You can manage companies you can manage cities you can manage states you can take the burden off officials who may not be up to the task. It's the way, it's the way computer science can actually run our world at least in substantial part, and they have an advantage and in biotech pursuant to the 60 minutes article yesterday they're, they're ahead of us in biotech and we don't know the implications of what that means. And then you know and dealing with virus and the genome dealing with not only coronavirus but any other virus that comes down the pike. So, you know, it's not just that Trump has alienated them, and it's not just that they have moved ahead on so many fronts, accelerating in the Trump years. It's not just that a lot of these things they have done puts them ahead of the US, and they're not only competitive, you know, in a, in an economic sense, they're competitive in a competitive sense with the US. They've taken individually and certainly taken collectively mean that they are ahead of us, and that they can, they can beat us and beat us up in the national global trade arena in the technology arena. And, you know, and people say, for example, that their prowess in computer science makes them the best national hacking organization in the world better way better than Russia, for example. So in a competitive world in a hostile competitive world, they have taken this opportunity to get ahead of us. And this creates a problem and I'm going to Russell's outline so I should address this to him. So, you know, in your outline, you suggest that you cannot be competitive with China, rather you cannot negotiate with China. Go to your last point. You know, in a global sense, if you are not competitive, because you don't have the competitive advantage you don't have the negotiating leverage. And because we have lost the negotiating leverage, our negotiating position is, is way less than it was 10 years ago. What do you think about that Russell, you've embraced that idea, what do you express it. The problem that we're facing is more than just surface. It goes really deep. It goes back predates the Trump years for many years where what the Chinese saw as an opportunity to build the infrastructure, to build their stem, to build all the background that they needed to accelerate. And they knew that technology was going to be a key ever since the internet was made available to them the late 90s. And so the problem that they saw the opportunity is that the the friction in our own governing bodies means that the Republicans and Democrats can't work together to do infrastructure projects. They're going to be opposing each other. China has been able to put up a high speed rail through the countryside, so that goods things will not only just be in the board but going through the middle of the country. They've set up their communication system. So everyone, even the people in the rural areas have access to smartphones. So in other words, they built an economy based on investing infrastructure based on having an a stem push through their country in the in the education in the colleges. So now what we're seeing is a result of that investment. So the big challenge Biden faces again is, we're way behind because we didn't do these things. We've been parties have been fighting each other politically. I think that's what the EU saw. What they saw was a last straw. When they saw that when President Trump came in, the alienation parties they can't work together. So in other words, the US is not going to help us. It's a loss of confidence in the US and justified is completely justified at least at this moment I mean through the Trump administration. But Alexander have you know how does this affect American investment in China. You know, if you if you go back a few years say they take 20 years ago, in the beginning of the, you know the century, you find an excitement Russell was there, you know, you find an excitement about American investment. There are limitations that Chinese and had all this control of foreign investment in the, in the woofy and the partnership arrangements they set up. And clearly they want to get our IP and all that. How is it now, how is it changed. If I'm a multinational or even a medium sized company, what are my prospects and in having a successful investment relationship in China. That would be the framework that we have in place now for doing investments in China I think a European corporation probably has on a damage because of this agreement. Be in mind disagreement is still a draft it has not formally been ratified so that it might be ratified. Some people say it might not be ratified, but the mere fact that it's there it has been negotiated to a certain extent boost the chances of European corporations. So be in mind apart from the economic side there is a corporate responsibility aspect that is growing when you look at multinationals that comes from sustainability very very strongly but also from the area of labor rights, labor standards, and human rights The fact that the European agreement has those elements in there again as I said initially in a pragmatic and programmatic form not necessarily as binding obligations gives those companies a boost as well when it comes to their own stakeholders and shareholders. So I think it's a moral boost as much as is an economic boost in many ways. The fact that we in the European Union now we have a centralized agreement that kind of replaces or at least mostly replaces the plethora of bilateral investment agreements will certainly help streamline the coordinated approach as well and European companies now have this foundational agreement to work together when it comes to investing. Of course Europe also opens the doors now to Chinese investors specifically in the renewable energy market area so China will have advantages there as well. Some economists that I've read suggest that the EU actually has a better end of the deal in many ways. I mean they get more immediately out of that agreement when it comes to opportunities of investing because China already was massively invested in Europe while the other way around the world more limitations that's correct. On the other hand I think it kind of levels the playing field now so now we have a level playing field between the Europeans and the Chinese, and we have something not quite level when it comes to the relationship between US corporations and, and the Chinese so that puts a set of disadvantage here for sure. There's more element in and that's the race up agreement in Asia Chinese did the same thing a little earlier, and they cut us out or we cut ourselves out more likely. And now they have, I guess it's similar but I wonder if you could distinguish the two, and tell us what the implication of that agreement is and how, how close that agreement is to the EU agreement. I was setting this up at a time when we were fumbling around with NAFTA and its successor basically as much as you could criticize NAFTA as being less than perfect. It still gave North America something like a free trade agreement to a certain extent at least. And there were barriers in place as well. China and that goes back to where it sees itself I believe feels strong enough to say we will be the center of another agreement that involves 14 more or less powerful economies in the region. Right. We've seen a shift that again not just economic that's geopolitical as well that they're emerging powers who are not striving necessarily to become one of the superpowers. But strive to become one of the regional powers. A good example, of course, is Turkey. Right. Turkey has a similar approach that it wants to be a force to be reckoned with when it comes to the Middle East. And as we have seen recently, it does it can go ahead to head with Turkey with Russia, and it can win a confrontation with one of the traditional countries. So I think we always have to put a great agreements like this into the overall geopolitical context and then the political context of, of course, our past administration being not very effective when it comes to dealing with any kind of partners or enemies that are out there. And I'm doing those four years will be a challenge. So the Biden international team certainly has the hands full at this point in time just to scramble to get things back on track and then it will take a while to get back. If we can get there back to where we actually want to be. Well, I want to, I want to ask you about that but first I want to ask you about one Belt Road or Belt and Road initiative. I just want to ask you how that is doing here in the, in the time of COVID and the time of such, you know, global disruptions to say nothing about climate change as well. I mean, it was a very ambitious program it is a very ambitious program. And I wonder a whether it continues at the same pace and be, you know, we talk about agreements with EU we talk about agreements with, you know, with Asia, other Asian countries but when we talk about Belt Road. We're talking about dozens hundreds of agreements that China is making smaller economic agreements for loans for development, who knows what all over continent by continent. And when you take that collectively that also has an effect on this very same process we're talking about, namely cutting out the US am I right. So I think, speaking as an international lawyer not an economist, having a more diverse portfolio of smaller agreements, some of them legally binding some of them more informal agreements. And it puts a power like China in a very advantageous position. One of the disadvantage of a large settlement style agreement like the EU China one of course is it's very prominent is being talked about all over the place. And it will ultimately be implemented in a very public fashion so if there's conflicts in the future you will have a settlement mechanism that actually decides matters like a little bit of a WTO ish kind of process. So this will be very much public and that the press will be reporting about that if you have a multitude of little individual agreements and some of them not necessarily the state, but state controlled enterprises with enterprises in foreign entities. There's more diversity and much less scrutiny sometimes. I believe China specifically looking at the other Asian countries but also Africa has done a tremendous job when it comes to exerting influence without appearing to exert influence. And that's a smart strategy. Yeah, they are smart and they're focused in the more we watch the move the more we have to stand in admiration. You alluded to it a minute ago about what what is what is Biden going to do. What are his options if you were on his team. What would you suggest he do because this is really a very significant threat. If we care about privacy but even if we don't care about privacy, even if we just care about survival economic survival in the world today about the continuation of the dollar is the reserve currency all those things. So what would you advise Biden to do to maintain our position and you know correct the errors of the Trump administration and before a monumental task I can say and if anybody had an actual answer to this I think you'd be a multimillionaire right away. But what you certainly have to do as a first step is repair the relationship with the allies. That's a crucial factor and I think first steps have been taken in this respect. The European allies or Europeans but also regional allies that are pretty much all over the place you know there's the military component of allies but there's also an ally that is cultural, economic, political, you know the democratic approach if you look at Biden's program one very strong focuses diplomacy and democracy. And that certainly puts in in contact with allies that go well beyond Western Europe or the European Union or even the Council of Europe, Europe puts you in a firm standing in Africa, Asia, Latin America and so on. So apart from facing the obvious competitors and we have to distinguish whether they're enemies or competitors that's a crucial factor too. I think going for those who are kind of on the edge you have been friendly towards the US traditionally but have become less friendly with past four years. One of the most important things your your old friends many times come back to you more easily I think once you show you good will, you're, you know neutral, but friendly leaning partners have more of a challenge when it comes to also convincing populations that now we trust the US again. So I think that would be strategy number two, and then never forget to combine very strategically combine economic interests with two political interests. 50 years ago, you could say we have, you have economic interests in one box and then political alliances in a different box and military alliances in another box. They're all in the same box now they're they're interrelated and they cannot be subdivided or singled out so you need to look at this holistically anyway. Yeah, that's the way things have turned out isn't it. So, so if I if I'm the US if I'm Biden, would it pay for me to try to negotiate a deal with the EU the very same members of the EU that works, you know, on a parallel basis, perhaps a better basis, a than the China deal with the EU. I mean would that work, could I wean them away into a separate US EU deal. We still have the EU US deal in many ways I mean the economic ties were not separate there were still in existence there were some problems in there. Again, being a lawyer not an economist I can look at this from the international legal perspective more than the economic one. I don't think there was a significant disruption of the legal relationship and the political relationship. There were dints put into it for sure. NATO being of course a very classical example here. So those are already in existence and free trade between the US and Europe is still ongoing, but now this free trade within Europe will certainly focus away a little bit towards Asia. How does the US go back into this relationship and how ideally would we rebuild a joint operation with the European Union and other partners around the world that check and balance China a little bit. We probably will not be able to stop China from becoming the economic superpower number one in the future, but we need to have something to counter that. It strikes me when you say that maybe what we have to counter that is what they touched on in the EU agreement but which they may not be able to conclude really conclude with with China and that is the morality side. What we've seen in the world today is a lot of war crimes. We've seen the eye way ways movie about human flow and 65 million people behind Bob wire in one place or another. This is a big morality issue and it's global. And what and one of the things that Trump lost and threw away, if you will, aside from his economic isolation and diplomatic isolation is the US leadership and morality. That's a special card. And I from what you were saying earlier it may be that if we play that card with our existing allies who are willing to come back to us and be a moral leader around the world. We could we could attract. We can attract a lot of people back with our special morality sauce. Don't you think. Let's hope we can get back to that and I think if you look at the EU agreement and we've been looking at it really from where an economic standpoint right now it does contain language that is very much morality based if you want to call it that from labor standards to procedural and so on and a few hints of human rights as well. On the other hand, the agreement is quite weak on that front that could have been more done in this respect as one example of provision that relates to how individual license procedures shall be handled if there's a court. Within the European Union it's clear this is a civil obligation, therefore a court is responsible for making determinations in the agreement that refers to a court or a quasi court or an administrative agency. The European Union would have been very very strongly backed by its own law if it said no we need judicial implementation of licensing decisions and of sanctions in the context of licensing licensing conditions. They let themselves be negotiated out of this and forgo in a way actually legal obligations that they already have. So they came come back and say we are not sitting on the high horse from the moral point of view because we put all this and partly it's not very strong and partly they're really backed out of things that could have very easily insisted on. And I don't think China would have had a major problem having the intermediate people's quotes make decisions on licensing issues instead of some government agency. Yeah. Well, it's a lot of ground to be covered here. But you know, Biden is a smart guy with smart counsel around him. And maybe he can figure these things out. Well he has to do is listen to our show. It'll help him. Russell Russell you know to go to your point which I think is really important is that if we are going to negotiate with China and get back into. I don't want to say normalization but some sort of some sort of negotiation of equals, so to speak, we're going to have to become an equal in many areas. And I think that's really an important point. But how do we do that now we have been declining in so many arenas. How do we do that. What would you advise Biden on that. Jay, that's a very good question. I think the problem is going back to what China looks at us. Maybe we're no longer equals because exactly is China being able to conclude a deal with the EU separately without the US. China has been able to conclude a deal with the Eastern Asian countries without the US. And I think when we go back to it. If I were the EU also and I'm looking at Biden. We don't know how you can be equal when you have so many problems at home domestically. You can't even if we get a deal we do with America, China or EU, you have a divided Congress, you know, there are many things that may not be able to get done, you know. So again, we're not at the point where we may be considered as equal anymore, because we are a very dysfunctional government that now, in many sense, you know, the January 6 domestic problem, the infighting between the two parties so nothing can get done. So that's a that's a big problem. So Biden has a big problem there. And this and get the bigger picture is, I think you have to win the trust back and credibility. Working together, for example, on climate change with China, you have to start in some area to start working together. That key is working together. And right now, China doesn't see that happening. We're not working together. It may require start finding projects where you can actually do things together. That's restoring the trust restoring the relationship so it's a big relationship problem Jay. So, so, Alexander, do you agree with that I mean it's a doable is my question, or have we passed over the Rubicon here and and will we you know for the next generation be behind the curve, whatever we try. No, I think that international relations is always comes in cycles, so I think we never crossed the Rubicon without a chance of finding a bridge drawn back across the Rubicon to the other end. Caesar would have liked that probably I'm not sure. But I think we definitely can do that would what I would recommend to the Biden team and yes they should watch this show. Probably going a little bit more aggressive when it comes to ratifying treaties that show that we are morally leaders right so ratifying for instance, the Intermarine Convention of Human Rights and becoming part of this continental system of human rights protection which has been lingering for 40 plus years now, would be a very advisable step and would not really take away of our sovereignty, it would actually give us a chance to reflect on whether we are still the leaders of constitutional right. In settling more proceedings in in in an amicable way instead of the bullying approach that we have been experiencing recently but just subjecting ourselves more to international traditional scrutiny, which again does not take away from our sovereignty, but makes us much more firm in our standing that we actually partners in the international arena would be extremely advisable. We have a 5050 Senate that has to approve every one of these initiatives we are in trouble we will probably not achieve it. So, I think Russell is absolutely right that we're in a big political conundrum here. And we need to clean house first, right we can go international and say we're good now if we're not actually showing that we are. Yeah, I mean if I'm if I'm just john Q every man or john Q every man in Europe, for example, I look at the US I say, aside from all of the squabbles. This is not efficient. This is a huge waste of time and resources. You know this is this is this is killing the country the economy, and it's collective will. That kind of inefficiency really puts us at a tremendous disadvantage, however it happened. So anyway, Russell, your time to summarize and say farewell to our discussion. Well, again, I think Alexander has brought up some really good points about this agreement how it impacts us. And I think that I don't think the agreement that was concluded hurts American interest. In fact, it, I would say that it's a leverage to say it's a starting point where America can aspire to do maybe more than the EU agreement. It's it's it's a it's a benchmark a framework, because you know, some of the things that the Chinese have agreed to is in good faith, move towards the labor conventions of more transparency, non discrimination, for example, in China, Chinese company when it procure supplies, they can't discriminate against some European companies. Well, you know, we can have the same thing with Americans. There's a there's a starting point where we can do more possibly. But again, I think I go back to it. I really think that we have to start at home. If we're going to actually show the world that we can do something. We have to be unified in many respects. Yeah, we have to take the racism out. That would that would be a really good start right now. Anyway, Russell you Hawaii lawyer who has years of experience practicing and teaching in China. Alexander Marawa, a lawyer in. I went in Phoenix, Arizona, who is an international lawyer. Thank you very much for your contributions to this conversation really appreciate you coming on. Thank you Russell for setting it up. I think it's been very valuable and I'm sending a copy of the tape to the White House. Thank you for that and for having us. It was a pleasure.


Hi and welcome back to program analysis. This is video number three of the lecture on path profiling and what we want to do in this third part of the lecture is to look at a generalization of the algorithm that we've seen in the previous part of the lecture where we go from directed acyclic graphs to arbitrary control flow graphs and then we'll also look briefly into some of the applications of this whole algorithm. The algorithm that we've seen in the second video of this lecture was only defined for directed acyclic graphs. Now, of course, real control flow graphs can have cycles because programs of course do have loops or maybe sometimes call a function recursively and now what we will do now is to generalize the algorithm that we've seen so far to these arbitrary control flow graphs. So the basic idea is to do the following. So for every back edge that we have in our graph where a back edge is basically one that makes an acyclic graph cyclic. So you can think of this basically as a as an edge back after a loop to the loop header. So for each of these back edges, we're adding two dummy edges to our graph. One that goes from the entry to where the back edge is going. So for example from the entry of a function to the header of a loop and then one from the beginning of the back edge. So basically from the end of a loop directly to the exit, which is both of these edges are edges that usually do not exist in the control flow graph, but we are adding them as dummy edges to our graph. And then once we have this graph augmented with these dummy edges, we are removing the back edges from the graph which will give us a graph that is a DAC, a directed acyclic graph again. And that is a good graph because on this one we can just apply the algorithm that you've already seen and it will work as described. And then we just take the instrumentation that we get out of the existing algorithm with one small addition. And this addition is to add instrumentation to every back edge in the graph. So for example every time we are going back to the header of a loop where we taking the current value of r and use this as the encoding of the path that was executed and then increment its count in this count array and then we are resetting this counter r in order to basically start over from scratch. So as an example, let's now consider different control flow graph than the one we've seen all the time because now we want to have one that actually acyclic and has one of these back edges. So this graph is what you can see here. So in particular what you can see is that we here have this back edge which typically comes from a loop and would basically go back from the last statement in the loop to the header of the loop where we decide whether we want to go on a little further in the loop or not. So what the generalized algorithm is doing with this kind of graph is to handle this back edge by adding two dummy edges for every back edge. One that goes from the beginning of the back edge. So from e to the exit node. So to f and another one that goes from the target node of the back edge. So from b or sorry from the entry node of the graph to the target node of the back edge. So from a to b And now on this changed graph, we will then apply the existing algorithm while ignoring the back edge. So just imagine that it's not there and then we will compute increments based on that graph. So I will not go through this changed graph again because we've seen the algorithm more than enough in the second video, but I'll just show you the solution. So basically it'll go over this graph and compute increments for some of the edges and those edges will be exactly those that you can see here. And then once we have this, we can of course again compute an encoding for every path. So now given this changed graph, we can basically think about four kinds of paths through the graph. So one kind of path goes from the entry to the exit of the path. So for our example, this is basically going from a to f. Then we can also think about paths that go from the entry to a back edge, which in our case means paths that go from a to e. We also can reason about paths that go from the end of a back edge to the beginning of the back edge. In this case, basically from b to e. And then finally we have some paths that go from the end of a back edge. So for example from b to the exit, so to f. And if you have these four kinds of paths and if you can compute how often each of these paths is taken, we can reconstruct the full path information by basically just putting together these partial paths and then adding their frequencies so that we at the end have the full path providing information also for graphs that contain cycles. So just to illustrate these four kinds of paths using our example, let's have a look at this table where we see all nine paths through this graph looking at these four different kinds of paths. So notice that not all paths go from a to f as was the case previously, but we also look at these paths that for example only go from b to f or from a to e or from b to e because you're going to look at all four kinds. And each of them still has a unique encoding that we get by simply adding up the edge values that are on the way when we take this path. So for example the path from a to f does not hit any increment operator so it will have encoding one. Or it's another example, the second path here a, b, c, e, f. It makes us go from a to b where we will take this dummy edge. So whenever there is a dummy edge and one of the pre-existing edges and we're taking the dummy edge or you can also think of it as we have put this edge label onto both of the two edges that go from a to b. Either way it's fine and gives the same result so we go from a to b. So our counter goes down to minus four then from b to c plus six so we are at two and then from c to e nothing changes and from e to f we are subtracting one again so the encoding for this path at the end will be one. The next path in the list a, b, c, e is the second kind of path that we see on the slide. So because that one just goes from a to e so it only goes from the entry to the beginning of a back edge and this will have encoding two because we do, we start with minus four but then plus six so we end up with two. In a similar way you can compute the encodings for each of these paths so I won't go through all of them because you've seen now how to do it yourself but I invited you to just try it out yourself to convince yourself that actually for each of these nine paths you're getting a unique encoding and that these encodings are as listed here in this table. Finally let me say a little more about the applications of path profiling so we already mentioned one of them earlier in this lecture and that's perhaps the most important application of path profiling and this is in performance optimization. So a compiler can only spend so much time and effort on optimizing different parts of the program and in order to find out which parts of a program are most worthwhile for spending time on to optimize, path profiling is a very popular technique where the assumption is that any path that is frequent should also get a lot of attention by the optimizer in order to speed up its execution. Another direction to use path profiling is in statistical debugging so this statistical debugging has this idea that you look at different execution of a program and you know which of these executions cause a bug or do not cause a bug. So for example you can think of having a large test suite where many tests are passing and some tests are failing and you believe that there's one bug responsible for most of the failing tests so what statistical debugging is doing is it compares the passing executions to the failing executions and then tries to highlight those parts of the code that seem to occur mostly or only in the failing executions and if you do this on the level of paths you actually get a pretty accurate picture of what happens during the execution where the idea is that those paths that are correlated with a failure are much more likely to actually contain the bug and the Holmes paper which is linked as one of the references for this lecture is a nice example of that and then finally yet another area of application is an energy analysis so sometimes you really care about an application not using too much energy. For example you can think of mobile applications that of course should not drain your battery too much and there are approaches that warn developers about paths and statements associated with high energy consumption and in order to know which paths and statements are actually associated with a lot of energy consumption what they essentially do is to perform path profiling as we've just seen it here in this lecture and at the same time they measure the energy that is used during an execution and then they correlate these two measurements and highlight those paths and statements that are responsible for a lot of energy that is used. All right and with this we are ready at the end of this lecture on path profiling so in this last part you've seen how to generalize the main algorithm also to control flow graphs that have cycles and I very briefly talked about some of the applications if you're interested in more applications just have a look at some of the papers that are linked with this lecture or you could also follow citations of the original path profiling paper and there are many many interesting applications to read on. Thank you very much for listening and see you next time.


What's up everyone? It's your girl Kenty here from Layton Sports Cards and I'm ripping a personal for Jeff W. We've got a 21-22 Panini recon basketball hobby. All right, best of luck Jeff. Thanks for your order. See you holodot. SSP holodot incoming. Sounds good, Six. We'll be here. Jane Springer-Rookie, Bronson 299 Giannis onto the Kumpo and Future Legends Anthony Edwards. For the Pacers on the red 32 of 99 glorified signatures, T.J. at McConnell. Pacers, Jared Butler, Rookie Hollow, and Cumminga, Rookie Recon. Hollow AD and Rookie Pink of Jared Butler. Jalen Suggs, Rookie Base. We've got one of five green, Jonas Valenkunas for the Pelicans. He's green. One of five and maneuvers, Donovan Mitchell. KD, Tim Duncan Hollow, and Pink Tim Duncan. Second half here. Still looking for the second auto. We've got something here. Triple Walker. We've got, nice! On the draft, Acetate Auto 13 of 13, Bones Highland. Nice hit, Jeff. That's sick. Bones Highland 13 of 13 on the Acetate and NBA draft. That is really cool. We'll go ahead and magnetize for you. The little dust. Let's move that off with the microfiber piece. And Kuzma, that's sick. I like those a lot. I think those insert autos are sick. Only pulled like two of those out of all the Recon that we've opened. It's a hard pull. Bronson 299, Danny Green, Cameron Thomas, Rookie Recon. Boston, Jr. Red to 199, Vusevich. Little color match there for the bowls. Rock the rim, Jaw. Hollow, Kuzma, and top of the charts, Luka. Youngest player in playoff history to score 40 points in game seven. And last factor for you, Jeff. Very solid box. Bronson, Wagner, Rookie, Josh Hart Hollow, and future legends of Zion Williamson. Alrighty, Jeff. That will do it for your Recon box again. Congrats on those hits. Very nice bones and we'll be getting that right out to you.


Teacher turnover is actually the silent source of teacher shortages, which many of us have been experiencing all across the country. Districts and schools have been continuing to struggle to meet the growing demand for qualified teachers. Since about 2012, when the layoffs that had been common during the recession ended, the teacher workforce has grown by about 400,000 teachers. And districts have been seeking to reclaim the positions that they had previously cut during the recession and replace the teachers who have left. And they're kind of trying to climb this hill every year and replace those who leave through the leaky bucket. But even with intensive recruiting inside and outside of the country, you've seen news reports about that. More than 100,000 classrooms are being staffed this year by instructors who are unqualified for their jobs.


Welcome to the SNAP. This is the segment where we answer frequently asked questions in a very rapid fire format, so let's get right into it. Today we will be demonstrating how to heat your DynaVap vaporizer with one of the most common heating sources, a BIC lighter. While a BIC lighter may not have as much heat as a torch lighter, it is still very capable of heating your VapCap. Much like other heating sources, your method of heating is important. First, we're going to show you the correct way of heating your VapCap while using a BIC lighter. Place your DynaVap vaporizer deep in the flame. While heating, you should see little to no yellow flame. Rotate slowly. Bearing your device in the flame minimizes the amount of carbon or soot left on the cap. And it doesn't really take much longer than a torch lighter. However, you will need a wind-free environment. And now to show you the incorrect way of heating your DynaVap vaporizer with a BIC lighter. As you can see, when I heat the VapCap with the top of the flame, the cap immediately turns black. What has been your experience heating a VapCap with a BIC lighter? Let us know in the comments below and be sure to like and subscribe if you would like to see more videos like this in the future. If you like what you see, make sure that you check out the other videos on our YouTube channel.


In this video, we want to piece together the information we've learned about cosines, so that we can actually establish with the graph of cosine. So thinking of the unit circle diagram, when you're at zero radian angle, the x-coordinate on the unit circle is going to be one. So we get the point when x, the angle is zero, the cosine ratio will be one. Then moving up the unit circle to the top of the unit circle at pi halves, the cosine becomes zero at that point. When we go from pi halves to pi, think of the unit circle, cosine ratio will go from zero to negative one. We get that point right there. And then as we go from pi to three pi halves, cosine will return to zero. And as we go from three pi halves to two pi, we get that cosine will equal one. So we get this type of picture right here. We definitely can add more details to this. So for example, when the angle is pi sixth, we know that cosine is going to be the square root of three over two. So we get that point there. When we're at pi fourth, we know that it's going to be the square root of two over two, like so. And then lastly, we know that at pi thirds, we're going to get one half right there. So if you try to connect this picture together, we're going to get this smooth curve looks something like this. Continuing on, it's going to break down down here, wrap around and come back up like so. And so since cosine is a two pi periodic function, two pi, of course, being a little bit bigger than six right here. Since it's a two pi periodic function, if we know one period, which we have that drawn on the board right here, we can actually just repeat that over and over again to get the entire picture. So what we're going to do is now turn this on the computer and we see exactly our picture is pretty good. I'm going to erase this. Now we're going to zoom out and we see that this is the graph of cosine. It looks a lot like the graph of sine, but there's some important differences. Sine, which if we put that on the screen right now, you get y equals sine of x. Sine, it actually starts at an x intercept goes to a maximum returns to an x intercept goes to its minimum, then comes back up to its x intercept. Cosine on the hand, looking at the y axis, actually starts at its maximum, goes to an x intercept at pi halves, then it goes down to its minimum at pi returns to an x intercept at three pi halves, and then it goes up to its maximum at two pi when it repeats itself. And so this is an important difference. Sine, cosine basically have the same graph, but it would appear that there's some type of shift. This is called a phase shift. There's some type of shift here. It's like one is a little bit farther off than the other. And this is some topic we'll talk about more as we study the graphs of trigonometric functions in this unit.