;
; dimensions-of-structure.scm
;
; A comprehensive map of all the dimensions of structure
; that could be extracted through counting/statistics.
;
; Each dimension is another layer where PMI-like measures
; can reveal meaningful patterns.
;
; CRITICAL INSIGHT (2026-02-03): This file is the strongest
; evidence that the "7-layer stack" (Layer 0-7) used elsewhere
; in our documentation is a SIMPLIFICATION. The 10 dimensions
; listed here are NOT stacked vertically -- they are ORTHOGONAL.
; Linguistic, temporal, causal, modal, social, etc. are
; independent axes, each with 4-5 internal sub-levels.
;
; Furthermore, each dimension has FRACTAL sub-structure: "causal"
; decomposes into physical-causation vs social-causation vs
; biological-causation, each discoverable by the same counting
; method. The true architecture is a fractal lattice of unknown
; dimensionality, not a numbered stack.
;
; The fixed "7 layers" and the fixed "10 dimensions" are both
; projections of whatever structure the data actually contains.
; The method (COUNT → CLUSTER → STRUCTURE) doesn't prescribe
; dimensionality -- it discovers it.
;
(display "═══════════════════════════════════════════════════════════════════\n")
(display " DIMENSIONS OF COUNTABLE STRUCTURE \n")
(display "═══════════════════════════════════════════════════════════════════\n\n")
;; ═══════════════════════════════════════════════════════════════════
;; LEVEL 1: LINGUISTIC STRUCTURE (what we've covered)
;; ═══════════════════════════════════════════════════════════════════
(display "╔═══════════════════════════════════════════════════════════════════╗\n")
(display "║ LEVEL 1: LINGUISTIC STRUCTURE ║\n")
(display "╚═══════════════════════════════════════════════════════════════════╝\n\n")
(display "1.1 LEXICAL CO-OCCURRENCE (done)\n")
(display " Count: word pairs within window\n")
(display " Reveals: synonyms, antonyms, associations\n")
(display " Example: PMI(hot, cold) → antonym relationship\n\n")
(display "1.2 SYNTACTIC BONDS (done)\n")
(display " Count: grammatical relationships\n")
(display " Reveals: word categories (noun, verb, adj)\n")
(display " Example: words taking Ds bond → nouns\n\n")
(display "1.3 SEMANTIC FRAMES (done)\n")
(display " Count: cluster co-occurrence\n")
(display " Reveals: conceptual groupings\n")
(display " Example: {buy, sell, price, money} → COMMERCE frame\n\n")
(display "1.4 SELECTIONAL PREFERENCES (done)\n")
(display " Count: what fills argument slots\n")
(display " Reveals: verb-argument compatibility\n")
(display " Example: drink(X) → X is LIQUID\n\n")
(display "1.5 SPATIAL TOPOLOGY (done)\n")
(display " Count: preposition-noun patterns\n")
(display " Reveals: physical affordances\n")
(display " Example: P(ON|table) high → table is SURFACE\n\n")
;; ═══════════════════════════════════════════════════════════════════
;; LEVEL 2: TEMPORAL STRUCTURE
;; ═══════════════════════════════════════════════════════════════════
(display "╔═══════════════════════════════════════════════════════════════════╗\n")
(display "║ LEVEL 2: TEMPORAL STRUCTURE ║\n")
(display "╚═══════════════════════════════════════════════════════════════════╝\n\n")
(display "2.1 SEQUENCE PATTERNS\n")
(display " Count: what events follow what events\n")
(display " Reveals: typical orderings, scripts\n")
(display " Example: P(eat | cook) >> P(cook | eat)\n")
(display " → cooking precedes eating\n\n")
(display "2.2 TENSE/ASPECT PATTERNS\n")
(display " Count: which verbs take which tenses\n")
(display " Reveals: event types (states vs actions)\n")
(display " Example: 'know' rarely in progressive → state verb\n")
(display " 'run' often in progressive → action verb\n\n")
(display "2.3 TEMPORAL CONNECTIVES\n")
(display " Count: before/after/while/until patterns\n")
(display " Reveals: event relationships\n")
(display " Example: 'before eating' + 'wash hands' = high PMI\n")
(display " → hand-washing precedes eating (script)\n\n")
(display "2.4 DURATION PATTERNS\n")
(display " Count: 'for X time' patterns\n")
(display " Reveals: typical durations of events\n")
(display " Example: 'for hours' + 'meeting' vs 'for seconds' + 'blink'\n\n")
;; ═══════════════════════════════════════════════════════════════════
;; LEVEL 3: CAUSAL STRUCTURE
;; ═══════════════════════════════════════════════════════════════════
(display "╔═══════════════════════════════════════════════════════════════════╗\n")
(display "║ LEVEL 3: CAUSAL STRUCTURE ║\n")
(display "╚═══════════════════════════════════════════════════════════════════╝\n\n")
(display "3.1 CAUSAL CONNECTIVES\n")
(display " Count: because/therefore/causes/leads-to patterns\n")
(display " Reveals: causal relationships\n")
(display " Example: 'because rain' + 'wet' = high PMI\n")
(display " 'because wet' + 'rain' = lower PMI (direction!)\n\n")
(display "3.2 ENABLEMENT PATTERNS\n")
(display " Count: 'X allows Y', 'X enables Y'\n")
(display " Reveals: preconditions\n")
(display " Example: 'key enables opening' → key is precondition for open\n\n")
(display "3.3 PREVENTION PATTERNS\n")
(display " Count: 'X prevents Y', 'X stops Y'\n")
(display " Reveals: blocking relationships\n")
(display " Example: 'lock prevents entry' → lock blocks entry\n\n")
(display "3.4 RESULT PATTERNS\n")
(display " Count: 'X results in Y', 'X leads to Y'\n")
(display " Reveals: consequences\n")
(display " Example: 'fire results in' + {smoke, heat, damage}\n\n")
;; ═══════════════════════════════════════════════════════════════════
;; LEVEL 4: MODAL STRUCTURE
;; ═══════════════════════════════════════════════════════════════════
(display "╔═══════════════════════════════════════════════════════════════════╗\n")
(display "║ LEVEL 4: MODAL STRUCTURE (possibility/necessity) ║\n")
(display "╚═══════════════════════════════════════════════════════════════════╝\n\n")
(display "4.1 ABILITY PATTERNS\n")
(display " Count: 'X can Y' patterns\n")
(display " Reveals: capabilities\n")
(display " Example: 'birds can fly', 'fish can swim'\n")
(display " → flying is bird-capability\n\n")
(display "4.2 NECESSITY PATTERNS\n")
(display " Count: 'X must Y', 'X has to Y'\n")
(display " Reveals: obligations, requirements\n")
(display " Example: 'humans must breathe' → breathing is necessary\n\n")
(display "4.3 POSSIBILITY PATTERNS\n")
(display " Count: 'X might Y', 'X could Y'\n")
(display " Reveals: uncertain/potential states\n")
(display " Example: 'weather might change' → weather is variable\n\n")
(display "4.4 PERMISSION PATTERNS\n")
(display " Count: 'X may Y', 'X is allowed to Y'\n")
(display " Reveals: social rules\n")
(display " Example: 'adults may drink' vs 'children may not drink'\n\n")
;; ═══════════════════════════════════════════════════════════════════
;; LEVEL 5: QUANTIFICATIONAL STRUCTURE
;; ═══════════════════════════════════════════════════════════════════
(display "╔═══════════════════════════════════════════════════════════════════╗\n")
(display "║ LEVEL 5: QUANTIFICATIONAL STRUCTURE ║\n")
(display "╚═══════════════════════════════════════════════════════════════════╝\n\n")
(display "5.1 UNIVERSAL PATTERNS\n")
(display " Count: 'all X are Y', 'every X has Y'\n")
(display " Reveals: categorical truths\n")
(display " Example: 'all dogs have' + {legs, fur, teeth}\n")
(display " → essential properties of dogs\n\n")
(display "5.2 EXISTENTIAL PATTERNS\n")
(display " Count: 'some X are Y', 'there exist X'\n")
(display " Reveals: possible but not necessary properties\n")
(display " Example: 'some birds' + {can't fly, are large}\n\n")
(display "5.3 NEGATIVE PATTERNS\n")
(display " Count: 'no X is Y', 'X never Y'\n")
(display " Reveals: exclusions, impossibilities\n")
(display " Example: 'no mammal' + {has feathers, lays eggs*}\n")
(display " *platypus exception learnable from low PMI!\n\n")
(display "5.4 FREQUENCY ADVERBS\n")
(display " Count: always/usually/sometimes/rarely/never + X\n")
(display " Reveals: typicality of associations\n")
(display " Example: 'dogs usually bark' vs 'dogs sometimes bite'\n\n")
;; ═══════════════════════════════════════════════════════════════════
;; LEVEL 6: SOCIAL/RELATIONAL STRUCTURE
;; ═══════════════════════════════════════════════════════════════════
(display "╔═══════════════════════════════════════════════════════════════════╗\n")
(display "║ LEVEL 6: SOCIAL/RELATIONAL STRUCTURE ║\n")
(display "╚═══════════════════════════════════════════════════════════════════╝\n\n")
(display "6.1 KINSHIP PATTERNS\n")
(display " Count: 'X's mother/father/child'\n")
(display " Reveals: family relationships\n")
(display " Example: 'mother of' patterns → parent-child structure\n\n")
(display "6.2 ROLE PATTERNS\n")
(display " Count: 'X is a Y' where Y is role\n")
(display " Reveals: social roles\n")
(display " Example: 'doctor treats', 'teacher teaches'\n")
(display " → role-behavior associations\n\n")
(display "6.3 POWER PATTERNS\n")
(display " Count: 'X commands Y', 'X obeys Y'\n")
(display " Reveals: authority relationships\n")
(display " Example: 'boss commands employee' not reverse\n\n")
(display "6.4 RECIPROCITY PATTERNS\n")
(display " Count: bidirectional relationships\n")
(display " Reveals: symmetric relations\n")
(display " Example: 'friend of' is symmetric\n")
(display " 'parent of' is not symmetric\n\n")
;; ═══════════════════════════════════════════════════════════════════
;; LEVEL 7: PART-WHOLE STRUCTURE
;; ═══════════════════════════════════════════════════════════════════
(display "╔═══════════════════════════════════════════════════════════════════╗\n")
(display "║ LEVEL 7: MEREOLOGICAL STRUCTURE (parts and wholes) ║\n")
(display "╚═══════════════════════════════════════════════════════════════════╝\n\n")
(display "7.1 PART-OF PATTERNS\n")
(display " Count: 'X has Y', 'Y of X', 'X's Y'\n")
(display " Reveals: part-whole relationships\n")
(display " Example: 'car has' + {wheel, engine, door}\n")
(display " → parts of cars\n\n")
(display "7.2 MEMBER-OF PATTERNS\n")
(display " Count: 'X is a member of Y', 'X in Y'\n")
(display " Reveals: set membership\n")
(display " Example: 'California is in USA' → part of country\n\n")
(display "7.3 SUBSTANCE PATTERNS\n")
(display " Count: 'X is made of Y'\n")
(display " Reveals: material composition\n")
(display " Example: 'table made of' + {wood, metal, glass}\n\n")
(display "7.4 COLLECTION PATTERNS\n")
(display " Count: 'group of X', 'collection of X'\n")
(display " Reveals: what forms groups\n")
(display " Example: 'flock of birds', 'herd of cattle'\n")
(display " → collective nouns for animals\n\n")
;; ═══════════════════════════════════════════════════════════════════
;; LEVEL 8: AFFECTIVE STRUCTURE
;; ═══════════════════════════════════════════════════════════════════
(display "╔═══════════════════════════════════════════════════════════════════╗\n")
(display "║ LEVEL 8: AFFECTIVE STRUCTURE (emotions, attitudes) ║\n")
(display "╚═══════════════════════════════════════════════════════════════════╝\n\n")
(display "8.1 SENTIMENT PATTERNS\n")
(display " Count: positive/negative adjectives with nouns\n")
(display " Reveals: typical attitudes toward things\n")
(display " Example: 'wonderful vacation' vs 'terrible disease'\n\n")
(display "8.2 EMOTION-CAUSE PATTERNS\n")
(display " Count: 'X makes Y feel Z'\n")
(display " Reveals: what causes emotions\n")
(display " Example: 'loss causes' + {sadness, grief}\n")
(display " 'success causes' + {joy, pride}\n\n")
(display "8.3 DESIRE PATTERNS\n")
(display " Count: 'X wants Y', 'X seeks Y'\n")
(display " Reveals: goals and motivations\n")
(display " Example: 'humans want' + {food, love, security}\n\n")
(display "8.4 EVALUATION PATTERNS\n")
(display " Count: 'X is good/bad for Y'\n")
(display " Reveals: value judgments\n")
(display " Example: 'exercise good for health'\n")
(display " 'smoking bad for health'\n\n")
;; ═══════════════════════════════════════════════════════════════════
;; LEVEL 9: MULTI-MODAL STRUCTURE (beyond text)
;; ═══════════════════════════════════════════════════════════════════
(display "╔═══════════════════════════════════════════════════════════════════╗\n")
(display "║ LEVEL 9: MULTI-MODAL STRUCTURE ║\n")
(display "╚═══════════════════════════════════════════════════════════════════╝\n\n")
(display "9.1 VISUAL FEATURE CO-OCCURRENCE\n")
(display " Count: which visual features appear together\n")
(display " Reveals: object structure\n")
(display " Example: {beak, feathers, wings} → BIRD visual signature\n\n")
(display "9.2 VISUAL-LINGUISTIC ALIGNMENT\n")
(display " Count: image features with caption words\n")
(display " Reveals: grounding of words to percepts\n")
(display " Example: 'red' + high-red-pixels = high PMI\n\n")
(display "9.3 AUDIO PATTERNS\n")
(display " Count: sound features with labels\n")
(display " Reveals: sound categories\n")
(display " Example: {bark-sound} + 'dog' = high PMI\n\n")
(display "9.4 ACTION-EFFECT PATTERNS\n")
(display " Count: motor actions with sensory results\n")
(display " Reveals: affordances from interaction\n")
(display " Example: push(cup) → cup-moves (from robot experience)\n\n")
;; ═══════════════════════════════════════════════════════════════════
;; LEVEL 10: META-STRUCTURE
;; ═══════════════════════════════════════════════════════════════════
(display "╔═══════════════════════════════════════════════════════════════════╗\n")
(display "║ LEVEL 10: META-STRUCTURE (patterns of patterns) ║\n")
(display "╚═══════════════════════════════════════════════════════════════════╝\n\n")
(display "10.1 TYPICALITY\n")
(display " Count: how often properties hold\n")
(display " Reveals: prototypes vs exceptions\n")
(display " Example: 'birds fly' 95% → flying is typical\n")
(display " 'birds are penguin' 2% → penguin is atypical\n\n")
(display "10.2 RELIABILITY\n")
(display " Count: how often X→Y holds across contexts\n")
(display " Reveals: robust vs fragile associations\n")
(display " Example: 'fire→hot' in 99.9% contexts → robust\n")
(display " 'bank→money' in 75% contexts → context-dependent\n\n")
(display "10.3 POLYSEMY DETECTION\n")
(display " Count: distinct clusters for same word\n")
(display " Reveals: multiple senses\n")
(display " Example: 'bank' in 2 distinct clusters → 2 senses\n\n")
(display "10.4 ANALOGY STRUCTURE\n")
(display " Count: parallel relational patterns\n")
(display " Reveals: analogies\n")
(display " Example: king:queen :: man:woman\n")
(display " (same offset in embedding space)\n\n")
(display "10.5 HIERARCHY DEPTH\n")
(display " Count: levels of is-a relationships\n")
(display " Reveals: taxonomic structure\n")
(display " Example: poodle→dog→mammal→animal→living-thing\n\n")
;; ═══════════════════════════════════════════════════════════════════
(display "═══════════════════════════════════════════════════════════════════\n")
(display "SUMMARY: THE TOWER OF COUNTABLE STRUCTURE\n")
(display "═══════════════════════════════════════════════════════════════════\n\n")
(display " Level 10: META ────────── patterns of patterns\n")
(display " ↑ (typicality, reliability, analogy)\n")
(display " Level 9: MULTI-MODAL ─── cross-modal alignment\n")
(display " ↑ (vision↔language↔audio)\n")
(display " Level 8: AFFECTIVE ───── emotions, attitudes\n")
(display " ↑ (sentiment, desire, evaluation)\n")
(display " Level 7: MEREOLOGICAL ── parts and wholes\n")
(display " ↑ (has-part, made-of, member-of)\n")
(display " Level 6: SOCIAL ──────── relationships, roles\n")
(display " ↑ (kinship, power, reciprocity)\n")
(display " Level 5: QUANTIFICATION all/some/none\n")
(display " ↑ (universals, existentials)\n")
(display " Level 4: MODAL ───────── possibility/necessity\n")
(display " ↑ (can, must, might)\n")
(display " Level 3: CAUSAL ──────── causes and effects\n")
(display " ↑ (because, enables, prevents)\n")
(display " Level 2: TEMPORAL ────── sequences, durations\n")
(display " ↑ (before, after, during)\n")
(display " Level 1: LINGUISTIC ──── words, syntax, frames, space\n")
(display " ↑ (co-occurrence, bonds, prepositions)\n")
(display " Level 0: RAW DATA ────── text, pixels, audio samples\n\n")
(display "Each level is built by COUNTING patterns at the level below.\n")
(display "Each level provides CONSTRAINTS for disambiguation at levels below.\n")
(display "The whole thing is SELF-CONSISTENT through bidirectional inference.\n\n")
(display "NOTE: These 10 levels are ORTHOGONAL dimensions, not a vertical stack.\n")
(display "They are NOT numbered layers in the same sense as 'Layer 0-7'.\n")
(display "They exist perpendicular to each other, and each has internal\n")
(display "sub-structure (fractal depth) discoverable by the same method.\n")
(display "The fixed numbers here (1-10) are for reference, not architecture.\n\n")
;; ═══════════════════════════════════════════════════════════════════
(display "═══════════════════════════════════════════════════════════════════\n")
(display "THE DEEP QUESTION\n")
(display "═══════════════════════════════════════════════════════════════════\n\n")
(display "Is there a level N where MEANING emerges?\n\n")
(display "Or is meaning just the WHOLE STRUCTURE - all levels together,\n")
(display "mutually constraining each other?\n\n")
(display " ┌─────────────────────────────────────────────────────────────┐\n")
(display " │ │\n")
(display " │ Perhaps 'meaning' is not a thing at a level. │\n")
(display " │ │\n")
(display " │ Perhaps 'meaning' is the COHERENCE across all levels - │\n")
(display " │ the fact that the structure is self-consistent, │\n")
(display " │ that predictions at one level match observations │\n")
(display " │ at another. │\n")
(display " │ │\n")
(display " │ Meaning = mutual information across the whole system? │\n")
(display " │ │\n")
(display " └─────────────────────────────────────────────────────────────┘\n\n")