<p>If you teach center dot as <em>and</em>, then + for <em>or</em> should be pretty natural. Tell them that <em>or</em> is logical addition and <em>and</em> is logical multiplication. Likewise, + can be used for set addition (everything in A "plus" everything in B). Likewise "or" means that something is in A <em>or</em> it is in B (maybe both). So, +, <em>or</em>, and Union are all alike. Naive Set Theory and Simple Logic. So it isn't just that the same symbol is used, the ideas are actually related. </p>

<p>If you teach them the distributive laws for these it will seem even more natural. What will be less natural is that <em>or</em> and <em>and</em> distribute over each other, while in arithmetic you only get one distributive law. </p>

<p>P or (Q and R) has the same truth table as (P or Q) and (P or R). Etc. Similarly for the other law and for set union and intersection. "Arithmetic is the anomaly, not logic." And if you put it like that, they may be more likely to remember. </p>

<hr>

<p>Actually it is <em>and</em> that is a bit harder to finesse with language. "Everything in A <em>and</em> everything in B" (Union, <em>or</em>)is easy to confuse initially with "It is in A <em>and</em> it is in B." (Intersection, <em>and</em>) so watch out for that. The first sentence is, of course, the same as "It is in A <em>or</em> it is in B." Focus on whether the statement talks about an individual thing, "It..." or the set/concept as a whole "Everything..."</p>

CC BY-SA 3.0
2018-02-18T16:35:05.517Z
2018-02-18T16:35:05.517Z
Buffy
<p>Algebraic data types use a notion of counting inhabitants in a correspondence between addition with OR, multiplication with AND (and exponentiation with implication).</p>

<p>The idea is that if something is an x OR y, then it has x + y possibilities &#8212; all the possibilities of x added to all the possibilities of y.  If there are 3 possible x's and 4 possible y's then there are 3+4=7 possible  inhabitants of x OR y.</p>

<p>And that if something is an x AND y then it has x * y possibilities &#8212; the Cartesian product of all possible x's with all possible y's.  So here if there are 3 possible x's and 4 possible y's then there are 3*4=12 possible inhabitants of the Cartesian cross product representing the notion of x AND y.</p>

CC BY-SA 3.0
2018-02-19T01:55:57.317Z
"...12 possible inhabitants of the Cartesian cross product..." This is what you would explain to an 11 year old?
Ben I.
CC BY-SA 3.0
2018-02-19T02:09:29.740Z
Yes, you could simply list them.
Erik Eidt
CC BY-SA 3.0
2018-02-19T18:23:15.580Z
All well and good, except the concept being taught is __Boolean logic__ not set theory. There are only ever _two_ possible answers using any operations. In addition, `AND` has 4 possible combinations of inputs, and `OR` _also_ has 4 possible combinations of inputs. Not a good time to explain the difference between Cartesian cross products and set union.
Gypsy Spellweaver
CC BY-SA 3.0
2018-02-19T00:54:22.130Z
2018-02-19T00:54:22.130Z
Erik Eidt
<p>Since your students are getting the beginning of Boolean from you, you have the advantage of being able to lay the proper groundwork to work within. To begin with, hopefully, you will be stressing the point that Boolean logic is <em>two-state</em>. You can use the word <em>binary</em> if you choose, as long as they are not predisposed to think <em>binary = computer</em>, since while Boolean logic is handy for computers to deal with, it is not <em>just</em> for computers.</p>

<p>To connect the symbols, meanings and math together, make it explicit, and demonstrate. Start with the concept that <code>FALSE</code> is the same as <em>nothing</em> and <code>TRUE</code> is the same as <em>something</em>. "I have an apple in my hand" is <code>FALSE</code> if you have no apples in your hand, even if you have an orange, or a pencil. The same statement is <code>TRUE</code> if you do have an apple in your hand. It is not, however, <em>more</em> <code>TRUE</code> if you have two apples, or twenty apples, in your hand, however, it is still <em>just</em> <code>TRUE</code>.</p>

<p>Zero, as a number, represents <em>nothing</em> as well - zero apples is <em>no apples</em>. Therefore, it makes sense (dare I say it is logical?) to use the number <code>0</code> to represent <code>FALSE</code>. Using the previous demonstrative phrase, it only takes one apple to make the statement <code>TRUE</code>, and at least <em>one</em> is <em>something</em>. Five is also <em>something</em>, but that would leave out everything from one to four as <em>maybe</em>, and Boolean logic has no <code>MAYBE</code>, so that creates a problem. If <em>some</em> starts at one then there is not need for a <code>MAYBE</code>. Using <code>1</code> for <em>something</em>, and therefore <code>TRUE</code>, gives two symbols to use instead of the words <code>TRUE</code> and <code>FALSE</code>, which can get quite long to write in a very short while.</p>

