Logique mathématique Examen 1 1 - Study Notes

Exercise 1: Formula Analysis and Properties

  • Formula Definition: The formula subject to analysis is F=¬((x∧y)  ⟹  z  ⟺  (x  ⟹  z)∧(y  ⟹  z))F = \neg((x \land y) \implies z \iff (x \implies z) \land (y \implies z)).

  • Equivalence Deduction:

    • ssPremise: It is given that ¬(x  ⟺  y)  ⟺  ((x∧¬y)∨(¬x∧y))\neg(x \iff y) \iff ((x \land \neg y) \lor (\neg x \land y)).

    • Inference: By substituting xx with AA and yy with BB, we obtain ¬(A  ⟺  B)  ⟺  ((A∧¬B)∨(¬A∧B))\neg(A \iff B) \iff ((A \land \neg B) \lor (\neg A \land B)).

    • Principle: Utilizing the property that F≡GF \equiv G if and only if ⊨F  ⟺  G\models F \iff G, we deduce that ¬(A  ⟺  B)≡(A∧¬B)∨(¬A∧B)\neg(A \iff B) \equiv (A \land \neg B) \lor (\neg A \land B).

  • Structure Tree of F:

    • The root of the tree is the negation operator ¬\neg.

    • The level below the root is the equivalence operator   ⟺  \iff.

    • The left child of   ⟺  \iff is the implication   ⟹  \implies, which branches into a conjunction ∧(x,y)\land (x, y) and the variable zz.

    • The right child of   ⟺  \iff is a conjunction ∧\land, which branches into two implications: (x  ⟹  z)(x \implies z) and (y  ⟹  z)(y \implies z).

  • Transformation to Disjunctive Normal Form (FND):

    • Let notation be simplified where xyxy represents x∧yx \land y and xˉ\bar{x} represents ¬x\neg x.

    • F≡(xy  ⟹  z)  ⟺  (x  ⟹  z)(y  ⟹  z)F \equiv (xy \implies z) \iff (x \implies z)(y \implies z).

    • Applying the property ¬(A  ⟺  B)≡(A∧¬B)∨(¬A∧B)\neg(A \iff B) \equiv (A \land \neg B) \lor (\neg A \land B), the transformation yields:

    • F≡(xy  ⟹  z)(x  ⟹  z)(y  ⟹  z)‾+(xy  ⟹  z)‾(x  ⟹  z)(y  ⟹  z)F \equiv (xy \implies z)\overline{(x \implies z)(y \implies z)} + \overline{(xy \implies z)}(x \implies z)(y \implies z).

    • Further reduction: F≡(xˉ+yˉ+z)(xzˉ+yzˉ)+(xyzˉ)(xˉ+z)(yˉ+z)F \equiv (\bar{x} + \bar{y} + z)(x\bar{z} + y\bar{z}) + (xy\bar{z})(\bar{x} + z)(\bar{y} + z).

    • Final FND: F≡xyˉzˉ+xˉyzˉF \equiv x\bar{y}\bar{z} + \bar{x}y\bar{z}.

  • Satisfiability and Validity:

    • Satisfiability: The formula FF is satisfiable. It possesses exactly two models: (x=0,y=1,z=0)(x=0, y=1, z=0) and (x=1,y=0,z=0)(x=1, y=0, z=0).

    • Validity: The formula FF is not valid because ¬F\neg F is also satisfiable.

    • Proof for ¬F\neg F: ¬F≡(x+yˉ+z)(y+xˉ+z)≡xy+xz+yˉxˉ+yˉz+zy+zxˉ+z≡z+xy+yˉxˉ\neg F \equiv (x + \bar{y} + z)(y + \bar{x} + z) \equiv xy + xz + \bar{y}\bar{x} + \bar{y}z + zy + z\bar{x} + z \equiv z + xy + \bar{y}\bar{x}.

