The LIST Specification
=======================

.. tikz:: The LIST Universe alongwith the 4 tiers of Referencing
   :include: fig_list_spec.tex
   :align: center

Core Axioms
-----------

1.  **Linked Immutably:** References between units of knowledge must be based on immutable IDs, ensuring they remain valid regardless of renaming or relocation.
2.  **Static and Strong Typing:** Each object is associated with an explicit, schema-bound metadata object, separating intrinsic document properties (:math:`\mathcal{M}_{\text{doc}}`) from extrinsic user interaction metadata (:math:`\mathcal{M}_{\text{user}}`).

Structural Model
----------------

*   **Atoms** (:math:`\mathcal{A}`): The smallest indivisible units of knowledge. Each atom has a unique, immutable :math:`\text{id}(a)`.
*   **LIST Universe** (:math:`\mathcal{U}`): A set of Atoms and the directed edges (links) between them.
*   **Recursive Composition:** An Atom can itself be a Universe containing sub-atoms.

Tiers of Referencing
--------------------

LIST enables four levels of granularity:

1.  **Whole-to-Whole:** Document A :math:`\to` Document B.
2.  **Inside-to-Whole:** Paragraph in Doc A :math:`\to` Document B.
3.  **Whole-to-Inside:** Document A :math:`\to` Paragraph in Doc B.
4.  **Inside-to-Inside:** Paragraph in Doc A :math:`\to` Paragraph in Doc B.


Metadata as Types
-----------------

LIST abstracts the notion of metadata as a type system. In programming, a type provides a contract about the nature of the data; in LIST, metadata provides a contract about the nature of the knowledge unit.

*   **Static Typing (Explicit Intention):** While conventional filesystems use implicit or volatile metadata, LIST treats metadata as a first-class, explicit property of the Atom. This is analogous to moving from dynamic typing (where types are inferred or mutable) to static typing (where the nature of the data is explicitly declared).
*   **Strong Typing (Preservation of Identity):** In standard filesystems, metadata is often lost or altered during relocation. LIST implements "strong typing" by ensuring that metadata is schema-bound and persistent, providing the structural stability required for Impeccable Referencing.


This abstraction/analogy/comparison between Programming and LIST Type System is depicted in the following table:

+------------------+-----------------------------+---------------------------------+
| Paradigm         | Programming                 | LIST Filesystem                 |
+==================+=============================+=================================+
| Dynamic / Loose  | ``a = 45``                  | ``f.txt $\to$ content``         |
|                  | (Type is inferred/mutable)  | (Metadata is minimal/volatile)  |
+------------------+-----------------------------+---------------------------------+
| Static / Strong  | ``float a = 45``            | ``M_a f.txt $\to$ content``     |
|                  | (Type is explicit/fixed)    | (Metadata is explicit/preserved)|
+------------------+-----------------------------+---------------------------------+


Haskell Formalization
---------------------

The LIST specification is being formalized in Haskell to rigorously define the relationship between Atoms, Metadata, and the Universe.

.. literalinclude:: LISTFormal.hs
   :language: haskell

This formalization ensures that:

*   **Immutability** is guaranteed by using `AtomId` as the primary key in the `Universe` map.
*   **Strong Typing** is enforced via the `Metadata` record.
*   **Recursive Granularity** (Inside-to-Inside) is achieved through the `AtomContent` sum type.



