A Graphical Representation of Logic.

 

This is a brief introduction to various disciplines of logic. It shows how Propositional Logic, Predicate Logic, Set Theory, and Probabilities can all be represented graphically as a measure of the existence of objects within regions. Later, this common graphical representation will be described mathematically.

You may link to this page and print this page out and use it as you wish as long as the URL, Webpage address, is also included.

If you find errors or if you know of any brief way of making this information more understandable, please don't hesitate to email me with your suggestions at email.

Consider the proposition "A" to be the following: It is daytime here at 12:00 noon, Greenwich mean time. To illustrate this proposition using a Venn diagram, a line is drawn to encircle a region as shown below in Fig_1. The square boarder encompasses the space which contains all the samples that may be considered. This is called the sample space. It may also be called the universe of discourse since the scope of our discussion would be limited to those examples. The sample space here consists of the following cities: Beijing, Cairo, Honolulu, Los Angeles, Moscow, Nome, Paris, Rome, and Tokyo. The oval region labeled "A" contains only those samples for which the proposition A is true. The dot labeled "Los Angeles" is the place in sample space where that sample is located. And similarly for the rest of the dots.

 

However, it is possible to arrange the samples in different locations in sample space, and then outline a different region in sample space to represent the same proposition. So it is easier to represent a proposition by drawing a typical region in sample space and to not draw in the individual samples for which the proposition is true or false. See Fig_2 below. For we know that whatever samples that make the proposition true are inside the region, and whatever samples for which the proposition is false are outside the region.

 

It is not necessary to color the regions. I do this here to help refer to the region under discussion. The colored area in Fig_2 above is the region in sample space that represents the proposition A.

The negation of a proposition is represented by the area outside the region labeled A, as shown in Fig_3 below. Each sample in the colored area labeled "~A" is where the proposition A is false.

 

Two different propositions can be represented in the same sample space as two different regions as shown in Fig_4 below.

 

Fig_5 below shows that two regions that represent two propositions can even overlap. There are areas where the proposition B is true but the proposition A is false. And there are regions where the samples would make A true but B false. The colored area is where the propositions A and B are both true. This would be written in symbols as , or simply as AB.

 

The colored region shown below in Fig_6 is where either the proposition A or the proposition B is true. This is symbolized as , or alternatively it may be symbolized as . The logical sentence   is true in the colored area.

 

Using regions to represent propositions we can show that two logical expressions are equivalent. If both expressions identify the same region, they are equivalent expressions. For example, we can prove DeMorgan's theorem, , as follows:

Fig_7 shows the logical conjunction of A and B, written . And Fig_8 shows the negation of , written .

  

 

Then on the other hand, Fig_9 show ~A; Fig_10 shows ~B.

  

 

And Fig_11 shows .

 

Now, since the region specified by Fig_8 for is the same region specified by Fig_11 for , this proves that .

As was shown in Fig_1, there are circumstances in which a proposition may be true, and there are circumstances in which a proposition may be false. Each circumstance was called a sample. Simply stating a proposition does not indicate which samples or circumstances make it true. And labeling a region of sample space to indicate a proposition does not say how many samples are inside.

But there is a branch of logic which considers more carefully the quantity of samples. This is called Quantifier Logic. Or it may be called Predicate Logic. Statements in Predicate Logic specify the sample which makes the statement true or false and considers whether there may be some, all, or no samples for which a proposition may be true.

For example,  consider the sentence "Art is honest". Here "Art" is the name of a person. The sentence asserts that some particular object, Art, has a certain property, namely, being "honest". If we let the capital letter "H" denote the property of being honest, and let the lower case letter "a" denote the individual, Art, then we can symbolize this sentence as Ha. Similarly, we can symbolize the sentence "Betty is honest" as Hb. And we can symbolize the sentence "Cathy is honest" as Hc. If we let the capital letter "N" denote the property of being "nice", then we can symbolize the sentence "Cathy is nice" as Nc, and the sentence "Debra is nice" as Nd. The property is always symbolized with a Capital letter, the object is symbolized with a lower case letter, and the property is always written to the left of the object.

The sentences, Ha, Hb, Hc, Nc, and Nd, all have the same general structure, a property is ascribed to an individual entity. English grammar would say that the sentence "Art is honest" contains a subject, "Art," and a predicate, "is honest." And the term "predicate" is sometime used instead of "property". Thus, the name "predicate logic".

