• A Intro Snippet for Logic & Propositional Logic


    Written with StackEdit.

    Materials: AIMA, Ch. 7

    Basics for Logic

    Syntax vs. Semantic

    Syntax : well formed representation

    Semantic : sentences' specific meaning in a "possible world"

    possible world: "model", such as "a world where x=1 and y=2".

    Satisfaction vs. Entailment

    Satisfaction : if sentence (alpha) is true in model (m) , we say :

    • (m) satisfies (alpha),
    • (m) is a model of (alpha),
    • (M(alpha)={m|m ext{ is a model of }alpha}).

    e.g. "(x=2, y=2)" is a model of "(x+y=4)".

    Entailment : A sentence follows logically from another sentence.

    • (alphavDasheta Leftrightarrow M(alpha)subseteq M(eta)), which means (alpha) entails (beta) .

    e.g. (x=0) entails (xy=0) .

    Inference vs. Entailment

    We use INFERENCE to find ENTAILMENT .

    If we can use inference algorithm (i) to derive (alpha) from (KB) , we say:

    • (KBvdash_ialpha), as (i) derives (alpha) from (KB) .

    Soundness vs. Completeness

    Soundness : An inference algorithm that derives only entailed sentences is called sound .

    Model-checking ( To prove (KBvdash_{mc}alpha), check every model to prove (M(alpha)subseteq M(KB)) ) is a sound algorithm when possible.

    e.g.: only find exist needles in a haystack.

    Completeness : An inference algorithm that can derive any sentence that is entailed is called complete .

    e.g.: find every exists needle in a haystack.

    Representation vs. Real World

    Corresponding relation between "x entails x" in logical representation and xx follows xx in real world .

    Grounding issues. "Sensors" guarantees (KB) is true in Real World.

    Propositional Logic

    Syntax

    • Atomic sentences: capitalized letters
      • True/False
    • Logical connectives: connect atomic sentences to make complex sentences
      • ( eg) neg , negation
      • (land) land , conjuction
      • (lor) lor , disjunction
      • (Rightarrow) Rightarrow , imply
      • (Leftrightarrow) Leftrightarrow IFF , biconditional
        • also (equiv) equiv

    Semantic

    Rules for Atomic sentences are easy:
    True is true in every model and False is false in every model.
    • The truth value of every other proposition symbol must be specified directly in the model.

    For complex sentences, we have five rules, which hold for any subsentences (P) and (Q) in any model m (here “iff” means “if and only if”):
    ( eg P) is true iff (P) is false in (m).
    (P land Q) is true iff both (P) and (Q) are true in (m).
    (P lor Q) is true iff either (P) or (Q) is true in (m).
    • * (P Rightarrow Q) is true unless (P) is true and (Q) is false in (m).
    (P Leftrightarrow Q) is true iff (P) and (Q) are both true or both false in (m).

    A tricky point: (PRightarrow Q) is true in model (M) EXCEPT (P) is true but (Q) is false.

    You can refer to this: ((PRightarrow Q) Leftrightarrow ( eg P lor Q))

    btw, Truth Table solves all.

  • 相关阅读:
    安卓AndroidManifest.xml介绍
    Android系统开发入门
    蓝牙协议(bluetooth spec)
    解决:NoSuchAlgorithmException: Algorithm HmacSHA1 not available
    Spring bean 实现初始化、销毁方法的方式及顺序
    解决: maven编译项目报“非法字符: 65279 ”错误
    解决:eclipse 非正常关闭,导致无法正常启动
    ffmpeg 音频转换: use ffmpeg convert the audio from stereo to mono without changing the video part
    win10家庭版快速升级专业版
    Linux下更改目录及其下的子目录和文件的访问权限
  • 原文地址:https://www.cnblogs.com/ria2020/p/13819599.html
Copyright © 2020-2023  润新知