<p>The next step is to introduce the symbols for <code>OR</code> and <code>AND</code>. Here I will, marginally, disagree with how and why your are using center dot <code>•</code> for <code>AND</code>. I am not opposed to that usage, only the reasoning behind the choice. The students have not had algebra yet, so it seems a safer choice than <code>✖</code>. You can tell the students you have chosen <code>•</code> for <code>AND</code> because it is what they are most likely to encounter later. They should also be told that it can also be written as <code>✖</code>, and that <em>both</em> can also be used for multiplication ins algebra. The same way that <code>0</code> means <code>FALSE</code> for this class, and will mean <code>zero</code> in mathematics (and <code>origin</code> in rectangular coordinates). Likewise using <code>✚</code> for <code>OR</code> in your class, while it will mean addition in mathematics. Rather than <em>shelter</em> them now, only to create confusion later, deal with the reality that we only have so many different symbols we can use, and many times they will have different meanings in different places, and knowing when, and when not, to use <code>✚</code> as <code>AND</code> is part of learning about Boolean logic.</p>

<p>We need to toss in one more symbol here as well. Replacing the word <code>is</code> with the symbol <code>=</code> (or symbol of your choice) also comes in real handy.</p>

<p>Since the students have not had algebra the next step <em>might</em> be difficult. Connecting the Boolean operators with the mathematical functions. Connecting the addition to <code>OR</code> first, because it is easier to apprehend, you can give the samples <code>FALSE OR FALSE is FALSE</code>, <code>TRUE OR FALSE is TRUE</code>, and <code>TRUE OR TRUE is TRUE</code>. Rewrite them in symbols as <code>0 ✚ 0 = 0</code>, <code>1 ✚ 0 = 1</code> and <code>1 ✚ 1 = 1</code>. The first two will be obvious, make sense, and get no questions. The third will start them thinking and should get some questions about "why not <code>1 ✚ 1 = 2</code>?" Return to the apples: zero apples made the statement false while <em>any</em> apples, one, two, or a dozen, made the statement true. So, any number other than zero is true. You can call it part of being a two-state system - either it is zero, or it is other than zero. Therefore, the last of the three samples can be expanded to:</p>

