




已阅读5页,还剩22页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Chapter2第二章LOGIC逻辑,Logicisthediscipline(学科)thatdealswiththemethodsofreasoning(推理).,逻辑是讨论推理方法的一门学科。一般来说,逻辑为确定一个给出的论证是否有效提供各种法则和技巧。逻辑推理在数学里常用来证明定理,在计算机科学里用来检验程序的正确性和证明定理,在自然科学和物理学里用来从实验导出结论,在社会科学和人们日常生活里用来求解大量的问题。确确实实,人们经常使用逻辑推理。在这一章将讨论它的一些基本概念。,Theexampleofreason,IfIamyourteacherthenIshouldgiveyoulessons.Iamyourteacher.SoIshouldgiveyoulessons.Isitright?Maybejustnow!,Anotherexampleofreason,Ifyouinvestinthestockmarketthenyouwillgetrich.Ifyougetrichthenyouwillbehappy.so,ifyouinvestinthestockmarketthenyouwillbehappy.Isitright?Maybejustnow!,Anotherexampleofreason,iftaxesarelowered,thenincomerises.incomerises.so,taxesarelowered.Isitright?Maybejustnow!,2.1PropositionsandLogicalOperations命题与命题逻辑,1.Proposition命题:Astatement(orproposition命题)isadeclarativesentencethatiseithertrueorfalse,butnotboth.命题是或者为真或者为假而不是两者同时成立的一条陈述句.,1+1=2Johnisastudent.TodayisTuesday.2isanoddnumberIamateacher.,Examples:,Truthvalue:Thevalue(result)oftheproposition.OneoftheelementfromsetTrue,False.,MoreExamplesofProposition,DoyouspeakEnglish?Thisisaquestion,notastatement.Letsgo!Itisnotastatement,butacommand.3-x=5.xisavariable,sothetruthvalueofthissentenceisopen.The4-colorguessistrue.Webelievethatitistrueorfalse,butnotbothevenbeforeitwassolved.ThesunwillcomeouttomorrowItisastatementWhatagoodmanheis.ItisnotastatementIamlying.Itisaparadox.,Inlogic,thelettersp,q,r,.denotepropositionalvariables(命题变量);thatis,variablesthatcanbereplacedbystatements.Suchasp:Thesunisshiningtoday.q:Itiscold.Statementsorpropositionalvariablescanbecombinedbylogicalconnectives(联结词)toobtaincompoundstatements(复合命题).wemaycombinetheprecedingstatementsbytheconnectiveandtoformthecompoundstatementpandq:Thesunisshininganditiscold.,2.LogicalConnectivesandCompoundStatements逻辑联结词和复合命题,Asimplestatementcanberepresentedbyanatomproposition.Morethanoneatompropositionscanbecombinedintoacompoundstatement.Thecombinationisachievedusing“connectives”.Usually,theconnectiveroughlycorrespondssomeconjunctiveinthenaturallanguage.,Sowelearnthat,Whatisthetruthvalueofacompoundstatement?Dependsonthetruthvalueofeachatomproposition;Dependsontheconnectives.Theconnectiveisdefinedexactlyusing“truthtable”.,若p为真,则p为假,若p为假,则p为真。严格地讲,“非”不是联结词,因为它不连接两个命题,p不是真正的复合命题。然而,“非”是命题集合的一元运算。若p是命题,那么p也是命题。,themostimportantconnectives,Negation否定,非:Ifpisastatement,thenegation(否定,非)ofpisthestatementnotp,denotedbyp.pisthestatement“itisnotthecasethatp.”,(2)Conjunction合取:Ifpandqarestatements,theconjunction(合取)ofpandqisthecompoundstatement“pandq(p且q)”,denotedbypq.Theconnectiveandisdenotedbythesymbol.Thecompoundstatementp/qistruewhenbothpandqaretrue;otherwise,itisfalse.InthelanguageofSectionl.6,andisabinaryoperationonthesetofstatements.,Truthtablefor,(3)Disjunction析取:Ifpandqarestatements.thedisjunction(析取)ofpandqisthecompoundstatement“porq,”denotedbypq.Theconnectiveorisdenotedbythesymbol.Thecompoundstatementpgistrueifatleastoneofporqistrue;itisfalsewhenbothpandqarefalse.,Truthtablefor,联结词“或”比联结词“且”更复杂,因为在语言里“或”的使用有两种不同的方法。假设说“我星期一去西班牙或我星期五去西班牙”,在这样的复合命题中,有命题析取p:“我星期一去西班牙”和q:“我星期五去西斑牙”当然,两种可能性只有一种发生,不可能两者同时发生。因此联结词“或”是在不兼容(exclusive)的意义上使用的。另一方面,考虑析取“我的数学及格了或我的法语未及格”,在这种情况下,两种可能性至少有一种发生。然而,两者也可同时发生。因此,联结词“或”是在兼容(inclusive)的意义上使用的。在数学和计算机科学中,人们约定总是在可兼容方式上使用联结词“或”。,Ingeneral,acompoundstatementmayhavemanycomponentparts,eachofwhichisitselfastatement,representedbysomepropositionalvariable.,命题s:p(q(pr)包含三个命题:p,q,r,其中每一个又可以独立地取真或假.对于p,q和r真值的组合情况,总共存在23即8种可能.在s的真值表中给出了所有这些情况下s的真或假.,Ifacompoundstatementscontainsncomponentstatements.therewillneedtobe2nrowsinthetruthtablefors.Suchatruthtablemaybesystematicallyconstructedinthefollowingway:,STEP1:表的开始n列用分命题变量标明,其余的列是变量的中间组合,最后一列是完整的整个命题。,STEP2:在开始的n个标题的每一个下面,列出n个分命题2n种可能的n元真值.,STEP3:对余下的列,按次序计算各自的真值.,Howtomakeatruthtable?,3.Predicate谓词,InSection1.1,wedefinedsetsbyspecifyingapropertyP(x)thatelementsofthesethaveincommon.Thus,anelementofxP(x)isanobjecttforwhichthestatementP(t)istrue.SuchasentenceP(x)iscalledapredicate(谓词).因为在英语里,性质在语法上就是谓词.,Ifxisaninteger,“xislargerthan2”isnotaproposition.ItcanbedenotedasP(x),apropositionalfunction(命题函数),因为x的每种选择产生一个或为真或为假的命题P(x)。ThedomainofPisthesetofallelements,andTherangeofPistrue,falseApropositionalfunctionP(x)isalsocalledapredicate(谓词).,Ifxisaninteger,“xislargerthan2”isnotapropositionLetP(x):xislargerthan2.isP(x)aproposition?No!Howtomakeapredicateproposition?P(3)isapredicateproposition.“Forallx,P(x)”isaproposition.“Thereexistsanx,P(x)”isaproposition.,Theuniversalquantification(全称量化)ofapredicateP(x)isthestatement“Forallvaluesofx,P(x)istrue.”WeassumeherethatonlyvaluesofxthatmakesenseinP(x)areconsidered.TheuniversalquantificationofP(x)isdenotedxP(x).Thesymboliscalledtheuniversalquantifier(全称量词).,UniversalquantificationcanalsobestatedinEnglishas“foreveryx,”“everyx,”or“foranyx.”(“对每一个x”、“所有x”或“任意x”.),4.Quantifiers量词,Giventhedomain,“forallx,P(x)istrue.”isastatement,thatisthesentenceiseithertrueorfalse,butnotboth.WhenP(x):x2,Howaboutthetruthvalueof“forallx,P(x)”?Ifxisrealnumber,andP(x)represents“-(-x)=x”,howaboutthetruthvalueofxP(x)?,谓词可以含有几个变量,全称量化可以施加到每个变量上.例如,交换性质可表示为:xy,xy=yx.,Theexistentialquantification(存在量化)ofapredicateP(x)isthestatement“ThereexistsavalueofitforwhichP(x)istrue.”TheexistentialquantificationofP(x)isdenotedxP(x).Thesymboliscalledtheexistentialquantifier(存在量词).,InEnglishxcanalsoberead“thereisanx,”“thereissomex,”“thereexistsanx,”or“thereisatleastonex.”(“存在一个x”、“存在某个x”、“有一个x”或“至少存在一个x”),WhenP(x):x2,Howaboutthetruthvalueof“thereisanx,P(x)”?Ifa,barerealconstants,ab,P(x)means“axb”,howaboutxP(x)?,NegationofQuantifications量词的否,Domainofrealnumber(-0)isassumedNegationofuniversalquantificationForallx,thesquareofxispositiveThereexistssomex,thesquareofxisnotpositive.NegationofexistentialquantificationThereexistssomex,5x=x.Forallx,5xisnotequaltox.,存在量化可以应用到谓词里的几个变量上,并且量化的次序被认为不影响真值.对于有几个变量的谓词,既可以应用全称量化也可以应用存在量化。在这种情况,与先后次序有关。,MultipleQuantifiers量词的多重使用,ConsideringthesetofrealnumbersandP(x,y)meansx=y+1.WhatisthemeaningandtruthvalueofxyP(x,y)?WhatisthemeaningandtruthvalueofxyP(x,y)?WhatisthemeaningandtruthvalueofxyP(x,y)?WhatisthemeaningandtruthvalueofxyP(x,y)?xyP(x,y)andyxP(x,y)havethesametruthvalues,andtheyarefalse.xyP(x,y)andyxP(x,y)havethesametruthvalues,andtheyaretrue.xyP(x,y)istrue,butxyP(x,y)isfalse.xyP(x,y)istrue,butyxP(x,y)isfalse.,ExamplesofQuantification,
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 青岛高一统考数学试卷
- 滦县小升初数学试卷
- 临汾高三月考数学试卷
- #2蓄电池组 质量控制资料-充电
- 陶瓷勘探设备集成效果分析报告
- 超市季节性需求预测与库存管理
- 2025年水基聚合物防水涂料合作协议书
- 风电场施工生态修复分析报告
- 清华附中中考数学试卷
- 道路工程建设项目管理分析报告
- 2025淄博市沂源县历山街道社区工作者考试真题
- 高压电缆头制作培训教材
- 国旗法课件教学课件
- 食管内镜支架植入护理配合
- 老年人防诈骗课件
- 《煤矿重大事故隐患判定标准》
- 二氧化碳逆水煤气变换技术研究进展
- GB/T 45411.1-2025光学和光子学瞄准望远镜规范第1部分:普通性能仪器
- 金融知识进校园高中课件
- 常压储罐管理制度
- 税务师事务所内部管理制度
评论
0/150
提交评论