The statement "Art is honest" can be represented in sample space as shown in Fig_12 below. The circular line labeled "H" encompasses the region of sample space that contains all those members that have the property of being honest. Here, Art is shown as belonging to property "H".

 

Similarly, if we let it be true that Art, Betty, Cathy, and Debra are honest, but Edward, Fred, and George are not. And let it be true that Cathy, Debra, and Edward are nice, but Fred and George are not. Then we can represent this situation as shown in Fig_13 below. The predicates of the sentence are the propositions to be considered, and the subjects of the sentence are the samples that make the sentence true or false.

 

The expression formed by combining a property constant, as in "H" above, with an individual constant, as in "a" above, results in a statement "Ha". It has a truth value; it is "True" if Art is indeed honest, and it is "False" if Art is not honest. And similar sentences were formed by replacing "a" with "b", "c", and "d" that represent the names of other people. Those sentences also have a truth value. But what if we replace the individual constant with an individual variable, as in Hx. Here "x" is just a place holder and does not represent anyone in particular. It is the same as saying, "______ is honest". The form, Hx, is not a statement or a sentence since we cannot determine its truth value until we replace x with a particular individual. Hx is just a sentence form.

But sentences can also be obtained from the sentence form, Hx, without replacing x with a particular example. Sentences can be obtained by specifying how many samples have the property. For example, "All men are honest" and "Some men are honest" are also sentences since a truth value can be assigned.

Two symbols, called quantifiers, are used to represent "all" and "some". One is called the "universal quantifier". It is used to symbolize that "all" entities have some property or set of properties. The universal quantifier is symbolized by placing an individual variable in parentheses, such as (x) or (y), etc. This in turn is placed in front of a sentence form to make a sentence. For instance, "All men are honest" can be symbolized as (x)Hx and is read as "For all x, Hx" or "Given any x, x is H", etc. Sometimes the symbol "" is used for the universal quantifier as in (x)Hx. The upside-down A is used so it is not confused with some sentence form with a property labeled A, as in Ax.

The second symbol is called the "existential quantifier". A backward E, or " " is used to symbolize that there exists some or at least one entity that has a property or set of properties. For example, if the entire sample space consists of only men, then we can symbolize the sentence "Some men are honest" as , read as "there exists an x such that x is an H" or "For some x, Hx". We could have used y or z as the variable; and say the same thing as long as it is understood that x, y, and z are variables that can only represent men in this example.

Since statements such as Ha and Nc are sentences that can be assigned a truth value, the usual logical connectives of propositional logic can be used. And quantifiers can be used with sentence forms to symbolize complex sentences that consider the quantity of samples that apply. The following examples are statements of predicate logic with their correct symbolization:

1)   Everything moves, .
      This is equal to saying that there is nothing that does not move, .
      

2)   Not everything moves
      This is equal to saying that there is something that does not move, .

3)   Some men are honest and nice, .
      Where the universe of discourse is limited to only men.
      If we did not wish to limit the samples to only men but include samples that are not men, we could write, 
      .

4)   All humans are mortal, .
      This is read as "For all z, if z is a human, then z is mortal."

5)   No one fears death, i.e. no person fears death, .

6)   It is not true that no one fears death, .

7)   Some people are not honest, .

8)   Some things are neither expensive nor cheap, .

9)   Everything is either sweet or bitter, .

10) Everything is sweet or else everything is bitter, .

11) It is false that no dishonest people fear death, .

12) Some people are liars and some people are thieves, .

 

Quantifier statements that begin with (x) or (x) can be represented as regions of sample space. And we have already done so in the case of the universal quantifier, (x). But the existential quantifier, (x), can also be represented as a region of sample space where the sample or samples are stated to exist. Yet we also have statements that begin with ~(x) and ~(x), and it seems like a contradiction to draw regions for statements that say there is no region. But all statements in Predicate Logic can be put in a form that does refers to regions of sample space.

~(x)Fx, "there does not exist Fx" is equal to , "all x is not Fx".

~(x)~Fx, "there does not exist x that is not Fx" equals , "all x is Fx".

~(x)Fx, "not all x is F" equals , "there exist x that is not F".

~(x)~Fx, "not all x is not F" equals , "some x are F".