Exercise 2: Validity Proofs

  • Conjunction Validity Proof:

    • Objective: Show that ⊨F∧G\models F \land G if and only if ⊨F\models F and ⊨G\models G.

    • Direction (  ⟹  \implies): Suppose ⊨(F∧G)\models (F \land G). For every assignment vv, [F∧G]v=1[F \land G]_v = 1, meaning min⁡([F]v,[G]v)=1\min([F]_v, [G]_v) = 1. Therefore, for every assignment vv, [F]v=1[F]_v = 1 and [G]v=1[G]_v = 1. Thus, FF and GG are valid.

    • Direction (  ⟸  \impliedby): Reciprocally, suppose ⊨F\models F and ⊨G\models G. For an arbitrary assignment vv, [F]v=1[F]_v = 1 and [G]v=1[G]_v = 1. It follows that [F∧G]v=1[F \land G]_v = 1. Thus, F∧GF \land G is valid.

  • Disjunction Validity Proof (No Common Variables):

    • Objective: Show that ⊨F∨G\models F \lor G if and only if ⊨F\models F or ⊨G\models G, given V(F)∩V(G)=∅V(F) \cap V(G) = \emptyset.

    • Direction (  ⟸  \impliedby): By contraposition: Suppose ⊭F∨G\nvDash F \lor G. There exists an assignment vv such that [F∨G]v=0[F \lor G]_v = 0, which means max⁡([F]v,[G]v)=0\max([F]_v, [G]_v) = 0. Thus, [F]v=0[F]_v = 0 and [G]v=0[G]_v = 0, meaning neither FF nor GG is valid.

    • Direction (  ⟹  \implies): By contraposition: Suppose FF is not valid and GG is not valid. Then there exists v1v_1 such that [F]v1=0[F]_{v_1} = 0 and there exists v2v_2 such that [G]v2=0[G]_{v_2} = 0. Define assignment ww such that:

      • w(x)=v1(x)w(x) = v_1(x) if x∈V(F)x \in V(F).

      • w(x)=v2(x)w(x) = v_2(x) otherwise.

    • Because ww and v1v_1 coincide on V(F)V(F), [F]w=[F]v1=0[F]_w = [F]_{v_1} = 0.

    • Because V(F)∩V(G)=∅V(F) \cap V(G) = \emptyset, for any x∈V(G)x \in V(G), x∉V(F)x \notin V(F), meaning w(x)=v2(x)w(x) = v_2(x). Thus [G]w=[G]v2=0[G]_w = [G]_{v_2} = 0.

    • Consequently, [F∨G]w=max⁡(0,0)=0[F \lor G]_w = \max(0, 0) = 0. Thus, F∨GF \lor G is not valid.

Exercise 3: Transformation to CNF and Semantic Tree Study

  • CNF Transformation:

    • Formula: F=((s∧q  ⟹  r)∧(s∧p  ⟹  q))  ⟹  ((q  ⟹  t)  ⟹  ((p  ⟹  s)  ⟹  (p  ⟹  (t∧p))))F = ((s \land q \implies r) \land (s \land p \implies q)) \implies ((q \implies t) \implies ((p \implies s) \implies (p \implies (t \land p)))).

    • Constraint: Distribution of the product relative to the sum is prohibited.

    • Negation of F (¬F\neg F): Using the equivalence ¬(A  ⟹  B)≡A∧¬B\neg (A \implies B) \equiv A \land \neg B, we find:

    • ¬F≡(sq  ⟹  r)(sp  ⟹  q)(q  ⟹  t)(p  ⟹  s)p(t∧p‾)\neg F \equiv (sq \implies r)(sp \implies q)(q \implies t)(p \implies s)p(\overline{t \land p}).

    • Final CNF: ¬F≡(sˉ+qˉ+r)(sˉ+pˉ+q)(qˉ+t)(pˉ+s)p(tˉ+pˉ)\neg F \equiv (\bar{s} + \bar{q} + r)(\bar{s} + \bar{p} + q)(\bar{q} + t)(\bar{p} + s)p(\bar{t} + \bar{p}).

  • Semantic Tree Study:

    • Let Γ\Gamma be the set of clauses equivalent to ¬F\neg F: Γ={sˉ+qˉ+r,sˉ+pˉ+q,qˉ+t,pˉ+s,p,tˉ+pˉ}\Gamma = \{\bar{s} + \bar{q} + r, \bar{s} + \bar{p} + q, \bar{q} + t, \bar{p} + s, p, \bar{t} + \bar{p}\}.

    • Enumeration Order: p,t,s,qp, t, s, q.

    • Tree Execution:

      • Root branches on pp.

      • The branch for pˉ\bar{p} is closed immediately by the clause (p)(p).

      • On the branch for pp, we look at clauses containing pp: tˉ+pˉ\bar{t} + \bar{p} becomes tˉ\bar{t}, so the branch for tt is closed.

      • On the branch tˉ\bar{t}, pˉ+s\bar{p} + s becomes ss, so the branch sˉ\bar{s} is closed.

      • On the branch ss, sˉ+pˉ+q\bar{s} + \bar{p} + q becomes qq.

      • From qq, qˉ+t\bar{q} + t was present, but since tt is false on this branch, it contradicts.

    • Conclusion: The semantic tree is closed. Therefore, the set Γ\Gamma is contradictory, and the original formula FF is valid.

