diff --git a/elements/neuron/appunti/2026-06-29-tripartite-synapse_v17.md b/elements/neuron/appunti/2026-06-29-tripartite-synapse_v17.md index dcf2e0b..0ccdabe 100644 --- a/elements/neuron/appunti/2026-06-29-tripartite-synapse_v17.md +++ b/elements/neuron/appunti/2026-06-29-tripartite-synapse_v17.md @@ -1,7 +1,3 @@ ---- -include_toc: true ---- - # Tripartite Synapse — Pseudocode v17 > Companion: `tripartite_synapse_v17_biology.md` · principle: `logic_principles_v5`. @@ -134,7 +130,7 @@ its structure rebuilt) OR energy is spent (overloaded — unspent tags carry to ## Conventions ``` -SCOPE = {DAY, NIGHT} CONTEXT = {AP, NOT_AP, NOT_SPIKE_TRAIN, bAP, NOT_bAP, CONTINUOUS} +SCOPE = {DAY, NIGHT} DAY CONTEXT = {AP, REFRACTORY⊂NOT_AP, NOT_AP, NOT_SPIKE_TRAIN, CONTINUOUS} NIGHT CONTEXT = {NON_REM_1, NON_REM_2, REM} THE THREE CATEGORIES (see logic_principles "The Ring"): (ACTION ⇄ RECOVERY) × many, then PREPARATION ACTION the component's defining deed; deposits the fast trace. ALWAYS LOCAL to the acting @@ -157,7 +153,23 @@ CONTEXT LICENSES PHASE (context = the imposed condition; phase = the work it per NOT_SPIKE_TRAIN no spike AND no train ⊂ NOT_AP → adds PREPARATION (runs on top of NOT_AP) A process runs in the SHORTEST quiet its timescale fits: fast-trace decay and partial pool refill in NOT_AP (they ride the train and set short-term depression); tag formation, full refill, and - occupancy read-out in NOT_SPIKE_TRAIN. (Components without trains use bAP / NOT_bAP, or continuous.) + occupancy read-out in NOT_SPIKE_TRAIN. (Components without trains use continuous flow.) + + WHO EMITS THE CONTEXT (a context is a signal from ABOVE, not self-generated): + AP, REFRACTORY emitted by SOMA — its own firing state (AP = it fired; REFRACTORY = the recovery + window after, when it cannot fire again yet). What was "NOT_AP" is REFRACTORY. + NOT_SPIKE_TRAIN emitted by the NEURON — sustained absence of soma spikes can only be tracked from + ABOVE the soma (a component cannot easily know "I have not fired for a while"); + the neuron keeps count of the gap and broadcasts it down. + NON_REM_1/2, REM emitted top-down within the NIGHT context (see DAY/NIGHT switch) — the night's + sub-phases: NON_REM_1 → ACTION (build⇄release), NON_REM_2 → RECOVERY + (import+free), REM → PREPARATION (replay+measure+prime). + + POST INVERTS THE DAY MAP. For the postsynapse the deed is RECEIVING, which happens whenever no + descending spike is arriving, so: NOT_AP → ACTION (open AMPA/NMDA, respond), AP → RECOVERY (the + brief descending spike, driven from above, restore + boost traces), NOT_SPIKE_TRAIN → PREPARATION. + POST's ACTION continues through the soma's REFRACTORY (refractory is the soma's state, not POST's; + from POST it is NOT_AP), which is how the spine charges up to ready the next spike. VARIABLE TIERS (timescale = meaning; see logic_principles "The Timescale Ladder") FAST (ms–s) immediate response fast_trace @@ -459,63 +471,67 @@ The postsynaptic spine is the synapse's primary memory locus: it detects coincid runs the calcium dynamics that decide potentiation versus depression, and requires the most validation (three coincidences) before committing. -**POST's ACTION is the synaptic event (context NOT_bAP).** Integration is graded and ongoing -rather than spike-punctate, so POST's action-context is "glutamate present, no bAP": three calcium -sources feed the fast trace — AMPA current (small Ca, begins ejecting the NMDA Mg block) and NMDA -(large Ca, only on the local coincidence of depolarization + astrocyte D-serine + glutamate). The -action deposits the calcium trace and emits the two retrograde messages. Because POST's receptors -are physical coincidence detectors, two of its three tag-coincidences (astro D-serine, and the bAP -below) are detected *in the action*; only the organism's dopamine coincidence is left to evaluation. +**POST's ACTION is the synaptic response (context NOT_AP).** Integration is graded and ongoing +rather than spike-punctate, so POST's action-context is "no descending AP arriving": it opens its +channels and responds to whatever glutamate has arrived. Three calcium sources feed the fast trace — +AMPA current (small Ca, begins ejecting the NMDA Mg block) and NMDA (large Ca, scaled by the local +coincidence of depolarization + astrocyte D-serine + glutamate). The action deposits the calcium +trace and emits the two retrograde messages. Crucially POST's ACTION **continues through the soma's +refractory period**: the refractory belongs to the soma, not to POST — from POST it is simply NOT_AP, +so the spine keeps responding and integrating, charging up so the neuron is ready to fire again once +its refractory ends. -**bAP is a second, vertical action-context.** The soma's back-propagating spike arrives, adds -depolarization and calcium, and supralinearly amplifies an existing candidate — the soma's -confirmation that it fired, detected in the action-moment (instantaneous coincidence). +**POST's RECOVERY is the descending AP (context AP) — a brief event.** When the soma's spike arrives +it adds depolarization and calcium, supralinearly boosts an existing candidate (the soma's +confirmation that it fired), and resets the spine: calcium extrudes, the NMDA Mg-block re-establishes +as Vm falls, and the trace relaxes — restoring the ability to respond again. This is the *alter-ego* +of the response, and it is short (the spike event), not the whole refractory window. -**EVALUATION FOLDS INTO PREPARATION.** POST runs the same three categories as every component. -ACTION is the synaptic response (integrate glutamate, detect the instantaneous coincidences, emit -the retrogrades). RECOVERY restores the ability to respond again — calcium extrusion and NMDA -Mg-block re-establishment, the fast alter-ego of the response. PREPARATION shapes what comes next: -fills AMPA surface toward the slot ceiling from accumulated calcium (short-term potentiation, no +**EVALUATION FOLDS INTO PREPARATION (context NOT_SPIKE_TRAIN).** PREPARATION shapes what comes next: +it fills AMPA surface toward the slot ceiling from accumulated calcium (short-term potentiation, no dopamine — for the next response), climbs the tag on the dopamine coincidence (for the night), refills budget, and settles. A fuel shortfall while calcium was climbing toward a tag is endurance evidence (a preparation deposit made during action); a surface already at its ceiling is a structural limit, not endurance. -**During NIGHT — the same three categories, turned inward.** RECOVERY imports material/energy and -primes AMPA responsiveness from the standing tag. PREPARATION replays: POST responds to the -re-evoked glutamate exactly as it responds by day (same AMPA/NMDA machinery, same endurance -deposit into the same trace), reading the response as participation rather than transmitting — no -dopamine. ACTION is the structural change: general homeostatic lowering, then rebuild where the tag -stands and participation was confirmed, consuming the tag. Both ceilings draw the same finite pool -and compete; unmaintained ceilings drift down. +**During NIGHT — the same three categories, turned inward, in sleep-stage contexts.** NON_REM_2 +(RECOVERY) imports material/energy and primes AMPA responsiveness from the standing tag. REM +(PREPARATION) replays: POST responds to the re-evoked glutamate exactly as it responds by day (same +AMPA/NMDA machinery, same endurance deposit into the same trace), reading the response as +participation rather than transmitting — no dopamine. NON_REM_1 (ACTION) is the structural change: +rebuild where the tag stands and participation was confirmed (consuming the tag) ⇄ release where +participation was low. Both ceilings draw the same finite pool and compete; unmaintained ceilings +drift down. ``` -// PARAMETERS K_AMPA · AMPA_Ca · AMPA_cost · NMDA_cost · bAP_cost · pka_cost · traffic_cost +// PARAMETERS K_AMPA · AMPA_Ca · AMPA_cost · NMDA_cost · AP_cost · pka_cost · traffic_cost // req_cost · Mg_eject · K_Ds · Ca_STP · Ca_TAG · eCB_thr · drift · baseline // NO_synth_cost · eCB_synth_cost // INTERFACE // EMIT retro_NO (+), retro_eCB (−) → PRE -// RECEIVE (signals) glutamate ← PRE ; astro_Dserine ← ASTRO ; bAP ← DEND/SOMA ; dopamine -// READ glutamate ; astro_Dserine (GAIN, not gate) ; bAP (dend_structure.bAP_fidelity) ; dopamine +// RECEIVE (signals) glutamate ← PRE ; astro_Dserine ← ASTRO ; AP (descending) ← DEND/SOMA ; dopamine +// READ glutamate ; astro_Dserine (GAIN, not gate) ; AP via dend_structure.bAP_fidelity ; dopamine // OWN post_structure{slot_ceiling, spine_volume, reserve_ceiling} ; post_budget_ceiling // SUPPLY astro_lactate[syn] ← ASTRO ; dend_ship_post ← DEND ; post_material ← DEND(NIGHT) ; post_energy ← SOMA(NIGHT) // EMERGENCY shockwave_lockdown ← ASTRO // NOTE POST endurance is own-state only (own Ca climbing); no arrived feedback term. -// coincidences sort by timescale: D-serine/bAP detected IN ACTION (instantaneous); dopamine in PREPARATION. -// THE THREE CATEGORIES (same at DAY and NIGHT; here DAY, subject = arrived glutamate / bAP): -// ACTION respond: integrate glutamate, detect instantaneous coincidences, emit retro (NOT_bAP); -// bAP is a second, vertical action-context (soma's spike confirms) -// RECOVERY restore the ability to respond: Ca extrusion + NMDA Mg-block re-establish -// PREPARATION shape what comes next: AMPA fill (next response) + tag climb (NIGHT) + refill + settle -// Coincidences sort by timescale: D-serine/bAP detected IN ACTION (instantaneous); dopamine in PREPARATION. +// THE THREE CATEGORIES (same at DAY and NIGHT; here DAY, subject = arrived glutamate / AP): +// ACTION (NOT_AP) respond: open AMPA/NMDA channels, integrate glutamate, detect the +// instantaneous coincidence, emit retro. This is POST's defining deed and it happens +// ALWAYS EXCEPT during an arriving AP — INCLUDING through the soma's refractory period: +// refractory is the SOMA's state, not POST's; from POST it is simply NOT_AP, so POST +// keeps responding and integrating, charging the spine so the neuron is ready to fire +// again once refractory ends. +// RECOVERY (AP) the BRIEF descending-spike arrival (ms): POST is driven from above, restores its +// ability to respond (Ca extrusion, Mg-block re-establishes as Vm falls), and deposits/ +// boosts traces. Short event, not a long window. +// PREPARATION (NOT_SPIKE_TRAIN) shape what comes next: AMPA fill (next response) + tag climb (NIGHT) +// + refill + settle. +// Coincidences sort by timescale: D-serine detected IN ACTION (instantaneous); dopamine in PREPARATION. -// ===== ACTION ===== -DAY | bAP: // second action-context (vertical): soma confirms - Vm += bAP_depol × dend_structure.bAP_fidelity; post_budget -= bAP_cost - if post_possible_tag > Ca_TAG: post_fast_trace += bAP_Ca_boost() // amplify only if candidate present - -DAY | NOT_bAP: // respond to arrived input (the defining deed) +// ===== ACTION (NOT_AP: open channels, respond — continues through the soma's refractory) ===== +DAY | NOT_AP: // respond to arrived input (the defining deed) a = sat(glutamate, K_AMPA) AMPA_current = a × AMPA_surface; Vm += AMPA_current; post_budget -= AMPA_cost // SOURCE 1 AMPA post_fast_trace += AMPA_Ca·AMPA_current // @cut affords: channel-opening frequency, response magnitude (quantity of response) [ms] @@ -526,13 +542,15 @@ DAY | NOT_bAP: // respond to arrived if Vm > eCB_thr: retro_eCB += eCB_emit(Vm); post_budget -= eCB_synth_cost // EMIT − brake -// ===== RECOVERY (restore the ability to respond; alter-ego of the response) ===== -DAY | NOT_bAP · recovered: // Ca extrusion + Mg-block re-establish - post_fast_trace *= decay(ms) // FAST — Ca extruded, trace relaxes +// ===== RECOVERY (AP: brief descending-spike arrival — restore + boost traces) ===== +DAY | AP: // soma's spike arrives (ms event), driven from above + Vm += AP_depol × dend_structure.bAP_fidelity; post_budget -= AP_cost + if post_possible_tag > Ca_TAG: post_fast_trace += AP_Ca_boost() // boost only if a candidate is present + post_fast_trace *= decay(ms) // Ca extruded, trace relaxes — ready to respond again // (NMDA Mg-block re-establishes as Vm falls — implicit in the Vm>Mg_eject gate next response) -// ===== PREPARATION (shape the next response AND the NIGHT) ===== -DAY | quiet: // sustained quiet +// ===== PREPARATION (NOT_SPIKE_TRAIN: shape the next response AND the NIGHT) ===== +DAY | NOT_SPIKE_TRAIN: // sustained quiet (emitted by NEURON — above SOMA) // for NIGHT: climb the tag; dopamine is the integrable coincidence (#3) if post_fast_trace > Ca_TAG: post_possible_tag += post_fast_trace; post_budget -= pka_cost // @cut affords: participation / consistency of co-activity (running average) [min] if dopamine > dop_thr and post_possible_tag > tag_thr: @@ -557,7 +575,7 @@ DAY | quiet: // sustained quiet // ACTION (same AMPA/NMDA machinery, same endurance trace), read for participation not significance. // ===== ACTION (build ⇄ release; participation gates direction; tag funds build, persists across cycles) ===== -NIGHT | build or release: +NIGHT | NON_REM_1: if rest_permission and post_tag > tag_expiry and post_participation ≥ MEDIUM: // BUILD (slice) Δ = min(slot_batch, post_material, post_energy·f_cap, post_tag) × post_participation post_structure += Δ; post_material -= Δ; post_energy -= Δ·assembly_cost @@ -573,7 +591,7 @@ NIGHT | build or release: // else: HOLD — tag waits for its pattern // ===== RECOVERY (acquire material/energy in CONTENTION with other components; receive freed material) ===== -NIGHT | import + free: +NIGHT | NON_REM_2: post_material += transit(post_material_ship, τ_transport_spine) // import (contested pool) post_energy += transit(post_energy_ship, τ_transport_spine) post_material += post_freed_material; post_freed_material = 0 // reclaim what release freed @@ -584,7 +602,7 @@ NIGHT | import + free: post_structure += min(post_maint, maint_cost) // hold up what is used // ===== PREPARATION (REPLAY the response — SAME machinery as day ACTION; multi-timescale) ===== -NIGHT | replay + measure + prime: +NIGHT | REM: // FAST: replay the response to the re-evoked input (probe) if arrived_glutamate_replay or arrived_replay_AP: a = sat(glutamate, K_AMPA)