# Two-element Boolean algebra

<https://en.wikipedia.org/wiki/Two-element\\_Boolean\\_algebra>

The two-element Boolean algebra is the Boolean algebra whose underlying set (or universe or carrier) B is the Boolean domain, B = {0, 1}. Paul Halmos's name for this algebra "2" is also common.

## Definition

`B` is a partially ordered set and the elements of `B` are also its bounds.

An operation of arity `n` is a mapping from Bⁿ to B, `Bⁿ ⟼ B`

Boolean algebra consists of two binary operations and unary complementation.

The binary operations have been named and notated in various ways. Here they are called 'sum' and 'product', and notated by infix '+' and '∙', respectively.

Sum and product commute and associate, as in the usual algebra of real numbers.

As for the order of operations, brackets are decisive if present. Otherwise '∙' precedes '+'. Hence A∙B + C is parsed as (A∙B) + C and not as A∙(B + C).

*Complementation* is denoted by writing an overbar over its argument (or a tick). The numerical analog of the complement of X is 1 − X.

In the language of universal algebra, a Boolean algebra is algebra denoted by the 6-tuple `⟨B, +, ∙, ◌', 1, 0⟩`, and has the type `⟨2,2,1,0,0⟩`.

$$\langle\ B\ ,\ +\ ,\ \cdot\ ,\ \overline {..}\ , \ 1\ ,\ 0\ \rangle$$

Either one-to-one correspondence between `{0,1}` and `{True,False}` yields classical bivalent logic in equational form, with complementation read as NOT. If 1 is read as True, `+` is read as OR, and `∙` as AND (and vice versa if 1 is read as False). These two operations define a commutative semiring, known as the *Boolean semiring*.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mandober.gitbook.io/math-debrief/400-abstract-algebra/boolean-algebra/boolean-algebra-of-2-element-set.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