Exercise 4: Positive Resolution Strategy

  • Problem 1: Prove or ìnfirm {a  ⟹  d,b  ⟹  e,f∨¬c}⊨(a∨b∨c)  ⟹  (d∨e∨f)\left\{a \implies d, b \implies e, f \lor \neg c\right\} \models (a \lor b \lor c) \implies (d \lor e \lor f).

    • This is true if and only if {aˉ+d,bˉ+e,f+cˉ,a+b+c,dˉ,eˉ,fˉ}⊨⊥\left\{\bar{a} + d, \bar{b} + e, f + \bar{c}, a + b + c, \bar{d}, \bar{e}, \bar{f}\right\} \models \bot.

    • Resolution Steps:

      1. aˉ+d\bar{a} + d (Hyp)

      2. bˉ+e\bar{b} + e (Hyp)

      3. cˉ+f\bar{c} + f (Hyp)

      4. a+b+ca + b + c (Hyp)

      5. dˉ\bar{d} (Hyp)

      6. eˉ\bar{e} (Hyp)

      7. fˉ\bar{f} (Hyp)

      8. a+c+ea + c + e (Res 2, 4)

      9. a+ca + c (Res 6, 8)

      10. a+fa + f (Res 9, 3)

      11. aa (Res 7, 10)

      12. dd (Res 11, 1)

      13. ⊥\bot (Res 12, 5)

    • Conclusion: Since ⊥\bot is reached using the positive strategy, the affirmation is proven by the correctness theorem of the positive strategy.

  • Problem 2: Prove or infirm {a  ⟹  (b∧¬c),b  ⟹  (¬a∨c)}⊨b∧¬c\left\{a \implies (b \land \neg c), b \implies (\neg a \lor c)\right\} \models b \land \neg c.

    • This reduces to checking if the set of clauses {aˉ+b,aˉ+cˉ,bˉ+aˉ+c,bˉ+c}\left\{\bar{a} + b, \bar{a} + \bar{c}, \bar{b} + \bar{a} + c, \bar{b} + c\right\} is contradictory.

    • Analysis: In this set, there is no positive clause (a clause containing only positive literals).

    • Conclusion: Without a positive clause, positive resolution cannot begin. Since positive resolution is complete for refutation, the set is not contradictory. The affirmation is infirmed.

