Add trinary encoding specification and update catalog
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
# 📇 BlackRoad OS Archive Index
|
# 📇 BlackRoad OS Archive Index
|
||||||
|
|
||||||
**Last Updated:** 2025-11-24
|
**Last Updated:** 2025-11-28
|
||||||
**Total Archived Items:** 0
|
**Total Archived Items:** 7
|
||||||
**Purpose:** Master index of all archived content
|
**Purpose:** Master index of all archived content
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -36,17 +36,11 @@ Point-in-time captures of the BlackRoad OS ecosystem state.
|
|||||||
|
|
||||||
Canonical versions of intellectual property, protocols, and frameworks.
|
Canonical versions of intellectual property, protocols, and frameworks.
|
||||||
|
|
||||||
*No IP artifacts archived yet. See `workflows/ip-registration-workflow.md` for how to register IP.*
|
- [Trinary Encoding Specification (Base27, Base81, Base729)](../ip/trinary-encoding-spec.md)
|
||||||
|
|
||||||
**Example entry format:**
|
|
||||||
```markdown
|
|
||||||
- [Protocol Name](../ip/protocol-name-v1.0.md)
|
|
||||||
- Category: IP / Protocol
|
- Category: IP / Protocol
|
||||||
- Registration: IP-YYYYMMDD-XXX
|
- Archived: 2025-11-28
|
||||||
- Version: 1.0
|
- Source: `BlackRoad-OS/blackroad-os-archive`
|
||||||
- Archived: YYYY-MM-DD
|
- Focus: Balanced ternary alphabets, Base81 ordering, Base729 mapping via Base27 pairs
|
||||||
- Source: `BlackRoad-OS/[repo]` @ `[commit]`
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -108,12 +102,12 @@ Archive documentation and operational files.
|
|||||||
## 📊 Statistics
|
## 📊 Statistics
|
||||||
|
|
||||||
- **Total Snapshots:** 1
|
- **Total Snapshots:** 1
|
||||||
- **Total IP Artifacts:** 0
|
- **Total IP Artifacts:** 1
|
||||||
- **Total Legal/Finance Docs:** 0
|
- **Total Legal/Finance Docs:** 0
|
||||||
- **Total Workflows:** 3
|
- **Total Workflows:** 3
|
||||||
- **Total Meta Docs:** 2
|
- **Total Meta Docs:** 2
|
||||||
- **First Archive Entry:** 2025-11-24
|
- **First Archive Entry:** 2025-11-24
|
||||||
- **Last Archive Entry:** 2025-11-24
|
- **Last Archive Entry:** 2025-11-28
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -137,6 +131,9 @@ Archive documentation and operational files.
|
|||||||
|
|
||||||
## 🆕 Recent Additions
|
## 🆕 Recent Additions
|
||||||
|
|
||||||
|
### 2025-11-28
|
||||||
|
- Trinary Encoding Specification archived under IP (Base27/Base81/Base729 mapping)
|
||||||
|
|
||||||
### 2025-11-24
|
### 2025-11-24
|
||||||
- Initial archive structure created
|
- Initial archive structure created
|
||||||
- Three core workflows documented
|
- Three core workflows documented
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# 📅 BlackRoad OS Timeline
|
# 📅 BlackRoad OS Timeline
|
||||||
|
|
||||||
**Last Updated:** 2025-11-24
|
**Last Updated:** 2025-11-28
|
||||||
**Purpose:** Chronological map of major milestones and events
|
**Purpose:** Chronological map of major milestones and events
|
||||||
**Format:** Most recent first
|
**Format:** Most recent first
|
||||||
|
|
||||||
@@ -10,6 +10,12 @@
|
|||||||
|
|
||||||
### November 2025
|
### November 2025
|
||||||
|
|
||||||
|
#### 2025-11-28
|
||||||
|
- **Trinary Encoding Alphabet & Base729 Mapping** 🧬
|
||||||
|
- [Trinary Encoding Specification](../ip/trinary-encoding-spec.md) defines Base27, Base81, and Base729 alphabets with balanced-ternary semantics for RoadChain/Lucidia payloads.
|
||||||
|
- Significance: Establishes canonical mapping for paraconsistent trits and high-density archival strings, enabling PS-SHA∞ and coherence-aware data interchange.
|
||||||
|
- Related: Extends the archive's IP catalog beyond workflows and snapshots.
|
||||||
|
|
||||||
#### 2025-11-24
|
#### 2025-11-24
|
||||||
- **BlackRoad OS Archive Initialized** 🕯️
|
- **BlackRoad OS Archive Initialized** 🕯️
|
||||||
- Repository structure created
|
- Repository structure created
|
||||||
@@ -60,7 +66,7 @@ Regular ecosystem state captures
|
|||||||
|
|
||||||
### 🧬 IP Registrations
|
### 🧬 IP Registrations
|
||||||
Formal intellectual property registrations
|
Formal intellectual property registrations
|
||||||
- *None yet - awaiting first IP registration*
|
- 2025-11-28: Trinary Encoding Alphabet & Base729 Mapping ([spec](../ip/trinary-encoding-spec.md))
|
||||||
|
|
||||||
### 📚 Documentation
|
### 📚 Documentation
|
||||||
Major documentation milestones
|
Major documentation milestones
|
||||||
@@ -148,13 +154,13 @@ Legal and corporate structure events
|
|||||||
|
|
||||||
## Timeline Statistics
|
## Timeline Statistics
|
||||||
|
|
||||||
**Current Metrics (2025-11-24):**
|
**Current Metrics (2025-11-28):**
|
||||||
- **Total Entries:** 2
|
- **Total Entries:** 3
|
||||||
- **Total Snapshots:** 1
|
- **Total Snapshots:** 1
|
||||||
- **Total IP Registrations:** 0
|
- **Total IP Registrations:** 1
|
||||||
- **Timeline Span:** 0 days (just started!)
|
- **Timeline Span:** 4 days (2025-11-24 to 2025-11-28)
|
||||||
- **Most Active Month:** November 2025 (2 entries)
|
- **Most Active Month:** November 2025 (3 entries)
|
||||||
- **Most Active Year:** 2025 (2 entries)
|
- **Most Active Year:** 2025 (3 entries)
|
||||||
|
|
||||||
*These statistics should be updated monthly*
|
*These statistics should be updated monthly*
|
||||||
|
|
||||||
|
|||||||
93
ip/trinary-encoding-spec.md
Normal file
93
ip/trinary-encoding-spec.md
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
# Trinary Encoding Specification (Base27, Base81, Base729)
|
||||||
|
|
||||||
|
**Category:** IP | Protocol
|
||||||
|
**Source Repo:** `BlackRoad-OS/blackroad-os-archive`
|
||||||
|
**Source Path:** `ip/trinary-encoding-spec.md`
|
||||||
|
**Source Commit:** `N/A (initial archival in this repository)`
|
||||||
|
**Archived On:** 2025-11-28
|
||||||
|
**Archived By:** agent:gpt-5.1-codex-max
|
||||||
|
**Status:** Living Document
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Purpose
|
||||||
|
|
||||||
|
Define a balanced-ternary encoding stack that bridges binary data to higher-density alphabets suitable for RoadChain and related Lucidia components. The spec emphasizes deterministic mapping, collision-free symbol choices, and graceful handling of paraconsistent states (−1, 0, +1) used in the coherence formula:
|
||||||
|
|
||||||
|
\[ C(t) = \frac{\Psi'(M_t) + \delta_t}{1 + |\delta_t|} \]
|
||||||
|
|
||||||
|
## Balanced Ternary Model
|
||||||
|
|
||||||
|
- **Digits (trits):** −1, 0, +1
|
||||||
|
- **Semantics:**
|
||||||
|
- −1 → Negation / contradiction
|
||||||
|
- 0 → Null / unknown / superposition
|
||||||
|
- +1 → Affirmation / confirmation
|
||||||
|
- **Information density:** log₂(3) ≈ 1.585 bits per trit.
|
||||||
|
- **Normalization:** The absolute value in the coherence formula collapses sign while preserving contradiction magnitude, making balanced ternary a native fit.
|
||||||
|
|
||||||
|
## Alphabet Tiers
|
||||||
|
|
||||||
|
### Base27 (3³)
|
||||||
|
- **Symbols:** `A`–`Z`, `_` (27 total)
|
||||||
|
- **Indexing:** `0–25` map to `A`–`Z`; `26` maps to `_`.
|
||||||
|
- **Use Cases:** Compact labels, namespace prefixes, checksum syllables.
|
||||||
|
|
||||||
|
### Base81 (3⁴)
|
||||||
|
- **Symbols:**
|
||||||
|
- 26 uppercase: `A–Z`
|
||||||
|
- 26 lowercase: `a–z`
|
||||||
|
- 10 digits: `0–9`
|
||||||
|
- 19 specials: `! @ # $ % ^ & * ( ) - _ = + [ ] { } |`
|
||||||
|
- **Ordering (value → symbol):**
|
||||||
|
- `0–25`: `A–Z`
|
||||||
|
- `26–51`: `a–z`
|
||||||
|
- `52–61`: `0–9`
|
||||||
|
- `62 → !`, `63 → @`, `64 → #`, `65 → $`, `66 → %`, `67 → ^`, `68 → &`, `69 → *`, `70 → (`, `71 → )`, `72 → -`, `73 → _`, `74 → =`, `75 → +`, `76 → [`, `77 → ]`, `78 → {`, `79 → }`, `80 → |`
|
||||||
|
- **Rationale for specials:** All ASCII, visually distinct, shell-safe, and avoid whitespace/quote ambiguity.
|
||||||
|
- **Use Cases:** URI-safe payloads, human-facing keys, structured labels where case sensitivity is acceptable.
|
||||||
|
|
||||||
|
### Base729 (3⁶)
|
||||||
|
- **Symbolization options:**
|
||||||
|
1. **Base27 pairs (recommended):** Encode each 6-trit block as two Base27 symbols (27 × 27 = 729). Example mapping: high-order trits → first symbol; low-order trits → second symbol.
|
||||||
|
2. **Base81 digraphs:** Use two Base81 symbols but restrict to the first 729 combinations for backward compatibility; reject/flag overflow combos `>=729`.
|
||||||
|
3. **Unicode glyph set:** Reserve a contiguous Unicode block (e.g., Mathematical Operators) and map indices directly for dense, single-symbol rendering.
|
||||||
|
- **Use Cases:** High-density archival strings, PS-SHA∞ representations, inter-agent coherence payloads.
|
||||||
|
|
||||||
|
## Encoding Pipeline
|
||||||
|
|
||||||
|
1. **Binary → Integer:** Treat the byte string as a big-endian integer.
|
||||||
|
2. **Integer → Balanced Ternary:** Repeatedly divide by 3; remap remainders `0,1,2` to ternary digits `0,+1,−1` using carry to keep digits in {−1,0,+1}.
|
||||||
|
3. **Group Trits:** Chunk from most significant to least into:
|
||||||
|
- 3-trit groups → Base27
|
||||||
|
- 4-trit groups → Base81 (pad with leading zeros as needed)
|
||||||
|
- 6-trit groups → Base729
|
||||||
|
4. **Map to Alphabet:** Use the ordering tables above to convert each group to its symbol.
|
||||||
|
5. **Padding/Alignment:** When input length is not divisible by the group size, left-pad with `0` trits; record original bit length in framing metadata when round-tripping exact byte counts matters.
|
||||||
|
6. **Error Handling:** Reject symbols outside the defined alphabets; for Base81 digraphs used as Base729 surrogates, enforce the `0–728` range and emit a contradiction flag (`−1`) for out-of-range pairs.
|
||||||
|
|
||||||
|
## Binary Compatibility Notes
|
||||||
|
|
||||||
|
- **Lossless decode:** The balanced-ternary conversion is reversible; carries are deterministic and do not alter numeric value.
|
||||||
|
- **Flag-friendly trits:** The `−1/0/+1` space can embed contradiction or integrity bits without leaving ternary space.
|
||||||
|
- **Interchange with Base64:** For interoperability, consider a shim where Base64 sextets are reinterpreted as 0–63 integers and lifted into balanced ternary blocks before symbol mapping, avoiding floating carries across block boundaries.
|
||||||
|
|
||||||
|
## Example Mapping (6 Trits → Base729 via Base27 pairs)
|
||||||
|
|
||||||
|
1. Trits: `[+1, −1, 0, +1, +1, −1]`
|
||||||
|
2. Value: \((+1)·3^5 + (−1)·3^4 + 0·3^3 + (+1)·3^2 + (+1)·3 + (−1) = 162 − 81 + 0 + 9 + 3 − 1 = 92\)
|
||||||
|
3. High digit: `92 // 27 = 3` (symbol `D`), low digit: `92 % 27 = 11` (symbol `L`)
|
||||||
|
4. Encoded pair: `DL`
|
||||||
|
|
||||||
|
## Integration with Coherence Formula
|
||||||
|
|
||||||
|
- **Contradiction channel:** Represent `δ_t` directly as a trit (−1, 0, +1); downstream modules can attach this trit alongside payload trits without widening the alphabet.
|
||||||
|
- **Normalization:** Because `|δ_t|` collapses sign, a single trit can both mark contradiction and participate in normalization without leaving ternary space.
|
||||||
|
- **Hash embedding:** PS-SHA∞ outputs can be rendered in Base729 for density while preserving explicit contradiction markers during aggregation.
|
||||||
|
|
||||||
|
## Implementation Checklist
|
||||||
|
|
||||||
|
- [ ] Reference encoder/decoder covering Base27/Base81/Base729
|
||||||
|
- [ ] Test vectors for binary round-trips and contradiction flag propagation
|
||||||
|
- [ ] Service-level framing that records bit-length for exact byte recovery
|
||||||
|
- [ ] Optional Unicode glyph map for Base729 when single-symbol density is required
|
||||||
Reference in New Issue
Block a user