Difference between revisions of "Talk:Logical graph"

MyWikiBiz, Author Your Legacy — Monday November 29, 2021
Jump to navigationJump to search
(→‎Exercise 1: add tables)
Line 329: Line 329:
  
 
<blockquote>
 
<blockquote>
<math>(\forall x \in X)(Px \Rightarrow Qx)</math>
+
<math>(\forall x \in X)(p(x) \Rightarrow q(x))</math>
 
</blockquote>
 
</blockquote>
  
This is just the form <math>\operatorname{All}\ P\ \operatorname{are}\ Q,</math> already covered here:
+
<blockquote>
 +
<math>\prod_{x \in X} (p_x (q_x)) = 1</math>
 +
</blockquote>
 +
 
 +
This is just the form <math>\operatorname{All}\ p\ \operatorname{are}\ q,</math> already covered here:
  
 
: [[Directory:Jon_Awbrey/Papers/Functional_Logic_:_Quantification_Theory#Application_of_Higher_Order_Propositions_to_Quantification_Theory|Application of Higher Order Propositions to Quantification Theory]]
 
: [[Directory:Jon_Awbrey/Papers/Functional_Logic_:_Quantification_Theory#Application_of_Higher_Order_Propositions_to_Quantification_Theory|Application of Higher Order Propositions to Quantification Theory]]
  
 
Need to think a little more about the proposition <math>p \Rightarrow q</math> as a boolean function of type <math>\mathbb{B}^2 \to \mathbb{B}</math> and the corresponding higher order proposition of type <math>(\mathbb{B}^2 \to \mathbb{B}) \to \mathbb{B}.</math>
 
Need to think a little more about the proposition <math>p \Rightarrow q</math> as a boolean function of type <math>\mathbb{B}^2 \to \mathbb{B}</math> and the corresponding higher order proposition of type <math>(\mathbb{B}^2 \to \mathbb{B}) \to \mathbb{B}.</math>
 +
 +
{| align="center" border="1" cellpadding="2" cellspacing="0" style="font-weight:bold; text-align:center; width:96%"
 +
|+ '''Table 1.  Simple Qualifiers of Propositions (''n'' = 2)'''
 +
|- style="background:ghostwhite"
 +
| align="right" | <math>p:</math><br><math>q:</math>
 +
| 1100<br>1010
 +
| <math>f\!</math>
 +
| <math>(\ell_{11})</math><br><math>\text{No } p </math><br><math>\text{is } q </math>
 +
| <math>(\ell_{10})</math><br><math>\text{No } p </math><br><math>\text{is }(q)</math>
 +
| <math>(\ell_{01})</math><br><math>\text{No }(p)</math><br><math>\text{is } q </math>
 +
| <math>(\ell_{00})</math><br><math>\text{No }(p)</math><br><math>\text{is }(q)</math>
 +
| <math> \ell_{00} </math><br><math>\text{Some }(p)</math><br><math>\text{is }(q)</math>
 +
| <math> \ell_{01} </math><br><math>\text{Some }(p)</math><br><math>\text{is } q </math>
 +
| <math> \ell_{10} </math><br><math>\text{Some } p </math><br><math>\text{is }(q)</math>
 +
| <math> \ell_{11} </math><br><math>\text{Some } p </math><br><math>\text{is } q </math>
 +
|-
 +
| <math>f_0</math> || 0000 || <math>(~)</math>
 +
| 1 || 1 || 1 || 1 || 0 || 0 || 0 || 0
 +
|-
 +
| <math>f_1</math> || 0001 || <math>(p)(q)\!</math>
 +
| 1 || 1 || 1 || 0 || 1 || 0 || 0 || 0
 +
|-
 +
| <math>f_2</math> || 0010 || <math>(p) q\!</math>
 +
| 1 || 1 || 0 || 1 || 0 || 1 || 0 || 0
 +
|-
 +
| <math>f_3</math> || 0011 || <math>(p)\!</math>
 +
| 1 || 1 || 0 || 0 || 1 || 1 || 0 || 0
 +
|-
 +
| <math>f_4</math> || 0100 || <math>p (q)\!</math>
 +
| 1 || 0 || 1 || 1 || 0 || 0 || 1 || 0
 +
|-
 +
| <math>f_5</math> || 0101 || <math>(q)\!</math>
 +
| 1 || 0 || 1 || 0 || 1 || 0 || 1 || 0
 +
|-
 +
| <math>f_6</math> || 0110 || <math>(p, q)\!</math>
 +
| 1 || 0 || 0 || 1 || 0 || 1 || 1 || 0
 +
|-
 +
| <math>f_7</math> || 0111 || <math>(p q)\!</math>
 +
| 1 || 0 || 0 || 0 || 1 || 1 || 1 || 0
 +
|-
 +
| <math>f_8</math> || 1000 || <math>p q\!</math>
 +
| 0 || 1 || 1 || 1 || 0 || 0 || 0 || 1
 +
|-
 +
| <math>f_9</math> || 1001 || <math>((p, q))\!</math>
 +
| 0 || 1 || 1 || 0 || 1 || 0 || 0 || 1
 +
|-
 +
| <math>f_{10}</math> || 1010 || <math>q\!</math>
 +
| 0 || 1 || 0 || 1 || 0 || 1 || 0 || 1
 +
|-
 +
| <math>f_{11}</math> || 1011 || <math>(p (q))\!</math>
 +
| 0 || 1 || 0 || 0 || 1 || 1 || 0 || 1
 +
|-
 +
| <math>f_{12}</math> || 1100 || <math>p\!</math>
 +
| 0 || 0 || 1 || 1 || 0 || 0 || 1 || 1
 +
|-
 +
| <math>f_{13}</math> || 1101 || <math>((p) q)\!</math>
 +
| 0 || 0 || 1 || 0 || 1 || 0 || 1 || 1
 +
|-
 +
| <math>f_{14}</math> || 1110 || <math>((p)(q))\!</math>
 +
| 0 || 0 || 0 || 1 || 0 || 1 || 1 || 1
 +
|-
 +
| <math>f_{15}</math> || 1111 || <math>((~))</math>
 +
| 0 || 0 || 0 || 0 || 1 || 1 || 1 || 1
 +
|}<br>
 +
 +
{| align="center" border="1" cellpadding="2" cellspacing="0" style="font-weight:bold; text-align:center; width:96%"
 +
|+ '''Table 2.  Relation of Quantifiers to Higher Order Propositions'''
 +
|- style="background:ghostwhite"
 +
| <math>\text{Mnemonic}</math>
 +
| <math>\text{Category}</math>
 +
| <math>\text{Classical Form}</math>
 +
| <math>\text{Alternate Form}</math>
 +
| <math>\text{Symmetric Form}</math>
 +
| <math>\text{Operator}</math>
 +
|-
 +
| <math>\text{E}\!</math><br><math>\text{Exclusive}</math>
 +
| <math>\text{Universal}</math><br><math>\text{Negative}</math>
 +
| <math>\text{All}\ p\ \text{is}\ (q)</math>
 +
| &nbsp;
 +
| <math>\text{No}\  p\ \text{is}\  q </math>
 +
| <math>(\ell_{11})</math>
 +
|-
 +
| <math>\text{A}\!</math><br><math>\text{Absolute}</math>
 +
| <math>\text{Universal}</math><br><math>\text{Affirmative}</math>
 +
| <math>\text{All}\ p\ \text{is}\  q </math>
 +
| &nbsp;
 +
| <math>\text{No}\  p\ \text{is}\ (q)</math>
 +
| <math>(\ell_{10})</math>
 +
|-
 +
| &nbsp;
 +
| &nbsp;
 +
| <math>\text{All}\ q\  \text{is}\  p </math>
 +
| <math>\text{No}\  q\  \text{is}\ (p)</math>
 +
| <math>\text{No}\ (p)\ \text{is}\  q </math>
 +
| <math>(\ell_{01})</math>
 +
|-
 +
| &nbsp;
 +
| &nbsp;
 +
| <math>\text{All}\ (q)\ \text{is}\  p </math>
 +
| <math>\text{No}\  (q)\ \text{is}\ (p)</math>
 +
| <math>\text{No}\  (p)\ \text{is}\ (q)</math>
 +
| <math>(\ell_{00})</math>
 +
|-
 +
| &nbsp;
 +
| &nbsp;
 +
| <math>\text{Some}\ (p)\ \text{is}\ (q)</math>
 +
| &nbsp;
 +
| <math>\text{Some}\ (p)\ \text{is}\ (q)</math>
 +
| <math>\ell_{00}\!</math>
 +
|-
 +
| &nbsp;
 +
| &nbsp;
 +
| <math>\text{Some}\ (p)\ \text{is}\ q</math>
 +
| &nbsp;
 +
| <math>\text{Some}\ (p)\ \text{is}\ q</math>
 +
| <math>\ell_{01}\!</math>
 +
|-
 +
| <math>\text{O}\!</math><br><math>\text{Obtrusive}</math>
 +
| <math>\text{Particular}</math><br><math>\text{Negative}</math>
 +
| <math>\text{Some}\ p\ \text{is}\ (q)</math>
 +
| &nbsp;
 +
| <math>\text{Some}\ p\ \text{is}\ (q)</math>
 +
| <math>\ell_{10}\!</math>
 +
|-
 +
| <math>\text{I}\!</math><br><math>\text{Indefinite}</math>
 +
| <math>\text{Particular}</math><br><math>\text{Affirmative}</math>
 +
| <math>\text{Some}\ p\ \text{is}\ q</math>
 +
| &nbsp;
 +
| <math>\text{Some}\ p\ \text{is}\ y</math>
 +
| <math>\ell_{11}\!</math>
 +
|}<br>
  
 
====Exercise 2====
 
====Exercise 2====

Revision as of 03:14, 9 December 2008

Notes & Queries


\(\cdots\)

Place For Discussion


\(\cdots\)

Logical Equivalence Problem

Problem

Problem posted by Mike1234 on the Discrete Math List at the Math Forum.

  • Required to show that \(\lnot (p \Leftrightarrow q)\) is equivalent to \((\lnot q) \Leftrightarrow p.\)

Solution

Solution posted by Jon Awbrey, using the calculus of logical graphs.

In logical graphs, the required equivalence looks like this:

      q o   o p           q o
        |   |               |
      p o   o q             o   o p
         \ /                |   |
          o               p o   o--o q
          |                  \ / 
          @         =         @

We have a theorem that says:

        y o                xy o
          |                   |
        x @        =        x @

See Logical Graph : C2. Generation Theorem.

Applying this twice to the left hand side of the required equation, we get:

      q o   o p          pq o   o pq
        |   |               |   |
      p o   o q           p o   o q
         \ /                 \ /
          o                   o
          |                   |
          @         =         @

By collection, the reverse of distribution, we get:

          p   q
          o   o
       pq  \ / 
        o   o
         \ /
          @

But this is the same result that we get from one application of double negation to the right hand side of the required equation.

QED

Discussion

Back to the initial problem:

  • Show that \(\lnot (p \Leftrightarrow q)\) is equivalent to \((\lnot q) \Leftrightarrow p.\)

We can translate this into logical graphs by supposing that we have to express everything in terms of negation and conjunction, using parentheses for negation and simple concatenation for conjunction. In this way of assigning logical meaning to graphical forms — for historical reasons called the "existential interpretation" of logical graphs — basic logical forms are given the following expressions:

The constant \(\operatorname{true}\) is written as a null character or a space.

This corresponds to an unlabeled terminal node in a logical graph. When we are thinking of it by itself, we draw it as a rooted node:

          @

The constant \(\operatorname{false}\) is written as an empty parenthesis\[(~).\]

This corresponds to an unlabeled terminal edge in a logical graph. When we are thinking of it by itself, we draw it as a rooted edge:

          o
          |
          @

The negation \(\lnot x\) is written \((x).\!\)

This corresponds to the logical graph:

          x
          o
          |
          @

The conjunction \(x \land y\) is written \(x y.\!\)

This corresponds to the logical graph:

         x y
          @

The conjunction \(x \land y \land z\) is written \(x y z.\!\)

This corresponds to the logical graph:

        x y z
          @

And so on.

The disjunction \(x \lor y\) is written \(((x)(y)).\!\)

This corresponds to the logical graph:

        x   y
        o   o
         \ /
          o
          |
          @

The disjunction \(x \lor y \lor z\) is written \(((x)(y)(z)).\!\)

This corresponds to the logical graph:

        x y z
        o o o
         \|/
          o
          |
          @

And so on.

The implication \(x \Rightarrow y\) is written \((x (y)).\!\) Reading the latter as "not \(x\!\) without \(y\!\)" helps to recall its implicational sense.

This corresponds to the logical graph:

        y o
          |
        x o
          |
          @

Thus, the equivalence \(x \Leftrightarrow y\) has to be written somewhat inefficiently as a conjunction of two implications\[(x (y)) (y (x)).\!\]

This corresponds to the logical graph:

      y o   o x
        |   |
      x o   o y
         \ /
          @

Putting all the pieces together, showing that \(\lnot (p \Leftrightarrow q)\) is equivalent to \((\lnot q) \Leftrightarrow p\) amounts to proving the following equation, expressed in the forms of logical graphs and parse strings, respectively:

      q o   o p           q o
        |   |               |
      p o   o q             o   o p
         \ /                |   |
          o               p o   o--o q
          |                  \ /
          @         =         @

( (p (q)) (q (p)) ) = (p ( (q) )) ((p)(q))

That expresses the proposed equation in the language of logical graphs. To test whether the equation holds we need to use the rest of the formal system that comes with this formal language, namely, a set of axioms taken for granted and a set of inference rules that allow us to derive the consequences of these axioms.

The formal system that we use for logical graphs has just four axioms. These are given here:

Proceeding from these axioms is a handful of very simple theorems that we tend to use over and over in deriving more complex theorems. A sample of these frequently used theorems is given here:

In my experience with a number of different propositional calculi, the logical graph picture is almost always the best way to see why a theorem is true. In the example at hand, most of the work was already done by the time we wrote down the problem in logical graph form. All that remained was to see the application of the generation and double negation theorems to the left and right hand sides of the equation, respectively.

Reflection


\(\cdots\)

Logical Graph Sandbox

More thoughts on Peirce's law

1-way version\[((a \Rightarrow b) \Rightarrow a) \Rightarrow a\]

        a o--o b
          |
          o--o a
          |
          o--o a
          |
          @         =         @

2-way version\[((a \Rightarrow b) \Rightarrow a) \Leftrightarrow a\]

        a o--o b
          |
          o--o a
          |                   a
          @         =         @

Compare with:

        a o b
          |
          o--o a
          |                   a
          @         =         @

That is:

       ab   a
        o   o
         \ /
          o
          |                   a
          @         =         @

This is the so-called absorption law, commonly written in the following ways:

\[(a \land b) \lor a \iff a\]

\[ab \lor a = a\]

Reports of my counter-intuitiveness are greatly exaggerated

We have the following theorem of classical propositional calculus:

\[(p \Rightarrow q) \lor (q \Rightarrow p)\]

The proposition may appear counter-intuitive on some ways of reading it, and it is usually excluded from the theorems of intuitionistic propositional calculi.

Read as a statement about the values of propositions — where the values \(p, q\!\) are drawn from the boolean domain \(\mathbb{B} = \{0, 1 \}\) — and written as an order law, its sense may become more sensible:

\[(p \le q) \lor (q \le p)\]

Here it is in logical graphs:

      q o   o p
        |   |
      p o   o q
        |   |
        o   o
         \ /
          o
          |
          @         =         @

Proof

      q o   o p
        |   |
      p o   o q
        |   |       q   p
        o   o       o   o       o   o         o           o
         \ /         \ /         \ /          |           |
          o        pq o        pq o        pq o           o
          |           |           |           |           |
          @     =     @     =     @     =     @     =     @     =     @

My guess as to what's going on here — why the classical and intuitionistic reasoners appear to be talking past each other on this score — is that they are really talking about two different domains of mathematical objects. That is, the variables \(p, q\!\) range over \(\mathbb{B}\) in the classical reading while they range over a space of propositions, say, \(p, q : X \to \mathbb{B}\) in the intuitionistic reading of the formulas. Just my initial guess.

On the reading \(P, Q : X \to \mathbb{B},\) another guess at what's gone awry here might be the difference between the following two statements:

\((\forall x \in X)(Px \Rightarrow Qx) \lor (Qx \Rightarrow Px)\)

\((\forall x \in X)(Px \Rightarrow Qx) \lor (\forall x \in X)(Qx \Rightarrow Px)\)

But the latter is not a theorem in anyone's philosophy, so there is really no disagreement here.

Functional quantifiers

Exercises. Express the following in functional terms:

Exercise 1

\((\forall x \in X)(p(x) \Rightarrow q(x))\)

\(\prod_{x \in X} (p_x (q_x)) = 1\)

This is just the form \(\operatorname{All}\ p\ \operatorname{are}\ q,\) already covered here:

Application of Higher Order Propositions to Quantification Theory

Need to think a little more about the proposition \(p \Rightarrow q\) as a boolean function of type \(\mathbb{B}^2 \to \mathbb{B}\) and the corresponding higher order proposition of type \((\mathbb{B}^2 \to \mathbb{B}) \to \mathbb{B}.\)

Table 1. Simple Qualifiers of Propositions (n = 2)
\(p:\)
\(q:\)
1100
1010
\(f\!\) \((\ell_{11})\)
\(\text{No } p \)
\(\text{is } q \)
\((\ell_{10})\)
\(\text{No } p \)
\(\text{is }(q)\)
\((\ell_{01})\)
\(\text{No }(p)\)
\(\text{is } q \)
\((\ell_{00})\)
\(\text{No }(p)\)
\(\text{is }(q)\)
\( \ell_{00} \)
\(\text{Some }(p)\)
\(\text{is }(q)\)
\( \ell_{01} \)
\(\text{Some }(p)\)
\(\text{is } q \)
\( \ell_{10} \)
\(\text{Some } p \)
\(\text{is }(q)\)
\( \ell_{11} \)
\(\text{Some } p \)
\(\text{is } q \)
\(f_0\) 0000 \((~)\) 1 1 1 1 0 0 0 0
\(f_1\) 0001 \((p)(q)\!\) 1 1 1 0 1 0 0 0
\(f_2\) 0010 \((p) q\!\) 1 1 0 1 0 1 0 0
\(f_3\) 0011 \((p)\!\) 1 1 0 0 1 1 0 0
\(f_4\) 0100 \(p (q)\!\) 1 0 1 1 0 0 1 0
\(f_5\) 0101 \((q)\!\) 1 0 1 0 1 0 1 0
\(f_6\) 0110 \((p, q)\!\) 1 0 0 1 0 1 1 0
\(f_7\) 0111 \((p q)\!\) 1 0 0 0 1 1 1 0
\(f_8\) 1000 \(p q\!\) 0 1 1 1 0 0 0 1
\(f_9\) 1001 \(((p, q))\!\) 0 1 1 0 1 0 0 1
\(f_{10}\) 1010 \(q\!\) 0 1 0 1 0 1 0 1
\(f_{11}\) 1011 \((p (q))\!\) 0 1 0 0 1 1 0 1
\(f_{12}\) 1100 \(p\!\) 0 0 1 1 0 0 1 1
\(f_{13}\) 1101 \(((p) q)\!\) 0 0 1 0 1 0 1 1
\(f_{14}\) 1110 \(((p)(q))\!\) 0 0 0 1 0 1 1 1
\(f_{15}\) 1111 \(((~))\) 0 0 0 0 1 1 1 1


Table 2. Relation of Quantifiers to Higher Order Propositions
\(\text{Mnemonic}\) \(\text{Category}\) \(\text{Classical Form}\) \(\text{Alternate Form}\) \(\text{Symmetric Form}\) \(\text{Operator}\)
\(\text{E}\!\)
\(\text{Exclusive}\)
\(\text{Universal}\)
\(\text{Negative}\)
\(\text{All}\ p\ \text{is}\ (q)\)   \(\text{No}\ p\ \text{is}\ q \) \((\ell_{11})\)
\(\text{A}\!\)
\(\text{Absolute}\)
\(\text{Universal}\)
\(\text{Affirmative}\)
\(\text{All}\ p\ \text{is}\ q \)   \(\text{No}\ p\ \text{is}\ (q)\) \((\ell_{10})\)
    \(\text{All}\ q\ \text{is}\ p \) \(\text{No}\ q\ \text{is}\ (p)\) \(\text{No}\ (p)\ \text{is}\ q \) \((\ell_{01})\)
    \(\text{All}\ (q)\ \text{is}\ p \) \(\text{No}\ (q)\ \text{is}\ (p)\) \(\text{No}\ (p)\ \text{is}\ (q)\) \((\ell_{00})\)
    \(\text{Some}\ (p)\ \text{is}\ (q)\)   \(\text{Some}\ (p)\ \text{is}\ (q)\) \(\ell_{00}\!\)
    \(\text{Some}\ (p)\ \text{is}\ q\)   \(\text{Some}\ (p)\ \text{is}\ q\) \(\ell_{01}\!\)
\(\text{O}\!\)
\(\text{Obtrusive}\)
\(\text{Particular}\)
\(\text{Negative}\)
\(\text{Some}\ p\ \text{is}\ (q)\)   \(\text{Some}\ p\ \text{is}\ (q)\) \(\ell_{10}\!\)
\(\text{I}\!\)
\(\text{Indefinite}\)
\(\text{Particular}\)
\(\text{Affirmative}\)
\(\text{Some}\ p\ \text{is}\ q\)   \(\text{Some}\ p\ \text{is}\ y\) \(\ell_{11}\!\)


Exercise 2

\((\forall x \in X)(Px \Rightarrow Qx) \lor (Qx \Rightarrow Px)\)

Exercise 3

\((\forall x \in X)(Px \Rightarrow Qx) \lor (\forall x \in X)(Qx \Rightarrow Px)\)