Exercise 5: Functional Completeness of Connectors

  • Connector Definition: Binary connector ∗* is defined as x∗y≡¬(x  ⟹  y)≡x∧¬yx * y \equiv \neg(x \implies y) \equiv x \land \neg y.

  • System {0, *}:

    • 0∗0≡00 * 0 \equiv 0.

    • For any formula written using only the constant 00 and the connector ∗*, the value will always be 00 under the constant 0 assignment.

    • Conclusion: The system {0,∗}\left\{0, *\right\} is incomplete because it cannot express the constant 11.

  • System {1, *}:

    • Negation: ¬x≡1∗x\neg x \equiv 1 * x (since 1∧¬x≡¬x1 \land \neg x \equiv \neg x).

    • Conjunction: x∧y≡x∧¬¬y≡x∗¬y≡x∗(1∗y)x \land y \equiv x \land \neg\neg y \equiv x * \neg y \equiv x * (1 * y).

    • Disjunction: x∨y≡¬(¬x∧¬y)≡¬(¬x∗y)≡1∗((1∗x)∗y)x \lor y \equiv \neg(\neg x \land \neg y) \equiv \neg(\neg x * y) \equiv 1 * ((1 * x) * y).

    • Conclusion: Because it can express the complete set {¬,∧,∨}\left\{\neg, \land, \lor\right\}, the system {1,∗}\left\{1, *\right\} is complete.

  • Derived Systems:

    • System {\iff, *}: Complete, because 1≡x  ⟺  x1 \equiv x \iff x, and {1,∗}\left\{1, *\right\} is complete.

    • System {\implies, *}: Complete, because 1≡x  ⟹  x1 \equiv x \implies x, and {1,∗}\left\{1, *\right\} is complete.

    • System {\neg, *}: Complete, because x  ⟹  y≡¬(x∗y)x \implies y \equiv \neg(x * y), making the system {  ⟹  ,∗}\left\{\implies, *\right\} reachable, which is complete.

Exercise 6: Logic Formalization and Davis-Putnam

  • Formalization of Propositions:

    • rr: "He is rich"

    • pp: "He is poor"

    • bb: "He is in good health"

    • ss: "He does sport"

    • hh: "He is happy"

  • Question 1: Sentential Logic Translations:

    1. "If he is poor, then he is not rich": p  ⟹  ¬rp \implies \neg r.

    2. "Doing sport is a necessary condition for being in good health": b  ⟹  sb \implies s.

    3. "He is happy if and only if he is in good health or he is rich": h  ⟺  b∨rh \iff b \lor r.

    4. "He is happy and poor implies that he does sport": (h∧p)  ⟹  s(h \land p) \implies s.

  • Question 2: Logical Consequence Verification:

    • Hypotheses: {p  ⟹  ¬r,b  ⟹  s,h  ⟺  b∨r}\left\{p \implies \neg r, b \implies s, h \iff b \lor r\right\}.

    • Conclusion: (h∧p)  ⟹  s(h \land p) \implies s.

    • The affirmation is true if {p  ⟹  ¬r,b  ⟹  s,h  ⟺  b∨r,¬((h∧p)  ⟹  s)}⊨⊥\left\{p \implies \neg r, b \implies s, h \iff b \lor r, \neg((h \land p) \implies s)\right\} \models \bot.

    • Clause Transformation: {pˉ+rˉ,bˉ+s,hˉ+b+r,h+bˉ,h+rˉ,h,p,sˉ}\left\{\bar{p} + \bar{r}, \bar{b} + s, \bar{h} + b + r, h + \bar{b}, h + \bar{r}, h, p, \bar{s}\right\}.

    • Davis-Putnam (Unit Resolution):

      • Using unit literals h,p,sˉh, p, \bar{s}:

      • From pˉ+rˉ\bar{p} + \bar{r} and pp, we get rˉ\bar{r}.

      • From bˉ+s\bar{b} + s and sˉ\bar{s}, we get bˉ\bar{b}.

      • From hˉ+b+r\bar{h} + b + r and hh, we get b+rb + r.

      • The current set simplifies to {rˉ,bˉ,b+r}\left\{\bar{r}, \bar{b}, b + r\right\}.

      • Resolving b+rb + r with bˉ\bar{b} gives rr.

      • Resolving rr with rˉ\bar{r} gives the empty clause ⊥\bot.

    • Conclusion: The set is contradictory. The final statement is indeed a logical consequence of the first three statements.