# AKA

Provides alternate names (aliases) for a definition. Allows the same value or type to be referenced by multiple names.

## Syntax

```l4
name1 AKA name2, name3 MEANS expression
DECLARE TypeName AKA AliasName IS ...
```

## Purpose

AKA ("also known as") enables:

1. Creating synonyms for legal terminology
2. Supporting multiple naming conventions
3. Providing human-readable alternatives

## Examples

**Example file:** 

```l4-file
-- AKA keyword examples

-- Value Aliases

-- Define a value with multiple names
x AKA y, z MEANS TRUE

-- All names evaluate to the same value
#EVAL x
#EVAL y
#EVAL z

-- Type Aliases

-- Create an alias for BOOLEAN
DECLARE B AKA YesNo IS BOOLEAN

-- Use either name in type signatures
GIVETH B
example1 MEANS TRUE

GIVETH YesNo
example2 MEANS FALSE

#EVAL example1
#EVAL example2

-- Record Type with Alias

GIVEN a IS A TYPE
      b IS A TYPE
DECLARE Pair OF a, b AKA `2-tuple`
  HAS
    px IS AN a
    py IS A b

-- Use the primary name
GIVETH Pair OF NUMBER, NUMBER
testPair1 MEANS Pair WITH px IS 3, py IS 5

-- Use the alias
GIVETH `2-tuple` OF NUMBER, NUMBER
testPair2 MEANS Pair WITH px IS 10, py IS 20

#EVAL testPair1
#EVAL testPair2

-- Legal Terminology Example

-- Primary legal term with common alias
DECLARE `Authorized Representative` AKA Agent
  HAS
    name IS A STRING
    licenseId IS A STRING

-- Can construct using either name
DECIDE myAgent IS `Authorized Representative` WITH
  name IS "John Smith",
  licenseId IS "A12345"

-- Access works with both names
#EVAL myAgent's name

-- Function with Alias

GIVEN n IS A NUMBER
double AKA twice MEANS n TIMES 2

-- Both names work
#EVAL double 5
#EVAL twice 5

-- Multiple Aliases

GIVEN amount IS A NUMBER
tax AKA VAT, `sales tax`, GST MEANS amount TIMES 0.1

#EVAL tax 100
#EVAL VAT 100
#EVAL `sales tax` 100
#EVAL GST 100
```



### Value Aliases

```l4
x AKA y, z MEANS TRUE

#EVAL x   -- TRUE
#EVAL y   -- TRUE
#EVAL z   -- TRUE
```

### Type Aliases

```l4
DECLARE B AKA YesNo IS BOOLEAN

-- Both names refer to the same type
GIVETH B
example1 MEANS TRUE

GIVETH YesNo
example2 MEANS FALSE
```

### Complex Type with Aliases

```l4
DECLARE Pair OF a, b AKA `2-tuple`
  HAS
    px IS AN a
    py IS A b

-- Use either name
GIVETH Pair OF NUMBER, NUMBER
test1 MEANS Pair WITH px IS 3, py IS 5

GIVETH `2-tuple` OF NUMBER, NUMBER
test2 MEANS Pair WITH px IS 10, py IS 20
```

## Use Cases

### Legal Terminology

```l4
-- The regulation uses "Authorized Representative"
-- but practitioners say "Agent"
DECLARE `Authorized Representative` AKA Agent
  HAS
    name IS A STRING
    licenseNumber IS A STRING
```

### Internationalization

```l4
-- Support English and abbreviated forms
DECLARE Value Added Tax AKA VAT, `sales tax`
  IS NUMBER
```

## Related Keywords

- **[DECLARE](/l4/reference/types/DECLARE.md)** - Type declarations
- **[DECIDE](/l4/reference/functions/DECIDE.md)** - Value definitions
- **[MEANS](/l4/reference/functions/MEANS.md)** - Definition body

## See Also

- **[Types Reference](/l4/reference/types.md)** - Type system