<pre><code>1 ✚ 1 = 2
        2 ≝ some (it isn't "none", our only other choice in Boolean algebra)
1 ✚ 1 = some
        some ≝ TRUE (the apple demonstration)
1 ✚ 1 = TRUE
        TRUE ≝ 1 (our definition of the symbols to use in Boolean algebra)
1 ✚ 1 = 1 (Final answer)
</code></pre>

<p>Doing the same thing with multiplication for <code>AND</code> is easier, if they understand that <em>anything</em> multiplied by zero <em>is</em> zero. If they do not have that concept mastered, then it can become more difficult. Finding a demonstration for that can be dicey, but it is possible. One option could be to use unit pricing. Say it costs 8 dollars (or your local currency) for a pizza. if you get one pizza, that's <code>8 ✖ 1 = 8</code>. If you get four pizzas, that's <code>8 ✖ 4 = 32</code>. Now, if you get no pizzas, that's the same as zero pizzas, so <code>8 ✖ 0 = ?</code> The answer, of course, is nothing. What if the price of pizza goes up to 12 dollars, how much for no pizzas? <code>12 ✖ 0 = 0</code>; still. No matter how much pizza costs, the total price for zero pizzas is zero dollars. Anything else could be used instead, such as speed and time for distance, or wage rate and hours for pay checks, etc.</p>

<p>With the multiplication by zero concept under control, it's time to connect <code>AND</code> with multiplication. Using the same three setups from above gets three samples of the conversion. <code>FALSE AND FALSE is FALSE</code>, <code>TRUE AND FALSE is FALSE</code>. Converting to symbols gives us <code>0 ✖ 0 = 0</code>, <code>1 ✖ 0 = 0</code>, and <code>1 ✖ 1 = 1</code>.</p>

<p>You can expand that into the distributive property, if you wish. [Again, the rule of only two values comes into play with the <code>OR</code> operator.]</p>

<pre><code>TRUE  AND (FALSE OR FALSE) ⇒ (TRUE  AND FALSE) OR (TRUE  AND FALSE) ⇒ FALSE OR FALSE  = FALSE
 1     ✖  ( 0    ✚    0  ) ⇒ (  1    ✖   0   ) ✚  (  1    ✖   0   ) ⇒   0    ✚   0    =  0
TRUE  AND (TRUE  OR FALSE) ⇒ (TRUE  AND TRUE ) OR (TRUE  AND FALSE) ⇒ TRUE  OR FALSE  = TRUE
 1     ✖  ( 1    ✚    0  ) ⇒ (  1    ✖   1   ) ✚  (  1    ✖   0   ) ⇒   1    ✚   0    =  1
TRUE  AND (TRUE  OR TRUE ) ⇒ (TRUE  AND TRUE ) OR (TRUE  AND TRUE ) ⇒ TRUE  OR TRUE   = TRUE
 1     ✖  ( 1    ✚    1  ) ⇒ (  1    ✖   1   ) ✚  (  1    ✖   1   ) ⇒   1    ✚   1    =  2 ≝ 1
FALSE AND (FALSE OR FALSE) ⇒ (FALSE AND FALSE) OR (FALSE AND FALSE) ⇒ FALSE OR FALSE  = FALSE
 0     ✖  ( 0    ✚    0  ) ⇒ (  0    ✖   0   ) ✚  (  0    ✖   0   ) ⇒   0    ✚   0    =  0
FALSE AND (TRUE  OR FALSE) ⇒ (FALSE AND TRUE ) OR (FALSE AND FALSE) ⇒ TRUE  OR FALSE  = TRUE
 0     ✖  ( 1    ✚    0  ) ⇒ (  0    ✖   1   ) ✚  (  0    ✖   0   ) ⇒   1    ✚   0    =  1
FALSE AND (TRUE  OR TRUE ) ⇒ (FALSE AND TRUE ) OR (FALSE AND TRUE ) ⇒ TRUE  OR TRUE   = TRUE
 0     ✖  ( 1    ✚    1  ) ⇒ (  0    ✖   1   ) ✚  (  0    ✖   1   ) ⇒   1    ✚   1    =  2 ≝ 1

TRUE  OR (FALSE AND FALSE) ⇒ (TRUE  OR FALSE) AND (TRUE  OR FALSE ) ⇒ FALSE AND TRUE  = FALSE
 1    ✚  (  0    ✖    0  ) ⇒ (  1   ✚    0  )  ✖  (  1   ✚    0   ) ⇒   0    ✖   1    =  0
TRUE  OR (TRUE  AND FALSE) ⇒ (TRUE  OR TRUE ) AND (TRUE  OR FALSE ) ⇒ TRUE  AND TRUE  = TRUE 
 1    ✚  (  1    ✖    0  ) ⇒ (  1   ✚    1  )  ✖  (  1   ✚    0   ) ⇒   1    ✖   1    =  1
TRUE  OR (TRUE  AND TRUE ) ⇒ (TRUE  OR TRUE ) AND (TRUE  OR TRUE  ) ⇒ TRUE  AND TRUE  = TRUE 
 1    ✚  (  1    ✖    1  ) ⇒ (  1   ✚    1  )  ✖  (  1   ✚    1   ) ⇒   1    ✖   1    =  1
FALSE OR (FALSE AND FALSE) ⇒ (FALSE OR FALSE) AND (FALSE OR FALSE ) ⇒ FALSE AND FALSE = FALSE
 0    ✚  (  0    ✖    0  ) ⇒ (  0   ✚    0  )  ✖  (  0   ✚    0   ) ⇒   0    ✖   0    =  0
FALSE OR (TRUE  AND FALSE) ⇒ (FALSE OR TRUE ) AND (FALSE OR FALSE ) ⇒ TRUE  AND FALSE = FALSE
 0    ✚  (  1    ✖    0  ) ⇒ (  0   ✚    1  )  ✖  (  0   ✚    0   ) ⇒   1    ✖   0    =  0
FALSE OR (TRUE  AND TRUE ) ⇒ (FALSE OR TRUE ) AND (FALSE OR TRUE  ) ⇒ TRUE  AND TRUE  = TRUE 
 0    ✚  (  1    ✖    1  ) ⇒ (  0   ✚    1  )  ✖  (  1   ✚    1   ) ⇒   1    ✖   1    =  1
</code></pre>

CC BY-SA 3.0
2018-02-19T05:39:53.477Z
2018-02-19T05:39:53.477Z
Gypsy Spellweaver
<p>In <a href="https://cseducators.stackexchange.com/q/4324/3524">a previous question</a>, I asked about the appropriate notation when teaching Boolean logic to students ages about 11–14.  I selected the notation of engineering and computer science in part because I believe (without any real research) that's what the students are most likely to encounter later.</p>

<p>I'm still not sure how to explain + as OR other than by saying that the same symbol is used for different, but similar, things. Is there a better way to explain that?</p>

<p><em>Aside:</em> I am going to use center-dot for AND because most of these students have not had an algebra course and implicit multiplication confuses them.  They won't encounter the inner product concept until college.</p>

CC BY-SA 3.0
2018-02-18T18:36:35.090Z
Because you use the same algebra rules, as if it is a $+$, because it is a $+$. Except $1=2$. See my answer on previous question. and $1\cdot1 = 1$ etc all as expected. But for $+$ it is as expected if $1=2$
ctrl-alt-delor
<lesson-ideas><introductory-lesson><boolean-algebra>
Boolean Logic: How to Explain + as OR?
# Boolean Logic: How to Explain + as OR?

(Asked by: username_0 on 2018-02-18)

In [a previous question](https://cseducators.stackexchange.com/q/4324/3524), I asked about the appropriate notation when teaching Boolean logic to students ages about 11–14. I selected the notation of engineering and computer science in part because I believe (without any real research) that's what the students are most likely to encounter later.

I'm still not sure how to explain + as OR other than by saying that the same symbol is used for different, but similar, things. Is there a better way to explain that?

*Aside:* I am going to use center-dot for AND because most of these students have not had an algebra course and implicit multiplication confuses them. They won't encounter the inner product concept until college.

**Tags:** lesson-ideas, introductory-lesson, boolean-algebra

> **Comments:**
> **username_1**: Because you use the same algebra rules, as if it is a $+$, because it is a $+$. Except $1=2$. See my answer on previous question. and $1\cdot1 = 1$ etc all as expected. But for $+$ it is as expected if $1=2$  

---

## 3 answers

### Answer by username_5 on 2018-02-19. Score: 3 | Accepted answer

Since your students are getting the beginning of Boolean from you, you have the advantage of being able to lay the proper groundwork to work within. To begin with, hopefully, you will be stressing the point that Boolean logic is two-state. You can use the word binary if you choose, as long as they are not predisposed to think binary = computer, since while Boolean logic is handy for computers to deal with, it is not just for computers.
To connect the symbols, meanings and math together, make it explicit, and demonstrate. Start with the concept that FALSE is the same as nothing and TRUE is the same as something. "I have an apple in my hand" is FALSE if you have no apples in your hand, even if you have an orange, or a pencil. The same statement is TRUE if you do have an apple in your hand. It is not, however, more TRUE if you have two apples, or twenty apples, in your hand, however, it is still just TRUE.
Zero, as a number, represents nothing as well - zero apples is no apples. Therefore, it makes sense (dare I say it is logical?) to use the number 0 to represent FALSE. Using the previous demonstrative phrase, it only takes one apple to make the statement TRUE, and at least one is something. Five is also something, but that would leave out everything from one to four as maybe, and Boolean logic has no MAYBE, so that creates a problem. If some starts at one then there is not need for a MAYBE. Using 1 for something, and therefore TRUE, gives two symbols to use instead of the words TRUE and FALSE, which can get quite long to write in a very short while.
The next step is to introduce the symbols for OR and AND. Here I will, marginally, disagree with how and why your are using center dot • for AND. I am not opposed to that usage, only the reasoning behind the choice. The students have not had algebra yet, so it seems a safer choice than ✖. You can tell the students you have chosen • for AND because it is what they are most likely to encounter later. They should also be told that it can also be written as ✖, and that both can also be used for multiplication ins algebra. The same way that 0 means FALSE for this class, and will mean zero in mathematics (and origin in rectangular coordinates). Likewise using ✚ for OR in your class, while it will mean addition in mathematics. Rather than shelter them now, only to create confusion later, deal with the reality that we only have so many different symbols we can use, and many times they will have different meanings in different places, and knowing when, and when not, to use ✚ as AND is part of learning about Boolean logic.
We need to toss in one more symbol here as well. Replacing the word is with the symbol = (or symbol of your choice) also comes in real handy.
Since the students have not had algebra the next step might be difficult. Connecting the Boolean operators with the mathematical functions. Connecting the addition to OR first, because it is easier to apprehend, you can give the samples FALSE OR FALSE is FALSE, TRUE OR FALSE is TRUE, and TRUE OR TRUE is TRUE. Rewrite them in symbols as 0 ✚ 0 = 0, 1 ✚ 0 = 1 and 1 ✚ 1 = 1. The first two will be obvious, make sense, and get no questions. The third will start them thinking and should get some questions about "why not 1 ✚ 1 = 2?" Return to the apples: zero apples made the statement false while any apples, one, two, or a dozen, made the statement true. So, any number other than zero is true. You can call it part of being a two-state system - either it is zero, or it is other than zero. Therefore, the last of the three samples can be expanded to:
1 ✚ 1 = 2
        2 ≝ some (it isn't "none", our only other choice in Boolean algebra)
1 ✚ 1 = some
        some ≝ TRUE (the apple demonstration)
1 ✚ 1 = TRUE
        TRUE ≝ 1 (our definition of the symbols to use in Boolean algebra)
1 ✚ 1 = 1 (Final answer)

Doing the same thing with multiplication for AND is easier, if they understand that anything multiplied by zero is zero. If they do not have that concept mastered, then it can become more difficult. Finding a demonstration for that can be dicey, but it is possible. One option could be to use unit pricing. Say it costs 8 dollars (or your local currency) for a pizza. if you get one pizza, that's 8 ✖ 1 = 8. If you get four pizzas, that's 8 ✖ 4 = 32. Now, if you get no pizzas, that's the same as zero pizzas, so 8 ✖ 0 = ? The answer, of course, is nothing. What if the price of pizza goes up to 12 dollars, how much for no pizzas? 12 ✖ 0 = 0; still. No matter how much pizza costs, the total price for zero pizzas is zero dollars. Anything else could be used instead, such as speed and time for distance, or wage rate and hours for pay checks, etc.
With the multiplication by zero concept under control, it's time to connect AND with multiplication. Using the same three setups from above gets three samples of the conversion. FALSE AND FALSE is FALSE, TRUE AND FALSE is FALSE. Converting to symbols gives us 0 ✖ 0 = 0, 1 ✖ 0 = 0, and 1 ✖ 1 = 1.
You can expand that into the distributive property, if you wish. [Again, the rule of only two values comes into play with the OR operator.]
TRUE  AND (FALSE OR FALSE) ⇒ (TRUE  AND FALSE) OR (TRUE  AND FALSE) ⇒ FALSE OR FALSE  = FALSE
 1     ✖  ( 0    ✚    0  ) ⇒ (  1    ✖   0   ) ✚  (  1    ✖   0   ) ⇒   0    ✚   0    =  0
TRUE  AND (TRUE  OR FALSE) ⇒ (TRUE  AND TRUE ) OR (TRUE  AND FALSE) ⇒ TRUE  OR FALSE  = TRUE
 1     ✖  ( 1    ✚    0  ) ⇒ (  1    ✖   1   ) ✚  (  1    ✖   0   ) ⇒   1    ✚   0    =  1
TRUE  AND (TRUE  OR TRUE ) ⇒ (TRUE  AND TRUE ) OR (TRUE  AND TRUE ) ⇒ TRUE  OR TRUE   = TRUE
 1     ✖  ( 1    ✚    1  ) ⇒ (  1    ✖   1   ) ✚  (  1    ✖   1   ) ⇒   1    ✚   1    =  2 ≝ 1
FALSE AND (FALSE OR FALSE) ⇒ (FALSE AND FALSE) OR (FALSE AND FALSE) ⇒ FALSE OR FALSE  = FALSE
 0     ✖  ( 0    ✚    0  ) ⇒ (  0    ✖   0   ) ✚  (  0    ✖   0   ) ⇒   0    ✚   0    =  0
FALSE AND (TRUE  OR FALSE) ⇒ (FALSE AND TRUE ) OR (FALSE AND FALSE) ⇒ TRUE  OR FALSE  = TRUE
 0     ✖  ( 1    ✚    0  ) ⇒ (  0    ✖   1   ) ✚  (  0    ✖   0   ) ⇒   1    ✚   0    =  1
FALSE AND (TRUE  OR TRUE ) ⇒ (FALSE AND TRUE ) OR (FALSE AND TRUE ) ⇒ TRUE  OR TRUE   = TRUE
 0     ✖  ( 1    ✚    1  ) ⇒ (  0    ✖   1   ) ✚  (  0    ✖   1   ) ⇒   1    ✚   1    =  2 ≝ 1

TRUE  OR (FALSE AND FALSE) ⇒ (TRUE  OR FALSE) AND (TRUE  OR FALSE ) ⇒ FALSE AND TRUE  = FALSE
 1    ✚  (  0    ✖    0  ) ⇒ (  1   ✚    0  )  ✖  (  1   ✚    0   ) ⇒   0    ✖   1    =  0
TRUE  OR (TRUE  AND FALSE) ⇒ (TRUE  OR TRUE ) AND (TRUE  OR FALSE ) ⇒ TRUE  AND TRUE  = TRUE 
 1    ✚  (  1    ✖    0  ) ⇒ (  1   ✚    1  )  ✖  (  1   ✚    0   ) ⇒   1    ✖   1    =  1
TRUE  OR (TRUE  AND TRUE ) ⇒ (TRUE  OR TRUE ) AND (TRUE  OR TRUE  ) ⇒ TRUE  AND TRUE  = TRUE 
 1    ✚  (  1    ✖    1  ) ⇒ (  1   ✚    1  )  ✖  (  1   ✚    1   ) ⇒   1    ✖   1    =  1
FALSE OR (FALSE AND FALSE) ⇒ (FALSE OR FALSE) AND (FALSE OR FALSE ) ⇒ FALSE AND FALSE = FALSE
 0    ✚  (  0    ✖    0  ) ⇒ (  0   ✚    0  )  ✖  (  0   ✚    0   ) ⇒   0    ✖   0    =  0
FALSE OR (TRUE  AND FALSE) ⇒ (FALSE OR TRUE ) AND (FALSE OR FALSE ) ⇒ TRUE  AND FALSE = FALSE
 0    ✚  (  1    ✖    0  ) ⇒ (  0   ✚    1  )  ✖  (  0   ✚    0   ) ⇒   1    ✖   0    =  0
FALSE OR (TRUE  AND TRUE ) ⇒ (FALSE OR TRUE ) AND (FALSE OR TRUE  ) ⇒ TRUE  AND TRUE  = TRUE 
 0    ✚  (  1    ✖    1  ) ⇒ (  0   ✚    1  )  ✖  (  1   ✚    1   ) ⇒   1    ✖   1    =  1


---

### Answer by username_2 on 2018-02-18. Score: 1

If you teach center dot as *and*, then + for *or* should be pretty natural. Tell them that *or* is logical addition and *and* is logical multiplication. Likewise, + can be used for set addition (everything in A "plus" everything in B). Likewise "or" means that something is in A *or* it is in B (maybe both). So, +, *or*, and Union are all alike. Naive Set Theory and Simple Logic. So it isn't just that the same symbol is used, the ideas are actually related.

If you teach them the distributive laws for these it will seem even more natural. What will be less natural is that *or* and *and* distribute over each other, while in arithmetic you only get one distributive law.

P or (Q and R) has the same truth table as (P or Q) and (P or R). Etc. Similarly for the other law and for set union and intersection. "Arithmetic is the anomaly, not logic." And if you put it like that, they may be more likely to remember.

---

Actually it is *and* that is a bit harder to finesse with language. "Everything in A *and* everything in B" (Union, *or*)is easy to confuse initially with "It is in A *and* it is in B." (Intersection, *and*) so watch out for that. The first sentence is, of course, the same as "It is in A *or* it is in B." Focus on whether the statement talks about an individual thing, "It..." or the set/concept as a whole "Everything..."


---

### Answer by username_3 on 2018-02-19. Score: 0

Algebraic data types use a notion of counting inhabitants in a correspondence between addition with OR, multiplication with AND (and exponentiation with implication).

The idea is that if something is an x OR y, then it has x + y possibilities — all the possibilities of x added to all the possibilities of y. If there are 3 possible x's and 4 possible y's then there are 3+4=7 possible inhabitants of x OR y.

And that if something is an x AND y then it has x \* y possibilities — the Cartesian product of all possible x's with all possible y's. So here if there are 3 possible x's and 4 possible y's then there are 3\*4=12 possible inhabitants of the Cartesian cross product representing the notion of x AND y.

> **Comments:**
> **username_4**: "...12 possible inhabitants of the Cartesian cross product..." This is what you would explain to an 11 year old?  
> **username_3**: Yes, you could simply list them.  
> **username_5**: All well and good, except the concept being taught is __Boolean logic__ not set theory. There are only ever _two_ possible answers using any operations. In addition, `AND` has 4 possible combinations of inputs, and `OR` _also_ has 4 possible combinations of inputs. Not a good time to explain the difference between Cartesian cross products and set union.  

---