And since Predicate Logic statements refer to regions of sample space, Venn diagrams can be used to represent those statements. Below are a number of Predicate Logic statements and their representation using Venn diagrams.

Fig_14 represents the statement that all x have the property F. Here the colored area indicates the only locations where samples exist. Or, another way to interpret "all x are F" is that the entire sample space can be labeled as F, as shown in Fig_15.

    

 

Fig_16 shows color to indicate the portion of sample space that exists with the property ~F. Or the entire sample space can be labeled with the property of not being F, as shown in Fig_17.

    

 

The dot in Fig_18 is used to show the existence of a sample that has the property F, as is expressed by the statement, "some x is F". This statement expresses that there exists at least one sample that has the property of being an F. Drawing a region for F and showing a sample that is F allows the possibility that there may also be samples that are not F. We need to do this because the statement "some x are F" does not say that there is no x that is not F. Fig_19 shows "There exists x that is not F". But this statement does not excluded the possibility that there may be some x that is F. So F is drawn to show that the possibility exists.

    

 

Fig_20 shows that for all x if x is an F, then x is an H. Here all the samples that are F are also samples that are H. But such statements do not express that there does indeed exist any sample that are F. So no dots are drawn. Fig_21 shows that any samples that may have the property of being an F most certainly do not have the property of being G. Again, nothing says that samples exists, only that if there were samples that are F, then they are not G.

    

 

Fig_22 shows that all samples have the property of both D and F. The colored region indicate the only locations where samples may exist. Or, in other words, the entire sample space has both the property D and F, as shown in Fig_23.

    

 

Fig_24 shows that there exists a sample that has both properties D and F. This figure does not assume that other samples do not exist. In Fig_25 the green line is arbitrarily drawn between properties A and B. The line indicates the possible locations of the sample that at least exists in either A or B.

    

 

In Fig_26, the colored regions shows only where samples can exist that are either D or F. This limits the sample space, or it describes the entire sample space. Fig_27 shows the whole sample space  is either D or F.

    

 

The above graphs show that statements in Predicate Logic can be represented graphically. But it is also possible to show complete arguments graphically. The premises of an argument are a set of statements. The premises are drawn on the same graph. If the region specified by conclusion is indicated after drawing the premises, then the argument is valid.

For example, Fig_28 shows that if the region labeled F is within G and G is within H, then F is also within H. The figure headings show the argument that is being demonstrated. The premises are stated first separated by a comma. The statement after the three dot triangle is the conclusion.

Fig_29 shows that if the property R is within B, then if there exists a sample that is not B, then there must also be a sample that is not R.

    

Fig_30 shows that if there is a sample that is both an A and a B, and if all A's are C's, then there must exist a sample that is both a B and a C. Fig_31 shows that if all samples are an M, all R's are G's, and there exists an R, then there must also exist a G and there must exist an M. Even though there are three different variables, x, y, z in the statements in the heading of Fig_31, each of these variables refer to samples in the same sample space. 

    

 

Fig_32 and Fig_33 both graphically demonstrate the same argument. Fig_32 shows how the whole sample space can be divided so that it is either an M or not B. The rectangular region in red is M. The blue rectangular region is ~B. The green S region shows the possibility of containing more samples than just M. Fig_32 shows that if all samples are either M or ~B, and all M are S, then all B's are also S's. The yellow region of Fig_33 is meant to indicate the only region where samples may exist. The circle on the left is ~B, the circle on the right is M, the green region is S. Again we see that if all samples are either M or ~B, and all M are S, then all B are S.

    

 

The green line in Fig_34 shows the possible locations of a single sample that is either an A or a B. Fig_35 shows that if an additional premise states that there are no A's, then there must be a B.

    

The next branch of logic to consider is set theory. Instead of propositions, sets of objects are studied. The specific objects that are included in a set are explicitly listed. For example, the set "A" in Fig_36 would be denoted . And the set "B" would be denoted . Set A might be the set of red dot, and the set B would be the set of square dots. We label each dot for the purpose of listing them.

 

If asked whether the proposition is true that there are red dots, the answer would be, "Yes, the proposition is satisfied by set A." Set A lists the samples for which that proposition is true. Each sample which is included in a set is called an "element" of a set. For example, e is an element of set A, and this is indicated symbolically as . Similarly, . And the exclusion of a sample can be indicate as well. For instance, the fact that s is not an element of A is symbolized as . If there were a set E that had no elements, then this would be symbolized as . The symbol  is call the empty set, or the null set.

