# Booleans

A **Boolean** in Internet Object represents a logical value that can be either true or false. Boolean values are scalar primitives used to express binary states, flags, or conditional logic.

Boolean values in Internet Object support both compact and verbose representations to balance readability and space efficiency.

## Syntax

A boolean value can be expressed in two forms:

```ebnf
boolean = compactBoolean | verboseBoolean
compactBoolean = "T" | "F"
verboseBoolean = "true" | "false"
```

## Structural Characters

| Symbol  | Name          | Unicode  | Description                     |
| ------- | ------------- | -------- | ------------------------------- |
| `T`     | Uppercase T   | `U+0054` | Compact representation of true  |
| `F`     | Uppercase F   | `U+0046` | Compact representation of false |
| `true`  | Keyword true  | Multiple | Verbose representation of true  |
| `false` | Keyword false | Multiple | Verbose representation of false |

## Valid Forms

```ruby
T                    # Compact true
F                    # Compact false
true                 # Verbose true
false                # Verbose false
```

## Optional Behaviors

### Literal and Alternate Forms

Internet Object supports two equivalent representations for each boolean value:

* **Compact form**: `T` for true, `F` for false (recommended)
* **Verbose form**: `true` for true, `false` for false

```ruby
T        # ✅ Recommended compact form
true     # ✅ Verbose form (equivalent to T)
F        # ✅ Recommended compact form
false    # ✅ Verbose form (equivalent to F)
```

## Invalid Forms

```ruby
t        # ❌ Lowercase not allowed
f        # ❌ Lowercase not allowed
TRUE     # ❌ All caps not allowed
FALSE    # ❌ All caps not allowed
True     # ❌ Mixed case not allowed
False    # ❌ Mixed case not allowed
1        # ❌ Numeric representation not allowed
0        # ❌ Numeric representation not allowed
```

## See Also

* [Schema for Booleans](/schema-definition-language/data-types/bool.md)
* [Values](/the-structure/values.md)


---

# 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://docs.internetobject.org/the-structure/values/booleans.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.
