-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathall_transcripts.json
More file actions
66 lines (66 loc) · 229 KB
/
Copy pathall_transcripts.json
File metadata and controls
66 lines (66 loc) · 229 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
[
{
"title": "A talk on SUMOjEdit for the International Joint Conference on Automated Reasoning (IJCAR-2020)",
"transcript": "hello I'm Adam Pease and today I'm going\nto talk about a programmers text editor\nfor a logical theory which I've called\nthe sumo J editor sumo J edit editor\neverything that I've done here is open\nsource all reachable from ontology\nportal org or from github and I also\nhave a number of videos on my youtube\nchannel that show the editor in action\nas well as various other sorts of\ndiscussions so the problem statement is\nthat I write a lot of statements in\nlogic in conjunction with the sumo\ntheory it uses a fairly expressive logic\nit's a higher-order logic although most\nof the actual theorem proving work that\nI do is in first-order but basically\nthere isn't a simple visual metaphor we\ncan't just be editing graphs as we do in\na taxonomy or a description logic or a\nframe system all the editing is done in\na text editor like most modern\nprogramming and as well as most\ninteractive theorem proving that folks\nare doing here there's a big library of\ntheories in sumo I'll talk about that in\na moment\nand so there's also a challenge with\nremembering all of the terms the\nrelations all have a defined type\nsignature and so sometimes remembering\nall that can be challenging because\nthere are thousands of different\nrelations I also had a need to try to\nmake it a little bit easier for people\nto come up to speed on editing sumo and\nmaking new content so I wanted to make\nit easier for newcomers to write good\ncode and primarily I'm using automated\ntheorem proving rather than interactive\nif you're improving but there is a sort\nof mode where you're trying to get a\nparticular inference to get you an\nanswer and it winds up I think being\nmore like interact if you're improving\nand so I wanted to apply some of the\nmetaphors for the editing process that\nfolks and interactive theorem proving\nuse but in this sort of first order\nframework where I'm using primarily\ncompletely automatic provers so this\npast fall I had the opportunity or the\nburden anyone might say to do a very\nquick\nproject I had about ten days to gather a\ngroup of people to work on the project\nthe project only lasted a couple of\nmonths and so I had to get people with\nno prior Logic experience in my case\nthere were just three folks that were\npretty much right out of college with a\nbachelor's degree in computer science\nand really no no prior experience with\nlogic or logical theories and I had to\nget them up to speed really fast and so\nI did a little bit of tracking as to the\nsorts of errors that they made in the\nduring their initial ramp-up period of\nworking on on sumo and adding to it and\nhere's some of the results so obviously\na lot of errors were just errors of\nconception print where the axioms that\nthey wrote just didn't really conform to\nthe requirements or conformed to the\nreality of the domain that we are\nworking on I call those semantic errors\nso those are certainly the bulk of the\nerrors and there's not much we can do\nthere to make sure that a machine can\ncatch those kinds of errors but the rest\nare things that are pretty\nstraightforward and easily automatable\nso using a class where an instance is\nrequired or vice versa errors and types\nso violation of the relation signatures\nthat I've mentioned using a term name\nthat maybe as a typo in it or especially\na simple error of capitalization so\ngetting people to realize the type that\ncapitalization is significant always for\nsome reason this kind of an issue unused\nvariables so just a simple typo and a\nvariable name can mean that you've got a\nvariable that doesn't get referenced\nlater and a rule for example syntax\nerrors things like balancing parentheses\npeople can sometimes be sloppy about\nthat if they're not used to languages\nlike this one that are lispy and require\nbalanced parentheses and then things\nabout argument order and number are also\ncommon errors so the theory I worked\nwith is called sumo hopefully some of\nyou've heard of it I started this work\nin the year 2000 so it's been now two\ndecades that I've had the chance to work\non this comprehensive upper ontology\nthat has really turned into\njust an upper ontology but a\ncomprehensive ontology and ontology that\nincludes\ninformation about a lot of different\ndomains so there dozens of those now and\nthe combined system has about twenty\nthousand terms eighty thousand\nstatements that have been written by\nhand but also some big fact bases of\nmillions and millions of simple simple\nfactual statements that have been pulled\nin from Wikipedia or other database\nsources and we've also gone through and\nmapped it to a big lexicon the word net\nEnglish lexicon which now is expanded to\ninclude global word net as it's called\nthat has some twenty four different\nlanguages and so that's been really\nuseful for studies in lexical semantics\nand NLP applications along with\ndeveloping sumo also have developed a\nknowledge engineering environment for\nthe system right really right from the\nstart so the idea was to be able to take\nthese source files that are written in a\ntext editor and read them into a system\nwhere it can do some error checking or\nessentially you can think of it as even\ncompilation very much similar metaphor\nto what you would do in a modern\nintegrated programming development\nenvironment so if you were writing in\nPython or Java you might use IntelliJ or\nEclipse and you write your source files\nand the system is all the time parsing\nthem and try and give you menus and\nsummary features and analyses that help\nyou do a better job as a programmer so I\nwanted to have this sort of same support\nin this completely declarative language\nof sue oak if that's the logical\nlanguage with the tsumo library in the\nsame way that one has Python with the\nPython libraries or the Java language\nwith all the Java libraries it's really\npretty much the same metaphor and it's\nwell the same metaphor with having an\necon IDE where the bulk of your work is\ndone in a text editor\nbut layered on top of that text editor\nare lots of tools to make your job\neasier one of the things we do is\nbecause there's no native implementation\nof the particular syntax and logic I've\nchosen is that I've developed a number\nof translators over the years\nespecially in conjunction with Jeff\nSutcliffe and and his team of students\nand colleagues so early on we developed\na translator to tptp but after that I\nworked with Chris Benz Muller and he\ndeveloped a translator to the THF\nlanguage typed higher-order form and\nthen more recently with the advent of\nthe typed first order form\nI developed a translator to the TF zero\nlanguage I have native interfaces to EE\nand vampire as well as Jeff's system on\ntptp and all of this was reusable for\nsumo Jaya it wouldn't have been possible\nto write this editor with all the\nsupport that it has without having\nimplemented basically all of the the\nbackend analyses first in Sigma so I'm\nreally just using Sigma as a client with\nthe editor to call it so editor features\nare many are pretty straightforward\nthings like color coding so being able\nto highlight logical operators the\nfundamental relations documentation\nstrings comments all this just visually\nmakes everything a lot more easy and\nreliable as it does with almost any\nother programming language\nI've got analysis tool that will flag\nthe kind of errors and warnings that I\nhighlighted in the statistics that I\nshowed about people learning sumo it\nincludes a standard formatting again\nlike most programming language tools you\ncan also open the browser to get this or\nmore traditional view of sumo with a\nhyperlinked nicely formatted collections\nof all of the logical statements can go\nto a definition so this is an\ninteresting thing where definitions\nthese are not necessary and sufficient\ndefinitions for most terms so they're\nnot definitions in a strict mathematical\nsense if you want to define something\nlike the concept of walking in sumo you\nhave necessary but not sufficient\nconditions and also the statements about\nthat symbol can be distributed in\nprinciple over several files so though\nyou prefer not to do that things do\nevolve\norganically just like any large\nprogramming project so there's a little\nbit of complexity in trying to determine\nwhere is the definition of the term so\nwe look at fundamental relationships\nlike where you define walking as a\nsubclass of ambulation that way the\nsubclass relationship is an indication\nthat's probably where the the most\nimportant definition is in a file for a\nparticular term and then lastly if\nthey're improving which I mentioned\nthough I'll show a little bit more\ninformation on so here's a screenshot\njust showing what the system would look\nlike when you're opening it on your\ncomputer it shows the command line just\nwith some Status Messages the center\nwindow there is the actual zoom oj Edit\nwindow so this is all built on top of an\nexisting pretty powerful and well\nsupported editing system called J edit I\nchose it really just because I wanted to\nstick in a stay in Java because that's\nwhat all the Sigma system is written in\nand this was one of the that really the\nonly\nfull-featured editing system that had\nplugins and had plugins that were well\nenough described that was really easy\nfor me to get started anyway this should\nbe possible in principle with IntelliJ\nor Eclipse but I really had a lot of\ntrouble figuring out their documentation\nand getting it working whereas J ed it\nwas a lot more straightforward another\nthing that would be interesting would be\nto try layering this on top of Emacs I\nbelieve that Isabelle for example has a\nnice Emacs interface for for their\nsystem and that would make eminent sense\nand should in principle be quite easy to\ndo I'm just not an Emacs Wiz so I chose\nJanet here this show this view shows the\nerror list that you can get so if you\nask for an analysis of the file it'll\npop up a separate window with all the\narrows and their line numbers so it's\nnicely clickable and you just click on\nthe on the error and go right to the\nline and it shows not only errors but\nwarnings here it's showing a list of\nwarnings that in reality are not\nproblems but they are often indicative\nof problem\nso even when the the error-checking\nsystem can't determine strictly whether\nyou've got syntax error or a type\nviolation there's still some other hints\nit can give you that will improve the\nquality of your code and let's show just\none more screen here this is a view of\njust a proof so there's a pretty simple\ninterface that you can highlight any\nstatement in your editor and then right\nclick and have it sent has have that\nstatement sent to a theorem prover as a\nconjecture so in order to do that we do\na round trip through the tptp translator\nso from the zoo ok if it gets converted\nto tptp it then gets sent to either E or\nvampire and that's your choice that's\nselectable and then when you get the\nproof back even though Ian's vampire\nsending back the proof in TST P 3 I\nbelieve it is we do a conversion back to\nsumo as best we can there are a lot of\ntransformations I've got some prior\npapers we talked about that in detail\nthose folks are interested and want to\ncontact me I can give you that link but\nit actually those those papers were\npresented at cater inch car in prior\nyears ok so that's really it\nand be interested in having your\nfeedback and please take a look at all\nthese resources online and let me know\nwhat you think thanks very much"
},
{
"title": "Time and Temporal Relations in the Suggested Upper Merged Ontology",
"transcript": "hi I'm Adam hello this is Jenny and\nwe're here for another podcast this time\non time and temporal uh\nrelationships so let's Dive Right In\nwe'll use Sigma as usual so one thing\nmaybe to start with\nis uh\ntime\ninterval right okay it's a unit isn't\nit uh it's not a unit but it is a class\nokay all right so we have time interval\nis just any period of time it could be 1\nhour 10 hours A Thousand Years uh could\nstart at any time of day and time could\nbe five minutes anything okay another\ncouple of interesting things we have are\nif we want to talk about uh the\nimmediate future yes from some time\ninterval that's fairly typical to talk\nabout after I'm done writing this novel\nI'm going to do something yes um but\nmaybe not to specify exactly how far in\nthe future after that so Sumo has a lot\nof features for saying just as little as\nyou actually know about something\nbecause especially since human language\nis full of stuff like this where we stay\nsay things that are lacking in precision\nand we want to be able to express some\nof these things in a language it's very\nprecise yes and that means we say only\nthat which we know to be true and no\nmore no less and no more and I notice is\na function how are we going to use that\nhow we going to use immediate future\nfunction okay let's take a look at the\ndefinition of immediate future function\nso it takes a time position as its first\nargument and it returns a time interval\nso time position is either a point or an\ninterval right so we can talk about an\ninstance of time and the immediate\nfuture after that point or we can talk\nabout a whole interval and the immediate\nfuture past that interval yes okay and\nso it's returning some indefinite time\ninterval in the immediate future of a\nparticular point or interval of time\nokay all right so the way to use it um\nin fact we can see here let's take a\nfind an example of immediate uh\nFuture Let's yeah immediate future fund\nokay so let's look for a good use of it\nhas immediate past some of these are\nkind of difficult um so basically we'd\nsay the immediate future of some like\nwhen fun that's another good thing let's\nlet's take a little detour and look at\nwhen fun because when fun allows us to\nconvert from a process not just a\nprocess could also be the lifetime of an\nobject so it's any physical anything\nwith a position in space and time can be\nan argument to when fun so it could be\nthe when fun of Adam or the when fun of\nJenny that is the time interval of our\nentire existence respective existences\nokay okay so as well as you know the\nwhen fun of this podcast right is saying\nyou know what are the temporal\nboundaries what's the interval of this\npodcast right okay so it helps us\nconvert a thing that has a place in time\nto the time interval that it covers okay\nall right because we have to another\nvery important thing that's especially\ntough for new Sumo Learners and Jenny\nyou've been struggling with this a\nlittle bit and learning is uh parameters\nand argument types yes right every\nrelationship has argument types just you\nknow if you're a programmer this is kind\nof easy you if you've done Java or any\nother type language you know that\narguments to a function or a relation uh\nare going to have argument types and you\nhave to conform to those yes um if\nyou're not used to that or if you're\nused to sort of a more permissive\nprogramming language like old style\nbasic or lisp um then uh you're may not\nbe as used to argument type that's true\nyeah so all right so let's see so we've\ngot when fund that we just talked about\nwe talked a little bit about this\nimmediate future fund uh we talked about\ntime intervals and time position you\nknow we can also have past fun the whole\nperiod of the past the whole period of\nthe future from a certain point in time\nleading out to\nInfinity um we can talk about uh a time\ninterval function time period\nfunction a whole bunch of different uh\nrepresentational possibilities um\nthere's also lots of very conventional\nthings like we talk about the time\ninterval of 1 hour right or a time\ninterval of the class of all lunchtimes\nright uh minutes or months\num here's some stuff that's that's\nfairly common uh begin fun and end fun\nso if we have a time interval what's the\npoint that that time interval begins on\nor ends on let's take a look at that so\nbegin fun takes a time interval and\ngives a Time Point time point at which\nit begin right okay so we can talk about\nintervals and points and convert between\nthem we can talk about things in the\nreal world and get their temporal\nspecification uh let let's do a little\nlooking at uh some calendar functions\nokay so year fun is good so you've used\nthis one yes before so year fund Maps uh\nan integer to the year that is expressed\nby that integer in the Gregorian\ncalendar okay at least I think You' call\nit the Gregorian calendar the modern\nWestern calendar right all right so the\nyear year fund\n1912 uh uh is the year 1912 yes\nokay um now I should also say these\nthings are compositional let's see if I\ndon't know if we can find a good example\nof it here that' be nice if we had a an\ninstance we could point to yeah here's a\ngreat case yes okay so because these\nthings are compositional year month day\nuh if we want to talk about the 20th of\nJanuary 1930 right we first say\n1930 year fund 1930 and then pass that\nas an argument to the function month\nfund right which takes a month and a\nyear to return a specific month in\nhistory or in the future right same\nthing with day fund so year fund just\ntakes one argument month fund takes two\narguments a month uh a class of all\nmonths and a particular year right day\nfund takes a three day fund takes a uh\nan integer integer right and a second\nargument it only takes two arguments and\nit takes a particular instance of a\nmonth that is on a particular year right\nokay we can be so specific yes and you\ncan do this for hours and minutes and my\nmilliseconds and so forth all of this\nstuff is open to you right okay so we\ncan talk about particular days um let's\nsee we also talked about holidays a\nmoment ago let me let's just look at\nholidays I think we have a few of\nthese since we're on the topic of\ncalendar\nmonths uh so we've got all sorts\nof holidays Christian holidays Jewish\nholidays uh Muslim holidays let's look\nat some of the Christian ones so\nChristmas Day for example popular\nwestern western holiday very important\none for many people um and so this is\nthe class of all Christmas days and by\ncustom this occurs on the 25th of De\nso Christmas day is a\nsubass of uh of all days right and it's\na particular class of all the days that\noccur on the 25th of December right it's\na fixed holiday so we also have Notions\nof holidays that are\nvariable um I think like Thanksgiving\nthis doesn't always fall on the same day\nWestern Thanksgiving so forth okay um\nnow let's see uh another thing to talk\nabout is\nwe can talk about Let's see we can talk\nabout the time at which a process begins\nor ends yes and you've dealt with a lot\nof that like you know John goes to the\nstore at 2:00 yes um but we also can\nwant to talk about things that are true\nover a particular period during during\nor holds during right holds during so\nlet's look at holds during now this is\ninteresting you know if you're doing\ninference holds during is is a higher\norder logic it's beyond first order\nlogic so you have to be a little careful\nif you're using this in inference you\nwon't be able to do much with it in a\nconventional first order like e or\nvampire you'll have to use one of these\nmore experimental provs like sellx right\nuh or leo2 um we have to do a separate\npodcast on that that's quite a bit\ntougher um so just be aware that there's\nsome issues with doing logical inference\nin this stuff but uh the representation\nis is uh solid let's look at argument\nyeah so hold during takes time position\nand a formula this is the hard part\nright it's not just taking a\nconventional kind of argument it's\ntaking a whole logical formula this can\nbe a little tricky all right so if we\nwant to say for example that uh John has\na blue car in the year 2003 we'd say\nthat it holds\nduring 2003 the year year fund 2003 the\ntime position a formula that you know\nthere exists a car John possesses that\ncar and the car has the attribute of\nbeing blue yes okay and I think this is\none of the exercises you did recently\nJenny yes yeah okay um so this this is\nkind of an important thing yeah the\ndifference between saying that a fact is\ntrue over a time period versus an event\nstarted or ended at a particular point\nin time right okay and uh let's see I\nthink that's about it for what I wanted\nto cover at the moment uh Jenny any\nquestions or thoughts that you wanted to\nask yes I would encourage uh our\naudience to spend a bit more time\nbrowsing through Sigma and make good use\nof the graph and\npresentation and it helps to give us uh\nan idea of what's there in Sigma that we\ncan use yeah just to reinforce maybe\nwhat we did on graphs so so here's a\ngraph of time interval holiday\nparticular holidays we can go down a\ncouple of levels it's a nice way to get\nput some\nyeah you have to click submit or hit\nenter on most browsers and you get this\nwhole list of holidays and then you can\nactually drill in to see for example\nmovable holiday and don't you need to\nsee how many yeah movable holiday has 10\neach of the but this is the extent of it\nright because each of these don't have\nany further sub classes according to\nthis graph oh that reminds me of another\nthing we could look at also which is\nrelevant um so we have this whole class\nof uh temporal relation\nso we talked about a lot of these\nfunctions future fun immediate fun\nminute fun year\nfun um we also have all these sorts of\nthings so there's a guy named James\nAllen in 1980s that had a very famous\npaper on time and temporal relations he\nhad a calculus of 11 relations we have\nall of that in Sumo so it talks about\nthe relationship between time intervals\nor events um without talking about the\nspecific times at which they occur he\ncame up with 11 of these things we have\nbefore before equal co-occurs finishes\nright uh you can spend some time\noverlaps temporary uh you could spend\nsome time looking at uh at these\nrelations and that's usually helpful\nyou'll need most of them at some point\nin time okay when you're doing your\nrepresentation and and we should also\nkind of hint to a future podcast of\nspatial relations\nright um there's a whole set of very\nextensive spatial relations that have\nsimilar things where we can talk about\nregions of space and whether they\noverlap or they're adjacent and all of\nthat so there's a nice analogy between\nthe timeline and space yes time and\nspace yeah two Dimension okay yes well I\nthink we'll we'll just uh stop here hope\nthis has been helpful and we'll talk to\nyou later hope you enjoyed it talk to\nyou soon bye\nbye"
},
{
"title": "Ontology Talk Formalizing Carabiner in SUMO",
"transcript": "hello and welcome to ontology talk i'm\nadam pease and today i want to\ncontinue the series of formalizing terms\nuh and show you how it's done\nformalizing terms in sumo\nand today i thought just because it came\nup in\nsome conversation i might formalize the\nnotion of a carabiner\ncarabiner for those of you who are not\nrock climbers and i'm not much of a rock\nclimber either but i've\ni've seen them before and used them once\nor twice\nare things that allow you to uh\nclip your rope or your climbing harness\nto something else and keep you from\nfalling\nit's generally under the class known as\nprotection or at least that's what\nclimbers call it\nso is as you can see here\njust a sort of a loop\nof metal with a little hinge in it so\nyou can get your rope or a clip\nor some other kind of thing in and out\nso that you're either connected by this\nlink chain link or not\nand one critical thing is you know\nthere are carabiners you might have to\nhold your keys\nthose don't have a lot of strength to\nthem but\nother carabiners that you use for\nclimbing have specific rated strength so\nthe first thing that i want to think\nabout\nis uh how do we distinguish climbing\ncarabiners from your sort of casual\nkeychain carabiner and there's a site\nthat i found\nhas all sorts of information so this is\nalso part of\nwhat one does as an ontologist you might\nhave some passing familiarity with\nsomething you need to formalize\nand you need to do some research just as\nthough you were defining a dictionary\nor an encyclopedia you need to get some\nmore information if you don't have all\nthat information in your head so\ncarabiners look like they have a major\naxis which is really strong you know if\nthe gate is open the hinge is open it's\nless strong\nminor axis is not very strong there's a\ncertification that they\nkind of real carabiners used for\nclimbing should get\nyou can see that you know they've tested\nit in falls they want to make sure that\nif you fell and this thing was supposed\nto hold you that it actually would\nso it looks like it's pretty hard to\nhave a fall where the force is greater\nthan five kilonewtons\nso in fact on the major axis the\ncertification make sure this is over\nengineered it's going to\nbe required to take a 20 kilonewton\nforce uh\nin the worst possible case i guess if\nthe gate is open\nyou still should be able to hold the\nworst possible\nreasonable uh fall strength of five\nkilonewtons and so forth\nso i don't know if we'll have time and\nwe certainly won't have time to get into\nall that but i can at least make a start\nso let's uh look at\nsome other stuff um so i was going to\nshow you some other things in sumo so\nthe first thing i was going to start out\nwas the notion of a chain\nlink a closed form of metal rod but the\nproblem with the carabiner is it's not\nclosed it's only closed some of the time\nit isn't fundamentally closed\nbut we can see from the definitions\ninvolved in sumo for the notion of chain\nlink\nthat we make use of this attribute of\nbeing a ring\ntaurus shape so sort of a fundamental\nshape from\nuh analytical geometry so informally the\nshape of a donut well that's what we\nwant we want a shape attribute\nwe want to talk about the carabiner\nhaving that shape\nbut only some of the time so that's\nprobably important it's not necessarily\na chain but there's one link in the\nchain\num so let's start maybe with that\nand then we're also going to have\nnotions of force and breaking strength\nand axis and maybe even let's take also\na look at\ncertification i don't know if we have\n[Music]\ncertification\nno we don't seem to have a notion of\ncertification so we have certificates\nbut not a certification so that might be\nanother thing to talk about\nis defining the the notion\nof certifying something as meeting a\nparticular standard\nso let's try to get started with that so\nat the very least a carabiner\nis a device and\nlet's give it some documentation\nso here i'm using the sumo j edit editor\nhas an\nadditional few features beyond just your\nbare text editor\nso it can do syntax checking and color\ncoding we'll get to that in a moment\nso that's\nin the english language\num and here you know might want it just\nto reuse\nsomebody else's definition if it's\nprecise enough let's\nand so one thing i often do is\nlook at wikipedia also\nbecause wikipedia has a nice friendly\nlicense\non it that lets me with attribution use\ntheir definitions thank goodness for the\ncreative commons license\nso let's look at uh carabiner that might\nalso get us some additional background\nso carabiner a special type of shackle a\nmetal loop with a spring loaded gate\non safety critical system okay so\nyeah um that looks great as a start\nso let's try that we'll just reuse\nwikipedia's definition with attribution\nof course\nokay so there we are let's say from\nwikipedia i usually put that in brackets\nokay and we'll quote it and\nlet's see if uh do i have my\nformat option let's format axioms now\nthat's not\nnot doing it for me so i'll just do it\nmanually\ni could because i haven't yet saved it\nas a kif file so\nlet's try that well let's get rid of\nsome of the\nthis extraneous stuff references because\nof course i'm not copying\nthe references in there so i don't need\nthese numbered things\nlet's get rid of that and let's try to\nsave it\nwe'll call it\nokay great at least now we've got our\ncolor coding which\nmakes things a little bit nicer all\nright and as usual we'll do a term\nformat and english\nlanguage bienner\nand a nice thing that you can see here\nfrom\nthe wikipedia definition it also gives\nus that there's actually an alternate\nspelling so uh\nand if that's that's a valid thing in\nenglish let's give it that so\nanother point here about you know we've\ngot an identifier\ncarabiner with a capital c that's just\nan identifier has a nifty uh mnemonic\nfunction to it just like any sort of\nstandard programming language identifier\nit's not however the definition and it's\nalso not\nthe printable label so we keep all those\nthings distinct in sumo\nso let's talk a little bit about what a\ncarabiner\nis yeah so we have an instance\nc of a cara\nand um certainly want to say\nthat it's made of a metal\nlet's just check i think that does take\na class\nof metal so let's go back here\nto our sumo browser called sigma\nand material\nall right so material\nhas as its second argument a corpuscular\nobject an instance\nit's a domain relation so it takes an\ninstance\nbut the substance that's referring to\nhere it's related with a domain\nsubclass so that's saying that the first\nargument to the relation material\nis a subclass of substance and metal is\na substance\nso good that's that's what we want\nso let's turn this all right so very\nsimple axiom just say that if you have a\ncarabiner it's made out of metal\nokay let's also say\nthat if\nwe have an instance of\ncaribbeaner\nand it holds during\nsome time t so here we're getting a\ntemporal logical axiom beyond first\norder logic at least\nmost of the time you know that's another\nissue about how to encode temporal\ninformation but\nin this case it's very least\nsyntactically higher order beyond first\norder\nso it holds during this following period\nt that the attribute\nof karen\nspell it right at least the carabiner is\ndevice closed\nthis is something that's already in sumo\nlet's just take a look at that and i\nthink\ndevice closed probably could stand some\nimprovement\nnow there it is i looked at it\npreviously\nand yeah it's a device state attribute\nwe said almost nothing else\nand part of that is you know what does\nit mean to be closed\nthat's something that let's uh maybe\ni'll save that\nto another video where we can explore\nwhat does it mean to be\nclosed and so this is just sort of a\nplaceholder for now\nso it holds during that if we have the\ndevice\nclosed then it also holds\nduring that period t that\nthe hairbinder c has the\nshape attribute of being a ring\ntaurus right it's informally shaped like\na donut\njust a very thin funny shape to donut\nokay um and\nif it's well then we should say the\nopposite specifically\nbecause unless we say it explicitly the\nmachine does not know\nthat uh let's see so then we've got\ndevice closed so let's talk about saying\ndevice\nopen that it\nholds during that period and it does not\nhave the attribute of being a\nring taurus okay\nand let's now talk about\nhow do we distinguish the carabiner\nfrom the climbing carabiner from that\ncarabiner that holds\nit holds your key ring so i think the\ngood way to do that\nis to put them into two different\nclasses because they really have\ncompletely different purposes\nso let's call it climbing carabiner\nis a carabiner and\nthen some class let's call it\nuncertified\ncara cleaner is also a kind of\ncarabiner i mean they have the\nfundamentally the same shape but they\nhave a different purpose so\nclimbing carabiner\nand english language\na carabiner\nthat has the purpose\nof and is certified\nfor use as protection\nin rock rock climbing\nokay let's just take a look see if we\nactually have rock climbing that would\nbe another useful thing\nrock climbing\nhey look at that great we do have rock\nclimbing as a sport so that\nhelps us well it doesn't really have\nmuch definition just somebody who does\nrock climbing as a rock climber\nokay so we can do a lot more there but\nit let's at least start\nmaking that hook into what we already\nknow at least we'll know that it's a\nsport\nso um let's say\nthat if we have a\ninstance of\na climbing\ncarabiner that it has\nthe purpose that\nthey're rock climbing rock climbing is a\nsport\nokay and a sport is\na game and a game is recreation or\nexercise\nwhich in turn is going to be an\nintentional process\nokay so it's a process we're talking\nabout\nthat's good so let's say it has the\npurpose\nthat it is an instrument\nused in rock climbing\nso let's say it there exists climbing\ncarabiner\nexists\nrock climbing oops\ninstance rc is rock\nclimbing and that\ninstrument instrument\nof rock climbing is a climbing carabiner\nright so again the same issue i talked\nabout in the previous video\nit's still a carabiner it's still a\nclimbing carabiner even before it's\nactually been used by a rock climber in\nrock\nclimbing so it's important to talk about\nthe purpose of it\num which which doesn't change um\nyou know it's it was manufactured to be\nused in rock climbing before it's used\nin rock climbing it's still\na rock climbing climbing carabiner and\nthen once it's actually used it remains\na rock climbing carabiner it's being\nused for its intended purpose\nright so this is a sketch showing you\nhow we start with one thing we expand to\na lot of others to really give this a\nfull definition we're going to have to\ngo back\nand we're going to have to fully more\nfully define the notion of a device\nbeing closed and a device being open\nmaybe i can do that in a future video\nwe're going to need to talk about things\nlike bending or breaking strength i\ndon't think we actually have that\nwe do have notions of force in sumo the\nnotion of newtons and kilonewtons we\nhave a\nnice ontology of units so we've got that\nwe can reuse\nbut there's some new stuff here that\nwe're going to have to add in uh to give\nit a\na firm definition give these things a\nfirm definition so you'd like to know\nsay if you had say a business that was\nselling these things\nthat would be very objective and clear\nwhen you're selling stuff that's\nsort of a novelty for use on your\nkeyring and when it's a serious\nequipment with a rating and\ncertification that you'd actually use in\nclimbing\nright so i hope this gives you a little\nmore information also\nshows you the nice color coding in jedit\nand\nit can be used for a lot of other\nfeatures i mean most importantly\nwhen we get a critical mass of this sort\nof thing we'd like to start be able to\nask questions as i think i've shown in\none of my previous videos\nto actually use theorem proving to prove\nwhether these things are consistent\nor these definitions can give you the\nanswers that you would expect in your\ndomain\nall right so that's it for now and we'll\nsave maybe splashing this out or\nmoving on to another concept for a\nfuture video\nthanks very much\nyou"
},
{
"title": "Ontology Talk Installing Sigma Part3 - Running Sigma",
"transcript": "hello and welcome to part 3 of a series\non ontology talk on installing the Sigma\nknowledge engineering environment in\nthis episode I show you how to do a\nlittle bit more configuration on Sigma\nhow to start up the web-based user\ninterface and also show you how to\naccess functions at the command line\nincluding theorem proving so you had a\nproblem on the first installation I\ndidn't realize until after so it was a\npermissions issue I had as you can see\nin the instructions here opened the\npermissions to the bin directory of\npatchy Tomcat they hadn't actually\nopened permissions on the web extras\ndirectory and that caused a problem when\nI was compiling with ant down at the\nlast step it wasn't copying the files\ncorrectly into that directory because\nthe permissions were wrong so I don't\nknow if that's something that maybe just\nspecific with this clean installation on\nvagrant but you may want to try that if\nyou have some trouble activating the web\ninterface so let me move on to a couple\nother considerations so for running\nunder vagrant you're gonna have to be\nconcerned with port forwarding now I\ndidn't want this to be a tutorial on\nvagrant but I should mention that since\nI'm I'm discussing the vagrant\ninstallation so let's just take a look\nat the vagrant file and I'll show you\nwhat I mean\nso vagrant\nlet's see gives you actually let me look\nat memory also is another issue you're\nprobably going to need to bump up the\nmemory so I've it was set originally to\n5,000 they made it 9,000 and that\nimproved the situation a little bit\nhere's what I was talking about port\nforwarding so Tomcat runs on port 8080\nso when you're accessing\nApache Tomcat the Apache Tomcat web\nserver which I'm going to show you how\nto do in a moment you're gonna be\naccessing the running process on vagrant\nso that's on this get what they call the\nguest machine right it's running as a\nguest on your your Linux host so the\nguest is gonna run on 8080 now you can\nconfigure that and you could change\nTomcat if you want but it's easier just\nto leave it at the default at the host\nhowever is going to recognize it at port\n8080 eight and so you see that when we\ngo to startup Sigma and look at it on on\nthe web it's going to be accessing port\n8080 eight so that there won't be a\nclash if you run it also locally then\nyou can run apache tomcat locally on\nyour on your actual physical linux box\non a e 80 and so you access the guest\nprocess running a vagrant at port 8080\neight and and any native process on port\n8080 okay so that's it for vagrant and\nso now let's take a look at actually\nstarting it up so we're gonna go over\nand start up vagrant\nnow you can see here we've got a\ntranscript that shows this port\nforwarding here just for verification so\nport 8080 on the guest machine on\nrunning under vagrant will appear as\nport 8080 8 on the host ok so there it\nis so we've got it started so let's go\nover to the vagrant virtual machine\nchange to the user that I created\nearlier and go to that directory so\nthere we are another consideration for\nrunning Tomcat you don't get the error\nmessages to the screen you get them to a\nlog so they go to a file called Catalina\nthat out so let's just show you that so\nthat's gonna be in the directory where\nyou installed Tomcat\noops change to that and it's in the logs\nsubdirectory and you're gonna get lots\nof logs so they can build up after a\nwhile if you're running a server you're\ngonna need to clean them out every so\noften or maybe even run a cron job to do\nthat for you so the file that we care\nabout here though is Catalina and dot\nout so let's just take a look at the end\nof that\nokay and so here's showing right I was\ntesting it earlier and started things up\nand you get a lot of messages about you\nknow what ports things are running on\nand so forth but most importantly for\nrunning Sigma you get all the Sigma's\nerror messages and status messages there\nso if something's going wrong the answer\nis usually in checking the output of the\nlogs it's usually just maybe you made a\ntypo in a you know an environment\nvariable that points to a directory or\nsomething of that sort right so I'm just\ngonna for now I'm gonna destroy all of\nthese logs so that we don't have any old\nstuff in there that might confuse us so\nthat's also a good practice if you're\ntrying to debug an installation so let's\ngo back to the root and now let's start\nit up so let's do this\nand I like to type full paths so that I\nhave those full paths and I can go back\nto them in the history if I just do a\nrelative path then maybe I'll be in a\ndifferent directory and it won't work so\nif I do the full path that's just a\nconvenience so you start up Tomcat by\nnot surprisingly a script called startup\nthat SH which is in the mid-deck turi\nokay so there it is started and now what\nI'm gonna do is I'm gonna go back to my\nhost machine let me just give you a good\nview as to that okay and I'm gonna try\nto access it so it's gonna be on\nlocalhost but it's gonna be on port 8080\n888 it's the Sigma application and we're\ngonna login okay and so there it is now\nthe standard login is admin admin you\ncan change that if you're running a\nserver you want different login the\nregister new account is something I've\nbeen working on actually isn't\nfunctional at the moment so appreciate\nany help on that anybody that wants to\nchip in on making that work properly\nalright so we're gonna load up Sigma now\nat the moment and this takes a few\nmoments it's got a load in all of\nwordnet it's got a load in all the\nontologies that you've specified in your\nconfig.xml such let's take a look at\nwhat i've got loaded in the config.xml\nso\nlook in a tomcat sorry let's look at a\nCigna key directory things where the\nconfig.xml lives ok and so I've just at\nthe moment countries and regions file so\nfacts about the world and merge which is\nthe upper upper level of up soon will be\nkind of the original sumo right so it's\njust loaded now and future loads once\nyou've loaded a particular configuration\nwill be much much faster the first time\nit loads it's got to parse all the files\nand create a bunch of indexes and but\nthen it saves those out you know Java\nserialized for a binary format so\nsubsequent loads are much faster okay so\nhere it is running on port 80 88 now my\nbrowser is running on my host machine\nand it's accessing Sigma on the guest\nmachine so just to show you a little\nmore about Sigma so let's look at a\ngraph let's look at a graph of object\nand here I'm gonna show you the graph is\nsystem running so it creates these very\nelegant-looking graph representations\nnow sumo is not just a graph it is a\ntheory in higher order logic but there\nare portions of the theory that are\ngraph like for example the sub class\nhierarchy so an object is a kind of\nphysical and artifact is a kind of\nobject etc so you may want to play\naround with this that's prison provides\nthese very nice graphical overviews\nwhich help you learn the structure and\narrangements of sumo I think pretty\nquickly okay so so next I want to show\nyou some execution at the command-line\nlevel instead of through the web-based\ninterface so let's start with\nKamiya and I ran earlier to make sure\neverything is functioning properly this\nis very similar to what you see in the\nreadme file for Sigma ki starts off here\nI've modified it just a little bit to\nmake sure that I'm using the right\nversion of Java or the Oracle JDK that\nI've downloaded rather than the open JDK\nthe next statement is to set the memory\nrequirements for Java and I give it 7\ngig Sigma does take a fair amount of\nmemory if you've loaded in all of the\nologies and all of wordnet especially if\nyou're doing some theorems\nbut if you are not doing fare improving\nand you're running maybe just the upper\nlevel of sumo and one domain ontology\nthen you can probably get away with less\nbut I just as a matter of habit since I\nhave a good-sized machine do tend to run\nwith more memory next thing you need to\ndo for Java is give it the path to the\nclasses so all of the classes that we've\ncompiled that are part of Sigma in the\nbuild classes directory and then all the\nlibraries are in the build Lib directory\nlastly you need to tell it what\nparticular class you want to execute and\nso we're gonna show it I'm gonna show\nyou trying to execute the KB class which\nis one of the main classes of Sigma now\ngive it a dash H just to show you the\nhelp screen so there it is you've got a\ncouple of different options that you can\nrun let's get set up for doing theorem\nproving so first thing we're gonna do is\ngo down to the vampire section of the\nontology portal Sigma key readme I give\nyou a couple of statements to do here so\nlet's take care of that\nokay never need install let me fix a\ntypo not gonna read me shortly right and\nthen with those preliminaries done then\nwe can actually get a copy of the\nvampire code now keep in mind of course\nvampire is not open source it has free\nlicense for research but not for\ncommercial work so if you use it make\nsure you're pleased that you're using it\nconsistently with the license or contact\nthe developers so we're gonna clone\nvampire\nnow that the download of vampire source\nis completed we can go about building it\nso let's go to the new vampire directory\nwe start off by executing one portion of\nthe make file\nokay and now we can execute remaining\nrequired portion of the make file start\nenough to make well but rather moving\nthe master copy to be called vampire so\nnow we can go through and set the\nappropriate portion of the Sigma config\nfile to point to it as well as to e\nbecause we didn't do that in the\nprevious step so let's do that so we're\ngoing to change to JB's directory where\nall of Sigma data files are located and\nwe're gonna edit I can fake XML\nokay so let's find vampire first okay\nthere we have it it actually is already\nhome ap's workspace vampire vampire\nwe'll check on that and let's check on\nnow EU we actually installed in programs\ndirectory if you're a call so let's\nchange that will verify that as well\nprograms and I believe scape out of that\nso let's just double check\nOh\nokay and there is he LT be runner a\nlarge theory batch that's the version of\ne that we run because sumo is so large\nthere's a special file that controls\nrunning Yi on large files and doing it\neffectively and making sure that it\ndoesn't have to reload the knowledgebase\nfor subsequent queries that's a big\nadvantage for a theory as large as sumo\nother provers do not have that including\nvampire I did it one time but it doesn't\nat the moment hopefully the developers\nwill restore that someday so let's also\njust take a quick look for vampire and\nso we had pointed that vampire renamed\nokay there it is\nvampire our executable built just a\nmoment ago great all right so let me\nmake sure that I didn't I think I kept\nJava yeah I kept Tomcat server running\nso let's shut that down before we do any\nmore command-line invocations because\nour memory is limited on this virtual\nmachine we don't want it to run out of\nmemory so we do that\nby executing Apache and shutdown before\nwe use it stirred up to startup and\nshutdown to shutdown pretty\nstraightforward launcher know the paths\nnow you just save those paths or given\nan alias or something make life a little\neasier on yourself I just haven't done\nthat yet\nright so now let's try some command line\nstuff so let's see\nI happen to do that previously okay here\nwe go so let's try executing E okay so\nhere we are making this call to Java\nspecific to the Java that I just\ndownloaded previously in the previous\nvideo make sure that I'm not getting the\nopen JDK I'm sure there's a way to set\nthat more reliably I just haven't looked\ninto what that is\nso just rather than that JDK I get the\nyou want to invoke the Oracle JDK I want\nto make sure I have enough memory so I\ngive it seven g seven gigabytes point\nit's a class path which is the build\nclasses directory as well as to the\nbuild library directory I'm gonna call\nthe KB object and this option here is\nfor invoking the e prover with a\nparticular query so let's run that so\nall that was just loading the knowledge\nbases and now we're loading wordnet and\nin a moment and he will actually start\nso he's pretty fast it's actually\nunloading the Sigma system that's taking\na little bit of time\nokay there we have it simple execution\nof proof most of the time is actually\nspent in creating the file that we sends\nto E and in loading Sigma he only takes\njust a moment of course it is a very\nsimple query no and we get the answer\nthat there is a region a region as a\nsubclass of object and that's already\ndirectly in the knowledge base so it's\nreally just doing a simple match this is\njust a exit straight command-line\ninvocation and if you look through the\nset of classes in Sigma you can get a\nlot more information on command line\naccess just by doing help so for example\nif we want to look at KB utilities we\ncan get a similar listing of help so for\nexample there's a utility to generate a\nsimple semantic network by throwing away\nall of the first and higher-order axioms\nand just taking all of the binary\nrelations that are in Sigma so if you're\ndoing some sort of graph application you\ncan still use sumo you're just not\ngetting the full power of it as you\nwould by using there improving but it's\nstill better than starting from scratch\nso I hope you found this helpful and see\nyou in the next video thanks for joining\nme on this latest edition of ontology\ntalk if you found this episode useful\nplease as always like subscribe and\nshare and if you'd like more information\nyou can go to ontology portal org\nand also possibly get a copy of my book\nthanks very much"
},
{
"title": "Ontology Talk Instances Sets and Classes",
"transcript": "welcome to ontology talk my name is Adam\nPease and I want to speak today about a\nfundamental concept in ontology of the\nnotions of instances sets and classes\nlet's look at an example of instances\nand classes and start off with the\nconcept of human sentient mammal of the\nspecies Homo sapiens that concept is a\nclass and then we might have let's say\nthree instances of this class the set is\ndefined by its instances so if two\ninstances of the class have a baby\nthere's one more instance we have a\ndifferent set the class hasn't changed\nin the same way if one of the members of\nthis set has an unfortunate accident and\nis gone we now have a different set the\nclass still hasn't changed its consists\nof its definition not of its members so\nlet's think of the class of all female\nhumans born on a specific date in a\nspecific place there might be no\ninstances of this class or just one one\nindividual Mary who's born on this\ncertain date in Oshkosh Wisconsin she's\nthe individual but this concept is a\nclass let's also look at the notion of\nprocesses let's take a University\nlecture for example that might have a\nsub process of thanks or acknowledgments\nthe process of thinking isn't a kind of\nlecture it's a sub part of a larger\nlecture so if richard fineman thanks\nniels bohr for his contributions to\nphysics as part of his lecture one is a\npart of another not a sub class here's\nanother case that can be problematic\nlet's take a look at bacteria so we\nmight have the subclass streptococcus\nthe instances of this class are\nindividual bacteria that you can point\nto in a microscope on in a petri dish\nlet's say\nsubstances are another issue that are\noccasionally complicated so let's say we\nhave several glasses of water and maybe\nwe take one of those glasses and we pour\nsome of its contents into a fourth glass\nso we now will wind up with four\ninstances of water four instances of the\nclass water and a particular set of four\nbodies of water together so I hope you\nenjoyed this video if you did please\ncheck out my website ontology portal org\nwhere there's a lot more information if\nyou're interested like and subscribe to\nthe channel and there's also a copy of\nmy book that may be of interest to you\nas well thanks very much for watching"
},
{
"title": "OntologyTalk Demystifying Inference Part 1 Overview",
"transcript": "hello and welcome to another edition of\nontology talk\ni'm adam pease and today i would like to\ntalk about\nthe notion of demystifying automated\nreasoning\nthis is just an introduction and an\noverview and then we'll have some more\ndetailed\nvideos on the specifics of how to how to\nactually do this sort of thing\nso first off what is automated reasoning\nthere are many sorts of reasoning or\ninference and especially today\ni read a lot of headlines or titles\ntalking about doing inference including\nthings like textual inference\nand this is a very general word right so\nit can be used a lot of different ways\nand the way that i'm going to use it\nhere is\nthe usage in the automated theorem\nproving community\ncommunity that does work in reasoning in\nmathematical logic\nand here i mean it's the use of computer\nsoftware to approximate a certain kind\nof reasoning deductive reasoning\nusing symbols using a mathematical logic\nor some other kind of\nmathematically formalized system that's\nyou know\nobjective repeatable it's not stochastic\nit's deterministic\nhas all those qualities of a mathematics\nthere are many also many kinds of\ndifferent\ndifferent kinds of mathematical logic\none of the most basic\nis propositional logic so you might\nremember this\nfrom your from schooling at some point\nif you had a scientific and technical\neducation\nso here's just some examples a\npropositional logic has no variables we\ntake\nstatements in natural language like\nmary likes cake and we assign it a\nsymbol\nin this case p or another statement like\nmary has likes cookies and we can assign\nit a different\nuh logic a different symbol q\nand then we can make statements\ncombining these symbols such that\nif mary likes cake then mary likes\ncookies or\nin propositional logic p implies q\nand you can string together these sorts\nof statements according to these symbols\nin propositional logic\nand do some very simple kinds of\ninference so if for example\nyou have this rule p implies q and you\nknow p\nthen logically necessarily according to\nthe mathematics\nyou can derive q you know q is true\nbecause\np is true and p implies q is true\nso this is the most basic kind of\nlogical\nsymbol structure in logical mathematics\nbut this is very limited propositional\nlogic is really used more often\nas an introduction for students these\ndays into what's possible\nit's not really a very terribly useful\nsystem of mathematical\nlogical reasoning so for example we\ncan't say that\nmary likes food x that has sugar\nif if she likes food x that has sugar\nthen she'll also like any other food y\nthat has sugar because we don't have any\nvariables\nso we can't talk about these abstract\nthings like x and y\nand hopefully this should be clear that\neven if you've done any just basic\nalgebra\nyou need variables in order to do most\nuseful things\nso another kind of mathematical logic\nis predicate calculus or otherwise known\nas first order logic\nand this is the kind that i'm going to\ntalk about today and\nin subsequent videos but i want to give\nyou a little context\nit is the most common kind of classical\nlogic or two valued logic a logic and\nwhich\nhas just true or false and not\ni don't know or unknown or in between or\nsort of or any other\nthink uh kind of constructs like that\nthat you might imagine that we can\ncommunicate in english it's it's pretty\nstrict\njust just true and false it is a good\ncompromise between\nspeed and the expressivity of the\nstatements\nexpressivity refers to the notion of\nwhat can you say\nin the language and have it be expressed\nlogically strictly\nwe're capturing the full semantics or\nmeaning\nof that statement in this particular\nlanguage so propositional logic as we've\njust seen has very limited expressivity\nit doesn't have you have variables\nthere's lots of things\nthat you'd want to be able to say in\nenglish or in any other natural language\nthat you just can't say in a\npropositional logic\nso having a more expressive language\nabsent all other qualities or issues\nis a good thing but there are other\nqualities or issues so the more\nexpressive you are\nthe more difficult the mathematics is\nand usually the more\ndifficult complicated and time-consuming\nthe automated reasoning is\nso propositional uh practice private\ncalculus or first order logic\nis generally seen as a kind of a good\ncompromise\nwe know how to do fairly efficient\ninference with it\nand has lots of very well tested\nimplementations it's fairly expressive\nbut certainly different people can make\ndifferent choices depending on the needs\nof their applications or their\nscientific interests\nso there are lots of others other kinds\nof mathematical logic description logics\nare quite popular today\nthey're very efficient and they were\nchosen i think primarily uh\nin the early 2000s as a better\ncompromise between speeds and efficiency\nbecause first order automated reasoning\nwasn't as far along it wasn't as\nadvanced it wasn't as fast\nand at the time people were quite\nconcerned about uh having inference that\ncould terminate in a reasonable amount\nof time\ni think that concern is changing because\nthe automated reasoners have gotten so\nmuch better and there are\nunfortunately once you've made that\nchoice to get use this more\nconstrained and computationally\nefficient logic description\nlogic you have a lot of restrictions it\ndoesn't really have true variables i've\ntalked about this in another\none of my videos it doesn't really have\nproper quantification\nit doesn't have true negation it doesn't\nhave functions it only has binary\nrelations and so on so quite a lot of\nsevere restrictions on what you're\nallowed to say in the language for some\nof these there are workarounds for\nothers that are not\ni personally think it's too many\nrestrictions\nto be able to encode the most important\nthings that we know about our world\non the other side there are modal logics\ni won't go into much detail right now\nabout what those are but let's just say\nthat they're more expressive\nthan first order logic includes all\nsorts of quantification\nqualifications such as something\nhappened during a time period or this\nmay become true or it will become true\nthe or it must become true it should be\ntrue\nall of these sorts of modifiers that we\nhave in natural language\nare often termed as modals when you\nhave a logical expression involving them\nthere are lots of options\nlots of people are playing around with\ndifferent sorts of model\nmodal logics there isn't a tremendous\namount of standardization\nthere and there aren't a tremendous\nnumber of implementations of the same\nmodal logic so at the moment i think\nthat's\nprobably not the best compromise for\nautomated reasoning there's certainly\nsome great and important research being\ndone in those areas\na higher order logic surprisingly enough\nit's actually\nfarther all along in some ways and it's\nmore expressive\nthan uh particular modal logics\nin terms of the language there's the uh\nthf standard in the theorem previewing\ncommunity\ntyped higher order form which is a\nclassical higher order logic\nclassical again meaning there's there's\ntrue and there's faults uh in terms of\nevaluating statements it's getting\nbetter fast we've done some experiments\nusing the sumo ontology\nand the leo 2 theorem prover that have\nworked out really well\nsatellax is also a really great prover i\nhaven't worked with\nwith others but there are many others\nthat are quite sophisticated\nand i think this area is is the growth\narea it\nit is going to be what's necessary we\ndon't want any limitations really on\nwhat we can say\nformally and there's still plenty of\nthings you can't say\nin a first order logic discussed this\nbriefly in some of my other videos but\nbasically things like john believes\nthat entire statement john believes that\nmary likes sue you're already in a\nhigher order logic you\nhave an argument that's an entire\nformula and that can be\ncomputationally challenging does require\nthis other logic\nthe but i think it's it's going to be\na good option in the future the the key\nissue at the moment uh in some work that\ni've done uh with professor christoph\nben's mueller\nis that even for something like sumo\nthat's expressed\nin a higher order logic that has lots of\nmodal operators\nlike uh qualifying something that of the\ntime that it was true\nas and at the same time talking about a\nbelief that somebody may have so if you\nwant to say\njohn believed in the year 2000\nthat vaccines were a bad thing but now\nhe's changed his mind\nthat's something that requires combining\ntwo modal logics that's\ni think the hot research one of the hot\nresearch areas since something that\nneeds to be resolved before\nwe can use a theory as sophisticated as\nsumo\nin a higher order logic fear improver\nand get consistent results we know that\nthis is a challenge going forward\nbut i think it is the way forward but in\nthis\ntalk just to be clear i'm going to talk\njust about first order logic because\nthat's what we know well\nthere are good provers for it etc all\nright\nso i'm going to divide this into a\ncouple of parts we're going to do this\nover several videos\nfirst i'm going to give you an algorithm\nan example\nand an implementation also i should tell\nabout you know what's not\ncovered here so automated reasoning even\nin first order logic is a tremendously\nrich area there's a\nconference an international conference\nevery single year the\nconference on automated deduction and\nits corresponding international\nconference that convenes uh every two\nyears the international joint conference\non automated reasoning each car\nand so i couldn't possibly cover you\nknow begin to cover what's in\nthose conferences if you're at that\nlevel of depth you're probably already\naware of this stuff you may know more\nthan i do about it\nhere i'm just going to try to explain in\na way suitable for helping programmers\nand people\nnew to this discipline what is the\nsimplest base case i'm trying to\ndemystify it how can we\nshow what this sort of area is capable\nof because it often is presented in a\nhighly mathematical and\ndifficult to understand form so i'm just\ngoing to show the simplest base case\nof automated reasoning using proof by\nrep\nrefutation which is sort of the standard\nalgorithm i'm not going to show any of\nits embellishments or enhancements\nin particular i'm not going to talk\nabout superposition\nand this is a big advance that allowed\nfirst order reasoning to be done\nefficiently with equality and it's hard\nto do without equality so this was a big\nroadblock\nroadblock up until the superposition\nalgorithm and something called nukes\nnewth bendix ordering was discovered\nseveral decades ago and then\nsubsequently implemented in the best\napprovers\nso there's really only two steps if if\nyou want to summarize\nthe approach so first we have to take\nfirst order logic and simplify it a bit\nand so we simplify the language into\nsomething that's called conjunctive\nnormal form and that's what i'm going to\ntalk about in the next video is this\nprocess of normalization\nand once you've simplified the language\nthrough a simple\nsomewhat simple mechanical procedure\nthen you can actually run inference so\ni'm going to talk about those each in\ntheir own video\nso that was it for the introduction\nplease be sure to watch the next video\non\nnormalization and its details and if you\nlike this so subscribe and comment\nthanks very much for watching"
},
{
"title": "Taming Digital Volatility",
"transcript": "it's great to be here and have the\nchance to speak with you\num just uh whenever the slides come up\non the main screen\nwe'll go back by one there we are\num so I'll leave these links up the end\nthis is going to be a very high level\ntalk as Odessa mentioned no equations uh\nwell maybe just one or two but I'll try\nto be restrained uh and so if you want\nto dig deeper there's a lot of material\nhere open source software uh papers all\nmanner of things I'll leave this up at\nthe end\num so my central question here is going\nto be how do programmers and I.T\nprofessionals communicate about what\ntheir data elements mean what are the\ncurrent methods what are the risks with\nusing those current methods and what can\nwe do about it and in case you think\nthis is just a tech geek talk from the\ntitle in my introduction this affects\neverybody not only does it affect\neverybody because we all use digital\ndevices but even at the level of do you\never use a spreadsheet right if you use\na spreadsheet you've probably got\nheaders on your columns that are\nintended to communicate something about\nwhat the use of this data is for what\nit's supposed to mean what its\nconstraints are but the key thing is\nwith that label your your projecting\nonto your users\na level of intuition and percept\nperception that's probably unwarranted\nuh so let's start with words because\nwords is that's that's what we have to\ncommunicate mostly our data elements\nwhether it's a database labels in a\ndatabase whether it's a spreadsheet\nwhether it's a software program where\nyou're labeling a function call or a\nmethod we're using words and just a few\nillustrations of what happens when we\nuse words well if we go back a few\nhundred years Samuel Johnson was using\nsome very common words our guides told\nus that the horses could not travel all\nday without rest or meat well I didn't\nthink horses ate meat but then I looked\nup what meat used to mean and it was\njust sustenance right it was it was a\nmeal horses needed to eat something\nsubstantial and they called it meat back\nthen or a translation of Euclid's\nelements of geometry but way back in\n1570 uh great increase and Furniture of\nknowledge I didn't know my chair was\nknowledge but back then Furniture was it\nhad the alternate meaning of\ninfrastructure or support it was also\nused metaphorically even for things like\nmathematics so words change all the time\nthey also change I think more rapidly in\ntechnical communities or in\norganizations we we all are familiar\nwith sort of business lingo that\ndevelops and develops very rapidly so\nthis is not just about people hundreds\nof years ago it's about a process that\nhappens all the time it happens to us\nevery day\nso meat changed Furniture changed what\nabout different regions of the world one\nof my favorite quotes here I thought it\nwas Winston Churchill it's probably\nactually George Bernard Shaw that talked\nabout Britain and America being two\ncountries separated by a Common Language\nwe supposedly both speak English but uh\nyou know they're the common examples of\nis boot a car part or a sh or a shoe\ncompletely different in these two\ndifferent countries dinner ones at\nmidday the others in the evening or if\nwe want to then go a little farther into\nFrance we talk about entrees is that\nyour main meal or your appetizer and\nFrance it's the absolute opposite so\nthings change over time\nanybody who speaks more than one\nlanguage and I this is a very\nInternational audience which is\nwonderful almost everybody here seems to\nspeak several languages usually way more\nmany more than I do that you're all\nfamiliar with the fact that we can refer\nto the same thing in completely\ndifferent ways right different\npronunciation different orthography uh\ndifferent grammars different choices\nabout what concepts are lexicalized as\nindividual words this is just part of\nlife so it shouldn't be hard to to\nhandle the fact that our software\nsystems also have to deal with this\nright if we rely just upon names to\ncommunicate intent what if the\nprogrammer that's using our database is\nfrom a different country and speaks a\ndifferent language even a different\ncountry as close as going from America\nto Britain meanings changed so how do we\nrely on people's intuitions about words\nhow do we\nstandardize things as common as a name I\nget this problem all the time I had this\nproblem traveling here that I go by my\nmiddle name and I wouldn't you it's hard\nto imagine how such a trivial thing\ncauses so much trouble that uh people\nalways want to take that first initial\nand put it into the middle for me and\nthen they'll tell me it doesn't match my\npassport and I can't enter the country\nwe should have some standard definitions\nwe should understand words in context\ncontext is really important for\nunderstanding individual words if you\nget it wrong maybe something blows up\nprogramming okay this is an equation or\nit's one line of code so hopefully you\ncan forgive me for this and hopefully\nthere are a few programmers here so\nlet's say we have a database object uh\nit has a sub-object called all objects\nand a function called filter\nright what does filter mean well in one\ncontext it might mean filter out all of\nthe years that are less than or equal to\n2011 or it could mean do this filter so\nthat you give me all objects that are\nhave uh 2011 or greater it's ambiguous\nand yet I've seen a lot of people called\nthings filter in their program now if\nyou're lucky maybe they've put some\ncomments up somewhere in the file if\nthey had time and somebody wasn't\nbreathing down their neck to deliver the\nfunctionality but these are some big ifs\nright sort of if everything lines up\nwell if you have people that understand\nyour context and maybe your context\nchanges over time maybe you don't\nunderstand your own context it's\nembarrassing the number of times I've\ncome back to my own code five years\nlater and had no idea what I was doing\nor worse yet looked at and said who was\nthe guy that wrote this this doesn't\ntake make any sense at all this is a\ndumb way to do this even just as an\nindividual with the same context just a\nfew years can cause my intuitions about\nhow I have done something in code or how\nI've named something in code to change\ncompletely\nhow can we possibly deal with this issue\nso what are some common Solutions today\nthe most typical one is talk to the\ndeveloper I'm I'm working on John's code\nhe wrote it last year I don't understand\nwhat something means he was sloppy about\nhis comments because programmers are\nusually sloppy about writing good\ncomments and so go over to the next\ncubicle and I say well what did you mean\nhere you know what are the are there any\non constraints that you didn't talk\nabout maybe something that's not obvious\nin the code how do I use this this data\nelement well that works pretty well if\nyou're in an open plan office and\nthere's only one office and you're in a\nstartup and maybe there's there's uh you\nknow 12 people there and everybody comes\ninto the office too everybody's\nreachable what about if John Smith has\nleft the company what if you're working\nin a large multinational corporation and\nthe author was in a completely different\noffice in a completely different country\nmaybe even speaking a completely\ndifferent language how do you deal with\nthat then what if you can't get a hold\nof this person what if they didn't write\ngood comments\nthis problem happens all all the time\nand unfortunately it seems to be you\nknow I talk to a lot of people I make\nthis pitch about how we're doing\nsoftware development and how we're\nnaming things and usually the response I\nget is oh yeah we're fine right we don't\nhave that problem\num I have any time that I've ever\nconsulted for a company that has a\ndatabase or a or a software program or\nspreadsheets that's beyond say a hundred\nelements everybody has this problem\neverybody there's been no exceptions\nright because it's impossible not to\nhave this problem especially over time\nyou know maybe the first six months with\nwith one developer or five developers\nbut not five years on uh it just it\nalways happens\num and often also there's the case of\nyou know as programmers uh our job is to\njust make things work and you get\nrewarded for just making things work and\nthat also means adopting somebody else's\ncode and adding functionality on top of\nsomething and just making it work and\nnot saying here's a big problem right\nyou need to integrate two databases that\nwere developed by completely different\nentities and you need them just make\nfigure it out and you do something and\nhopefully the thing doesn't break until\nX number of months down the road when\nyou're on a different problem right and\nyou've just been rewarded for making it\nwork as opposed to addressing this\ndeeper issue by doing something that's\ngoing to require a very big change in\nthe process of software development\num so what do people do again they read\nthe code they talk to other people they\nread them documentation well that one\nmakes me laugh because uh so I remember\nworking Consulting for a very large\nFortune 100 company that had a process\nof labeling all their data and defining\nit in a central repository and about\none-tenth of the fields were actually\nhad any comments at all any sort of\nlabel and usually the comments were were\nrather brief something like filter\nfilters according to an equation that\nwould be a reasonable comment I've seen\na lot of stuff like that what does that\nmean does it filter in does it filter\nout and the challenge is that writing\ndefinitions is actually a real skill and\nthe people that are the best at this in\na certain context are lexicographers\npeople that write dictionaries this is\nreally hard to do if you were writing a\nnew dictionary how do you take a word\nthat may been may have been in use for\ncenturies figure out how people are\nusing it and distill that essential\nmeaning down to a short sentence that\nnot only says what this word sense is\nbut also what it isn't how it's\ndifferent from all the similar words\nthat one might confuse it with that's a\nreally hard skill I didn't have any\ntraining in that as a programmer I've\nnever heard of anyone who has and yet\nthat's what we're expected to do and as\na result people don't do it and when\nthey tried to do it they don't do it\nwell\nso we we're hearing about black swans\nmaybe you could look at this famous\ncrash of the Mars probe as being a Black\nSwan where there was essentially a\nmisunderstanding of data elements a\nreally trivial uh seemingly trivial\nmisunderstanding one group was\ndeveloping based on the metric system\nthe other is on the English system they\ntried to calculate the orbits and the\nright orbit was you know 50 million\nmiles away anything crashed and that was\nvery expensive and people were unhappy\nwas that a Black Swan well I would say\nabsolutely not because where was the\nmetadata this should be a completely\nobvious thing you don't store numbers\nwithout units I hate it when somebody\nsays oh the answer is a hundred\n100 what right 100 meters 100 pounds 100\nindividual people a number without any\nunits is useless that's one of the most\nfundamental pieces of metadata and here\nNASA right I used to work at Nasa\nthere's some really smart people at Nasa\nit's a great place but along the line\nsomebody ran into this problem of just\nnot writing down what they really meant\nand it really cost a lot of money and a\nlot of embarrassment\nanother problem that people run into is\nthey'll say okay we'll solve it with a\nprocess we'll solve this with proper\ndata governance will require that people\nwrite definitions right it'll be part of\nyour maybe your your kpis uh your key\nperformance indicators as programmers\nthat's a really great step so that then\nit's clear how you're being rewarded are\nyou being rewarded as a programmer just\nfor creating functionality or is it for\nthe whole ecosystem of software\nengineering around that functionality\nand one of those essential pieces\nobviously is documentation but if it's\nno if it's always the 10th thing on the\nlist it never gets done it's got to be\nsomewhere in there that that is a chief\nresponsibility and so people develop\nstandards and I use standards sort of\nvery Loosely here they're big formal\nstandards like IEEE or ISO that are\ngoing through multi-year processes with\nlots of international representative\nRepresentatives but there are standards\nthat are created all the day all all day\nlong at companies standards that are\nsmall and local but are expected to be\nadhered to in some way and there is you\nknow they'll have some process for\ndefining say what do we mean by this\ndata element what are its constraints\nwhat are its limitations and if all we\nhave is natural language for creating\nthese definitions we've already got a\nproblem because computers can't help us\na lot with natural language with all the\nadvances that are happening in various\napplications with natural language one\nthing that we don't yet have computers\ndoing is really a deep level of\nunderstanding right if a computer reads\na term like age\nyou and I can all understand what age is\nall the contexts in which it might be\nused what are some of the limitations\nfor an age right if we see age at work\nit probably means that maybe it's age of\nan employee okay well in the U.S it's\ngot to be person's got to be at least 14\nyears old to be able to work legally uh\nif age isn't going to be greater than\n125 there are all these things that you\nand I take for granted that our machines\nactually don't know and if our machines\ndon't know these things they're not\ngoing to function the way that we want\nthem to function right and if we just\nrely on busy programmers to put in all\nthese constraints from scratch every\nsingle time they write some of these\nfields we're also not going to get there\nbecause all of these Common Sense things\nthey add up there's a lot of them\nright and so let's say we try to create\na standard with these things we try to\ncreate a standard that has English\ndefinitions or any other language it's\ngoing to solve suffer from the same\nproblem and we want these definitions of\nthe things that we use in our\nspreadsheet or our database to be\nconsistent with one another how do we\nkeep them consistent well usually it's\nyou've got one person in charge that's\nthe architect and the architect of this\nstandard is responsible for saying well\neverything we've said on this first page\nis the you know consistent with stuff on\nthe on the next page and so on and so on\nfor small standards that's possible but\nwhat if we have a really big standard I\nmean there are standards out there that\nISO has that run to thousands of pages\nif it's just text how do we keep that\nstuff consistent it's beyond human\ncapacity you might assign teams of\npeople to work on this standard and keep\ntheir area of responsibility consistent\nbut how do you keep the entire thing\nconsistent with itself we need\nAutomation and oh by the way search and\ninformation retrieval is not enough\nbecause it's just searching on words\nright it's not searching on meaning we\ndon't have a way to do that yet in terms\nof machine understanding of language\nai's made great advances but it's not\nthere yet\nso here's an attempt to put into context\nwhat various people try to do to address\nthis problem so the first I've talked\nabout is socialization\nhave people talk to each other\ndevelopers talk to each other they work\nit out right if there's a mismatch they\nnegotiate and they create some kind of\ninter intermediate program that converts\none database into another database and\nhopefully they don't gloss over too many\nissues or hopefully they don't\nmisunderstanding some issues that are\nlurking in the background for exceptions\nto what what they believe their data\nmeans next level of trust and stability\nis documentation at least write it down\nthen it's not just Word of Mouth there's\na record probably your odds are getting\nbetter you know all of these things are\ngood A lot of people are down in that\nleft-hand corner where it's really\ntotally ad hoc there's no process at all\nin fact I would say 90 of the companies\nthat I've worked with are in that corner\nright they they are socialization is is\nis the only thing that they're doing\nthey're not even writing it down so when\nyou start writing it down great that\nthat's a good thing having some kind of\nprocess of data governance having a a\ndatabase of definitions is a really good\nthing having standardization having some\nprocess that you have to go through\nthat's agreed to by the developers in in\nthe company\nformalization is where I think good\nthings really have a potential to start\nto happen right this is where we need to\nbe I think at a minimum of having ways\nof defining our data that is inspectable\nby the computer and one way that we can\ndo that is with mathematical logic now\nI'm going to try to give a little hint\nas to what this might look like but I'm\nnot going to do a bunch of equations I\npromise\nokay well we can have equations for you\nlater Odessa that'd be great all right\nthe next thing Beyond just the\nspecification the formality of the\nspecification is reuse\nso I don't know that we have how many\npeople in this room are programmers or\nhave been programmers for at least some\npart of your career\nall right okay that that's great so at\nleast we've got some folks here that you\nknow you know already that reuse is an\nessential part of life for the\nnon-programmers let me try to put this\ninto a little perspective back in the\n1950s you had a machine that filled up a\nwhole room and the way you programmed it\nwas probably by flipping toggle switches\nand you were flipping individual bits\nright or if you were a little bit later\nI I wasn't in that era and I just barely\nmissed the area of Punch Cards and paper\ntape but it was almost that painful you\ndidn't have a lot of support if you\nwrote a program that delivered some\nfunctionality you probably wrote every\nsingle bit of that maybe other than like\nthe uh the tape drive access or some\nvery basic elements of the operating\nsystem well let's fast forward to to now\nright one of the things that I use as\nthe front end for most programs I've\never written is a browser\nuh now the Google Chrome is I think well\nin excess of a million lines of code I\nthink it's probably several million\nlines of code that's just one little\npiece that's what I use for the front\nend of my code and then I use an\noperating system that also has a few\nmillion lines of code maybe a database\nsystem maybe some kind of a web server\nright all of this stuff I'm reusing and\nmaybe most importantly if I'm writing in\na modern language like Java or python\nwhere I do most of my work I'm reusing a\nlot of very basic code about data and\ndata manipulation if it's Java it's the\ncollection classes well Java has a ton\nof classes let me come back to this in a\nmoment I'll just finish this bit so once\nwe have logical specification the\nbiggest thing I think that we have is\nautomation there are many forms of\nautomation I'll hint at some of them and\nthen finally at the the Holy Grail of\nwhere I think that we should be going to\nin terms of data specification is proof\nand that's what my friend and colleague\nJoseph Urban works on is figuring out\nhow to get computers to give us real a\nreal level of trust and Assurance of\nmathematical certainty that at least\nwhere we have a path from question to\nanswer or we don't have a path from lots\nof data to a contradiction in terms\nso for modern programming we have very\nexpressive languages we expect all our\nlanguages to be what's called Turing\ncomplete we expect them to be able to\ncompute any sort of arbitrary thing or\nfunction right even though there's vast\nvariation in what different programming\nlanguages do well in their very many\nspecialized languages but we expect all\nof them to be at a mathematical level\nequally powerful and almost all of them\nare nowadays\nthis is entirely distinct from\ndeclarative languages what you do in a\nprogram is to tell the computer what to\ndo you create a procedure that it has to\nfollow in a declarative language you\nsimply say this is true\nand this is true and something else is\ntrue that's what you do in algebra a\nsquared plus b squared equals c squared\nthere's an equation for you Odessa your\nfirst one\num\nyou're not you're not giving a procedure\nfor doing something with a squared plus\nb squared plus c squared you're saying\nthat that is a fundamental mathematical\nTruth at least maybe in some context\nright or if you say some uh uh something\nin the integral calculus right you're\nnot giving a procedure there may be a\nprocedure for doing something with that\nequation but fundamentally what you're\ndoing in the language of algebra or\ncalculus or number Theory are saying\ntrue things about the world and that's\nfundamentally different from programming\nlanguages and these different languages\nhave different levels of expressiveness\nif all you have is algebra you're going\nto have a hard time doing calculus well\nexcept by successive approximation but\nlet's ignore that for now\nin logic you have similar gradations of\nlogical power right some of you\nhopefully had a an introduction to logic\nor uh or or\nsome sort of symbolic calculation as\nopposed to numeric calculation you might\nhave been introduced to proposition\nadditional logic at some point that's\nhigh school awesome the very few I\ndidn't have that in high school I wish I\ndid I wish everybody did maybe you went\na little farther than you had predicate\ncalculus which is a bit more powerful\num but okay I I was I thought I was on a\nroll there for a second\nbut great there was any exposure to this\nright so logic has these different\nlanguages that have different expressive\npower it's like if you're just in\nalgebra you you can't yeah you can't do\nthis stuff you don't have an integral\nthere in your toolbox to work with and\nLogics are similarly like this I\nmentioned about Java having lots of\nlibraries so it's not just the big\nFrameworks that you use it's also the\nlittle things like the collection\nclasses or how to do file access this is\nessential as programmers there's no way\nthat we could do the kinds of things\nthat we do today without reusing\nsomething like 97 of our code and yet\nfor data design we're back in the 1950s\neverybody just writes stuff from scratch\nfor the most part that is insane we have\nto change that\nright so here's just attempted to find\nsome backup for these statistics there\nare a number of different uh uh studies\nof you know how much code is reused it\nseems to be around three to five percent\nuh is is genuinely new depending upon\nhow you calculate it for any sort of\nnon-trivial sized program\nso another thing that I would be great\nif some people had how many people\nremember back to high school geometry\nwhere you had to prove things like\nsiding side angle side\nokay awesome great uh so\nproof is really valuable it gives you an\nunderstanding that's irrefutable uh in\nmathematics and you can do the same\nthings in mathematical logic and\nalthough we might have learned in high\nschool how to do this manually and if\nsome of you went on to more advanced\nmathematics you did all sorts of\ncomplicated and sophisticated proofs of\nvarying levels of formality but now\nmachines can do some of this and so\nagain this is the stuff that Joseph\nUrban is working on with this group of\nhaving machines efficiently be able to\nprove theorems in mathematics well we\ndon't have to limit ourselves just to\nmathematics we can actually use these\nsame techniques to talk about things in\nthe real world things in our databases\ncustomer relationship management\npackages employee return management\nemployee management packages Financial\npackages just about anything we can\nthink of in programming it has terms and\nwe can use these same features these\nsame tools to create definitions that a\nmachine can actually do something with\nso not just do search not give a us just\na match in terms of names of one name is\nkind of like another one English comment\nis like another we can actually have our\nmachines prove for us that we have say\nmathematical equivalence of two things\nor a proof of of conflict between\ndifferent definitions even more valuable\nthat can head off bugs so all right so\nI've talked about the problem let's talk\nabout some of the good stuff right so we\nI think we all have this uh we had a\nlittle discussion about the one of the\nchallenges is we all like to complain\nright we like to say what's wrong what\nare we going to do to fix this well I've\nspent the last 22 years of my life\ntrying to fix this and creating open\nsource software to do so\nI've resisted the temptation to give you\nall a pitch on that software if you're\nreally interested you know let's have\nsome offline discussion I want to just\nsay there are solutions out there I've\nall of this stuff is open source I'm a\nbig open source proponent\num I may make less money at it this way\nbut I have the satisfaction of believing\nfervently even if it takes another 20\nyears I will solve this problem and have\na change in software engineering to take\nadvantage of these kinds of techniques\nand the best way I think I can do that\nis by giving it all away\nso we have libraries of Concepts and\ndefinitions so we get exactly the ReUse\nI'm talking about we have tools that\nhelp you manage the stuff they act like\nan integrated development environment\nlike eclipse or IntelliJ or any one of\nthese other packages that the\nprogrammers here may already be familiar\nwith theorem prove is the sort of thing\nthat Joseph and his colleagues work on\nlexicons because lexicons are still\nimportant I don't want to give the\nimpression that language doesn't matter\nit matters a lot it matters a lot when\nprogrammers write really beautiful clear\ncomments that mean I can understand the\ncode just by reading the comment and not\nhaving to read every painful line of the\ncode that's the worst thing when you're\njust presented with somebody else's code\nyou're expected to use it and there's no\ncomments in it whatsoever and all the\nvariables are named X Y and Z so you\nhave no idea what those are those mean\neither\nthe language that we use is important\nbut we are clear at least in the work\nthat I've done about how to separate\nlanguage labels from semantics or\nmeaning which we Define carefully in\nmathematical logic and I also wrote a\ntextbook on this stuff and there's lots\nof videos and other good stuff\num\nanother question I often get is how hard\nis it to learn this stuff mathematical\nlogic equations that sounds very scary\nI'm not a big math guy myself in fact I\ngot into artificial intelligence because\nof the time I was going through it you\ndidn't have to do a lot of math\neverything was symbolic we just wrote\nlisp code it was great right and the\nreally smart kids were going into you\nknow advanced mathematics or some kind\nof chemical engineering and learning all\nthis this really difficult stuff I\nlearned something else and it turns out\nI can't escape it I'm back doing\nequations all the time\nso it's about the same effort to learn\nthis stuff as a new programming language\nif you want to calibrate the efforts\nright because there's a big unknown here\nand I think that scares off a lot of\npeople I start talking about\nmathematical logic ooh you know right\nthat's scary but it's no harder than\nlearning python if you already know Java\nor you know if you know basic learning\nfortrans something on on that order it's\nboth learning the language the syntax as\nwell as learning the libraries\nso what are enabling features for\nmanaging volatility the thesis of the\ntalk\num it's really two things it's having an\nexpressive computable language so that I\ncan tell the computer something\nanything that I would say to a colleague\nbut put it in a formal language that it\ncan understand for some version of\nunderstand right that's that's a longer\nphilosophical discussion but we want to\nmake sure that our machines have some\naccess to the intuitions the background\nthe context that we would all bring to\nbear on understanding a particular field\nin a database and then secondly a large\nlibrary of definitions this is kind of\nhard to do it does take time programming\nis hard it takes a lot of time to do the\nonly way we survive is through reuse and\nwe should be taking the same approach\nfor information design instead of\nwriting everything from scratch\nso hopefully you won't have this\nreaction but people often do my gosh\nthis is impossible the mountain is too\nhigh I can't climb it our organization\njust can't do it we can't handle change\nand sometimes there are organizational\nimpediments\num first it isn't too hard to learn I've\ntaught high school students how to do\nthis I've had groups of Summer interns\nfresh out of high school in a couple of\nweeks I have them writing formal formal\nlogic using the packages I've created\nyou know the tools help but mainly it's\nthe process it's just not that hard to\nwrite the hard stuff is hard right I'm\nI'm not writing uh operating system\nkernels myself I consider myself a\nfairly good programmer but there are\nlevels to this right and so average\npeople can do lots of useful things\nwithout being Geniuses and working on\nthe super hard stuff that maybe only a\nfew people in the world have to write\nI've already this stuff has already been\nwritten I don't have to write a an\nontology of time and temporal relations\nanymore I've got one if I asked some\nhigh school intern to do it they'd\nprobably struggle but they don't need to\ndo it they just reuse it it's so much\neasier and then the second uh impediment\nthat I often hear about as well it's\nthere's too much change this is a change\nin process\nand especially at the local level it's\ngoing to be hard for somebody to see\nthat you know this I I have a friend who\nworks at labs and I asked him exactly\nthis question you know can I get this in\nhe understands the problem he says he\nhas this problem every day he's got a\nteam of two dozen programmers and\nthey're writing the website code for he\nsays happens every day that somebody\ndoesn't understand some field or some\nmethod that somebody else has created\nand the comments aren't good enough they\nhave to spend time talking to each other\nand working it out but then I ask them\nwell okay so you're you're spending a\nlot of money doing this he's like yep so\nwhat are you going to do about it\nnothing\nright because his job is to get that\nproject done and out the door and the\nnext person that has to use the code\nwell that's kind of his problem this is\na sad feature of modern business right\nso maybe you do have that problem and\nmaybe there's an organizational issue I\ncan't answer for you but I guarantee\nthat the sunk cost fallacy is applying\nhere or across the organization that if\nyour Senior Management could understand\nthis problem or maybe maybe I'm lucky\nmaybe you are Senior Management and\nhopefully I can introduce you to this\nissue and you can take action on it\nso they're Solutions even the hardest\nthings sometimes is possible with the\nright tools so that's the positive\nmessage I want to leave you with thanks\nfor listening and here are some\nresources\n[Applause]"
},
{
"title": "Instances, Sets and Classes Formalizing in SUMO",
"transcript": "welcome to ontology talk I'm Adam Pease\nand today I'm going to talk about\ninstances sets and classes and rather\nthan speak in just general terms I'm\ngoing to tell you how to formalize some\nof examples with these notions in sumo\nso let's take a look at the first\nexample so we had several instances of\nthe class human now the class human in\nsumo is defined and take a look at the\naxioms online that ontology portal da to\nwork so human is a cognitive agent\nhominid many of their relations hold\ntrue for a human being you can just take\na look at these axioms yourself I want\nto show you how to represent these items\nso we started off with three humans John\nMary and Stanley let's call them so say\nit's an instance of John we'll just call\nhim John one say it's very specific\nindividual with that name Stanley as\nhuman just to show you how to represent\ntheir names to keep them clear pretty\nsimple stuff so far then I mentioned the\nnotion of sets so sets have members so\nlet's say there's a particular set let's\ncall it a set John Mary Stan as an\ninstance of the class set and then sets\nhave elements so\nthis particular set on one Larry\nstay on fix that typo in just a moment\nup here okay we also mentioned there\nshould a very specific class of humans\nso let's just define the similar very\nspecific class of human so excited\nsubclass hush-hush and then we'll say if\nwe have an instance of Oshkosh human\nthen that human was born in Oshkosh\nWisconsin now we need to find the\nappropriate relation to use here and\nit's not born in it is I think\nbirthplace let's try that\nokay here it is it's a relationship\nbetween an animal and an object so I'll\nreturn here and thank yous that earth\nplace of X is this constant okay so now\nwe've just defined this very specific\nclass of human and we're actually not\nmaking any commitment that there exists\nany such human we're merely saying if\nthere is a human that is a member of\nthat class but then necessarily their\nfirst place was Oshkosh Wisconsin so\nvery different than saying there was a\nparticular human born in that place next\nwe went on to talk about processes so a\nlecture that has specific parts that can\nsay that instance let's say we used\naverage Fineman as an example one let's\ncall it as a lecture I've fixed that\nlater if lecture is not the right term\njust in the interest of time I'll assume\nthat's correct and then let's say that\nwe also have\nand acknowledging let's call that things\nthinking or and so that would be any\nthanking I leave\nso check on that later and then we'll\nsay sub process of finding and thanking\nBor\nthat's the sub process it's the super\nprocess okay so now to subclass but sub\nprocess it's a part of this temporal\nevent now we mentioned bacteria so let's\nsay we have a sub class I just call it\nstrep I don't have to type all that out\nit's a kind of bacteria where as a\nparticular bacteria let's call this\nstrep one two three four five six seven\nis an instance of strep and that's an\nindividual tiny bacterium not strap\nitself I've seen that error made on more\nthan one occasion and lastly let's look\nat water so I think you can kind of\nguess right now we might have water one\nas an instance of water may be that we\nalso have an instance of a container\nactually a fluid container and that\ninstincts of water one is contained in\nthe fluid container glass one okay so\nthis was just a quick video to show you\nhow we actually represent these concepts\nand sumo we're not just philosophical\nabstraction x' they're actually part of\na computable language with a defined\nlanguage a toolset and an existing set\nof not just terminology but also logical\ndefinitions for these things so I\nencourage you to take a look at some of\nthese notions online and eager to answer\nquestions if you have them so I hope you\nenjoyed this video and found it\ninformative if you did please like and\nsubscribe and check out the main website\nat ontology port org where you can also\nbuy a copy of my book if that's of\ninterest thanks very much for watching"
},
{
"title": "Spatial relations in the Suggested Upper Merged Ontology (SUMO)",
"transcript": "hi I'm Adam hi I'm Jenny we're back for\nanother podcast this time about space\nand spatial relations right what are we\ngoing to talk about then well let's go\nto Sigma first and why don't we look up\nthe class spatial relation\nokay well uh while you do that maybe we\nwant to explain and remind our audience\nabout the use of capital letter in uh\nSigma yeah so sigma's uh or rather Sumo\nis a programming language and so like\nany programming language it's very\nspecific about spelling and\ncapitalization uh it uses by convention\nwhat programmers tend to call Camel case\nuh because it looks kind of like the\nhumps of a camel when you have words\nthat uh uh flow together so word\nboundaries are indicated with a capital\nletter so hence spatial with a capital S\nrelation with a capital R okay and uh\nalso reminder for using Sigma we type\nSumo terms in the KB relation field if\nwe want to have a a word from English\nthen we can type it in the English word\nfield and we'll get a search on word net\nand its uh word senses right okay so\nlet's take a look at spatial\nrelation all right so class of relations\nthat are spatial as expected um get a\nlist of a lot of instances of spatial\nrelation okay a lot to choose from here\nso I'd encourage people to spend some\ntime browsing around and see what's here\nif you're going to be working on a\nproject that has a need for uh talking\nabout space and uh most practical or\ncommon sense projects will uh at some\npoint uh good idea to familiarize\nyourself with a few of these things so\nwhat what is going to be the things that\nwe're going to work on uh well why don't\nwe try to go through a couple of\nexamples of English sentences that have\na\nspatial concept embedded in them and see\nif we can try to represent them okay\nI've got one for you here okay Mexico\ncountry of Mexico it's south of the\nUnited States okay great so let's try to\nstart with collecting some\nterms so let's just make sure that we\nhave uh\nMexico okay great that is the right way\nto spell it um oh in United States so\nthat'll give us a shortcut I don't have\nto type it okay great United States is\nin\nthere um and South\nokay how are we going to represent it\nyeah so let's go back to spatial\nrelation and look at what might give us\nwhat we need so orientation orientation\nthat looks pretty likely and happens to\nbe the right answer in this case right\nbut then we have to look at the\narguments yeah and this is a\nrelationship that's a little unusual\nit's a Turner relation taking three\narguments arguments right not the usual\ntwo that's far more common another\nexample of why having an expressive\nlanguage like suok that can handle\narbitrary numbers of arguments is really\nimportant because the notion of\norientation is just\nfundamentally uh a relationship amongst\nthree things uh hard to reduce it there\nand and silly if you had to so uh let's\nsee so we got a relationship with two\nobjects and then an attribute that holds\nbetween them position yeah positional\nattribute right right so let's see what\npositional attributes we\nhave uh looks like we've got a whole\nbunch for expressing uh things that are\nin some sense a little vague or\napproximate okay right I mean we want\nSumo has a lot of facilities for that\nallow us to\nsay just exactly what we mean no more no\nless kind of like what we would in an\nEnglish conversation we talk about\nsomething being uh south of or next to\nand we don't have to give precise\ngeometric coordinates to say that like\nwe would in a geographic information\nsystem so Sumo gives us that same\nability that uh natural human language\nhas okay so let's see in this\ncase we want to look at directional\nattributes directional attributes are\nthe attributes that concern Compass\ndirections uhhuh so you can see all the\nones we'd expect including\nSouth but look at that it's NST it is an\ninstance yes South is an instance of the\nclass of all directional\nattributes okay right attributes are\ninstances right so let's go back to\norientation yeah you see that\norientation takes an instance of a\npositional attribute the domain uh uh\ndefinition here the argument type\ndefinition means that we need an\ninstance of positional attribute an\ninstance of object an instance of object\nso we've got everything we've got\neverything we need so let's go code it\nup okay\nso got our editor open or whoops need to\nopen a new document there we go so\norientation um and oh we should check on\nthe order of the arguments\nokay which go first yeah so we have an\nexample here yeah very convenient so the\ndocumentation is telling us\nthat object one in our case is the thing\nthat's going to be north of object two\nokay okay uh so in our case we're\ntalking about object one is Mexico one\nis Mexico because we're going to use the\nSouth relation of course we could\nreverse it and say United States is\nnorth of Mexico but in this case we're\ngoing to say Mexico is south of the US\nokay all right so let's type it in\nMexico United\nStates North no South oh South South\nthank\nyou great okay that's easy yeah let's do\na few more\nokay uh how about Adam lives in\nCalifornia okay uh so let's see so let's\ndo the same kind of inventory that we\nneed to so let's check on California\nthat should be an easy\none okay great Sumo has California by\nthat name that we expect um\nand lives in okay so I happen to know\nthat the term we want is home that\nreflects one's permanent residence okay\nokay so we have a human has a permanent\nresidence so let's see what a permanent\nresidence\nis that's what happened with looking up\ninto Sigma it get you look up into one\nof the words and find out the expression\nthe meaning and the uh arguments\nright right it's like any other\nprogramming language uh Library\nespecially when you're a beginner you\nhave to spend a lot of time poking\naround learning the library now that see\ncan seem like a big imposition but the\nalternative is to try to code everything\nup from scratch and that just takes a\nlot more time and it's a lot more error\nprone than reusing something that's\nalready been vetted over many years\nexctly that's why all programmers use\nlibraries and don't write everything\nfrom scratch so the same is true in this\nprogramming language uh for representing\nknowledge about the world\nokay so let's take a look at permanent\nresidence okay permanent residence is a\nkind of residence a residence is a kind\nof stationary\nartifact okay a stationary artifact has\na fixed spatial\nlocation uh and there are lots of\ndifferent ones like building would be a\ngood one okay most people live in\nbuildings all right so that presents an\ninteresting issue right now we've said\nthat home requires a building but then\nwe have to say that that building is in\nCalifornia we can't just say directly\nthe person lives in California\nCalifornia isn't a permanent residence\nno it's a geographic location right so\nwhat are we going to do all right\nso that tells us we need let's say there\nexist some\nhome um you need an instant don't we\nyeah we need\ninstance H let's call it a building\nokay and let's say home of adom is H\nH and then we want to say that that\nbuilding is located in California it's\nlocated a ter in Sumo let's\ncheck just so happens that it is ah\nright that's handy okay located object\none is located partly located at object\ntwo okay so let's go back and state that\nlocated\nH\nCalifornia oops there we go brackets\nbrackets are important brackets are very\nimportant uh if you use a text editor\nthat has uh parenthesis balancing that\ncan be handy emac does that many others\ndo uh otherwise you spend a lot of time\ncounting uh parentheses and that can be\nkind of error prone but uh in this case\nI I do have a problem if I start with\nliving and I would try to use living in\nSumo terms and start it as a process how\nwould I end up being uh doing the thing\nthat you're doing in term of using in\nterms of using spatial relationship well\nit all depends on what you're trying to\nrepresent if you're wanted to represent\nthe fact that I am living in California\nand I'm performing this action that's\nkind of what you want to represent well\nthen yes you would use a process but if\nyou want to represent the fact the\nsituation not the process then this is\nthe way to do it and of course English\nis like that uh you really have some\nambiguity and when you say I live in\nCalifornia it really does mean a couple\nof things it means I'm living in\nCalifornia there's a process going on\nI'm going about my daily activities of\nliving and surviving but it also means I\nhave a particular space faal location\nand that's just a a fact about the world\na statement that's not uh talking about\nyou know the process of living it's\ntalking about a relationship between my\nbody and the rest of the world okay okay\nall right should we go on to one more\nexample just do you want to do one more\noh yeah okay just one\nmore um how about a more difficult one\nthe arrow has pierced the uple ah okay\nso same idea here we could talk about\nWilliam Tell shooting his proverbial\narrow through the apple on his son's\nhead um but here we're going to we're\nfocusing in this uh podcast on spatial\nrelations so we just want to talk about\nthe relationship okay the spatial\nrelationship between the apple and the\narrow but how are we going to do it well\nlet's start with our nouns cuz those\nwill be simpler so look up at Sigma yeah\nso let's look up see if we have apple uh\nokay we do\ngood and\narrow ah so we don't have Arrow at Le\nbut we do have Arrow projectile that's\nactually what we want spelled a little\ndifferently that's why we have this kind\nof alphabetic list so that if you spell\nsomething wrong you get a a list that\nhopefully you can poke around and find\nwhat you actually need right okay Arrow\nprojectile great that is what we need\nokay and then the question is what kind\nof spatial relationship to you use so\nlet's go back\nto spatial\nrelation and see what's available to\nus okay so height path\nbetween connects\ncontains oh those don't look\nright um\ntraverses okay that one looks\nlikely and in fact we've got one that's\neven better penetrates is a kind of\ntraversing but it's even more specific\nwe can look\nat so it's spatially connection\nconnected it's touching and it go it's\nuh along at least one whole dimension so\nyou know it's passing through the\ndiameter of the Apple not just some\nlittle portion of it very precise yeah\nwe have whole set of axioms uh spatial\naxioms that you know traverses is either\nCrossing or\npenetrating Etc that kind of Define\nprecisely we hope um what all of these\nthings mean all right so now we've got\ncoding yeah let's start some coding all\nright um so we're going to need to\ncreate some instances yes uh of an arrow\nyes and an apple\nyes okay get our quantifier list going\nwe're going to have several Clauses so\nwe need a conjunction so\nlet's say\nthat have an instance of a arrow\nprojectile instance of an\napple and we found that\npenetrates what we wanted which one into\nwhich uh let's take a look at\npenetrates penetrates object one object\ntwo so object\none is connect Ed to object two same as\ntraverses it penetrates the peninsula\npenetrates the water here are some\nexamples you can look at the way it's\nused in other axioms also the cape\npenetrates the water region okay the\ninlet penetrates the land that just\nright to me and Adam you do have a Ru of\nthumb in terms of uh putting the\narguments together yeah so the rule of\nthumb is that the smaller thing usually\ngoes first so for example is sub ation\nhere you see that the more specific\nthing penetrates uh before the more\nGeneral thing the same for subass the\nsubass goes first uh in the part\nrelationship the the spatial part goes\nfirst and then the whole goes second all\nright so now we know that the arrow\npenetrates the Apple we'll close up a\ncouple our parentheses and we're done\nwell done\nyeah anything else you want to add or I\nthink we're all set for now I think I\nhave quite quite enough today okay great\nwe hope this has been helpful and uh\nthanks for listening bye bye"
},
{
"title": "How (and why) to Build an Automated Theorem Prover De-mystifying Logical Inference",
"transcript": "all right so i'm going to talk about how\nand why to build an automated theorem\nproverb i'm going to concentrate on the\nhow\nmy y is just for context i'm going to\ntry to move through the why quickly but\ni did want to give you some\nbackground about why to do this and i\nsee this as a process of demystifying\nlogical inference which i think is\na bit mystifying for a lot of people\nincluding myself before i started on\nthis effort\nand this is also a tutorial it's not\nintended to present research it's just\npresenting stuff that's already quite\nwell known but maybe not quite well\ndescribed\nand it lastly it is joint work with\nprofessor stefan schultz the creator of\nthe ethereal improver couldn't have done\nthis without stefan i mean all the ideas\nall the algorithms are really his\nand my help my contribution is really\njust in explanation framing\nand testing so first motivation\nuh i'd ask people to if you have any\nquestions save that to later so i can\nget through it quickly and move on to\nthe\nthe nitty-gritty of how to do this i'm\ngoing to talk about algorithms give an\nexample inference step by steps to\nexplain what's going on\ni'll talk a bit about the architecture\nand data structures and have a few\nconcluding remarks\nso first what is this what is this fair\nimproving thing\nit's that we know some things about the\nworld we believe we can encode some of\nthose things\nin a particular amount computable\nmathematical logic\nand then run at their improver to answer\nquestions and get explanations\nand we hope that this uh process of\nasking questions with the theorem\nwe'll have some predicted value right we\ncan take the things that we know\nask a question and have the theorem plus\nthe theory\ntell us something that maybe we didn't\nalready know about the world that\nis true or at least reasonable why are\nwe picking first order logic\nwell it's my contention that anything\nless than that leaves just too much\nknowledge implicit if you don't have an\nexpressive logic there's too many things\nyou can't simply can't say\nin the context of that you know\nhopefully provably\ncomplete and uh sound logic\nand we also want to be able to get\nexplanation right if you're doing any\nsort of\nuh reasoning that has a legal context to\nit say european gdpr rules\nyou're actually going to have a\nrequirement to be able to explain what\nthe computer did\nand they're improving gives you a very\nrigorous way to do that\na second point is often gotten the\ncomment or that this stuff isn't common\nyou know\npeople are communicating writing\nsomething down\nthey don't really use or need to use an\nexpressive logic you can get away with\nsomething easier\nso i decided to try to disprove that so\ni did a little study where i took 7 500\nsentences combined from the brown corpus\nand the corpus of contemporary american\nenglish tried to label those linguistic\nconstructs that were indicative of\nrequiring uh quantification or negation\nor statements of attribution or belief\nthings that\nare at least first verter logic beyond\nand i found that about 45\nof the individual statements required at\nleast first order logic\nand that of course is individual\nstatements if you try to\ncreate a coherent thought or an argument\nor a discussion about something\nit's inescapable i believe that you're\ngoing to\nhave to use at least a first-order logic\nto say anything non-trivial about the\nworld\nanother couple of characteristics of\nfirst turbologic it's sound\nmathematically i can't derive anything\nfalse from true premises\ngirdle numbering enthusiasts so please\nhold your fire\ni'm aware of that but apart from that it\nis sound\nuh and complete also we'll find an\nanswer\nwith this proof procedure at least in\ninfinite time of course that's not great\nyou'd like things to terminate in finite\ntime and the good news is modern\napprovers\nmost of the time all given uh albeit to\nthis\nthis theoretical limit most of the time\nthey do terminate and they do give you\nan answer pretty darn quickly even on\nfairly large theorists\nwhy do we want to do automated theorem\nproving well computers don't understand\nthe things that we know about the world\ni'd like to create a dictionary for\ncomputers to read\nwhere there's some shared understanding\nof concepts or terms\nand where the computer can explain what\nit does\nuh in a way that that mirrors what\nhumans would do and shows that they\nactually have\nsome you know in quotes understanding of\nthe same concepts\nand doing question answering with\nexplanation abductions is potentially\nvery powerful\nand then finally i have obviously\npersonal interest because i am the\ncreator of this\nsumo theory it's a big theory i want to\ndo practical stuff\nand using it to answer questions or\nverify data or all hosts\nof things where i need to do automated\ntheir improving with\nthat theory why do i want to create\nanother prover\nwell understanding atp i think is pretty\nhard and it certainly was for me prior\nto this\nengagement with stephan schultz the\nbarrier to entry is a lot of high there\nis high there are a lot of papers and\ntextbooks on htp\nand they generally have a lot of math\nand proofs about why some procedure or\nalgorithm or another is\ncorrect or consistent or complete but\nnot a lot about how do i actually go to\nimplement this darn thing how do i\nset up some reasonable and efficient\ndata structures and what's my\narchitecture going to look like so that\nwas what we really set out to do\nand i also feel like if more people\nunderstood the guts of what\ntheorem proving was and really how it\nwas so different\nfrom many other ways of say doing\ntextual entailment\nor machine learning based kind of\none-step\ninference from a pattern to a conclusion\nif people understood this process of\nautomated deduction\nmaybe more people would use it when\nremember the heyday of ai\nwhere everybody was hot on using this\nthing which is still very useful\nand has some distinct competencies from\na lot of the things\ncompared to a lot of the ways that\npeople are doing ai nowadays\nso our process was i was thankful to be\nable to engage stefan schultz in this\neffort he's been a friend and colleague\nfor a long time\nhe writes one of the top performing\nfirst order logic theorem provers as\nmeasured by the yearly cask competitions\ni'll talk some about that later\nso stefan wrote an original python\nversion of our demonstration prover\nand what happened was i followed along\nwith him he did some pair programming\nessentially where i re-implemented his\nalgorithms\nin java asked him lost questions we had\nweekly\nphone calls or video calls so that i\ncould learn what he was doing and why\nand how to replicate it myself\nand so our goal was ultimately to\nexplain theorem improving from a\nprogrammer's perspective\nnot a logician because there's lots of\nbooks explaining this from a magician's\nperspective\nokay so that's the the why now let's get\ninto the how\nfirst the core algorithms the core\nalgorithm really is\nresolution theorem proving um it is a a\nfairly simple rule\nso here i've just got some really\nsimplified notation that's sort of\npropositional right there's no variables\njust a b\nc and d all stand for some thing that's\ntrue in the world or that you've stated\nor true in the world or not and\nthe uh the two there are two formulas\nhere\neither a is true or not b is true or not\nc\nis true and then a second statement not\na is true or d\nis true this is how you read these\nthings\nand if the resolution rule looks for\nuh two literals that's the the letters\nhere\nof opposing signs so you want to find in\nyour collection of knowledge\nyou want to find uh an a and a not a\nand then you can apply the resolution\nrule the resolution calculus\nand it's really simple a uh sort of if\nit unifies with not a\nthen those two poof they disappear like\nmatter and antimatter in a science\nfiction way\nand you're left with everything that is\nnot a and not a\nso these two statements uh resolve and\nyou get not b\nor not c or d is your conclusion you've\nlearned something new about the world\nyou've\nhad through a entirely syntactic\nprocess mechanical process the computer\nhas now told you something new\nbased on some facts you already know so\nthat's really all it is\neverything else is in some ways a detail\nnow i'm going to give you all the\ndetails\nso let's let's do an example maybe\nthat's more meaningful than just these\nsimple logical symbols so let's say\nwe've got a proposition a we want to ask\nwhether it's true\nwhat we're going to do is refutation\ntheorem proving or proof by\ncontradiction\nthis is the way all these modern fol\ntheorem provers work we assume\nthe opposite of the thing we're asked\nand then we attempt to find a\ncontradiction\nso through this uh sort of assume the\nopposite and find a contradiction we've\ngot a nice mechanical process for the\nmachine telling us\nirrefutably uh why it the thing we've\nasked is true\nor not so in a concrete example let's\nsay we have a predicate blue\nso uh blue is says that something is\nblue blue of my car so my car is blue\nand we might also have a rule that uh\nanything that's blue\nis also attractive so blue of x implies\nattractive of x\nwhere x is a variable and maybe we want\nto ask\nis my car attractive so we start off by\nnegating that\nwe say it's my car is not attractive\nand from the fact that my car is blue\nand that blue things are attractive\nthings or if we\ninstantiate the constant my car in for\nx we can say the fact that my car is\nblue\nimplies that it's attractive then those\ntwo facts together\nyou know all we have to do is match that\nmy car is blue and\nthe premise of the rule which is that my\ncar is blue\nwe can conclude that my car is also\nattractive but remember we just\nasserted the opposite of that we\nasserted that my car\nis not attractive there's our\ncontradiction\nand if we then rewind our process of\nfinding that contradiction\nwe've got a proof uh for why in fact it\nwas\ntrue right we've created a contradiction\nby asserting the opposite\nof what we believe is true and if that\nyields a contradiction then we have a\nproof\nright so that's maybe a little\nconvoluted and why some people uh\ndon't really like refutation they're\napproving it's a little\ncounter-intuitive\nbut it is uh straightforward mechanical\nand truth-preserving and so those are\nthe the important things here they give\nus what we want a way to answer a\nquestion\nthrough a mechanical process now in\norder to get\nto the things that we need to manipulate\nuh all modern improvers also go through\na step\ncalled classification where we take the\nlanguage of first order logic that has\nseven logical symbols plus equality\nsometimes\num and reduces their number because we\ncan reduce that number of symbols\nwe've got a way easier problem to solve\nwith our software\nso in order to get started we do this\nprocess\nof normalization we create conjunctive\nnormal form\nwhich only has three logical operators\nplus equality and or\nnot it has the added benefit by the time\nwe're done with this process we've got a\nvery\nflat structure a nice a nice fixed\nhierarchy we've got\nclauses sort of our statements about the\nworld and clauses\nare sets of literals uh i'll talk about\nwhat a literal means and then literals\nin turn have\nhave terms constants or variables or\nfunctions\nand it's just simpler to write approval\nwith fewer operations so\nall right so let me give you a concrete\nexample of inference now and then we'll\ngo\ninto how actually to do it mechanically\nas we go along\nincluding classification so let's say we\nhave this cartoon\nof three animals we have an ostrich uh\nostrich one\nelephant one and ostrich two uh\nelephant one is to the left of ostrich\ntwo the two symbols on the right\nand ostrich one is to the left of\nelephant one\nand what we wanna ask is this very\ntrivial statement but good for this\nexample\nthat is it the case that ostrich 1 is to\nthe left of ostrich 2. that's the thing\nthat's that we want to conclude\nwe want to ask it and conclude it and we\nhave one rule\nthat is just the axiom of transitivity\nfor these\norientation statements if there's an\norientation between x and y\nand the same orientation holds between y\nand z then that\nor relationship also holds between\nx and z right so the arrow is a an\nimplied implication\nstatement in this particular syntax\norientation is the predicate and it's\nfollowed by\nin this rule uh three three arguments\nand in this rule they're all variables\nright the thing the two things that are\noriented to each other\nand question mark are the third argument\nis\nuh the orientation and in this case\nwe're just using one kind of orientation\nleftwardness so first we do our\nnormalization that i talked about\nwell we want to get rid of this\nimplication sign and do another couple\nof things to make this rule simpler and\nbecause our problem's so simple the\nother facts are already\nas simple as they can be we don't need\nto touch them we're just going to worry\nabout normalizing the rule\nso the first kind of rule of inference\nor normalization that we apply\nis that a implies b is logically\nequivalent to\nnot a or b right so that allows us\nis going to allow us to get rid of this\nimplication sign so\nthe first argument to implication is a\nconjunction\nuh the and of orientation x y r and\nuh y z are and then there's the\nconsequent of the rule that's the second\nargument or what\ncould be considered b for this\nnormalization rule\nthat's orientation xzr and as you can\nsee with the arrow\nwhat we've done now is translate it that\ninto we've taken\nimplies a b and turned it into not a\nor b and we're using a prefix notation\nhere so or\ngoes around at the beginning of its two\narguments\nright now if you're not already familiar\nwith this\nthis rule of inference that a a implies\nb equals not a\nor b try it with a truth table or i've\ngot a couple of the videos that walk\nthrough this but hopefully\nfolks have already seen this before it's\na it's a very basic\ninference rule and it is logically\nincorrect okay next thing we need to do\naccording to the classical normalization\nalgorithm you can find this\nalgorithm in russell and norbegg's ai\ntext by the way\nif you want to review it yourself the\nnext thing we do is move negation\ninwards\nbecause our goal is to get a disjunction\nof\npossibly negated literals that's the the\nend target for\nconjunctive normal form normalization so\nhere the arrow shows that we are\nmoving this negation that's just below\nthe or\nthe or the outward or out outermost or\nstatement\nand we're pushing it in into the and and\nwhen we do that push we follow\nthis this rule that you see\nin the lower right that not a and b\nis the same as not a or not b\nwe're sort of we're flipping the\nconjunction to a disjunction when we\nmove the negation inward is mechanically\nwhat happens so we wind up with\na disjunction of two arguments and that\nfirst argument\nis in itself a disjunction a disjunction\nof two negated\nliterals not orientation x-y-r not or\nin the orientation uh y-z-r\nand then the second argument to the\nouter disjunction is the orientation\nxzr there are four more steps\nthat we don't actually have to follow in\nthis example but again are detailed in\nrussell norvig's book things that only\napply\nif we have quantifiers which we don't in\nthis particular statement\nwe'd want to standardize our variables\nmove the quantifiers left\nskolamize is the technique for getting\nrid of existential quantifiers\nand then we want to distribute our and\nour disc\nour conjunctions over our disjunctions\nbecause we want to wind up again with\na disjunction of possibly negated\nliterals\nand then the last thing that we do\nactually need to do\nis uh flatten any nested conjunction to\ndisjunctions in this case we have a\nnested\ndisjunction we have an or of another or\nand so instead of\na hierarchical sort of tree of ores\nwhere there's only two arguments\nwe can have a single order that has\nthree arguments and that's what we wind\nup with in the lower left-hand side\ngreat so we're we are done with\nnormalization now we can actually get\nstarted\non the the kind of the meat of theorem\nproving if you will\nuh so we've got two statements uh a\ntransformed rule that's now just a\nlarge disjunction and we've got our\noriginal query that we\nwe're trying to find out whether ostrich\none is indeed to the left of ostrich 2.\nbut remember of course we're doing\nrefutation theorem proving so we have to\ndo\na negated query so we negate our query\nthere we are\none other thing that i need to mention\nis unification anyone who's done prolog\nprogramming course is intimately\nfamiliar with this but\nbriefly it's just the process of trying\nto see if two statements match\nand they can match if they have an\nidentical\nnumber of arguments if arguments\nthat are uh instantiated or that are\nconstants\nuh match exactly or if we try to match a\nconstant\nterm with a variable right so that's\nwhat you see depicted here we're going\nto start out by trying to match the\npremises of our rule\nessentially and match them with the\nfacts that we know and if\nwe were to do that here with this pair\nthat you see with the four arrows\norientation matches perfectly and we get\na substitution set\nof x becomes element one our elephant\none\ny becomes ostrich two and r becomes left\nyou can see that\nthat uh variable pairing with constants\nat the lower right\nokay so we're just pairing these these\ntwo literals that you also see\nreplicated in\nthe middle of the page on the right and\nthere is a key\nrequirement that there are no\nsyntactically shared variable names so\nsometimes you\nmight you have in practice you wind up\ndoing variable renaming to make sure\nthat syntactically\nall these variables are distinct but\nthey are different statements and the\nscope\nof variables is within a statement so\neven if they they were to share\nvariables they wouldn't in reality they\nwould just look like they do but to make\nthe mechanical process easier\nwe just uh in in practice always rename\nour variables\nhere i won't do that because it just i\nthink adds confusion so\njust uh you can i've already ensured\nthat\nthe variable names are in fact distinct\nso another thing we need to worry about\nis what do we try first this is a search\nproblem\nso in the simplest version of the prover\nwe're just going to pick\nthe first statement that comes into our\nhands\nand see if it resolves with anything\nelse\nso uh we wind up with sort of two lists\none that we call to be used and the\nother is the rest of our knowledge base\nand we we put everything in the\nknowledge base and we initialize our to\nbe used list\nwith the negated query and that's that's\nwhat we're showing here\nall right negated query is to be used\nwe've got our our transformed rule\nand our two statements in the knowledge\nbase\nand our goal is to find a pairing\nbetween the thing that we pull out of\nthe\nto be used list uh and a\nnegated literal that also appears\nunnegated in the in the the clause that\nwe're\nuh concerned with that we've pulled it\nout of the to be used list or vice versa\nwe look we've got a negated literal then\nwe search for a positive letter\nright and in fact here there's only one\noption we we can't get a resolution out\nof\nthe two statements in the knowledge base\nonly the the original rule\nand just one part of the rule and so\nhopefully you can see how\nuh we've got one positive literal in the\ndisjunction\nthat is the rule in the knowledge base\nand in our to be used list that we're\nfocusing on\nwe've got a negated version of that\nliteral they unify\nand with the following substitution for\nx z and r that you see at the lower left\nand great then we've satisfied the\ncondition of the resolution rule\nand we do the substitution all the way\nthrough\nthe rest of the rule right so we had\nvalues for x z and r but not for y and\nso we go ahead and we\ninstantiate all of those substitutions\nexcept for y which we we don't have any\ninformation about\nand we get the following now we've got\nour negated literal and are positive\nliteral\nand poof matter and anti-matter cancel\neach other out those go away\nand we're left with this station\nstatement in bold at the upper right\nand that becomes the result of our\nresolution so we actually move it then\ninto our to be used\nlist and we go through this process\nagain see do we have\nwe have a disjunction of two negative\nliterals and to be used\nin our knowledge base we have uh two\npositive literals that we can test to\nsee whether unify we just let's pick the\nfirst one\ncould have picked the second one as\ndepicted by the gray arrow\npairing but we're just gonna start with\nthis one that's in blue\nuh see if they unify that we do have\nnegative and positive literals uh\nostrich one\nis the same as ostrich one uh question\nmark y matches with elephant one\nand left matches with left so they're\nunifying great\nwe do the the same uh thing of\ndoing the substitution for y\ny gets elephant one there it is on the\nleft\num and now these two cancel each other\nout\nand we're left with the following and\nwell what do you know they\nwe've got a negative literal and a\npositive literal there i\nthe literals are identical we've got our\ncontradiction we've got an\nanswer uh and if we kept track of\nthe inferences in our resolution rule\nthat led up to this\nthen we also have a proof of why\nirrefutably the\nanswer follows from the question and the\nfacts that we know\nso great that's that's a whole simple\nmechanically uh processed uh\ninference in first order logic and the\nway we do that\nis with this simple architecture this is\numl diagrams not too many people do uml\ndiagrams\nnowadays but i like it because it really\ngives me an overview of the\nthe whole architecture the hollow error\nis a containment relation so one class\ncontains instances of another class\nand the solid arrow is a calling\nrelationship so one class\ncalls a method in another class and this\nis this is the hello world\nof first order refutation they're\nimproving this is all there is to it and\nthere's also a nice symmetry here for\nuh as i'll talk through each of these\nclasses but it kind of goes bottom up\nin containment from terms to literals to\nclauses to clause sets\nand then the classes that do the actual\nwork\nsimple proof state res control\nresolution unification and substitution\nkind of work from the top down\nwe start with a set of clauses the\nresolution control\ndeals with picking out individual\nclauses resolution\ngoes through the literals and resolve\nthem unification\nuh tests whether literals actually unify\nand substitutions finally do the term\nsubstitution so there's this beautiful\nmirror effect around the\nmiddle of this architecture again here\nthis is all thanks to stefan having\nworked\nout the simplest possible approach over\nhis decades of working in this field and\ni've just sort of\ncodified it or explained it a bit so\nwhat are terms\nterms are constants variables or\nfunctions\nthey denote something in the real world\nso a\ndenotes something in the real world the\nvariable stands for kind of an empty\nplace in which we can put\nsomething that's denoted in the real\nworld and functions are functional terms\nso the gum\ngovernment function of the united states\ndenotes the government of the united\nstates\nright they're not true or false they\njust are what they are they point to\nsomething in the real world\nat the next level up literals do have a\ntruth value\nand literals are composed of terms so we\ncan make the statement that cocoa is a\ngorilla\nor the government has one one million\npeople in it\nin the us or that mary doesn't like bill\nliterals have truth values but terms\ndenote something and don't have a truth\nvalue so that's a key distinction for\nespecially for people starting out\nauthoring stuff in logic at least in\nfirst order logic\nuh clauses uh at least as we manipulate\nthem in this prover are\ndisjunctions of possibly negated\nliterals so\nhere is something that could have\noriginally been an implication or a rule\nthat\nif a likes b then b likes a and\nsets of clauses they're implicitly a\nconjunction the collection of all things\nthat we know in our knowledge base\nprover one is really simple this is our\nfirst version of our hello world fair\nimprover\nand it just initializes the proof state\nit initializes our\ntwo lists the to be used list and the\nknowledge-based list\nit just puts the negated query in our to\nbe used list and says that's the focus\nfor now\nand everything else has to be tested\nagainst it very simple\nuh before i go to the rest of these\nclasses i need to introduce one more\nvery simple algorithm all very\nmechanical\nuh very syntactic but a key part of the\nproblem\nit's called factoring and the\nmathematical expression that i'll be the\none thing\nmathematical non you know straight logic\nuh expression that i'll throw at you\nis this one at the upper left where the\nthe line is sort of\nthe derivation via a rule a rule of\ninference\nwhich is that if i have uh\ntwo literals that unify\nthat are of the same polarity right\nthey're either both negative or they're\nboth positive\nthat i can eliminate one of them\nso if if if\na and b unify\nthen i can eliminate one of them and\napply the substitution from that\nunification\nif there's a variable substitution that\nresults throughout the statement\nsigma is the the operation for\ncreating a performing a substitution so\na concrete example is if we have g of x\nor f of x or g of\na i can unify g of x which has a\nvariable and g\nof a which is a function on a constant\nand i get the\nsubstitution list of x is replaced with\na\nand as a result i can get f a or g of a\nit's a simpler statement it has only\ntwo literals instead of three now this\nis really important because resolution\nyou can generate\nvery long clauses as a result of\nresolving two statements and combining\nall the things that are left over that\nthat aren't the negated and the positive\nliteral that that are the mad they're an\nantimatter that explode and go away\nand so you need to be able to simplify\nuh clauses mechanically this gives you a\nway to do that that's\ncorrect and consistent\nso we have in addition to prover one is\na\nsort of an action class we have simple\nproof state\nwhich just cycles through trying to pick\na clause from our\nunprocessed or to be used list it\ntries to compute uh factors and it tries\nto compute\nresolvence so the factors simplify and\nthe resolvence hopefully also simplify\nbut sometimes they make actually things\nmake more complicated statements as a\nresult so we need both\nres control then looks at\nthe given clause that's been supplied by\na simple proof state\nand checks pairs of literals to see if\nthey either have\nif they're suitable for factoring or\nsuitable for resolving\nresolution does that actual resolution\nand\nfactoring of a clause with a given pair\nof literals for factoring\nor a particular resolvent\nand the given clause and it looks at\ntheir literals for doing resolution\nunification i've already talked about\nwhich is a necessary process for\ndetermining if literals\nactually can be resolved or factored and\nthen we have a class substitution which\nactually performs the substitution of\nvariables either a constant for a\nvariable or one variable for another\nvariable\nso that's it for the hello world now\nwe're in the realm of what\nwhat can we do that's more efficient\nthan that and there are three things\nthat we can do\nthat are very basic very mechanical uh\neasy individually to understand but have\na huge impact\non how well this this proverb performs\nwhile still being truth preserving\nand complete so the first thing is we\nhave choices\nat every step we have choices about\nwhich clause do we choose to resolve or\nfactor which do we look at\nnext and when we're doing uh both\nresolution and factoring we also have a\nchoice about which literals\nto pay attention to we can order them\nand pay attention to the\nbest ones or the likely best ones that\nwill get us to a simplification faster\nand we can even do that at the level of\nterms so these are all\nselection choices and we've got\nheuristics for how to do that\nwhile still again being complete we want\nheuristics that\neventually we'll get the right answer\neven if we guess wrong\nbut are more likely to give us a guess\nthat gets us to a conclusion faster\nwe also have one other simplification\nthat in a way is\nis uh kind of like factoring that's\ncalled subsumption\nbecause we can generate with resolution\nthings that we already know uh we don't\nwant to do that and we can also generate\nthings that are subsumed by things we\nalready know\nand so uh we we want to make sure that\nwe don't keep those redundancies because\nin our mechanical process that just\nmakes our search space bigger if we\nconsider them we'd like to get rid of\nthem\nand we can do subsumption both backwards\nsaying oh we just generated something\nthat allows us to remove more limited\nstatements that we already know\nbackwards assumption we can also do\nforward subsumption\num we've just generated something that\nis actually subsumed by something we\nalready knew before it was not a useful\nresolution\nso both of those directions are good\nideas although\ni believe it's that uh backward\nsubstitution is\nis uh has a bigger impact um i check on\nthat if you're really interested in the\ndetails\nand then lastly we can be smart about\nhow we search for things\nuh we actually one of the things we do\nthat has a nice impact\nis uh keeping a a suggestion list in a\nway\nof literals that might resolve so we can\njust look at whether it's positive or\nnegative and what the predicate is as\nopposed to all the arguments and that\ngives us a quick first cut if we know\nthe predicate matches\nand we're trying to look at a resolving\na negative and a positive literal\nthen it's worth looking at the full\nunification of all the arguments\nright so that's indexing so here's our\nnew argument\nour new architecture we've just added a\nfew classes\ninto our structure one thing is uh the\nability to backtrack\nso if we're just uh picking and choosing\nwhich literals to look at in either\nresolution or factoring\nwe may not have to consider everything\nwe may we want to be able to fail fast\nand fail partially without considering\neverything if we're doing this kind of\nordering and then deciding maybe we come\nback to it later\nso we need a way to do that keep a stack\nof of of uh\npossible substitutions as we go and the\nability to backtrack from it\num now that we're not just going in\norder through all the clauses trying\nthem all\nbut looking at them heuristically\nordering them\nthen we need a heuristic clause set that\nalso has a clause\nevaluation function that gives us a way\nto choose which\nuh clause to consider next for\nresolution or factoring i'll talk about\nthis some more in a moment\nwe're also going to add in the ability\nto to generate proofs\ni've talked about that we keep this\ntrack uh keep track\nof our resolutions over time and if we\ndo that\nthen at the end we want to be able to\nkeep only those resolutions that led to\nan answer because we'll do\nlots of resolutions and a lot of them\nwon't actually lead to the answer\nleave somewhere else else off in the\nsearch space to a dead end\nso we want to ignore those and then\nlinearize our proof\nbecause we'll wind up with the sort of\ntree of resolutions\nbut we want to limit linearize that so\nproof state helps us do that\nand then lastly we have indexed clause\nset which gives us\nindexes into the various\nstatements that we want to be able to\nwork with in order to speed up our\nprocess of searching for\nresolvence and factors\nso in a heuristic clause set i'll just\ntalk about\none of our possible evaluation functions\nwhich is symbol count evaluation\nreally simple very mechanical right and\nwe just\nhave a call to a routine called term\nweight\nit takes a a formula\nthat formula then has two arguments\nabout the relative weight that we give\nto symbols function symbols\nor constant symbols we treat them\nidentically and\nthen this the third argument here is the\nweight that we give to variables\nand typically stefan is found just\nempirically through all his years of\nwork on this\nbut having a function weight of two and\na variable weight of one\ngenerally kind of guides us guides the\nalgorithm in the right direction\nso just taking a look at the first\nexample so if the formula is\nf of a a and b uh our\nuh constant or function\nweight is one our variable weight is one\nwell there's no variables there's just\nthree\nsymbols one is uh one is a real function\nthe other two are sort of degenerate a\nfunction with no arguments\notherwise known as a constant term and\nwe multiply that by one we get three all\nright\ndown in the third bullet we have a\nvariable\nx the variable weight is one there's one\nvariable with a weight of one the answer\nis one and so on right so you know not\nterribly exciting or complex but\nreally makes a big difference in how we\nchoose which clause to worry about\nwe want to choose clauses that are small\nfor some measure small and this is how\nwe measure small\nso you don't have to take all just my\nword for it that this is\nuh sound and complete and that we've got\na good implementation we did a big test\nbecause we have thank goodness professor\njeff sutcliffe's\ntptp or thousands of problems about\ntheir improving\nuh collection which is used every year\nto\nrun his competition cask the\ncomputer-aided\nsystems competition i think it stands\nfor where all the\ntop finger improvers in the world can\ncompete or at least all the ones that\nwant to enter the competition\nand it's it's great it's been going on\nfor a long time and so we ran\nboth pires and javarez over about 16\n000 different problems we ran on jeff's\nstar exec\nserver farm so it's feasible to do these\nuh they get done overnight\nuh for a corpus this size if i tried to\nrun on my laptop it could take weeks so\nyou know big big shout out to jeff for\nproviding this resource\nand then we see a comparison between\npires and java resin\nand three other provers so one is e\nstefan's own\ntop performing prover you can see that\nit's it gets a lot more answers it does\na lot better than our new very\nsimple provers but high res and java is\ndo pretty well compared to prover 9 and\nbetter than leancom which are other kind\nof representative not\ntop performing improvers but they've\nbeen around for a while and they're not\nbad\nand so this very simple implementation\ndoes quite well\nand also uh you know i'm a bit of a java\npartisan\nuh so i'm gonna give a plug for java as\nbeing really a lot faster than python it\nwinds up if we compare just the problems\nthat both systems answered successfully\nand look at the times\nuh javarez is about five times faster\nthan python they use exactly the same\nalgorithms uh albeit\nmy implementation is probably a bit more\nawkward and\nyou know stefan is just an amazing\nprogrammer as a privilege to work with\nhim doing pair programming\nso maybe java could have been even\nbetter if i was as good as stefan\nbut it's pretty darn good\nhow long did all this take uh it took\nabout three months of full-time effort\nand we started this work way back in\n2011 or 2012 so i tried to go back over\nour\nemail history to remember exactly you\nknow was i working on this full time or\nhalf time\nuh how much time did i put in because\nthen i i had to make a living\nafter a brief start on this and my\nattention got went elsewhere and i put\nit on the shelf for a while until\nthe pandemic gave me a big opportunity\nto really devote uh full-time on this to\nfinish it up over about a\nmonth month and a half um so i i\nestimate that i had about three months\nof full-time effort doing this so i\nthink it's\nreally feasible as a\nsemester possibly two semester course\nespecially if you did a semester on\nwriting logic and\nthe fundamentals of first order logic\nand then did\na semester on just implementing a fear\nimprover\nand that's actually what stefan does\nwith his own students uh so he started\nto find that\nthis really works it's a great way to\nget people up to speed\non how to write up their improver how it\nworks and at least some percentage of\nstudents will come out\nwith of the course with knowledge about\nhow to do this themselves and maybe some\nproject ideas for a good thesis\nuh on doing proving in a new way a\ndifferent way adding some enhancements\nor so forth\nand i did exactly that myself because\nnow\ngreat i understand they're improving\ni've got approver i wrote myself\nwhat can i add on top of it hacking is\nfun and so i\nadded the another version of how to do\nconjunctive normal form normalization i\nadded the sine axiom selection algorithm\nthat christoph hodar wrote to deal with\nlarge knowledge bases\ndid some work with proof visual proof\ngeneration of course the upshot of this\nis now\ni've got a prover that's not quite so\nsmall and elegant as pyres\nbut it does illustrate how to do the\nsome fun add-ons\nso it's about a little more than doubled\nthe size of pyrus of course pyruvate\nalthough python is a little slower\npython is arguably considerably less\nverbose than java so that's another\nimpact\nthat happened here that that makes java\nthe java version bigger\nand if you look at just lines of\neffective code that ratio also holds if\nyou take out all the\ncomplements and the fluff and the unit\ntests and so forth\nunit tests were another huge thing uh\nthat i found\nthat uh i had a number of\npoints during this work where i didn't\nquite understand what stefan had\ndone and so i needed some more\nexplanations we added some more unit\ntests to explain\ncarefully some of the algorithms\nespecially things like\nindexing and the more more complicated\nuh\nclause selection functions that we\nimplemented so another\nbig end result of this is just lots of\nexamples\non how all these algorithms work and the\nexamples are implemented as unit tests\nboth in python and java\nso i'd like to think that's a a\nsubstantial\npractical contribution to this area\nwhat is it what is a unit test oh sorry\nunit test\nis just a a test that you write to make\nsure a portion of your code worked well\nright so it could be you have write a\ntest you write a routine\nuh this could this is follows in lisp as\nwell as java and python or c\nplus plus you write a routine that tests\nwith an example\nto see if some portion of your code gets\nthe right result\num and both java and python actually\nbuild this into the language\nso you have unit test suites it's a\npractice\nkind of a standard practice i think in\nmodern large scale software development\nand industry\nthat i had a team that really turned me\non to this\nin using the junit framework for java\nit's just it's great you make a\nmodification you rerun all your unit\ntests\nyou wind up getting a huge library of\nunit tests and if you break something\nwith an addition\nthe unit tests tell you immediately you\ndon't have to just figure it out\nor code it right the first time because\nerrors are inevitable\nso uh i think the conclusions are it's\nfeasible for a novice like myself\nto to write an atp system albeit i think\nyou need to have a pretty solid\ngrounding in logic and i've been writing\nlogical statements in sumo for two\ndecades so\nit was really comfortable for me to\nwrite examples and test them and so\nforth\neven though it was brand new to the\nprocess of automated theorem proving\nit performs pretty well even a pretty\nsimple system\nat least compared to older for fol uh\natp systems\none big thing that we lack is the\nsuperposition calculus for equality\nthat was a game changer for efficient\nhandling of equality\num thanks to you know work by bachmeier\nand gansikar\nand uh newth and bendix all contributed\nto this\nit changed they're improving it means\nit's it's feasible to do\nwork with equality in efficiently a\nshort amount of time\nall the major top pro provers like\niprover and\neprover and vampire all have it and our\nsystem doesn't because that would just\nit would be very complicated i'm hoping\nstefan will teach me how to do\nsuperposition\nand we'll do re-implement this whole\nsystem again if we both have time\nand it'll certainly perform better on\nproblems with equality and you can\nactually see that in our test results if\nyou\nwant to go over those uh together maybe\noffline\nand fast another conclusion is faster\nlanguages help java wound up being\nbetter not because the algorithms\nwere better just because java was faster\nbecause of the bytecode compilation\nand so certainly c plus plus or c\nimplementation would be much faster\nand that's why vampire and eprover\nare written in c and c plus\nso you know big thanks to stefan\ncouldn't have done this without him you\nknow it was like having a phd advisor\nnow he tutored me through all this it\nwas just fantastic and loads of fun i\nlearned a lot\nso thanks thanks stefan and i'll just\nconclude here\nwith some some links here um the first\nlink is\nmy main research site where i post sumo\nand\nlinks to sumo then we've got two github\nrepositories so my\nrepository is ontology portal and\nstefan's is improver so we've hosted\njavarez and pyrez on those respective\nsites you can download them and play\nwith them and run the unit tests and see\nhow they work\nand also run them over the tptp problems\nwhich is really\nreally fun to do i've got lots of\nyoutube videos\nuh trying to explain all this stuff\nabout ontology and theorem proving and i\nadd more every week i've also done a\nbunch of interviews including one of\nstefan recently\nand if you want to see the academic\npaper result uh stefan did the first one\nof a pair here on pires and\nwe've recently submitted a paper on java\nas we'll see if that gets accepted the\nreviewers kind of\nwere a little skeptical that this was\nreally new research because it is just a\nre-implementation of iris so\nso we'll see if they like it and if that\ngets published so\nthat's it and i'm open to questions\nwe'll pause the presentation here and\nreturn in a subsequent video\nfor the questions from the audience\nyou"
},
{
"title": "A propositional logic proof with E",
"transcript": "welcome back to ontology talk I'm Adam\nPease and I'd like to do a set of\nfollow-ups to my recent video on\nunderstanding different logics\nby providing some detail that there\nreally wasn't time to fit into the video\nthat was already getting a bit too long\nso let's just look at a couple of the\nproblems that I explored on that video\nthat are drawn from Jeff Sutcliffe's\ntptp thousands of problems about their\nimproving and the first one that I went\nthrough was a simple puzzle in\npropositional logic and so if you\ndownload the problem set from tptp you\njust go to tpt.org and get it and this\nfirst one is puzzle number four dash one\nI presented the English text which is\nrepeated here in the problem format all\nthese problems are you know very well\nstructured very well documented as to\ntheir origin and so forth here there's a\nspecific bibliographic reference to\nLewis Carroll\num all the comments in this file are\npreceded by a percent sign\nand we get down to the actual meat of\nthe problem here and I thought I should\njust take a few moments to try to\nexplain uh you know give a quick\nintroduction to tptp syntax so the first\nthing that you see in a tptp language\nfile the first thing you're going to see\nis the the type of\nthe statement that is being shown so\nhere it's CNF it's conjunctive normal\nform\nand the next thing you see is in a given\nstatement is a name the name is\narbitrary if you've authored the file\nyou can give it whatever name you want\nit's not actually strictly required as\nfar as I know for that name to be unique\nin the file but it's certainly\nbeneficial for it to be unique so that\nyou can track back to your authored\nversion later when you see a particular\nproof\nthe next thing that you find\nis going to be a keyword that describes\nwhat sort of statement it is\nif it's Axiom that's generally what you\nuse just for things that you author and\nif you see a keyword in this place in\nthe proof\nthen you'll see a couple of different\nkeywords and we'll get to that when we\nwe cover the proof output\nanother key word that you'll also see is\nconjecture we'll get to that at the\nbottom of this file so probably only two\nkeywords that you need to worry about\nAxiom and conjecture\nand then you see the formula in tptp\nformat these are all valid prologue\nsyntax\nwhich is a combination of infix and\nprefix notations logical operators are\ninfix and your user-defined relations\nand functions are going to be prefix\nalso with\nprologue syntax you have capitals are\ngoing to be variables and lowercase\nthings are non-variables they're just\nterms\nhere we see a disjunction so the\nvertical bar just like in many\nprogramming languages stands for or it's\nthe or operator the tilde is the not\noperator and an ampersand sign although\nwe don't see it here in any of these\nstatements is the and operator so kind\nof mimicking Java except Java uses the\ndoubled Ampersand and the doubled\nvertical bar instead of single\nso here this says that it is true that\nnot dated or on blue paper\nyou have to balance your parentheses and\nthen every statement is ended by a\nperiod again valid prologue syntax\npretty much the same sort of syntax here\nuntil we get down to the end\nwhere we see another keyword hypothesis\nI'm not actually all that familiar with\nhow that is different than Axiom it\nseems as far as I know to to have the\nsame function as just Axiom it's a\nstatement that you provide maybe Jeff\nwill give a little more detail or I can\ndig up some more detail for everyone but\nfor now let's just treat it as Axiom\nand finally you can have either\nconjecture or negated conjecture if you\njust type in the conjecture the systems\nthe theorem proofers will actually do\nthe negation for you because we're doing\nnegation uh proof by negation or\napproved by refutation where if you ask\na query then your query is negated and\nthe system attempts to find a\ncontradiction between the negated\nversion of what you've asked and\neverything else that it knows so you can\ngo ahead if you want and just negate\nyour own conjecture and then it doesn't\nneed to do that step for you\nso that's what a typical simple\npropositional logic file\nlooks like using just this conjunctive\nnormal form because for propositional\nlogic you don't need anything other than\nconjunctive the conjunctive normal form\nlanguage that's the least expressive\nlanguage in the tptp family\nand then for this file we can go ahead\nand execute a theorem prover on it so\nlet's take a look back and where I used\ne-prover\nand we'll grab that command\nhere is the command that I used and\nand we'll just copy that\nand we'll\ncall this particular puzzle puzzle zero\nfour okay there it is it should take a\nmoment to explain\nwhat we're doing here with the improver\non the links to my last uh talk on\ndifferent Logics I also included in the\ncomments section\nwhere the URLs where you can download\nthe e-proofer content it's on GitHub and\nthe compile takes a little while but\nit's it's very simple that's just a\ncouple of make commands\nand E has a lot of options I'm not going\nto go into all those options here I\ndon't really use very many of the many\nof those options this is my standard\nconfiguration where I select auto\nschedule that just means sort of pick\nyour best option for finding a good\nproof there are various ways to direct e\ndirect its search process and they can\nget quite complex they're very\nsophisticated there's a lot of stuff\nthere for people that are interesting in\ntheorem proving as a discipline but if\nyou're just interested in getting an\nanswer getting approved to a particular\nproblem I would Advocate just using Auto\nschedule then it takes care of all of it\nfor you it's a really nice nice\nparameter so you don't have to worry\nabout things\nthen there's a command to say\nspecifically I want a proof the theorem\nprover is a little bit faster if you ask\ndon't ask it to give you a proof\nbut if you want to see how it did what\nit did and really validate in fact that\nyou're getting the kind of answer that\nyou thought you wanted well then it's\npretty good a pretty good idea to select\nthis proof object option and then you\nget the name of the file that you're\ngoing to be doing a proof on which is\nwhat we were just looking at\nso if we run it runs blindingly fast for\nthis a very simple proof and we get the\nproof that I was showing in my last talk\nand let's just walk through it briefly\nfirst\nwith this set of options gives you a lot\nof sort of background meta information\non what it's doing\nthings about the machine that you're\nrunning on it tries to take advantage as\nmuch as it can of the hardware that you\nhave and then it regurgitates the file\nthat you've given it\nand if you're lucky uh and if you've\ncreated a problem that is solvable as\nthis one is\nit tells you profound\nand then it gives you that actual proof\nand the proof starts by really just\nagain regurgitating all the things\nyou've told it\nright and you can tell that because for\neach one of these statements as its last\nargument to the prologue relationship\nCNF\nit's given you a file keyword here and\nthe specific file and then the name of\nthe the Axiom from that file so here\nwe've called it with puzz 004-1 and\nthat's what it's telling us and it tells\nus that for uh the first this first\nchunk of of a number of statements a\nnine or ten statements something like\nthat\nand then it starts telling you about all\nthe axioms that it's actually picked for\nthe proof so here uh this first one\nbegins with dear sir it's essentially\njust copying this statement and it's\nrenamed it it has this incremental very\nsimple naming scheme it's automatically\ncome up with this first argument is its\nnew name for the proof or the Newton\nname for the statement and again it's\njust an axiom it's something that you've\nauthored as well as the hypothesis is\nsomething that you as the supplier of\nthis file have authored\nfirst real interesting statement in the\nproof that we come to is marked plane\nplane just means that it's plain output\nthe system has created this deduction\nbased on the rules of logic for this\nparticular logical language\npropositional logic which is a subset of\nfirst order logic\nand uh it's yeah make gives you this\nlabel so you know it's something that's\nbeen deduced it deduces this third\nargument to the CNF relation this is the\nentire formula in this case it's a very\nsimple formula it's just one proposition\none propositional variable if you will\nand then it tells you how did it get it\nwell it did some kind of inference\nand this inference was a result of\ncombining steps 11 and steps 12. so\nlet's look at 11 and 12. so 11 says\neither it's true that begins with Dear\nSir or Not by Brown\nand then step 12 says by Brown well if\nyou combine those two things\nnot by Brown and by Brown annihilate\neach other you've got negation now if\nyou know by Brown then the disjunction\nof anything with the opposite of that\nterm is going to be just the first thing\nso you wind up being able to conclude\nbegins with Dear Sir on the basis of\nvibe Brown and not by Brown kind of\nannihilate each other another way of\nlooking at this as I mentioned during\nthe different Logics presentation is\nthat this is also essentially a rule\nright it's not begins with Dear Sir\nimplies not by brown or if you reverse\nit not by Brown\nas a disjunction\nor of not by Brown begins with Dear Sir\nif you reverse this\nyou can actually say instead by Brown\nimplies begin with dear sir and you know\nby Brown therefore you can conclude\nbegins with the dear sir\nright that's just uh modus ponen's basic\nreasoning\nand then essentially for this very\nsimple proof you get a lot more of the\nsame\nif for everything that's marked plane we\nusually see that there's just two\nformulas that are antecedents so here is\n13 and 14. let's take a look at 13 and\n14. so we get not begins with beer Dear\nSir or not in the third person we know\nbegins with Dear Sir therefore we must\nbe able to conclude not in the third\nperson and that's exactly what we do\nconclude here in step 16. and so this\ncontinues on until finally we get to\nthe conclusion false a contradiction\nwhich is a combination of steps 27 28\nand 29 so let's look at 27 28 and 29.\nwhich is we have dated or not on one\nsheet\nwe have not dated therefore we can\nconclude not on one sheet and we also\nhave on one sheet so we have we're left\nup we're left with not on one sheet and\non one sheet that's a contradiction so\nwe can conclude false we have a\nrefutation and we're done\nso that's how to read a simple\npropositional logic proof and execute e\nthanks for watching I have future videos\nplanned for proofs with vampire and Leo\n3 and I hope you'll join me then"
},
{
"title": "CaseRoles Representing action sentences in SUMO",
"transcript": "hi I'm Madam the creator of sumo hello\nI'm Jenny a student of sumo and we're\nhere for another podcast today we're\ngoing to do a little introduction to\nsome how to do some basic coding in Sumo\nof what we might call Action sentences\nand so we're going to start with an\nexample I use throughout my book that's\nactually taken from an author named\nTerrence Parsons who has a whole book on\nhow to use uh logic to code the antics\nof English sentences um it starts off as\na I think a a really good and useful\nexample and you call that case roles in\nSumo term or just normal yeah case roles\nuh case roles this is a a u a phrase\nfrom formal Linguistics um it just\nrefers to uh the roles that things play\nin sentences in actions right um and\nit's often I guess it's called case\nroles um because\nit's often referred to what uh linguists\nwould call case or gender the sort of\nlinguistic uh constructions U but that's\nnot really our topic today isn't so much\nLinguistics as Sumo right and it's about\nprocesses aren't we yeah we're talking\nabout Sumo processes so hopefully uh if\nyou're watching this you will have uh\nlooked at some of the previous uh\npodcasts we've done on how to you know\nwrite a basic term in Sumo and maybe how\nto use Sigma because we're going to be\nusing Sigma during this podcast as well\nright so uh here's Sigma or here's the\nSumo homepage so we'll go to browse and\nwe'll just uh let's bring up process for\nnow okay so this is the sort of main\nclass having to do with actions um and\nwe should also take a look at case roll\nall right we'll just leave this up in\nthe background I'm not going to go into\nit yet because we got to get a little\npreliminary information straight about\nwhat what case roles really are letes\ntalk about something though maybe we\ncould go yeah you want to go through\nthat like predicate corrup uh like agent\npatient okay well we'll we'll talk about\nit a little here and then I'll go back\nto the slides and we'll see all right so\ncase r so the informal English comment\nagain you know the the comment the\ndocumentation string is not the\ndefinition of case rle the definition of\ncase rle are the formal act mathematical\naxent inmo Zumo yes um so here it says\nyou the class of predicates relating the\nspatially distinguished parts of a\nprocess all right so if you think of an\naction happening in the real world um\nthere's somebody doing the action maybe\nis doing the action to something else\nthe direct object in a sentence maybe\nhe's using a an instrument or a tool\nthese are these spatially distinguished\nparts of a process that are all part of\nan action going on okay um and here it\nsays you know case roles include for\nexample agent patient destination action\nso you know I'm walking somewhere it has\na destination that's part of the process\nand you are the agent if I'm the agent\nI'm the agent if I'm walking somewhere\nI'm the agent of a walking process right\num so here it says also the flammable\nsubstance in a burning process right so\nif I've got a fire a fire is a process\nit's burning the wood the wood is\nparticipating in this action uh if it's\nraining the water that falls and rain is\nthe the patient of the rain it's the\nthing that's that's sort of the main\nfocus um anyway so maybe we'll go back\nto the slides and start through this\nlittle example from Terrence Parson yes\nit's a a little violence from you know\nRoman history of Brutus stabbing the\nemperor Cesar right so Brutus stabbed\nCaesar with a knife on Tuesday so there\nhave been many ways over the years that\nlinguists have thought to represent this\nstuff um but here's a SC of how we do it\nin Sumo how Terren Parsons who came up\nwith this example does it and ultimately\nthis is all thanks to a guy named Donald\nDavidson in the late 60s who uh came up\nwith this he was a linguistic\nphilosopher right um very important work\nuh he had her paper The Logical form of\naction sentences okay I recommend that\nso should I try to yeah them say in this\ncase stepping stabbing is the process\nright and then well Brutus is the agent\nright and the one that being stab is\nCaesar so Caesar is the patient right\nand then he used a knife he used a knife\nthe knife I would think is an instrument\nisn't it yeah but what about the time\nyeah this is a time at which the action\nhappened it happened during a Tuesday\nright happened on Tuesday so let's uh go\nto the next slide where we can show all\nthese relations right so Caesar as as\nJenny just said is the patient Brutus is\nthe agent the knife is the instrument\nand the time is Tuesday okay so the nice\nthing about this is that once we've\ndefined an instance of a stabbing right\na particular individual\nstabbing um then we can relate a whole\nbunch of things to this stabbing and\nthat was the key advance that Donald\nDavidson came up with intellectually\nabout how to talk about uh actions in\nthe world and how to talk about it in a\nway that's amenable to coding in logic\nthere exists a stabbing exactly there\nexists a stabbing so that's how you'd\nphrase in English what the The Logical\nuh expression would be and so let's take\na look at that logical expression so\nhere we go all right so in suo format\nusing Sumo Sumo terms there exists a\nstabbing a knife and a Tuesday where the\nagent is Brutus the patient is Caesar\nthe time on which at which the stabbing\nhappened is the instance of Tuesday and\nthe instrument used in the stabbing is\nan instance of a knife right okay so\nthis this really says uh says all of it\num so the key things to pay attention to\nis like we have to have an instance of a\nstabbing a PO particular stabbing right\nnot stabbing with this capital S is the\nclass of all possible stabbings right\nknife is the class of all possible\nknives right and here we're saying well\nthere exists one of each of these things\nwe haven't named them you know we could\nhave named them we could have called it\nyou know brutus's knife is an instance\nof knife but we can just as easily say\nthere exists some variable K right that\nstands for this instance of a of a\nparticular knife right so to be more\nprecise that somebody call Brutus that\nsomebody call Cesar it may not be the\nsame Brutus or the same Caesar we\nunderstood yeah yeah so um specificity\nis important in this little example we\nhaven't talked about you know how do we\nknow which Brutus it is um uh Jenny in\nyour some of the exercises you're doing\nnow from the Sumo book you're using the\nterm uh the relationship names so that\nyou define Brutus and you give him a\nlittle string that is the name Brutus\nbru T us Etc um that helps a little bit\nyou know we could talk about where we\ncould specify where Buddhist was born\nwhat his social security number is in\nmodern terms all these things to\nidentify individuals uniquely in the\nreal world that's maybe a little bit\nbeyond our scope today though um maybe\nthe hardest thing in this is uh the\ntemporal qualification because I know\nthat's been some of a challenge for you\nyeah um so here talking about Tuesday\nright so Tuesday is the class of all\nTuesdays that have ever happened in the\npast and will ever happen in the future\nright that can be a kind of a tough\nconcept to get your head around um and\nhere we're talking about an instance of\na Tuesday we haven't said which\nparticular Tuesday it is we just said\nthat there is some Tuesday it definitely\nhappened on a Tuesday we don't know what\nyear what month Etc but we know what\nhappened on Tuesday so we're talking\nabout an instance of a Tuesday during\nwhich uh this action\nhappened okay um so that's really all\nall there is uh if you use this form as\na model then uh you start to quickly to\nget the hang of how to represent any\nkind of of action in Sumo and I think in\nfuture maybe longer podcasts uh will go\ninto some more complexities but uh if if\nyou can get this part down and do a\ncouple of examples um then you're well\non your way to be able to talk about\naction sentences using Sumo yeah but I\nwould also recommend actually um for\nstudents to actually browse uh in Sigma\nto look up on terms like what agent what\nwhat an agent is instrument and what a\nprocess spend a bit of time on on on on\nthe web page yeah definitely so uh that\nthat uh points out a little more that we\ncould go over so here we're back in\nSigma and you see there's lots and lots\nof different case roles in fact there's\na whole hierarchy of case roles if you\nlook at there's a a little diagram in my\nbook uh the onology a practical guide\nbook uh that shows what all these are\nbut there are few that you're going to\nbe using a lot so there's\nagent uh destination is very\ncommon uh changes location is not so\ncommon um experiencer is quite\ncommon uh origin is also common path\npatient is is you know nearly Universal\nin fact there are also a lot of\nsubclasses of\npatient um object transferred is\nsomething that we should use more more\nof it's something actually defined\nfairly recently in one of these domain\nontologies in cars. right okay so you\nknow poke around poke around in in Sigma\nas much as you can so not only case\nroles of course but also process um if\nwe take a look at process there's lots\nof subclasses of process and getting\nfamiliar with all of the processes and\nsubclasses of processes in Sumo is very\nvery important um you'll see a lot of uh\nuse of various kinds of\ncommunication um dual object process is\na lot of useful stuff attaching\ndetaching\nseparating um a lot of intentional\nprocesses things having to do with uh\nthinking you know planning\nlearning\ngames this is very neat uh how did you\nget you know get here I I you know from\nthe previous web page I think it's very\nuseful so let's go back so if we have\nany class in Sumo that we're looking at\nuh we can go to the upper right here to\nthe graph link that's very useful yeah\nand graph has a lot of nifty controls on\nit\num the first thing is that uh any\ntransitive binary relation uh in Sumo\nforms a hierarchy we talked about this a\nlittle bit in one of the previous\npodcasts so not only can you use subass\nbut you could use part and sub attribute\nor sub plan there are all sorts of these\nrelations but it is true that typically\nthe one you're going to pay most\nattention to is subass because that's\nyour taxonomy that's kind of the\nbackbone of\nsumo um and then you've got all these\ncontrols you know you can see how many\ndirect children each of these terms has\nso if you know I expand intentional\nprocess it's going to have 29 subclasses\nultimately in its sub tree you get a\nlittle hint of the definition over here\nyou know if I click over on the graph\nlink um then it starts with intentional\nprocess one above one below and gives me\na lot of detail and as you see there are\na lot of these intentional process very\nuseful yeah and you've got a choice of\nselecting some columns customize a\nlittle bit you can get more levels above\nand below um you can limit the number of\nterms which is important if you get a s\nyou know a big EXP exposion you want to\nget as many levels below but you don't\nwant it to go off into Infinity giving\nyou all of sumo that's important maybe\nwe could spend some other the time in\nthe future looking at this because I\nthink in order to to get used to the\ncode of terms in Sumo we need to have\nsome sort of very handy easy visual tool\nfor us to go back and find out what\nexists what doesn't exist what need to\nbe defined what didn't not to be defined\nyeah that's a good point so there's\nespecially early on the sort of tools in\nSig that you're going to use are going\nto be a little different than the tools\nthat you use once you get at a kind of\nan expert level I don't use the graph uh\ndisplay very often because I'm just I'm\nso familiar with it um when you're just\nlearning Sumo getting the graph view\nwill be very very valuable so definitely\nlet's do a future podcast on graphs yep\nI think so it's going to be very useful\nbut unless you have any other questions\nthen I think we'll we'll wrap up this\none on uh action case roles and action\nsentences um hope it's been helpful uh\neager to have feedback from anybody\nthat's listening to this and uh we'll\ntalk to you later bye bye"
},
{
"title": "Ontology Talk What is Semantics",
"transcript": "hello and welcome to another edition of\nontology talk i'm adam pease\nand today i'd like to talk about my\nnotion of\nwhat is semantics and semantics is\nreally about\nthe meaning of meaning and to set the\nstage a little bit there are lots of\ndifferent senses of what semantics is\nin particular linguists have a certain\nsense of that i'm really going to be\ntalking about\nformal semantics the semantics of formal\ncomputational systems\nand not linguistic semantics\nso semantics is also quite closely\nrelated to semiotics or a theory of\nsigns and symbols so let's take a look\ninitially at static signs so steins that\ndon't change if i'm a driver and i come\nto an intersection\nand i see a stop sign then though\ni have an interpretation of what that\nsign means it's a command\nessentially that has some force of law\nas well\nthat i have to stop at this road\nintersection\nand after i stop and look around and\nmake sure it's safe to proceed then i'm\nfree to do so\nso there's an understanding of this\nsymbol by an\nagent the agent responds to that symbol\nand has a response that has\nsome significance in the real world\nif i come to a sign however that i don't\nunderstand maybe it's a sign\nprinted in russian that may under some\ncircumstances mean exactly the same\nthing but if i don't understand it\nit's no good it doesn't do anything for\nme and so i can't take action according\nto that\nan important thing is that the symbols\nconform to our understanding of what\nthey mean and if we have a\nsystem that uses those symbols and the\nsystem is not a human\nthat the system should also have this\nsame\nunderstanding it's essentially\nperforming a simulation\na simulation of how the real world\nshould act\nso that it can predict something that's\nuseful to us as human beings\nand mathematics is exactly one of those\nuh systems\nso we have basic symbols the symbols for\nnumbers the arithmetic operations\nand so in a mathematical system we\nexpect two plus two equals four and that\nconforms to what we know about the real\nworld the operations\nuh on these abstract symbols have some\npredicted value\nthat uh tells us something useful about\nhow numbers work in the real world or\nquantities of things\nand we could change these symbols of\ncourse there have been different uh\nmathematical symbol languages throughout\nhistory if you go back far enough\nand uh we can have different symbols\nbut that still operate according to the\nsame rules and still have predictive\nvalue if we interpret those\nsymbols correctly so if we have\ntwo apples we add another two apples and\nobviously we get four apples right so\nthey have these abstract symbols and\nthey conform to our understanding of how\nobjects behave in the real world they\nhave predictive value\nso if we have a young student in\nelementary school\nlearning arithmetic then he or she does\nthis sort of\nsimulation in his or her brain according\nto these symbols\nand the answer hopefully comes out right\nand conforms to\nwhat he or she sees in the real world\nand that's how we learn that these\nsymbol systems\nhave value to us they have utility\nbecause they predict something\nso we can do these abstract calculations\nand not have to go around counting\napples\nwe can just use the arithmetic operator\nto get the right answer and know how\nmany apples we have without counting\nthem once\none by one which of course matters if\nyou get more complex operations\nand uh all larger sets of things\nit wouldn't be practical to count you\nknow ten thousand apples\nbut you know if you have five thousand\napples plus five thousand apples you've\ngot ten thousand apples and you don't\nneed to count them all then\nthe symbol system helps you understand\nthe real world it has it gives you\nleverage for understanding the real\nworld\nand the same is true in the computer if\nyou can have the computer understand the\nmathematics it doesn't need to\nunderstand anything else about\nthe real world it doesn't need to\nunderstand about apples or counting\nor even really integers it's creating uh\nit's performing a simulation\nthat has this same predictive value\nbecause it conforms to\nthe rules that we learn in school the\nrules of mathematics\nand those those operations those symbols\nuh have this predictive value so there's\nreally\nthree things going on here there are the\nsymbols the abstractions\nthere are the reference the things in\nthe real world and then there are what\nthose\nthings mean it's really this this\nmeaning portion\nof this triangular relationship that we\ntry to get at with some\nwith the notion of semantics the study\nof semantics creating symbol systems\nthat have predictive value even though\nthey are just abstractions\nso here's another way to look at it so\nwe have the symbols plus\n2 equals cosine\nany other sort of symbols in a\nmathematical system or other systems of\ncourse there are many such abstractions\nabstraction systems we have things in\nthe real world\napples houses people atoms\nand but then most crucially we have\nfunctions we have a\nsymbol system that can be in a human\nbeing's head\nand hopefully codified maybe in a\nmathematics text\nwhere we show that the symbol system is\nuseful and correct and consistent\nand we can also program those same\nsemantics the semantics of the\noperations and the symbols\ninto a computer if we do a good job at\nthat then\nwe can run things hopefully much faster\nand\nwith less error in the computer than we\ncould ever run\nin a human being's head now a limitation\nof this is that\nif your symbol system is lacking a\nsymbol then you've got a problem\nthere's nothing you can do right so if\nyou want to do a square root operation\nyou're on a calculator that's a simple\narithmetic calculator you don't have a\nsquare root\nuh key then you know barring something\nthat like successive approximation if\nyou don't have logarithms and you don't\nhave the square root key\nyou're just stuck you can't you can't\nfigure out the answer\nyou need a different symbol system and a\ndifferent symbol\nsimulation of that symbol system a more\ncomplex calculator that actually has\nthis\nsymbol and some semantics behind it some\nmeaning for that symbol that allows it\nto do\nan operation through some means and\nmaybe it is successive approximation\nor it's a logarithmic calculation that\nwould get you the answer\nfor the square root of something\nsimilarly maybe you have the right\nsymbols\nbut your symbol system computation\nyour simulation is impoverished\nso if you don't have negative numbers\nand you take four away from two\nwell you as a human may know the answer\nbut your symbol system may not so your\nsymbol system\nhas to contain the same semantics\nabout the sim the symbols as you have\nin your head as a at least an amateur\nmathematician or\na professional mathematician\nand this applies as well not just to\nformal symbol systems\nin mathematics but the representation of\nall the other sorts of knowledge about\nthe real world\nso if we know from say some purchasing\nhistory\nthat we can say john likes tennis\nbecause he bought a tennis racket\nbut maybe there are other things we want\nto say that are a bit more nuanced than\nthat\nnot just that there's a liking\nrelationship between john\nand tennis in general but maybe really\nfrom his buying history all we can say\nis that well he must like tennis rackets\nbecause he's bought some tennis rackets\nor maybe that he likes just a single\ntennis racket that he happened to buy\nmaybe he's bought more than one he's he\nlikes some tennis racquets\nall of these four things are quite\ndifferent statements about the real\nworld\nand if we want a correct and\nnuanced or granular view of the world\nand have\nour compu computational systems share\nthat perspective\nthen we need a language that allows us\nto state these very distinct things\nif we want our symbol system our\ncomputational system\nto have predictive value then we might\nwant to be able to actually\nsay these individual things and\ndistinguish them from one another\nand that's really where the science of\nsemantics and also in artificial\nintelligence where the science\nof knowledge representation comes in so\ni hope this brief introduction kind of\nmade you aware of maybe some of the\nissues in how we represent\nsystems of symbols and semantics inside\na computer\nand you might ask yourself does the\nlanguage that you've created\nhave all the systems that you actually\nneed does do you have the systems that\ntell\nthe symbols that tell you everything you\nwant to be able to say about to the real\nworld\nand does your computational system\noperate on those symbols in the same way\nthat you do\ndo you even have a formal system or do\nyou have just something that's very\ninformal\nand really relies on the human being to\nimbue those\nuh symbols with some intuitions if you\ndo\nthen maybe your computer doesn't have\nthe same understanding\nit certainly doesn't have the same\nunderstanding as you do if you've never\nmade that explicit\nto your computational system as a result\nit's going to lack some predictive value\nit's going to get\nanswers that you know as a human would\nbe nonsensical\nand this is closely related to is this\nsystem correct all right great you've\ncreated a system\njust like uh the you know ancient\nphilosophers\nstarted creating symbol systems about\nmathematics or about logic\nand at first of course they didn't get\nthese things right\nthey didn't have a correct or consistent\nsystem so it's no good to have\na symbol system and a computational\nsystem\nthat imbues those symbols with semantics\nif your semantics isn't consistent you\nwant each of the operations that you\nperform on those symbols\nwithin the computational system to yield\na correct\nanswer not to yield something that's\ninconsistent with what humans know to be\ntrue about the real world\nand as your simple system gets more\ncomplicated like all of mathematics\nthen that takes a lot more work to make\nsure that in fact it's correct so if\nyou're just as a programmer and you\ndream up a symbol system on your\nown and you implement it maybe\nif you actually had a way to prove uh\nthat system computationally sort of a\nmeta-analysis\nof the system you've created it might be\nthe case that\nit's not consistent it could get wrong\nanswers so if there is such a symbol\na symbol system like mathematics or\nmathematical logic you might want to\nreuse it because the problem of creating\nsuch a system from scratch\ncomputationally may be a lot harder than\nyou thought\nso again can you say everything you want\nto say in the system\nwithout relying on a human being to\ninterpret it\nif you can't then you better make sure\nthat you're deriving answers that are\npresented to human\nbefore that intuition has to be applied\nin order to to interpret the result\nand if that's the case then what's the\npredictive value of the system\nthe utility of a computational system\nand a symbol system or a mathematics is\nvery closely intimately related to the\nfact that it has some predictive value\notherwise you know why would you use it\nright if it doesn't tell you something\nnew and informative about the real world\ndoes it faster or more in a more correct\nfashion\nthere's no point in using it so anyway\nthink about these various questions and\nnext time you're trying to implement\nsome computational system\nand see if that changes your perspective\nall right i hope you\nfound this informative and thanks for\nwatching\nyou"
},
{
"title": "Ontology Talk Types and Type Definitions in SUMO",
"transcript": "[Music]\nhi i'm adam pease and welcome to another\nedition of ontology talk today i want to\ntalk about\nargument types in sumo\nso sumo uses a typed logic\nso unlike just regular first order logic\nwhich is does not restrict the types of\narguments sumo's more like\na type programming language if you're\napproaching this from the standpoint of\na computer programmer working in a\nlanguage like c\nplus or java this should be very\nfamiliar to you so\nif we have a relationship like part one\nthing is part physically a part of\nanother\nwe can say say wheel number 23 is part\nof car 57 i put these numbers on the\nidentifiers just to make it really clear\nthat\nthese are particular individuals a\nparticular wheel is part of a particular\ncar\nand we know that's allowed in sumo\nbecause\nwe have a relation part and this\nrelation is itself an\ninstance of the class of all relations\nso\nthat means that it belongs as the\nfirst argument if you will in an\nexpression belongs in the relation\nposition the zeroth argument would be\nanother way to say it\nand it has two arguments which\nare individuals instances of the class\nobject so a wheel a particular wheel is\nan object and\na car a particular car is also an object\nnow if we look at the class hierarchy\nfor the class wheels\nwe can go into the sigma knowledge\nengineering environment and take a look\nand get a graph of the hierarchy\nyou know you can see that wheel is a\nsubclass of artifact which in turn is a\nsubclass of\nobject uh that's the most important\nthing here because\nthe part is defined as having uh\nrequirement\nthat both of its arguments are instances\nof a class object\nand then so on object is also a physical\nand physical\nis a subclass of entity the class of all\nthings in zuma\nso if we just uh look in the sigma\nknowledge engineering environment the\nstuff highlighted at red\nyou can see i'm showing a page from the\nbrowser at sigma.ontologyportal.org\nyou can see that the domain\nof the part relation both the first\nargument argument one\nand second argument are both objects\nso let's look at a couple of more\nexamples so\nthere's other ways to define the types\nof arguments\nin fact there are four ways that i'm\ngoing to show you so the most common is\nusing this domain statement\nand so we just saw how part the two\narguments the first and the second\nargument of part\ncan be defined as an object\nand just as an example of this\nparticular\nsort of expression or an example of the\nuse of this sort of thing we have the\nrule that\nif two things overlap spatially then\nthere's a\nsome third thing that is a part of\nboth objects so that hopefully should\nmake sense two things overlap\nthere's some kind of middle if you think\nof it as a venn diagram\nwhere that middle thing is part of both\nobjects um\nand adds the same right that's the\noverlap\num so in this particular axiom\nuh you can see the part has uh two\narguments\nand there are arguments that must be of\nthe same or\na subsidiary type of overlap spatially\nso just an example of how this is\nactually used\nin practice now there's also the\nrelationship\ndomain subclass this is the way we\ndefine\nthe types of arguments when those\narguments are classes\nand not instances so for something like\nsaying\nthat a break shoe is a typical\npart of a drum break so it needn't be\na part of all drum breaks so you can go\nto the junkyard and you can get a break\ndrum\nsystem um and maybe the shoes have been\nremoved and sold off to somebody else\nbecause the shoes are in good shape and\nthe drum isn't although\nprobably that's not the case it's\nusually the opposite if you're a\ncar enthusiast but anyway\nthis is a necessary thing if\nwe want to be able to have relations\nthat can be between classes we need to\ndistinguish between the cases where\nthe arguments are instances or classes\nand for typical park we typical part we\nwant to make a very general statement\nsaid\nusually typically a brake shoe\nis part of a brake drum our drum brake\nokay\nrange is another sort of declaring\nstatement uh that we use when we're\ntalking about functions so\nfunctions have a return type if you will\nand that's the range so functions have a\nunique l uh value for the range for\nevery value in the domain\nthat's the definition of function\ndistinguishes it from the notion of a\nrelation\nand so we're not talking about the\narguments but rather the return\ntype the the the value of what the art\nof the function denotes in the world\nbecause remember from a previous uh\nintroductory video\nfunctions denote terms whereas\nstatements involving a relation are\nsentences that have a truth value\nthey're either true or false but\nfor a function it ha it denotes a term\nso for example\noff to the right we can see that the u.s\nstate department is a sub\norganization and forgive the space typo\na sub\norganization of the government of the\nunited states so government fund united\nstates\nis a function with an argument that\nstands for a term which we just haven't\nreified or or created and named in the\nsystem\nthat is the government of the united\nstates rather than the united states\nitself\nright and so here on the left we're\nsaying that the range\nthe the return type or the thing that is\ndenoted by this function\nuh is an instance of a government\nright in this case for the statement on\nthe right it's the instance of the\nunited states government\nand in the same way that we have for\ndomain and domain subclass we have range\nand\nrange subclass so if we want to talk\nabout\nthe return type or the denotation of\na function being a class then we use\nthe relationship range subclass so we\ncan say that the range subclass of\ncovering function\nis a wearable item\nand uh in the case of a glove\nright a glove is uh the covering\nfunction of the hand\nright so the class of things uh that is\nclothing that covers your hand that's\nknown as a glove\nso this isn't used all that often but\nwhen you need it it's very powerful\nand it's important to have it it's part\nof representing our world\nso we have these four ways in which we\ncan define\nthe argument types and the return types\nof\nrelations and then respectively\nfunctions so\nif you're trying to use a relation or a\nfunction\nit's essential to know what the argument\ntypes are just as if you were writing\nsome java or c plus plus code and you\nwere calling\na method or a function in that language\nit would be essential to know the types\nof the arguments to that method or\nfunction if you get the types wrong it\nmay not even compile much less run\ncorrectly\nso you've got to know these things and\nover time for the common ones you'll\nmemorize them but initially you probably\nhave to look them up and so that's what\nyou use the sigma browser for\nand just as a reminder i covered a\nlittle bit of this\nin one of my previous videos but keep\nalso distinct\nbetween the notions of sentences turns\nterms and operators\nso even more fundamental than argument\ntypes are the sort of\nthese disjoint classes of things if you\nhave a logical operator like and or or\nthe arguments to and are\nsentences with the truth things that\nhave a truth value and so here you can\nsee\nlikes bob sue as an argument to the and\nlogical operator\nand likes bob sue has a truth value\neither bob\nlikes sue or he doesn't like sue but\nthat's the only value that actually\napplies there it's true or false\nand contrasts this with the relation\npart it's not a logical operator\nand it takes terms as its arguments\nnot sentences that have a truth value\nwheel\n23 is uh denotes uh\nsomething in the in the world as does\ncar 67.\nnow there is sort of a maybe a confusing\nexception uh one until you're used to it\nthat if we also have uh the ability to\nstate things in higher order logic so if\nyou're used to or if you've studied in\nschool\npredicate calculus or first order logic\nthen you know\nthat in those logics the arguments uh\nto anything other than logical operators\nmust be terms uh they can't be sentences\nwith a truth value but\nin sumo we allow higher or higher order\nlogic\nnow there's a much smaller set of\ntheorem provers that can actually do\ncomputation with that for the most part\num we've been using the e and vampire\napprovers which are primarily first\norder provers\nso they have this restriction but we've\nstill uh\nkept track of and spent time stating\nthings in sumo\nthat are higher order on the belief that\nover time higher order provers are going\nto become more common and more powerful\nindeed that has been the case in recent\nyears so\nfor example satellax and leo 3\nare some pretty hot high road approvers\nthat we do use and and they work quite\nwell\nso this was a good idea to capture\ninformation that's in higher order okay\nso if you forgive that digression\nas to why we do things this way then\nlook at this particular example let me\njust scroll the screen\nso you can see all of that and here's an\nexample\nof a very commonly used higher order\nrelation\ncalled holds during and note that the\nsecond\nargument to holds during is a formula so\nthat's how we specify\nthat we've at one of the arguments is a\nsentence with the truth value\nso in this case we say that if\nit's true that a person possesses an\nobject and that there's something that's\na part of that object then during that\nsame time period the person\npossesses that subsidiary part of the\nobject\nokay so if i own a car i own the wheels\nof that car too at least we'd hope so\nso this is something to pay attention to\nright the only cases\nwhen you can have a sentence with a\ntruth value\nthat is an argument to a relation\nis a case in which we've defined that\nthe domain of that relation\nat least one of the arguments to that\nrelation is a formula so that's why you\nsee unambiguously that this\nis called out defined and allowed okay\nnow here's a just a couple of cases of\nthings you can't do\nhence the large red cross so\ni've seen people try to do stuff like\nthis now\nthis is the sort of thing that you might\nsee in other ai formalisms maybe that\nare a bit more\ncasual that don't actually use a theorem\nprover but\nthey maybe have their own kind of ad hoc\nreasoning system\nbut it's been it was pretty common at\nleast decades ago to have\nverbs used as relationships and i have\nanother whole video on davidsonian\nsemantics\ni think i called it case roles as\nanother word for it\non why that's not a great idea and why\ncase roles are a better formalism for\ntalking about actions\nso in the case of sumo this is not\nallowed\nright and sumo walking is a class\nof of actions it's a class of\nambulating acts and it's not an instance\nof relation you can't put it in that\nfirst argument it's not a relationship\nit's the class of all walkings and so\nhere\nis a look at the hierarchy so\nyou can see that walking is down the\nbottom ultimately\nit's a process well ultimately it's an\nentity but in particular it's a process\nwe say that we define this by saying\nwalking isn't ambulating\nelsewhere we define that ambulating is a\ntranslocation and a motion\na process etc okay and this is defined\nin the merge.kif file that's\nin the github repository in case you're\ncurious about where to look for it\nso here's an example of how you're\nsupposed to do this and\nhow you can conform to the type\nrequirements that are already in\nsumo again since we use this davidsonian\nsemantics approach\nwe define an instance of walking and we\nsay that the agent of the walking is\njohn and the destination is john's local\ngrocery\nthis gives you a lot more spence\nspecificity and a lot more extensibility\nfor the things that you say about\nactions right\nso the upshot of this is you know again\nunderstand the types\nwalking is not a relation therefore it\ncan't be used as if it were a relation\ninstances are also not classes\nso if you say something like part wheel\ncar\nwell a wheel is a class it's the class\nof all wheels and you can see this from\nthe\nhierarchy on the right hand side and we\nknow that\npart doesn't take classes because we use\nthe domain statements\nagain remember the difference between\ndomain and domain subclass if we wanted\nto say that\na class was allowed as an argument we'd\nuse domain subclass but instead we use\ndomain which means that in this case the\ninstances\nuh the the arguments to part must be\ninstances\nof the class object both for the first\nand the second argument they can't be\nclasses\nnot allowed that'll give you a type\nviolation\nand just to highlight this uh because\nit's tempting i think for people to be\nkind of free\nin this sort of representation you might\nthink you could get away with this um\nbut you can't\nin the same way that maybe the\ndifference between\nan untyped language like lisp and a\ntyped language\nlike c c plus plus or java\nthis is a design choice i made a design\nchoice to catch some of these potential\nerrors\nat the time of writing or the time of\ncompiling if you will\nand that that yields a better system\nthat's\nthat's our design choice you might have\na different system uses a different\ndesign choice but this is the choice\nthat sumo has made and it's\nproven to be very helpful in finding\nerrors over the past several decades\nas people write and add stuff to the\nsystem so\nit might be tempting to say well wheels\nare part of cars parts of cars i can say\nthat in english but english and every\nother human natural language is very\nambiguous\nand so we keep a clear differentiation\nin\nsumo between language and the lexicon or\nthe language understanding system\nand the formal theory that\nmay be the result of adding some\ncontent that was originally processed\nfrom informal natural language\nbut the important thing is not to\nconflate the two uh you either have an\ninformal system that's ambiguous and can\nuse part\nas as a word and use it in something\nthat looks like a logical expression but\nin fact is something\ncasual and ambiguous where part can be\ninterpreted in different ways\nor you can have a formal system that has\na formal calculus\nlogical calculus associated with it that\ncan do formal computation\nand that's just a different thing right\nso understand what a logical theory is\nversus a sort of casual free\nrepresentation that's designed to be\ninterpreted either statistically or\nstochastically or by humans\nsumo is a logical theory it requires\nprecision and so meaning is accurately\nand strictly captured in this logical\nframework\nthat's what it's for right so this is a\njust a quick overview of types\nlet me know what you think i'd be very\neager to hear from you i have your\nfeedback\ncheck out some of my other videos like\nand subscribe if you found this\nuseful and also take a look at the\nsoftware all which is all open source\nthat we have online\nthanks for listening"
},
{
"title": "Sigma Tutorial - Surveying the basic functions of the Sigma knowledge engineering environment",
"transcript": "hi i'm adam hello i'm jenny and we're\ngoing to have a podcast today on using\nsigma\nso we're going to start out with\nthe\nontologyportal.org page and the first\nthing you do to get to sigma\nis to go to the browse link\nclick on that\nall right and so here we're going to see\nsigma\nwe've got some statistics here on how\nmuch stuff is loaded all of sumo a lot\nof terms a lot of axioms or the\nstatements that are\ndefining the terms\nsome of those statements are rules\nand some of those terms are relations\nso there's a lot of controls we'll go\nthrough just a little bit of this today\nand we'll do a later podcast that has\nmore detail some other time\nso we figured we'd do today\nis take one of the exercises from the\nchapter in my ontology book\non\nuh learning sigma\nso\nthe example we want to look at is\na verb a slightly uncommon verb to peep\nthis is on page 214 of the first edition\nto peep is\nexercise 1e of\nchapter 6 knowledge engineering tools\nso really important thing here\nis it's very easy to cheat on this\nexercise if you use the english word\nfunction and search wordnet\nso what we're trying to do with this\nexercise is get people to\nunderstand a little bit about sigma and\nunderstand a little bit about sumo by\nbrowsing the hierarchy itself what do\nyou mean by searching wordnet\nso wordnet is this english lexicon that\ni introduced\nin my introductory lecture and hopefully\nsome of you\nare listening to this have have seen\nthat um so we've got two different\nthings here that are loaded in there's\nwordnet a dictionary of english\nand we've got\nsumo this formal theory and you've got\ntwo little windows here that jenny's\npointing me to out to mention\nthe kb term box is where you type in\nsumo terms the english word box is where\nyou type in\nwords from the word net dictionary why\ndon't we go through it as an example\nyeah so so we're gonna\nuse this uh\nexample to peep okay okay so first thing\nwe need to figure out i mean the the\ntough part about getting started with\nsumo and sigma is you need to know\nuh\na little bit about sumo just to even get\nstarted so\nlet's just give you some information to\nstart with so uh peeping or to peep\nis a verb and most verbs map to the sumo\nterm process so we're gonna start there\nprocess with a capital p why is it\ncapital\nuh\nall sumo terms that are not\nrelations\nuh\nyeah all sumo terms that are not\nrelations have an initial capital\nnow there are some relations that are\nfunctions that are capitalized a\nfunctional relation has an initial\ncapital relations that are not functions\nare initial lowercase everything else is\nan initial capital okay\nall right so we're going to enter\nprocess uh you're going to see we've got\nthis drop down menu of things we've\nsearched on recently\nwe're going to click enter\nokay and now we're going to get the page\nfor\nyou have a pretty picture there yeah\nyeah it's a neat project it did years\nago to link uh pictures from wikipedia\nto sumo so there are a lot of sumo terms\nthat have an associated picture that's\nshowing an example or a prototype that\nembodies this concept\nso now we got this screen what are these\nblue\nlittle hyperlinks words\non the right hand side the stuff on the\nright hand side these are\nsyn sets or word net words from wordnet\nword senses that have been linked to\nthis particular sumo term in this case\nprocess\nand then we've got a whole list of all\nof the formal statements all the axioms\nin which the term process appears\nokay we start out looking at appearance\nas argument number one these are\nstatements in which\nprocess the term that we're looking at\nhere\nis appearing as the first argument so\nif you have simple expressions in sumo\nthat are not rules you can read them\nkind of left to right the first\nthing is the relation or what we call\nargument zero\nthe second thing is argument one\nthen we have argument two etc\ni see so these are defined in sumo yes\nall these things we're seeing that we\nhave are things from sumo\nso\nthe first thing you always see\nis a documentation string this is just a\nnatural language comment to help you get\na quick idea of what this term means\nit's not actually used by the theorem\nprovers in sigma it's not actually part\nof the formal definition it's just like\nin a programming language you put a\ncomment at the top of your subroutines\nor your variables to give you a quick\nidea what it means but what it really\nmeans is in the code not in the comments\ncomments are just help\nokay now we're going to go down this\nnext section we see appearance is\nargument number two all right so we see\nhere relate for the first statement\ncomes up range is the relation aborted\nfund is the\nfirst argument the second fund\nuh second argument argument number two\nis process and so that's what you'll see\nfor all these in this section now i\nnotice we don't have many statements on\nthe first uh on having process as the\nfirst argument but you see a lot of\nlines saying you know process associated\nwith different\nprocesses does it mean that\nprocess is quite high rank\non the hierarchy yeah that's a really\ngood good comment so\nprocess has quite a number of subclasses\nand so when something has subclasses it\nwinds up being the second argument and\nso yeah we see a lot of this\nhere that's pretty typical and these are\nactually in the sumo\nterms yeah these are all sumo terms\nagent patient process causing happiness\nintentional process etc\nyep so if we look down a little farther\nwe'll also see a few cases of\nappearances argument number three so\nprocess here is the third argument in\nthese domain statements domain\nstatements as well as also domain\nsubclass\nare telling us\nwhat arguments\nuh or what what are the types of\narguments to a given relation or\nfunction because functions are relations\nso we see for example instrument the\ninstrument relation which is one of\nthese case roles\nstating participants in a process\nthe first argument to the instrument\nrelation is of type process\nright\nif we go down a little farther oh let's\nsee if you're looking on the web in\norder to avoid overloading the server i\ncapped things at 25 at a time so getting\nrobots hitting my server so\nyou have to quick click through to get\nyou know all of all of the\nargument three\nterms here\nif you're looking at the web if you're\nrunning your own copy of sigma locally\nyou can set this limit arbitrarily high\nso you don't have to bother clicking it\nyeah that's a little handier so let me\njust explain\nthis next section too\nfor antecedent and consequent\nso\nrules\nhave two parts\nuh\nantecedent\nand consequent\nand so the first argument is the\nantecedent and the second argument is\nthe consequence so here for this first\nrule that i'm pointing at\nuh\nwe've got we're looking at the the page\nsegments you can process appearing\nuh in the antecedent and so it here is\nhere in this antecedent\nlisting\nif you look down a little farther\ntowards the next section and there's a\nlot of axioms for our process\nand consequent now we'll see here's this\nfirst rule has two arguments a\nconjunction of stuff and then it confers\nright expression you'll see the process\nhere appears in the consequent not in\nthe antecedent so that's why it appears\ndown here\nall right so jenny's reminding me i kind\nof go off into tangent the whole point\nof this was to\nshow you uh\nuh\nthe verb to peep right that was our\nexample so we're gonna keep going\nthrough that\nso\nnow the next thing is okay we know\npeeping is a pro is a verb therefore a\nprocess so the next question is\nwhat is it of these subclasses here that\nare available to us can we walk down the\nhierarchy and try to find it right\nwe have\nagent patient process implying you have\nsomeone being an agent and then you have\na patient right\nyeah but i think there's something a bit\nmore fundamental and that's actually\ndown in the media ontology oh i should\nmaybe say a bit about this on this\nmiddle column you're getting\ninformation on which source files these\nstatements come from because\nsigma loads\nsource files and the suokiff\nformat and puts it all together\nso you don't have to remember which file\nis from which knowledge base\nin this case is from media\ni want to keep us let's keep for the\npurposes of this exercise stick with\nmerge that's the original sumo the\noriginal upper level okay all right\nso\nwe have content bearing process dual\nobject process\nintentional process internal change\nmotion process\nnatural process\nand single agent process\nyeah\nso what do you think it is amongst all\nof these\ni think it's an intentional process yeah\npeeping at something certainly sounds\nintentional to me\nall right so let's click on intentional\nprocess\nokay\nso intentional process we have\nalso again all sorts of\nwell we have listening we have listening\nyeah so if listening is kind\nis something we do with our ears maybe\nwe can find something to do with our\neyes\nthere we have looking\nokay yeah looking sounds like peeping to\nme\nall right hey we even got a picture of\nsomebody's eyes\nlooking okay an instance of seeing which\nis intentional\nokay\nuh\nthat sounds pretty good to me looking is\na kind of seeing that is intentional\nbut then\nwith peep you have some furtive sin\nthat you do it quietly\nyeah\nso\nas is the case for a lot of sumo we\ndon't have super specific stuff if you\nwanted to actually define to peep we'd\nhave maybe some\nsubclass that we'd create below looking\nright and then we'd say oh the person\nwho's peeping is doing this quickly\ncompared to other kinds of looking and\nmaybe doesn't want to be discovered it's\na secret there's something nobody he\nwants to make sure that nobody else sees\nhim peeping right but it's not defined\nyet but it's not defined yet so it could\nbe one of our audience tasks to define\nthat in sumo terms yeah in fact that\nwould be a great exercise okay\nall right so so that was just a quick\nintroduction um why don't we wrap it up\nfor now hopefully it's giving you a\nlittle bit of introduction to sigma that\nyou can use yourself and you know the\nbest way to learn about sumo and sigma\nis to start exploring and doing the\nexercises okay so thanks jenny for your\nhelp thank you adam"
},
{
"title": "DeMystifying Automated Reasoning Part 3 Example and Resolution Algorithm",
"transcript": "hello and welcome to the third part of\nthis series\non demystifying automated reasoning i'm\nadam peace and today we're going to get\ndown to the really the heart of the\nmatter which is the actual fear\nimproving algorithm\nso what is automated reasoning there are\nyou know this is one of these terms that\nuh people can use in different ways\ni'm going to use it in a way that the uh\nlogical\nautomated theorem proving community uh\nuses it\nas sort of representative of the\nconference on automated deduction\nand the international joint conference\non automated reasoning i'm\nconcerned about how they use the term\nand there may be other uses of the term\nbut we'll stick with this one\nso it's you know a process of using\ncomputer software to approximate a\ncertain kind of human reasoning\nbut using mathematical logic\noccasionally some other formalism but\nbasically a certain kind of mathematical\nlogic\nand i'm going to further narrow this by\nin this\nseries i'm just talking about refutation\ntheorem proving or proof by\ncontradiction i'll tell you a bit about\nwhat that means in more detail in a\nmoment and this is in first order logic\nthere are many different uh\nformal logics that have a well uh\nwell-specified mathematics\nfirst order logic or fol or predicate\ncalculus\nis what you probably had some\nintroduction to in your schooling if you\nhad a scientific and technical education\nespecially\none in computer science and i'm going to\ntalk about really just the\ntwo steps that are involved first is\nkind of preliminary\ncalled canonicalization uh which is\ngetting\nthe formulas into an easy to process\nform we've actually talked about that\nalready\nand created an algorithm for it in the\nsecond video of this series\nand uh the step the second step is the\nactual theorem proving that i'm going to\nconcentrate on here\nand a bit of a disclaimer this is a\nhighly mathematical area\nit's an area that took me a while to get\ninto because i'm not\nby training a mathematician i i'm a\nlittle uncomfortable when i see lots of\nmathematical symbols it takes me a while\nto get into it\nso i wanted to create an introduction\nthat's really suitable for programmers\nmathematicians and logicians may find\nthis too casual\nbut if if you do then pick another\nsource because there's lots of sources\nfor you that uh\ndescribe this area in a highly rigorous\nmathematical way but there's really very\nlittle\nfor programmers so that's my target\naudience here\nso let's start uh with an inference\nexample\nand so here i'm going to show\njust a very simple bit of reasoning with\nsome spatial relationships so we've got\nthese three\ncartoons here we've got an ostrich\none on the left an elephant one in the\nmiddle and an ostrich two\non the right and we're just going to\nreason about their relative positions so\nit's\nreally like most tutorials i've picked\nan example\nthat's almost trivial so that the\nexample itself\ndoesn't become overwhelming and\nhopefully you can extrapolate to more\ncomplicated problems from here\nso we've got uh elephant one\nis to the left of ostrich two\nso uh forgive the the video hiding the\nostrich 2 on the right maybe i'll scroll\nthis down a little bit for now so you\ncan get used to the example and we'll\nhide it later\nand then we have ostrich 1 is left of\nelephant 1. very simple and what we want\nto determine\nautomatically is is ostrich 1\nto the left of ostrich 2. so really\nsimple stuff\nbut useful if this were a more\ncomplicated problem\nand in order to accomplish this we need\nnot only these three\nthese two facts and the query the thing\nwe're going to ask\nbut we also need one rule and this rule\nsays that if we have an\norientation relationship between two\nthings\nand the stated relationship which we'll\ndenote by this variable\nr then this is a transitive relationship\nif this relation holds between x and y\nand y and z then it therefore holds\nbetween x and z\nso simple axiom of transitivity but for\na non-binary relation\nso a little more complicated maybe than\nthan some folks have been used to\nso first thing we do is this\ncanonicalization into conjunctive normal\nform i'm going to speed through this\nbecause we covered that\nin the second talk but just to show it\non a different problem so first thing we\ndo is remove our equivalences\nso you can see we've got this arrow uh\nuh\nthe implication operator here and our\nfirst axiom\nand a implies b equals not a or b\nso here we do this simple transformation\nto get rid of that\nthat symbol next thing we do are is to\nmove the negations\ninwards so we've got or wrapping around\na knot wrapping around an and\nand so if we want to push that knot in\nthen we\nflip the and to an or as you can see so\nnow we have\na nested pair of ores and we've negated\nboth of these first two\nliterals these these individual\nclauses or tuples that you see the\norientation statements so\ninstead of not and\norientation orientation we have or not\norientation not\norientation as a pattern so simple\ntransformation\nand then with regard to the algorithm we\nintroduced in the last video\nwe actually don't need the middle four\nsteps because all the variables already\nare standardized we don't have any\nexplicit\nnested quantification that could result\nin some\nrenaming we don't have any quantifiers\nto move left\neverything's already universally\nquantified in the outermost scope\nwe don't have any existentials so we\ndon't have any skullimization\nwe don't have any and operators to\ndistribute over or\nso the last thing we're left with is we\njust need to flatten ours we've got a\nnested or\nand so we can just have a single or\namongst three clauses rather than a\nnested or amongst\ntwo binary binary relationships\nso we wind up with not orientation or\nnot orientation or\norientation etc with the variables\nright and just some terminology\nthat i mentioned in passing so each of\nthese tuples\nis called a literal and if it's negated\nwe call it a negated literal and this is\ngoing to be key for\nour theorem proving algorithm in a\nmoment\nright so here's what we wind up with we\nwent up two with two facts\na normalized rule that's just a\nin conjunctive normal form and\na query so now we can get started\nso we're going to do as i mentioned\nrefutation theorem proving or proof by\ncontradiction and the way in which we do\nthat\nis we negate the query and then\ntry to find a contradiction and it's a\nlittle counter-intuitive it's like\nif i assume that this isn't true what\ncan i conclude\nand if in the end you come down to a\ncontradiction\nyou know that assuming the opposite of\nyour query has resulted in a\ncontradiction therefore\nthe positive version of your query must\nbe true that's the\nthe informal sketch of how this works\nand it really is the standard in the\ncommunity unfortunately it is a little\ncounterintuitive to to read such proofs\nbut it results in a nice simple\nalgorithm and that's what we want as\ncomputer scientists\nso here we go we've negated the query\njust put a knot around\nis ostrich 1 to the left of ostrich 2.\nand now we get started but another\noperation\nthat i need to detail here is known as\nunification if you've ever done the\nprologue programming\nuh this will hopefully be familiar to\nyou but not a lot of people have done\nprolog programming these days\nso unification informally at least is\ndo two of the two tuples uh\ntwo literals have the same form\nbut different values or occasionally the\nsame value\nthat are compatible so if\nwe have uh we first we have to have\npredicate symbols that are the same\nso the orientation symbol is the\npredicate here\nit's the relationship the name of the\nrelationship and then we have the\narguments and the arguments can't clash\nwe can't have terms\nthat are not equal in the same position\nin the two things we're trying to unify\nbut terms can unify with variables and\nthat's the case that fortunately we have\nhere\nso you can see that uh elephant one\ncorresponds to variable x ostrich 2\ncorresponds\nto ostrich y and and\nthe relationship of being or the\nattribute of being to the left of\nsomething\nis the variable r and so the result of a\nunification\nis a list of bindings for variables so\non the left we're showing the the\ncandidate unification between\na rule and a fact over to the right\nwe've kind of simplified it a little bit\nwe've just taken out\nthis literal from the rule and looked at\nit in isolation so it\nyou can see it matching up very clearly\nwith the fact\nand you can also see that uh the the\nsubstitutions you know x becomes\nelephant one and so on\nuh another key uh that's mentioned of\ncourse in a lot of\nunification algorithms is the fact that\nyou can't have\nshared variables you can't get into a\nsituation where you have\nuh x is substituted with y and then y is\nsubstituted with x then you have a sort\nof circularity that destroys this whole\nthing so\nmake sure that for each of the\nclauses or the literals being unified\nthat they have unique variable names\nno shared variable names the end of the\nthe or the result of a unification\nprocess is\nwe come out with a list of substitutions\nwhich is the list you see\ndown below and to the right uh question\nmark x equals elephant one and so on\nand i should note this is an example uh\ntaken from a prior publication\nso i tried i've been trying to collect\nexamples of spatial reasoning problems\nfor some future work\nso okay great now we've got we've done\nour canonicalization\nwe've uh showed you how to do\nunification\nand now we've got the actual process of\ndoing the resolution theorem proving and\nthis starts with axiom selection so\nhere's another area\nwhere there's a tremendous amount of of\nwork research\nin good approaches to axiom selection\nthere's sort of no\none beautiful perfect uh universal way\nto choose the best best statement to\nconsider next there are different ones\nunder different circumstances\nfor the purposes of this tutorial we're\njust going to pick the simplest one so\njust pick the next one that's available\nand try it out and see what you get\nso we're just going to have the\nthe query and then uh go from there\nso we start uh with a list that we'll\ncall to be used or tbu\nas well how it often appears in the\nliterature and\nwe're going to start with our negated\nquery and then our knowledge\nbase is all the things we know these two\nfacts about\nelephant one is left of ostrich two and\nthis rule that expresses the\ntransitivity of this relationship so our\ngoal\nis to match a negative literal\nwith a positive literal if we do that\nthey cancel out\nif you're a science fiction fan think of\nit like matter and antimatter canceling\neach other out that's our goal here\nbecause that lets us simplify\nthings uh if you've got a and not a\nyou've got a contradiction um and uh\nfor the purposes of this algorithm we're\nsort of trying to\nto you know explode those or pull them\nout\nor have them disappear or have them\nmatch um\nso for a negative literal we try to find\na positive literal that unifies\nuh and which one do we pick so we're\nlooking at our two be used we're trying\nto find a match\nfor the negated version or really the\npositive version of that because our\nquery is negated and so on the right we\ncould\nuh let's look at these two facts they're\nnot negated that's good so they're the\nopposite\nof our query but the they don't unify\nour terms don't match so look at this\nuh middle statement orientation elephant\none ostrich two\nwell right away with respect to our to\nbe used list our query\nthe first argument first argument is\nostrich 1\nand over on the right this middle\nstatement\nit has a first argument of elephant 1.\nit doesn't match doesn't unify we can't\nuse it uh the third\nstatement on the right has a similar\nproblem okay the first argument ostrich\none matches and we are matching a\nnegative literal with a positive literal\nthat's good but the second argument\ndoesn't work\nbecause uh for our query we've got\nostrich two\nand for our fact on the right we've got\nelephant one uh for the second argument\nthey don't match they don't unify\nit doesn't work so we have to pick uh\nthe rule that is the the first statement\nin our knowledge base and we've got a\nchoice of several of\nthe literals there the first two are\nnegated well that doesn't work because\nwe're trying to match\nwith a negated literal so we want to\nfind a positive literal\nthe third literal in this rule does\nmatch\nand in fact it unifies because it's all\njust filled with their\nas just variables for its arguments so\ngood news great we've found a match and\nwe can do some unification now and we're\njust going to\nyou know we're going to ignore the\nnegation because those that's going to\ncancel out\nnegated literal with the positive\nliteral and we're just going to focus on\nunifying\nuh the the unnegated literal uh\nand and see what happens and we get this\nnice match you know\nx goes to ostrich 1 z\nbecomes ostrich 2 and r becomes left and\nyou can see the substitution list\non the left of your screen so great\nso now we've got\nthe following because we have to do the\nsubstitution for the remainder of the\nrule\nso if we go back let's look at we've got\nsubstitutions for x\nz and r so look at that first\norientation statement we've got an\nx a y and an r so x is going to become\nequal to\nostrich 1 and r is going to become equal\nto left\nokay and similarly for the second\nstatement we've got\ny z and r well we've got substitutions\nfor z and r\nostrich two and left and so you can see\nhow\nuh yeah that turns into ostrich two and\nleft and of course the final statement\nunifies and substitutes completely uh\nbecomes completely equal\nto the thing we're trying to match and\nto be used\nso fantastic we've done the substitution\nnow we can have matter and antimatter\ncancel each other out that\nliteral goes away and we're left with\njust the following a simplified\nstatement in our knowledge base and that\nresult\nactually becomes our new to be used item\nthat's one of the ways in which\nthis method for axiom selection works\nfor us\nanytime we have a result left over we\nadd it to to be used\nas something we're going to try to match\nagain and that works out really well in\nthis case because\nnow we've got the complicated thing that\nwe're trying to find a match for\nand we've got some really easy matches\nfor it so in the first one\nwe really could match either we have to\npick one so we're just going to go in\norder\nwe're going to try to match this first\nliteral and we find\nthat it matches beautifully so\norientation\nand orientation match ostrich one\nmatches with ostrich one\nquestion mark y matches with elephant\none and left matches with left so we're\nleft with a substitution that\nuh y equals uh uh\nelephant one so great we could have used\nthe other but we've done in this order\ndoesn't really matter in this case\num so we could have used the the other\nuh pair but you know we had to pick one\nso that's what we did\nall right so we do the substitution uh\nand\nnow surprisingly enough because y was\nthe one variable we didn't have a\nsubstitution for\nin our first resolution we do have it in\nthe second one\nnow we've got a fully instantiated or\nfully ground\naxiom in our to be used list\nso we've gone from the see how we have a\nquestion mark y we filled it in with\nelephant one\nthere it is and so now both of these\nnegated literals in a disjunction are\nfully ground they have no variables in\nthem\nso matter and antimatter uh annihilate\nand the negated literal and its positive\nversion and knowledge base go away\nuh we set the result over to the to be\nused list\nand we're left with our last step very\nsimple\nand so we've got just a negated\nliteral and a positive literal and\nthey're identical\nso they match they annihilate and we're\ndone\nthat is the end if we have nothing else\nthat can be matched then we know we\nfound ultimately a contradiction this is\nthe contradiction it works out to be the\nkind of the end result we've proved that\nuh all of these steps hold we've done a\ncollection of very small\noperations which are truth-preserving\nand legitimate\nand shown that if we make the opposite\nassumption\nin the start of this proof if we negate\nour query\nthen we wind up with in the end a simple\ncontradiction\nright so if we don't go into the many\npossible improvements enhancements\nheuristics\ndifferent strategies for allocating\nmemory\nor choosing how you sort things\nor doing things called subsumption which\nmaybe i'll get\ninto in a future video all of these\nsimplifying efficiency steps and\napproaches\nthis is a very simple mechanical\nalgorithm\nstated like this maybe if i can give you\na little more detail on some\njust some data structures then\npretty much any competent programmer\ncould code this up the problem is it's\ngoing to be very slow\nand this is what people struggled with\nfor a lot of years is\nthe fact that the base algorithm is\nquite slow but there have been\ntremendous enhancements in over the past\nfew decades\nthat mean actually the stuff's now\nreally very very fast\neven on very large knowledge bases but\nfundamentally it's a well-proven\nmathematics it's not something just that\na programmer dreamt up and did some\ntesting on\nthere's mathematical proofs that show\nthat this process\ndoesn't reach wrong answers as long as\nthe premises are true\nthe algorithm itself is a\ntruth-preserving algorithm\nand each step is is very simple\nand i wish somebody had a simple\npresentation like this\nto show me a long time ago because it\nreally isn't that hard\nif you state it without some of the math\nbut just as a programming technique\nand the power of it like in a lot of uh\nscientific disciplines is the the beauty\nof it\nis you have a very simple thing that\nwhen you do it in the large or do it\nrepeatedly\nit can result in something very\nsophisticated and give you some really\nuseful answers that would be otherwise\nvery hard to calculate yourself\npeople have been doing proofs\nmathematically for a very long time\nand having a machine that can do it that\ndoesn't get tired and works much faster\nis a tremendous resource and so\nmathematicians are also making very good\nuses\nof automated theorem proving these days\nas well\nall right so that's it hopefully this uh\ndemystified a little bit of the process\nof\nrefutation theorem proving or first\norder proving proof by contradiction\nand if you like this let me know and\nsubscribe and comment and\nthanks for listening"
}
]