ZoranMajkić IntensionalFirst-OrderLogic Also of Interest KnowledgeEngineeringforModernInformationSystems Methods,ModelsandTools Sharma,Kautish,Agrawal,Madaan,Gupta,Nanda(Eds.),2022 ISBN978-3-11-071316-9,e-ISBN978-3-11-071363-3 NoiseFilteringforBigDataAnalytics Bhattacharyya,Ghosh(Eds.),2022 ISBN978-3-11-069709-4,e-ISBN978-3-11-069721-6 BigDataAnalyticsMethods AnalyticsTechniquesinDataMining,DeepLearningandNatural LanguageProcessing Ghavami,2019 ISBN978-1-5474-1795-7,e-ISBN978-1-5474-0156-7 BigDataManagement DataGovernancePrinciplesforBigDataAnalytics Ghavami,2020 ISBN978-3-11-066291-7,e-ISBN978-3-11-066406-5 AdvancedDataManagement ForSQL,NoSQL,CloudandDistributedDatabases Wiese,2015 ISBN978-3-11-044140-6,e-ISBN978-3-11-044141-3 Zoran Majkić Intensional First-Order Logic | From AI to New SQL Big Data Author ZoranMajkić ViaPalestro13 00185Rome Italy [email protected] ISBN978-3-11-099494-0 e-ISBN(PDF)978-3-11-098143-8 e-ISBN(EPUB)978-3-11-098146-9 LibraryofCongressControlNumber:2022940161 BibliographicinformationpublishedbytheDeutscheNationalbibliothek TheDeutscheNationalbibliothekliststhispublicationintheDeutscheNationalbibliografie; detailedbibliographicdataareavailableontheInternetathttp://dnb.dnb.de. ©2022WalterdeGruyterGmbH,Berlin/Boston Coverimage:dem10/E+/GettyImages Typesetting:VTeXUAB,Lithuania Printingandbinding:CPIbooksGmbH,Leck www.degruyter.com | Dedicatedtomydaughters VivianaandSofia Calypso,thebeautifulgoddess,wasthefirsttospeak,andsaid:“SonofLaertes,sprungfrom Zeus,Odysseusofmanydevices,would’stthouthenfarenowforthwithhometothydearnative land!Yet,evensofaretheewell.Howbeitifinthyheartthouknewestallthemeasureofwoeit isthyfatetofulfilbeforethoucomesttothynativelandthouwouldestabidehereandkeepthis housewithme,andwouldestbeimmortal,forallthydesiretoseethywifeforwhomthoulongest daybyday.SurelynotinferiortoherdoIdeclaremyselftobeeitherinformorstature,forinno wiseisitseemlythatmortalwomenshouldviewithimmortalsinformorcomeliness.” ThenOdysseusofmanywilesansweredher,andsaid:“Mightygoddess,benotwrothwithmefor this.IknowfullwellofmyselfthatwisePenelopeismeanertolookuponthanthouincomeliness andinstature,forsheisamortal,whilethouartimmortalandageless.ButevensoIwishandlong daybydaytoreachmyhome,andtoseethedayofmyreturn.Andifagainsomegodshallsmite meonthewine-darksea,Iwillendureit,havinginmybreastaheartthatenduresaffliction.For erethisIhavesufferedmuchandtoiledmuchamidthewavesandinwar;letthisalsobeadded untothat.” Sohespoke,andthesunsetanddarknesscameon. TheOdyssey,book5,byHomer. Preface In“ÜberSinnundBedeutung,”Fregeconcentratedmostlyonthesensesofnames, holding that all names have a sense (meaning). It is natural to hold that the same considerationsapplytoanyexpressionthathasanextension.Buttwogeneralterms canhavethesameextensionanddifferentcognitivesignificance.So,generalterms, predicates,andsentencesallhavesensesaswellasextensions.Thesamegoesforany expressionthathasanextension,orisacandidateforextension. Thesignificantaspectofanexpression’smeaningisitsextension.Wecanstip- ulatethattheextensionofasentenceisitstruth-value,andthattheextensionofa singulartermisitsreferent.Theextensionofotherexpressionscanbeseenasasso- ciated entities that contribute to the truth-value of a sentence in a manner broadly analogoustothewayinwhichthereferentofasingulartermcontributestothetruth- valueofasentence.Inmanycases,theextensionofanexpressionwillbewhatwe intuitivelythinkofasitsreferent,althoughthisneednotholdinallcases.WhileFrege himselfisofteninterpretedasholdingthatasentence’sreferentisitstruth-value,this claimiscounterintuitiveandwidelydisputed.Wecanavoidthatissueinthepresent frameworkbyusingthetechnicalterm“extension.”Inthiscontext,theclaimthatthe extensionofasentenceisitstruth-valueisastipulation. “Extensional”ismostdefinitelyatechnicalterm.Saythattheextensionofaname isitsdenotation,theextensionofapredicateisthesetofthingsitappliesto,andthe extensionofasentenceisitstruthvalue.Alogicisextensionalifcoextensionalexpres- sionscanbesubstitutedoneforanotherinanysentenceofthelogic“salvaveritate,” thatis,withoutachangeintruthvalue.Theintuitiveideabehindthisprincipleisthat inanextensionallogictheonlylogicallysignificantnotionofmeaningthatattaches toanexpressionisitsextension.Anintensionallogicsisexactlyoneinwhichsubsti- tutivitysalvaveritatefailsforsomeofthesentencesofthelogic. Thefirstconceptionofintensionalentities(orconcepts)isbuiltintothepossible- worlds treatment of Properties, Relations and Propositions (PRP)s. This conception iscommonlyattributedtoLeibniz,andunderliesAlonzoChurch’salternativeformu- lationofFrege’stheoryofsenses(“AformulationoftheLogicofSenseandDenota- tion”inHenle,KallenandLanger,3–24,and“OutlineofaRevisedFormulationofthe LogicofSenseandDenotation”intwoparts,Nous,VII(1973),24–33,andVIII,(1974), 135–156).ThisconceptionofPRPsisideallysuitedfortreatingthemodalities(neces- sity,possibility,etc.)andtoMontague’sdefinitionofintensionofagivenvirtualpred- icateϕ(x1,...,xk)(aFOLopensentencewiththetupleoffreevariables(x1,...xk)),as amappingfrompossibleworldsintoextensionsofthisvirtualpredicate.Amongthe possible worlds, we distinguish the actual possible world. For example, if we con- siderasetofpredicates,ofagivendatabase,andtheirextensionsindifferenttime- instances,thentheactualpossibleworldisidentifiedbythecurrentinstanceofthe time. https://doi.org/10.1515/9783110981438-201 VIII | Preface ThesecondconceptionofintensionalentitiesistobefoundinRussell’sdoctrine oflogicalatomism.Inthisdoctrine,itisrequiredthatallcompletedefinitionsofin- tensional entities be finite as well as unique and noncircular: it offers an algebraic wayfordefinitionofcomplexintensionalentitiesfromsimple(atomic)entities(i.e., algebraofconcepts),conceptionalsoevidentinLeibniz’sremarks.Inapredicatelog- ics,predicatesandopen-sentences(withfreevariables)expressesclasses(properties andrelations),andsentencesexpresspropositions.Notethatclasses(intensionalen- tities)arereified,i.e.,theybelongtothesamedomainasindividualobjects(partic- ulars).Thisendowstheintensionallogicswithagreatdealofuniformity,makingit possibletomanipulateclassesandindividualobjectsinthesamelanguage.Inpar- ticular, when viewed as an individual object, a class can be a member of another class. The distinction between intensions and extensions is important (as in lexicog- raphy [1]), considering that extensions can be notoriously difficult to handle in an efficientmanner.Theextensionalequalitytheoryofpredicatesandfunctionsunder higher-ordersemantics(e.g.,fortwopredicateswiththesamesetofattributesp=qis trueiffthesesymbolsareinterpretedbythesamerelation),i.e.,thestrongequational theoryofintensions,isnotdecidable,ingeneral.Forexample,thesecond-orderpred- icatecalculusandChurch’ssimpletheoryoftypes,bothunderthestandardseman- tics,arenotevensemidecidable.Thus,separatingintensionsfromextensionsmakesit possibletohaveanequationaltheoryoverpredicateandfunctionnames(intensions) thatisseparatefromtheextensionalequalityofrelationsandfunctions. Relevantrecentworkabouttheintension,anditsrelationshipwithFOL,hasbeen presentedin[2]intheconsiderationofrigidandnonrigidobjects,w.r.t.thepossible worlds,wheretherigidobjects,like“GeorgeWashington,”andarethesamethings frompossibleworldtopossibleworld.Nonrigidobjects,like“theSecretary-Generalof UnitedNations,”arevaryingfromcircumstancetocircumstanceandcanbemodeled semantically by functions from possible worlds to the domain of rigid objects, like intensionalentities. Anotherapproachusedinintensionallogicprogrammingisanewformoflogic programmingbasedonintensionallogicandpossibleworldssemantics,andisawell- definedpracticeinusingtheintensionalsemantics[3].Intensionallogicallowsusto uselogicprogrammingtospecifynonterminatingcomputationsandtocapturethe dynamic aspects of certain problems in a natural and problem-oriented style. The meanings of formulas of an intensional first-order language are given according to intensionalinterpretationsandtoelementsofasetofpossibleworlds.Neighborhood semanticsisemployedasanabstractformulationofthedenotationsofintensionalop- erators.Themodel-theoreticandfixed-pointsemanticsofintensionallogicprograms aredevelopedintermsofleast(minimum)intensionalHerbrandmodels.Intensional logicprogramswithintensionaloperatordefinitionsareregardedasmetatheories. Some of the important questions about intensional First-order Logic (FOL) was enouncedbyMelvinFittinginhis2003preprint[2]: Preface | IX “Whatisfirst-ordermodallogicfor?Sincethisisobviouslynotasimplequestion;perhapsweshould beginbyasking,whatispropositionalmodallogicfor?Hereweareonwell-exploredground.With propositionalmodallogic,anditsrelationalsemantics,wewanttoexplicatevariousconstructs fromnaturallanguage,andexplorenuancesofcertainconceptsarisinginphilosophicalinvestiga- tions.Wewanttomodelknowledge,atleastinanidealsense.Wewanttoreasonaboutaction.And thereisanotherpurposeaswell,onethathasbecomeclearerovertheyears.Instudyingproposi- tionalmodallogics,–primarilythosecharacterizedbyclassesofframes,–wearealsostudying fragmentsofclassicalfirst-order(andhigher-order)logic.Thisisknownascorrespondencetheory. Forthispurposeaxiomatizability(ornot)isacentralissue.Inaddition,axiomsystemsallowthe constructionofcanonicalmodels,whichprovidesametamathematicalmethodologythatisuniform acrossmanylogics.Detailsmatteragreatdeal,ofcourse,butthebroadoutlinesofpropositional modallogicshavebeenstandardizedforsometime. Buttheoriginalquestionabovewas,whatisfirst-ordermodallogicfor?Whatdoquantifiersaddto themix?” Butinhisapproach,differentlyfromthisone,Fittingchangesalsothesyntaxofthe FOL,byintroducingan“extensionof”theoperator,↓,inordertodistinguishtheinten- sionalentity“grossdomesticproductofDenmark,”anditsusein“thegrossdomestic productofDenmarkiscurrentlygreaterthangrossdomesticproductofFinland.”Inhis approach,ifxisanintensionalvariable,↓ xisextensional,while↓isnotapplicable toextensionalvariables,differentfromours,whereeachvariable(concept)hasboth intensionalandextension.Moreover,inhisapproachtheproblemarisesbecausethe actionoflettingxdesignate,i.e.,evaluating↓x,andtheactionofpassingtoanalter- nativepossibleworld,thatisofinterpretingtheexistentialmodaloperator⬦,arenot actionsthatcommute.Todisambiguatethis,onemorepieceofmachineryisneeded aswell,whichsubstantiallyandadhocchangesthesyntaxandsemanticsofFOL,in- troducesthehigher-ordermodallogics,andisnotaconservativeextensionofTarski’s semantics.Inthemostrecentworkin[4,5]isgivenanintensionalversionoffirst-order hybridlogic,whichisalsoahybridizedversionofFitting’sintensionalFOL,byakind ofgeneralizedmodels;thus,isdifferentfromourapproachtoaconservativeextension ofTarski’ssemanticstointensionalFOL. AnotherrecentrelevantworkispresentedbyI-logicin[6],whichcombinesboth approachestosemanticsofintensionalobjectsofMontagueandFitting. Inhisapproach,FittingfollowedtheMontaguetradition,differentfrommywider approach provided in this book that uses both Montague tradition and algebraic Bealer’s approach, and enriched them by a more detailed investigation of modal logicsofFOL,andbythewayintroducednaturallytheintensionalsemanticsintotra- ditionalextensionalFOLwithTarski’ssemanticsand,moreover,howtointroducein suchminimalintensionalFOLandthe“higherlevel”modaloperators.Mostrelevant formypersonalresearchhasbeentwosignificantapproachestointensionalFOL: 1. Montague’sapproachbasedonpossibleworldrepresentation[7,8,9,10,11],the intensionofapropositionisafunctionfrompossibleworlds𝒲totruth-values,and propertiesandfunctionsfrom𝒲tosetsofpossible(usuallynotactual)objects. X | Preface 2. Bealer’sapproachin[12]totheintensionallogicthefundamentalentitiesarein- tensionalabstractsorso-called,“that-clauses”andhisintroductionofintensional algebras. Thesetwoapproachesareunifiedinmyapproach,withprovidingaconservativeex- tensionofTarski’ssemanticstointensionalFOLaswell. Quovadislogic-basedAI? Why this title? I will try to explain it by my relevant research history from 2003 to 2020. At “La Sapienza,” Roma, Italy, we had a number of good professors and re- searchesinlogic-basedAI,andespeciallyintheresearchgroupofmyPhDadvisor, ProfessorM.Lenzerini(from94to98),whointhatperiodwaschiefofthePhDpro- gramsandresearchinknowledgebasisandAI.Inthatperiod,thebook[13]ofthelogic basedapproachtoAIwasareferenceformyintroductiontothisfield,andmybook insomewayisacontinuationofthatapproach.Ireturnedagaintohisdepartmentin 2002,4yearsafterIfinishedmyPhDthesis,toworkfortheEuropeaninteruniversity projectofSemanticWeb,calledSEWASIEprojectIST-2001-34825.Ihavewritten,with initialhelpofLenzerini,threeorfourresearchpapersforthisEuropeanresearchpro- gram.Inthatperiod,Lenzeriniwasthechiefresearchleaderindataintegrationand itwasalsotheverybeginningoftheP2Pdataintegrationsystems,basedonthefirst- orderlogicanditssecond-orderextensionsfortheinterdatabasemappings.Thus,the wholeframeworkwasjustinstandardextensionallogics,whichdemonstratedalotof theoreticalproblemsaboutmutuallyinconsistentinformationcomingfromdifferent sources. Ofcourse,allmyworkinthisprojectwasjustinthisworkinglogicframework,but Itriedtoconsidermany-valuedlogicstoovercometheseproblemsabouttheinconsis- tencesandtofindamorerobustdataintegrationP2Psystem,tryingtoovercomethe strong(extensional)mappingbetweendatabases.WhenIorganizedafirstshortpaper withthesenewideas,Lenzeriniacceptedtojoinwithmetowritethefinalversion,but fromthefactthathepublishedpaperswithhisworkinggroupofotherprofessorsand researches,heaskedmetowaitonthedecisionofthisgroupiftheywouldacceptme asnewmemberofthisgroup,andhenceauthorizedtopublishtheresearchpapersfor journalsorconferencestogether. Unfortunatelyforme,somebodyinhisgroupdidnotlikemyparticipationand Lenzerini was sorry, but promised that if my papers were accepted for the confer- encesorjournals,thatdepartmentwouldsupportallexpenses(traveling,participa- tioncosts,etc.)forpresentations.Theirdecisionexplainswhy,duringthe3yearswork- ingwithhisresearchgroupforthisEuropeanproject,Ihavenoanypublicationwith theminjournalsorconferences,andwhyallsuchworkwasdonebymeonly.With economicalsupportbythedepartmentofLenzerini,Ipublishedadozenpapersby