jungscript: Jung's Typology as a Closed System
A tiny closed language for Jung's typology: six primitives, four axioms, one meaning per symbol, every term defined before use. The backbone layer of the Jung Compression Project (JCP).
Layer 0 of the Jung Compression Project (JCP): the formal backbone, for tech+psy readers. The human-facing layer lives in the companion post Jung for Humans: The Translation Layer. The public ancestor of both is Deciphering Jung's Typology.
The public post proved the instinct: Jung's Psychological Types compresses into rules. But its notation drifted. = carried six different meanings, -> carried five, and Python fought JavaScript across the code blocks. jungscript v0.1 is the do-over as a language instead of a habit: a closed system with six primitives, four axioms, thirteen operator forms with exactly one meaning each, and a rule that no term may appear before it is defined. The closure report at the end audits the whole thing, including its own leaks.
1. Closure rules
What "closed system" means here, as enforceable rules:
- C1, ground: exactly six primitive terms. Primitives get glosses, not definitions: they are the undefined ground, like point and line in Euclid.
- C2, define before use: every non-primitive term is defined before its first use, using only primitives and previously defined terms. Definitions form a DAG; this document reads in topological order.
- C3, one symbol, one meaning: only whitelisted operators appear, and every symbol has exactly one meaning (and every meaning one symbol).
- C4, marks are part of the name:
termᴶandtermᴮkeep their marks at every occurrence. A barefeelingdoes not exist in this system; onlyfeelingᴶdoes. - C5, explicit boundary: terms the system touches but does not define are declared
@extern, once, in the closure report. Closed means no silent leaks, not no doors. - C6, provenance: every definition carries a source or a status flag. Jung's voice and ours never blend silently.
2. Notation
2.1 Term marks
| Form | Meaning | ASCII form |
|---|---|---|
snake_case | Jung's term; the everyday meaning survives contact | same |
termᴶ | Jung's term, false friend: the everyday meaning actively misleads. Discard it; only the jungscript definition applies | term^J |
termᴮ | Coined in jungscript for coherence; not Jung's vocabulary | term^B |
The J-rule: when you meet termᴶ, the word you know is not the word you are reading.
The test for the ᴶ mark: would a smart reader with no Jung, applying the everyday meaning, get the sentence importantly wrong? If yes, mark it. Merely narrower-than-everyday does not earn the mark. Two verdicts that show the test discriminates: intuition passes unmarked (the everyday hunch is close enough), and projection passes unmarked (pop psychology inherited roughly the right meaning). feelingᴶ fails the test hardest: in Jung it is not emotion at all, but a rational judgment of worth.
Marks apply to terms of the theory, never to notation. Operators and builtins are ours by construction and carry no marks.
2.2 Quotes and annotations
'single quotes': a compressed, near-verbatim Jung definition.@source(CW6: Entry): cites the Definitions chapter of Psychological Types (CW6) by entry name, not paragraph number, so it is checkable in any edition. CW8 is cited by essay. v0.1 cites coarsely; v1 tightens.@status(jung | inferred | contested): jung = his claim, inferred = our reading beyond his text, contested = tradition disagrees (usually MBTI vs Jung).@aka(name): alias.@example('...'): grounding case.@extern: declared but undefined here (C5).
3. Operators
The complete whitelist. Thirteen forms, one meaning each.
| Form | Reads as | Meaning |
|---|---|---|
x := 'gloss' | is defined as | definition |
x = a | is, equals | structural equation |
a + b | together with | composition: parts forming a whole |
a | b | or (exactly one) | exclusive alternatives |
a × b | paired with | pairing of orthogonal choices |
f(x) | operation or accessor | |
libidoᴶ ~> x | streams toward | energy flow (the only energy arrow) |
a -> b | becomes, lands on | content process: move or transform |
a -> s↑ , a -> s↓ | raises, lowers | modulation of a scalar |
a ≈ b | is merged with | undifferentiated sameness; partial(a ≈ b) for partial merger |
[a, b, c] | ordered list | |
when c: e | when, then | dynamic rule |
a != b | is not | exclusion constraint |
Builtins (notation, not theory): center(), opposite(), flip(), counterpole(), axis(), max_by(), habit(), query(), adjust(), link(), intake(), trigger(), matches(), hold().
4. Statement kinds
Everything below is one of eleven statement kinds. Nothing else occurs.
| Kind | Shape | Example |
|---|---|---|
| definition | x := 'gloss' | feelingᴶ := 'judgment by worth' |
| taxonomy | x = a | b | attitudeᴶ = introversion | extraversion |
| equation | x = a + b | psyche = conscious + unconscious |
| pairing | a × b | Fi = introversion × feelingᴶ |
| flow | libidoᴶ ~> x | introversion: libidoᴶ ~> subject |
| process | a -> b | abstraction: imageᴶ -> concept |
| modulation | a -> s↑ | affectᴶ -> differentiation↓ |
| merger | a ≈ b | identityᴶ: subject ≈ object |
| rule | when c: e | when tension_dropped: enantiodromia |
| query | query(f) = '...' | query(Ti) = 'what is true in my own logic?' |
| annotation | @key(...) | @status(contested) |
5. Ground: the six primitives
subject := 'the experiencing standpoint' @status(jung)
object := 'what is met as other than the subject' @status(jung)
content := 'any element of the psyche' @status(jung)
libidoᴶ := 'psychic energy as such' @source(CW6: Libido)
consciousness := 'the lit field: what is present to awareness' @status(inferred)
differentiation := 'how separated, refined and steerable
a content or function is' @source(CW6: Differentiation)
One honest liberty, flagged per C6: Jung defines consciousness through the ego and the ego through consciousness. His pair is circular. A closed system must choose a ground, so jungscript takes consciousness as primitive and derives ego from it below. libidoᴶ wears the mark because the everyday (and Freudian) reading, sexual drive, misleads: in Jung it is the general currency of the psyche. consciousness and differentiation are graded scalars; v0.1 simplifies consciousness to a two-region field.
6. Axioms
Four root principles. Everything after this section is these four, applied.
- A1, polarity: the load-bearing constructs come in opposing pairs, and tension between poles is what carries energy. Conscious and unconscious, introversion and extraversion, each function and its counterpole.
@status(jung) - A2, conservation:
libidoᴶwithdrawn from a position does not vanish; it accumulates at the counter-position, out of sight.when libidoᴶ leaves position p: libidoᴶ ~> opposite(p).@source(CW8: On Psychic Energy) - A3, differentiation: development raises differentiation; strong emotion collapses it; the archaic is the undifferentiated.
@status(jung) - A4, mediation: the subject never touches the object directly. All traffic passes through an
imageᴶ. Most of Jung's difficult vocabulary is traffic control for images.@status(jung)
7. The system
7.1 Structure and will
unconscious := 'contents standing in no perceived relation to the field' @status(jung)
conscious(x), unconscious(x) # region predicates over contents
psyche = conscious + unconscious @status(jung)
ego := 'the reference point all conscious contents relate to'
ego = center(consciousness) @status(jung) # circle broken at ground, see §5
willᴶ := 'the sum of libidoᴶ at the disposal of consciousness' @source(CW6: Will)
volition := 'the energic process released by conscious motivation' @status(jung)
when motivation is conscious: process = willᴶ
when motivation is unconscious: process != willᴶ # drive moves you; willᴶ is spent by you
willᴶ is marked: everyday "will" means wanting or willpower; here it is a budget, the energy consciousness can actually spend on command.
7.2 Attitude
attitudeᴶ := 'a standing readiness of the psyche to act in one direction' @source(CW6: Attitude)
attitudeᴶ = introversion | extraversion
introversion: libidoᴶ ~> subject # interest streams to the inner pole
extraversion: libidoᴶ ~> object # interest streams to the outer pole
Marked because everyday "attitude" means mood or opinion. Here it is a direction of energy, and the first application of A1: one pair, two poles.
7.3 The four functions
function := 'a form of psychic activity that stays the same
across changing contents' @source(CW6: Function)
function = thinkingᴶ | feelingᴶ | sensationᴶ | intuition
rationalᴶ := 'operating by judgment' # not: sensible
irrationalᴶ := 'operating prior to judgment' # not: crazy; pure perception
axis(thinkingᴶ) = axis(feelingᴶ) = rationalᴶ
axis(sensationᴶ) = axis(intuition) = irrationalᴶ
processing = judgment(perception(x)) # intake first, verdict second
thinkingᴶ := 'judgment by concept: what is true' # not: any mental activity
feelingᴶ := 'judgment by worth: what is this worth' # NOT emotion: a rational function
sensationᴶ := 'perception through the senses of what is' # not: a vague feel
intuition := 'perception via the unconscious of what could be' # unmarked: survives
query(thinkingᴶ) = 'what follows from this?'
query(feelingᴶ) = 'what is this worth?'
query(sensationᴶ) = 'what is concretely here?'
query(intuition) = 'what could emerge?'
feelingᴶ is the flagship false friend of the whole system: a calm, rational verdict of worth. The emotion word arrives later, as affectᴶ (§7.7). English merges what Jung splits; the marks keep them split.
7.4 Attitude-functions and the stack
attitude_functionᴮ = attitudeᴶ × function # the eight instruments
Ti = introversion × thinkingᴶ Te = extraversion × thinkingᴶ
Fi = introversion × feelingᴶ Fe = extraversion × feelingᴶ
Si = introversion × sensationᴶ Se = extraversion × sensationᴶ
Ni = introversion × intuition Ne = extraversion × intuition
query(Ti) = 'what is true in my own logic?'
query(Te) = 'what works, in the outer system?'
query(Fi) = 'what feels right by my inner values?'
query(Fe) = 'what keeps the shared field in harmony?'
query(Si) = 'what impression does this leave in me?'
query(Se) = 'what concrete fact is here and now?'
query(Ni) = 'what inner vision is forming?'
query(Ne) = 'what outer possibilities are opening?'
opposite(a × f) = flip(a) × counterpole(f) # BOTH flip
@example(opposite(Fi) = Te)
differentiation(f) # each function has its own level (A3)
principal_function := 'the most differentiated function: it leads' @aka(dominant)
principal_function = max_by(differentiation, function)
inferior_function := 'the least differentiated: the unconscious counterweight'
inferior_function = opposite(principal_function)
auxiliary_function := 'the differentiated second, serving the principal'
axis(auxiliary_function) != axis(principal_function) @source(CW6, quoted below)
attitude(auxiliary_function) = free_variable @status(contested)
stackᴮ = [principal_function, auxiliary_function, inferior_function] # by differentiation
type = habit(principal_function) @source(CW6: Type)
"Experience shows that the secondary function is always one whose nature is different from, though not antagonistic to, the primary function... The auxiliary function is therefore one of the irrational functions when the primary function is rational, and one of the rational when the primary is irrational."
On the contested line: MBTI asserts the auxiliary attitude always flips. Jung fixes only the axis and stays silent on the attitude, so jungscript leaves it a free variable and lets behavior and questionnaires decide, per the argument in the public post. Also note: the public post contained the line function_stack = principal_attitude, which was a bug; stackᴮ above is the fix.
7.5 Image, idea, and reading levels
imageᴶ := 'the psyche's native representation: fantasy-image,
not retinal picture' @source(CW6: Image)
objective_level := 'reading an imageᴶ as information about the object' @status(jung)
subjective_level := 'reading an imageᴶ as information about the subject' @status(jung)
imago := 'the inner figure of a person, not identical with the person:
an imageᴶ held on the subjective_level' @status(jung)
concretism := 'image and object taken as one thing' @source(CW6: Concretism)
concretism: imageᴶ ≈ object
concretism -> differentiation↓
abstraction := 'pulling the general out of the concrete,
withdrawing from the object' @source(CW6: Abstraction)
abstraction: imageᴶ -> concept # the tie to the object is cut
abstraction -> differentiation↑
ideaᴶ := 'the meaning distilled from a primordial_image' @source(CW6: Idea)
ideaᴶ = abstraction(primordial_image) # primordial_image: @extern, see §8
Se -> bias(concretism) @status(inferred)
Ni | Ti -> bias(abstraction) @status(inferred)
7.6 Boundary traffic: the moveᴮ schema
A4 makes all subject-object traffic image traffic. Here is the payoff of the whole formalization: eight of Jung's dictionary entries turn out to be one operation with four dials.
moveᴮ(payload, path, awareness, adjusts)
# payload : which content travels
# path : subject -> object | object -> subject | none (the boundary itself fails)
# awareness : conscious | unconscious | either
# adjusts : what actually changes
projection := 'unconscious content of the subject met as a quality
of the object' @source(CW6: Projection)
projection = moveᴮ(unconscious(content), subject -> object, unconscious,
adjusts: how_the_object_is_seen)
@example('unaware of your own dishonesty, you distrust everyone')
introjection := 'a quality of the object taken into the subject' @status(jung)
introjection = moveᴮ(quality(object), object -> subject, either,
adjusts: contents_of_subject)
@example('the critical parent's voice becomes your inner standard')
empathyᴶ := 'feeling into: the object taken in while the ego
keeps standing' @source(CW6: Empathy)
empathyᴶ = introjection + ego_preserved # a mechanism, not a virtue
@example('you feel your way into the client and remain yourself')
identification := 'unconscious molding of the subject toward
the object' @source(CW6: Identification)
identification = moveᴮ(form(object), object -> subject, unconscious,
adjusts: the_subject_itself)
identification -> differentiation↓
@example('under a charismatic leader you start speaking in their voice')
identityᴶ := 'no boundary yet: subject and object one, prior to
any distinction' @source(CW6: Identity)
identityᴶ: subject ≈ object # a state, not your sense of self
@example('the toddler's mood is the mother's mood')
participation_mystique := 'partial identityᴶ with a person or thing'
participation_mystique: partial(subject ≈ object) @status(jung) # after Levy-Bruhl
@example('the stadium roars: the striker's goal is your own act')
assimilation := 'the new bent to fit the subject' @source(CW6: Assimilation)
assimilation(new) = adjust(new -> subject)
@example('you restate a harsh remark in your own terms')
dissimilation := 'the subject bent toward the object' @status(jung)
dissimilation = adjust(subject -> object)
@example('your default tone drifts toward the remark's style')
The same eight as a matrix:
| Pattern | Path | Adjusts | Awareness | Ego afterwards |
|---|---|---|---|---|
projection | out | how the object is seen | unconscious | stands, sees wrong |
introjection | in | contents of subject | either | stands |
empathyᴶ | in | contents of subject | conscious | stands, by definition |
identification | in | the subject itself | unconscious | weakened |
identityᴶ | none: never two | nothing yet | unconscious | absent |
participation_mystique | partial merge | the boundary, locally | unconscious | partial |
assimilation | inward fit | the incoming content | either | stands |
dissimilation | outward fit | the subject | either | drifting |
Eight entries, one operation, four dials. Memorize the schema and you can re-derive the dictionary. @status(inferred) on the unification itself: Jung never wrote moveᴮ; he wrote eight entries that happen to be its rows.
7.7 Activation: complexes and tinted intake
affectᴶ := 'emotion proper: a feeling-state plus body innervation' @source(CW6: Affect)
affectᴶ -> differentiation↓ # A3 in action: flooded means primitive
# feelingᴶ judges worth; affectᴶ is the seizure. English merges them; Jung does not.
complexᴶ := 'a feeling-toned cluster of contents with its own charge
and a will of its own' @status(jung) # not: a hang-up
constellation := 'a complexᴶ switching on and organizing perception
and behavior' @status(jung)
when trigger(object) matches complexᴶ: constellation(complexᴶ)
perception := 'raw intake' @status(jung)
perception = intake(sensationᴶ | intuition)
apperception := 'intake linked to what is already active' @source(CW6: Apperception)
apperception = link(perception, constellated(content))
active_apperception := 'subject-led linking: an inner aim selects the match'
passive_apperception := 'object-led linking: the loudest stimulus or
charged complexᴶ selects' @status(jung)
constellation -> bias(apperception)
introversion -> bias(active_apperception) @status(inferred)
extraversion -> bias(passive_apperception) @status(inferred)
active_apperception -> assimilation↑ @status(inferred)
passive_apperception -> dissimilation↑ @status(inferred)
@example('harsh feedback constellates a shame complexᴶ; the next day a
neutral email is apperceived as criticism; assimilation then
rewrites the whole day in its terms')
7.8 The energy story
compensationᴶ := 'self-regulation: the unconscious answers the conscious
attitude with its counterweight' @source(CW6: Compensation)
one_sidedness := 'libidoᴶ overinvested in the principal position' @status(jung)
enantiodromia := 'the flip of a one-sided position into its opposite'
@source(CW6: Enantiodromia) # after Heraclitus
transcendent_function := 'the union of conscious and unconscious positions
in a living third' @source(CW8: The Transcendent Function)
when one_sidedness:
libidoᴶ ~> unconscious(opposite(principal_function)) # A2: the counterweight charges
tension↑
when hold(tension): transcendent_function(conscious_position, unconscious_position) -> third
when drop(tension): enantiodromia # eruption: the inferior takes the wheel
Illustrative instances, @status(inferred, illustrative):
# flips (enantiodromia) # syntheses (transcendent_function)
Ti: rigid inner logic -> sentimental flood Ti + Fe -> considerate rigor
Fe: harmony keeping -> tactless verdicts Fi + Te -> principled effectiveness
Si: routine keeping -> reckless novelty Si + Ne -> adaptive tradition
Ne: possibility chase -> detail tyranny Ni + Se -> grounded vision
7.9 Methods of interpretation
reductive := 'reading content backward to its origins' @source(CW6: Reductive)
reductive: interpret(content) -> origin(past)
constructive := 'reading content forward to its aim' @source(CW6: Constructive)
constructive: interpret(content) -> aim(future)
synthetic := 'both at once: origin and aim in one reading' @status(jung)
synthetic = reductive + constructive
when only reductive: verdict = 'I am this because of my past' # fixation
when only constructive: verdict = 'I must simply grow past this' # rootless
when synthetic: verdict = 'the past built the pattern;
the pattern shows the work'
7.10 Individuation
individuality := 'the peculiar singularity of a person in every respect:
given a priori, largely unconscious' @source(CW6: Individuality)
individual = conscious(individuality) # the lived share of it
individuation := 'the process of becoming the distinct whole one
already potentially is' @source(CW6: Individuation)
individuation = repeat( differentiate(stackᴮ) ; compensationᴶ ;
hold(tension) ; transcendent_function )
# the loop that neither freezes nor flips
8. Closure report
The audit the system owes you (C5, C6):
- Counts: 6 primitives, 4 axioms, 13 operator forms, 11 statement kinds, 60 defined terms (68 counting the eight instruments separately). 15 terms carry the ᴶ mark:
attitudeᴶ libidoᴶ willᴶ imageᴶ ideaᴶ identityᴶ feelingᴶ thinkingᴶ sensationᴶ affectᴶ complexᴶ empathyᴶ compensationᴶ rationalᴶ irrationalᴶ. 3 terms carry the ᴮ mark:attitude_functionᴮ stackᴮ moveᴮ. - @extern (declared doors, not defined here):
archetype, primordial_image, symbol, fantasy, self, persona, shadow, dream, instinct. First candidates for v0.2 aresymbolandfantasy: the transcendent_function quietly leans on symbol formation. - @status(contested): one statement: the attitude of the auxiliary function (Jung silent, MBTI assertive).
- @status(inferred) registry: consciousness taken as ground (breaking Jung's ego-circle); the
moveᴮunification; the concretism/abstraction bias lines; the four apperception links; the illustrative flip and synthesis tables. - Known gaps: constellation mechanics beyond the trigger rule;
archaismandaffectivity(defined by Jung, not yet placed); consciousness treated as two regions instead of a gradient. - Longest definition chain to ground:
transcendent_functionresolves through tension,compensationᴶ,opposite(),attitude_functionᴮ,attitudeᴶtolibidoᴶ: depth 6. Every other term bottoms out sooner.
9. Roadmap
v0.1 is hand-checked; the rules above are also a build spec. v1 inverts the source of truth: one structured record per term (kind, gloss, formal statement, edges, example, source, status), from which everything renders: these script blocks, glossary cards, the relation graph (replacing the hand-drawn map), the matrices, and an Anki deck, because the original complaint behind this whole project was that the concepts do not stick. A linter then enforces C1-C6 mechanically instead of by hand.
If the notation above feels heavy, that is by design: this layer is the backbone, not the interface. The interface is Jung for Humans: The Translation Layer.
Part of the Jung Compression Project (JCP). Drafted with AI, hand-checked. Citations reference the Definitions chapter of Psychological Types (CW6) by entry name, and CW8 by essay.