The relationship between sets can also be expressed in terms of their elements. These relationships are very similar to the relationships between propositions which we've already seen. For example, the complement of  set A is symbolized as ~A, or in some books it is symbolized as A', or sometimes as . The complement of a set is the list of all elements that are not contained in the set. The complement of A is . This is similar to the negation of a proposition.

The union between two sets, A and B, is symbolized as , and is read as A union B. Now is the set of all elements that are either in set A or are in set B, and . This is similar to all samples for which the proposition is true. A more mathematical definition of union would be:
, meaning if x is an element of A union B, then x is an element of A or x is an element of B.

The intersection between two sets, A and B, is symbolized as , and is read as A intersect B. Now is the set of all elements that is in both set A and set B, and . This is similar to all samples for which the proposition is true. And .

It is also possible that one set may be included in a larger set. Consider the diagram of Fig_37. Let D be the set of all colored dots, and let C be the set of square red dots. It is said that C is a subset of D.

 

The fact that C is a subset of D is symbolized as , and is read as C subset of D. Alternately, this can be symbolized as , and is read D contains C. This is similar to the expression that C implies D, for if there is any sample that is a C then there must also be a D. Mathematically, . Perhaps you've noticed that , and that .

In the study of probabilities, it's the comparative number of samples that is considered. Instead of being called sets, the various regions of sample space are called "Events", and instead of being called elements, each member of an event is called a sample. The region which contains all possible samples is called the sample space. If we select a sample at random, we can calculate the probabilities of it being a sample of a particular event. For example, consider Fig_38 below. There is a total of 20 different samples possible to choose from. There are 7 samples that could be chosen from event A, and there are 9 samples that could be chosen from event B.

 

So the probability of choosing a sample of A is symbolized as P(A), for probability of A. And the probability is calculated to be the number of samples of some event divided by the total number of samples possible. Therefore, we have P(A) = 7/20 = 0.35. We can put this in the form of a percentage by multiplying by one hundred and adding the symbol  % after it. Thus, 0.35 = 35%. The odds of choosing a B is P(B) = 9/20 = 0.45 = 45%. And the probability of choosing a sample from the entire sample space, S, would be P(S) = 20/20 = 100%.

Set Theory can be used in the study of probabilities to consider the probability of various combinations of events. For instance, the samples which are both an A and a B is symbolized as , which is the set, . And the probability of randomly selecting a member of this set is .

Or, samples which are either an A or a B is symbolized as , which is the set, . And the probability of randomly selecting a member of this set is .

It is also true that . This can be proven as follows: 

Let the symbol, na, be the number of samples in the event A. Let nb be the number of samples in event B. Let naub be the number of samples in the event region of . Let nab be the number of samples in the event. And let T be the total number of samples in the entire sample space. Then in symbols:

P(A) = na/T,

P(B) = nb/T,

P(AB) = naub/T,

P(AB) = nab/T.

Then P(AB) = P(A) + P(B) - P(AB) can be written as: . Multiplying by T on both sides cancels the T on both sides and gives: . And it is seen that the number of samples in both regions together  is equal to the number of samples in event A plus the number of samples in event B minus the number of samples in the region of since we counted those samples twice. 

From the above, we also have: .

Of course, if the events A and B do not have any samples in common, then , the empty set. And , and  .

Note also if one event, C, implies another event, D, we write this as (See Fig 37 above), for which it must be true that , simply because there are more samples in the region of D than there are in the region of C.

So in summary, at the level of basic definitions, the various disciplines of logic are just describing different features of the same sample space. Probabilities compare the number of samples in a various regions. Set theory explicitly lists the samples of a region. Predicate logic considers whether there may exist some, none, or all samples in a  region. And Propositional logic is only concerned with the regions where samples may exist.

Note that we must be able to determine whether it is true or false that a particular sample exist in a specific region before one can list the members or consider some or all or compare the numbers of possibilities. If we cannot determine that the first sample belongs to a region to begin with, then we cannot make a list or calculate the probabilities.

To continue with a more mathematical discription of samples in regions, click here for an introduction to the study of probability density functions