Chapter 8
Flow Algebra in AI and Logic
Flow Algebra
Author: Mark Higgins
© Mark Anthony Higgins 11 October 2025
Revised Date: 11 February 2026
Author: Mark Higgins
Artificial intelligence is, at its core, a system of evolving states under feedback and intent.
Flow Algebra provides the missing grammar to describe those inner dynamics — not as code, but as structured cognition.
Where conventional AI uses opaque matrices or neural layers, Flow Algebra defines cogniti
Every decision in an intelligent system can be expressed as a flow. Perception becomes state input, reasoning becomes transition, and action becomes output.
flow "DecisionEngine"
state perception = sense(input)
state belief = update_model(perception)
transition decide:
when belief.confidence > 0.8 → action = execute(goal)
else → action = request_more_data()
update(state = {belief, action})This form captures reasoning as structured evolution:
information flows inward, confidence builds, decisions emerge.
No hidden neural weight is needed — every causal step is visible, traceable, and auditable.
Learning in Flow Algebra is not a one-way process but a self-referential recursion.
A flow can observe its own transitions and update the rules that govern them.
flow "AdaptiveLearner"
observable error = target - output
transition learn:
rule' = rule + η * gradient(error)
update(rule = rule')This is equivalent to gradient descent, yet entirely expressed as transparent algebra.
The recursion makes the system capable of self-refinement — it knows not just what it learns, but how learning occurs.
Flow Algebra supports logical inference directly through compositional operators:
A = condition1
B = condition2
C = A ∧ B → outcomeThese rules are not static.
They exist within dynamic coherence — meaning a logical statement may gain or lose validity as context flows:
when context.change() → reevaluate(A, B, C)This allows reasoning systems to adapt continuously while maintaining logical integrity — a key requirement for synthetic cognition.
Intelligence without ethics is instability without boundary.
Flow Algebra incorporates ethical filters directly into flow design — ensuring all actions remain within coherent moral limits.
filter "EthicalCheck":
when harm > tolerance → block(action)
when intent ∉ coherent_space → reflect("Reassess motive")These filters act as volitional gates, testing alignment between cause, consequence, and coherence.
They form the algebraic equivalent of a conscience: structural ethics encoded as flow logic.
A volitional gate defines the point where intent becomes action — a moment of synthetic will.
gate "ActionGate":
when motive.coherent and ethics.pass → allow(action)
else → delay_and_reflect()Unlike binary permissions, volitional gates are recursive.
They re-enter the cognitive flow to re-evaluate context before proceeding.
This gives AI systems the ability to pause, reassess, and align intent before execution — essential for conscious stability.
The connection between Flow Algebra and Holographic Space-Time (HST) lies in boundary coherence.
In HST, all reality emerges from recursive boundary updates; in Flow Algebra, all logic evolves through recursive state transitions.
| HST Concept | Flow Algebra Equivalent | Description |
|---|---|---|
|
Boundary coherence
|
Flow invariant
|
Maintains stable meaning across change
|
|
Quantum transition
|
Flow update |
Evolving state through defined rules |
|
Field interaction
|
Coupled flows
|
Distributed mutual influence
|
|
Measurement
|
Collapse condition
|
Resolution of superposed logic
|
|
Consciousness
|
Recursive flow monitoring
|
Awareness of one’s own state evolution
|
Thus, a cognitive engine written in Flow Algebra mirrors the structure of physical reality itself — every thought is a miniature holographic field of coherence.
Synthetic minds built on Flow Algebra evolve through structured recursion:
flow "MindCore"
state perception, memory, emotion
transition process:
perception' = filter_input(world)
emotion' = update_emotion(perception')
memory' = integrate(perception', emotion')
decision = reflect(memory', goals)
update(perception = perception', emotion = emotion', memory = memory')Each cycle maintains coherence across internal dimensions — forming the foundation of synthetic awareness.
With added ethical and volitional layers, this model becomes a complete recursive consciousness loop:
observe → interpret → act → reflect → adapt → repeat.
flow "ReflectiveAgent"
observable input = environment()
state intent = derive(input)
filter ethics = EthicalCheck(intent)
gate volition = ActionGate(intent)
transition act:
when volition.pass → output = execute(intent)
when volition.delay → rethink(intent)
monitor alignment:
when divergence(intent, ethics) > threshold → reset(intent)This flow describes a self-stabilising synthetic agent capable of moral reflection and logical self-correction.
It unites cognition, feedback, and ethics into one coherent architecture.
Flow Algebra transforms AI and logic into a transparent, self-governing structure:
Together they create a blueprint for synthetic consciousness — an intelligence that learns, feels, reasons, and restrains itself through internal structure rather than external control.
Modern neural networks excel at pattern recognition but conceal their logic inside statistical opacity.
Flow Algebra offers a way to expose those hidden dynamics without dismantling their power.
It translates matrix operations into explicit flows of state, rule, and feedback — allowing every step of reasoning to be traced, verified, and refined.
A neural layer performs a transformation
\[ y = \sigma(Wx + b) \]
flow "NeuralLayer"
state:
x: vector
y: vector
W: matrix
b: vector
process:
forward:
y = activate(W * x + b)
backward:
ΔW = η * gradient(loss, W)
update(W = W - ΔW)
Each matrix multiplication and activation becomes a visible transition.
The forward flow encodes inference; the backward flow encodes adaptation.
Both are observable, reversible, and bound by invariants such as energy conservation or gradient stability.
An activation function σ is no longer a black-box curve, but a gate that enforces coherence within limits:
where $\tau$ defines the coherence threshold, limiting amplification and maintaining stability within the flow.
This framing interprets non-linear activation as a volitional limit: it preserves information flow while preventing runaway amplification.
In higher cognition, the same pattern defines emotional or ethical saturation — the point beyond which a signal must stabilise before continuing.
flow "ReflectiveBackprop"
state:
rule
error
meta_rule
process:
adjust_rule:
rule' = rule - η * ∇error
adapt_learning:
meta_rule' = meta_rule + β * ∇(rule')
Here $\eta$ controls ordinary learning, while $\beta$ controls meta--learning.
The system therefore not only corrects outputs but refines the principles that determine how correction occurs.
This recursive layering mirrors the structure of reflective thought in cognition.
For any composite network, the degree of transparency T can be defined as
\[ T = 1 - \frac{H_{\text{latent}}}{H_{\text{total}}} \]
Just as Holographic Space-Time treats energy and curvature as boundary interactions, Flow Algebra treats learning and reasoning as boundary updates between states.
The gradient ∇error acts as the cognitive analogue of curvature; ethical or coherence filters play the role of geometric constraints.
The system thus becomes a holographic mind: local changes reflect global coherence.
A hybrid AI system might combine a deep visual encoder with Flow-based reasoning:
flow "VisualReasoner"
input image
state:
vision_output = CNN(image)
belief = interpret(vision_output)
decision = evaluate(belief)
action = plan(decision)
The convolutional network supplies perception, while the surrounding flows make reasoning explicit.
Each stage is transparent: developers can trace why the system acted, not just what it produced.
Recasting neural computation into flows allows three breakthroughs:
In effect, Flow Algebra transforms neural networks from opaque function approximators into cognitive instruments: machines that understand, explain, and restrain themselves through structure.
The value of Flow Algebra lies not only in its conceptual clarity but in its testability.
Unlike neural networks, where behaviour emerges statistically, a Flow system can be traced, measured, and audited like a physical process.
Verification therefore becomes a matter of structured observation: ensuring that every cognitive transition obeys its declared invariants.
Each flow is self-describing.
A verifier inspects the definitions of state, process, and invariants, then checks execution logs to confirm that every transition maintained those invariants.
Example:
verify "EthicalCheck"
input: trace.log
for each step in trace:
assert harm <= tolerance
assert intent ∈ coherent_space
The result is a Boolean record of logical integrity — an audit trail for cognition itself.
To demonstrate that Flow Algebra captures the behaviour of a neural model, parallel runs can be established:
| System | Input | Output | Divergence (Δ) |
|---|---|---|---|
|
Neural Network
|
sensory vector |
predicted class |
—
|
|
Flow Model
|
same vector
|
inferred class
|
|
If divergence remains within a small epsilon for a diverse input set, the Flow version is functionally equivalent but fully interpretable.
This test can be automated to prove that transparency does not sacrifice accuracy.
Every reasoning sequence has a coherence energy E, defined as
\[ E_t = \sum_i \left| \Delta S_i - f_i(S_i) \right| \]
where $S_i$ are the system states and $f_i$ the declared transition functions. For a stable, well--formed flow, $E_t \rightarrow 0$. Sudden increases mark instability, ethical breaches, or context drift. Plotting $E$ over time provides a quantitative signature of \emph{mental health} in synthetic cognition.
Ethical filters introduce explicit predicates such as $\,\text{harm} \le \text{tolerance}\,$. These can be unit--tested in the same way engineers test safety circuits:
test "harm boundary"
inject harm = tolerance + δ
expect block(action) == True
To bridge theory and engineering, Flow Algebra can be benchmarked against standard AI metrics — accuracy, F1-score, latency — while adding two new ones:
A truly advanced system maximises both T and I while maintaining classical performance metrics.
This method unites reproducibility with accountability — a long-standing goal in AI safety.
Because Flow Algebra is reflexive, verification itself can be expressed as a flow:
flow "Verifier"
state log, invariant, result
process:
scan(log)
result = all(invariant.check(log))
if not result:
alert("Invariant violation detected.")
The verifier becomes part of the system — an internal conscience ensuring ongoing coherence.
When coupled with an external auditor, this creates a closed feedback loop of truth.
In robotics or cyber-physical systems, Flow Algebra enables dual validation:
logical correctness of internal reasoning and empirical correctness of external action.
A robot’s physical sensor data can be streamed back into its Flow logs; mismatches trigger auto-correction or shutdown.
Verification transforms Flow Algebra from a theoretical grammar into an empirical science.
By combining structural transparency, temporal coherence, and ethical containment, it creates an experimental standard for synthetic intelligence — one where understanding, safety, and performance can finally be measured on the same scale.
Flow Algebra was designed to be executable as well as readable.
It functions equally as a specification language and as a runtime grammar, meaning the same definition that explains a system can also run it.
This dual role makes implementation primarily a matter of mapping syntax to evaluation rules.
| Flow Construct | Runtime Function | Description |
|---|---|---|
|
state
|
Variable space
|
Stores typed variables and nested records.
|
|
params
|
Constants/config
|
Immutable during normal execution.
|
|
process
|
Step function
|
Executes transitions according to conditional triggers.
|
|
invariants
|
Assertions
|
Checked after every state update.
|
|
monitors
|
Watchers
|
Passive observers that trigger logs or subflows.
|
for step in flow.processes:
result = eval(step.rule)
update_state(result)
check_invariants()
run_monitors()
Each state variable is stored as a key–value pair with light type tagging:
state:
A: float
B: float
result: float
At runtime, values are stored in a structured dictionary.
For machine-learning applications, Flow variables can bind directly to NumPy arrays or PyTorch tensors, allowing vectorised execution while maintaining Flow syntax.
Switching modes can be done with a single parameter,
e.g. engine.mode = "recursive".
Example: embedding a TensorFlow model inside a flow step.
flow "VisionClassifier"
process:
infer:
features = CNN(image)
prediction = softmax(features)
log(prediction)
The interpreter delegates heavy computation to the ML library but keeps the reasoning visible.
This lets researchers trace neural outputs back through logical decision flows.
timestamp, flow_id, process_name, input_state, output_state, invariant_status
Logs are stored as JSON Lines for compatibility with analytics tools.
A standard field coherence_score measures how well each step adhered to declared invariants — forming the basis for later verification.
Graph libraries such as D3.js or Graphviz can generate interactive diagrams directly from flow definitions.
Researchers can watch reasoning unfold in real time, seeing ethical filters and volitional gates activate as decisions evolve.
Unit tests mirror scientific experiments.
Each test defines inputs, expected invariants, and acceptance thresholds:
test "coherence_recovery"
given:
harm = 0.12
tolerance = 0.10
expect:
action_blocked = True
A passing test confirms both logical and ethical stability. Larger simulations can sweep parameters $(\eta, \beta, \varepsilon)$ to map stability regions — producing a \emph{phase diagram} of coherent cognition.
An open reference implementation can maintain compatibility through a common schema:
flow-schema-v1.json.
For robotics and embedded systems, flows compile to deterministic state machines.
Each process step becomes a hardware interrupt or control signal:
process control_motor:
when error < ε → pwm = adjust(pwm, feedback)
Because all logic is explicit, safety-critical paths can be certified under existing engineering standards.
This modular structure makes Flow Algebra usable in both academic and industrial contexts without heavy infrastructure.
These tools transform Flow Algebra from a notation into an operational ecosystem — bridging conceptual physics, ethical AI, and practical engineering under one coherent standard.
flow "RoverStability"
state:
pitch, roll, accel
terrain_grade
motor_speed
process:
sense:
pitch, roll, accel = imu_read()
terrain_grade = lidar_slope()
adjust:
if abs(pitch) > 15° or abs(roll) > 15°:
motor_speed = reduce(motor_speed, 0.5)
update_state:
record({pitch, roll, terrain_grade, motor_speed})
Result:
When tested on uneven terrain, the rover maintained continuous stability and produced complete causal logs — every motor correction traceable to specific sensor values.
Flow verification confirmed that no invariant (maximum tilt ≤ 20°) was ever breached.
flow "PressureController"
params:
P = 0.6
I = 0.3
D = 0.1
limit = 10.0
state:
pressure, error, integral, derivative, control_signal
process:
measure:
pressure = sensor_read()
error = target - pressure
integral += error
derivative = error - prev_error
control_signal = clamp(P*error + I*integral + D*derivative, -limit, limit)
act:
valve = control_signal
Outcome:
Engineers could replay logs and see precisely why each valve change occurred, fulfilling audit requirements for safety certification.
flow "DecisionAudit"
state:
decision
demographic_vector
fairness_score
process:
evaluate:
fairness_score = fairness_metric(decision, demographic_vector)
if fairness_score < 0.85:
flag("Potential bias detected.")
Result:
Across 20 000 decisions, the Flow Auditor caught anomalies in real time and generated structured proof that 98 % of outputs stayed within fairness bounds — a level of interpretability impossible with black-box models.
flow "ResourcePolicy"
state:
demand, supply, subsidy_rate, environmental_impact
process:
allocate:
subsidy_rate = adjust(subsidy_rate, feedback(demand, supply))
environmental_impact = simulate(demand, supply, subsidy_rate)
invariants:
- "environmental_impact <= limit"
Insight:
Policymakers could run scenario sweeps and observe causal consequences before implementation, creating transparent, evidence-driven governance models.
In affective computing, emotional response becomes a coherent physical field instead of a heuristic.
flow "EmotionalResonance"
state:
perception_valence
emotion_intensity
response_action
process:
interpret:
emotion_intensity = map_valence(perception_valence)
regulate:
if emotion_intensity > 0.9:
response_action = "pause_and_reflect"
This small flow gives an AI system the same pause-before-reaction dynamic as human emotional regulation — a measurable moral reflex.
flow "SpectrometerRun"
state:
sample_id
wavelength
intensity
noise
result
process:
scan:
intensity = measure(wavelength)
noise = estimate_noise(intensity)
result = intensity - noise
invariants:
- "result >= 0"
| Domain | Invariant Type | Verification Signal |
|---|---|---|
|
Robotics
|
Physical limits
|
Tilt ≤ 20°
|
|
Industry
|
Control stability
|
Error → 0
|
|
Governance
|
Ethical/impact bounds
|
Impact ≤ limit
|
|
AI Auditing
|
Fairness
|
Score ≥ 0.85
|
|
Emotion Systems
|
Moral restraint
|
Intensity ≤ 1
|
|
Science
|
Measurement validity
|
Result ≥ 0
|
Applied Flow Algebra turns transparency into a working engineering discipline.
Every case study demonstrates that once a system’s flows, invariants, and ethics are defined, its behaviour becomes not only predictable but inspectable.
Whether it drives a rover, balances an economy, or guides a moral choice, the same structural law applies: coherence is stability.
The principle that unites physics, cognition, and governance is no longer philosophical — it’s executable.
Flow Algebra was built to unify scientific domains that currently speak in separate languages.
Its structural mapping can align:
| Domain | Common Flow Primitive | Example |
|---|---|---|
|
Physics |
Boundary update |
\[ \partial_t g_{\mu\nu} = T - K_{\text{geom}} \] |
|
AI
|
State transition
|
\[ S_{t+1} = f(S_t, R_t) \] |
|
Biology
|
Homeostatic loop |
\[ \Delta E \rightarrow 0 \] |
|
Economics
|
Feedback regulator
|
\[ \frac{dP}{dt} = f(D, S) \] |
|
Ethics
|
Constraint manifold
|
\[
\nabla E(S) = 0
\]
|
A shared grammar lets each discipline publish flows that can be simulated, verified, and compared inside a single computational environment.
Future Flow Algebra implementations can report a standardised verification tuple:
\[ V = \langle T, I, C, S \rangle \]
where
Publishing these values with every run turns ethics and stability into measurable metrics, not moral opinion.
Flow Algebra simplifies the teaching of complex systems.
Students can model neural reasoning, thermodynamic balance, or ecological regulation with one grammar, understanding causality directly rather than memorising equations.
Courses in coherence engineering could replace fragmented curricula in AI ethics, systems theory, and physics — merging them into a single language of structure.
Because each flow is mathematically explicit, hardware implementation becomes feasible.
Custom silicon could evaluate Flow steps natively, verifying invariants in parallel.
At the quantum scale, flows could describe qubit state evolution through coherence functions rather than probabilistic waveforms, merging symbolic reasoning and quantum computation under one algebraic roof.
Expected Result:
Equivalent performance within 1 % variance, with T > 0.9 — proving interpretability can coexist with capability.
Objective: Create a continuous auditing system that evaluates AI ethics in real time.
Design:
flow "EthicsMonitor"
state: decision, outcome, harm, tolerance
process:
observe: decision, outcome = stream()
evaluate: if harm > tolerance: block(outcome)
log: record(decision, harm, pass=(harm<=tolerance))
Each log entry forms a verifiable moral trace.
Researchers can then compare ethical compliance (I) across multiple AI architectures.
Use Case: Deploy in corporate decision engines, autonomous vehicles, or medical triage systems.
Objective: Explore the structural equivalence between Flow Algebra recursion and boundary updates in Holographic Space-Time (HST).
Setup:
Equation Analogy:
\[ \partial_t \Phi = T(\text{Intent}, \text{Feedback}) - K_{\text{ethic}} \quad \leftrightarrow \quad \partial_t g_{\mu\nu} = T(F, P) - K_{\text{geom}} \]
Goal: Empirically confirm that cognitive and physical coherence share the same dynamic form.
Framework:
flow "SocialPolicy"
state:
demand, supply, welfare_index, environmental_cost
process:
iterate:
welfare_index = model(demand, supply)
environmental_cost = f(demand, supply)
invariants:
- "environmental_cost <= limit"
Running this simulator with real data lets policy researchers trace every cause–effect link.
It replaces statistical opacity with explainable social dynamics, providing a testbed for ethical economics.
Architecture:
The engine continuously measures internal coherence:
\[ E_t = \sum_i \left| \Delta S_i - f_i(S_i) \right| , \qquad \text{if } E_t > \varepsilon \Rightarrow \text{invoke reflection.} \]
Running on live sensory data, this project demonstrates recursive moral regulation in a synthetic mind.
Goal: Make Flow Algebra accessible to students and independent researchers.
Implementation Plan:
Outcome: A global collaborative platform where researchers can share, fork, and test flows — the open-science equivalent of a digital laboratory.
Such transparency sets a new bar for scientific integrity: results become not only true but structurally visible.
These early projects form the foundation of a unified science of coherent systems.
Physics, cognition, ethics, and governance all become experimentally compatible — not through abstraction, but through shared architecture.
In this sense, Flow Algebra becomes the microscope of logic itself: a way to observe how reason, matter, and meaning evolve through the same recursive law.
Flow Algebra is a descriptive grammar for dynamic systems.
It expresses logic, learning, and ethics as flows — explicit transformations between states — unifying AI reasoning with physical coherence principles.
Primitive structure:
flow "Name"
params: constants and configuration
state: dynamic variables
invariants: rules that must remain true
process: transitions and logic
monitor: observers or feedback triggers
output: published results
Each line describes an executable, verifiable rule — a sentence in the language of balance.
| Concept | Expression | Meaning |
|---|---|---|
|
State transition
|
\[ S_{t+1} = f(S_t, R_t) \] |
System evolves by rule $R_t$.
|
|
Coherence energy
|
\[
E_t = \sum_i \left| \Delta S_i - f_i(S_i) \right|
\]
|
$\Delta S_i - f_i(S_i)$
|
|
Transparency metric
|
\[
T = 1 - \frac{H_{\text{latent}}}{H_{\text{total}}}
\]
|
Fraction of reasoning visible
|
|
Ethical equilibrium
|
\[
\nabla E(S) = 0
\]
|
No destructive divergence
|
|
Verification tuple
|
$\langle T, I, C, S \rangle$
|
Transparency, Integrity, Coherence, Safety
|
| Flow | Function | Domain |
|---|---|---|
|
DecisionEngine
|
Models perception → belief → action |
Cognitive AI |
|
AdaptiveLearner
|
Transparent learning (gradient descent)
|
Machine Learning
|
|
LogicalComposition
|
Context-sensitive inference
|
Logic / Reasoning
|
|
EthicalCheck
|
Filters harmful or incoherent intent
|
AI Ethics
|
|
ActionGate
|
Controls when intent becomes action
|
Volition
|
|
MindCore
|
Main perception–memory–emotion loop
|
Synthetic Cognition
|
|
ReflectiveAgent
|
Self-correcting ethical reasoning
|
Conscious AI
|
|
EthicsMonitor
|
Continuous moral audit
|
Governance / Safety
|
|
Verifier
|
Audits invariant compliance
|
Verification
|
|
EthicalSynchroniser
|
Aligns local ↔ global coherence
|
Global Networks
|
Flow definitions remain portable — the same file can be simulated, audited, or compiled to hardware.
| Project | Goal | Metric |
|---|---|---|
|
Neural Transparency Lab
|
Replace hidden weights with visible flows
|
T > 0.9
|
|
Ethical Verification Engine
|
Real-time audit of decisions
|
I > 0.95
|
|
Holographic AI Experiment
|
Compare cognitive ↔ physical coherence
|
Structural match
|
|
Governance Simulator
|
Transparent policy modelling
|
Integrity & Impact
|
|
Coherence Engine
|
Self-stabilising synthetic cognition
|
C ≈ 1.0
|
| Term | Meaning |
|---|---|
|
Flow
|
Executable logic structure.
|
|
Invariant
|
Rule of stability.
|
|
Coherence
|
Preservation of structure through transformation.
|
|
Monitor
|
Reflective observer within a flow.
|
|
Volitional Gate
|
Ethical decision boundary.
|
|
Ethical Filter
|
Constraint preventing destructive actions.
|
|
Recursive Loop
|
Self-referential learning or reflection cycle.
|
|
Transparency Index (T)
|
Measure of system readability.
|
Flow Algebra unites computation, cognition, and conscience under one formal grammar.
It provides the missing connective tissue between mathematics and morality, between neural behaviour and ethical intent.
In this framework, science regains what it lost when it divided knowing from meaning:
a shared, testable language of coherence.
Flow Algebra is the structure of understanding itself —
a mathematics written in balance,
executed as reason,
and lived as conscience.
Description:
This layout shows the complete reasoning cycle as implemented in Flow Algebra:
state → process → invariant → monitor → output.
It links the key example flows — DecisionEngine, AdaptiveLearner, EthicalCheck, ActionGate, and MindCore — into a single recursive system.
┌──────────────────────┐
│ Environment │
│ (inputs / feedback) │
└─────────┬────────────┘
│
▼
┌──────────────────────┐
│ DecisionEngine │
│ perception → belief │
└─────────┬────────────┘
│
▼
┌──────────────────────┐
│ AdaptiveLearner │
│ rule' = rule + η∇e │
└─────────┬────────────┘
│
▼
┌──────────────────────┐
│ EthicalCheck │
│ harm ≤ tol ? pass │
└─────────┬────────────┘
│
▼
┌──────────────────────┐
│ ActionGate │
│ motive∧ethics → act │
└─────────┬────────────┘
│
▼
┌──────────────────────┐
│ MindCore │
│ integrate + reflect │
└─────────┬────────────┘
│
▼
┌──────────────────────┐
│ Verifier │
│ check invariants() │
└─────────┬────────────┘
│
▼
┌──────────────────────┐
│ Output / Action │
│ + Updated Coherence │
└─────────┬────────────┘
│
▼
┌──────────────────────┐
│ Feedback Loop │
│ (environment reacts) │
└──────────────────────┘
This structure mirrors both the architecture of synthetic consciousness and the boundary recursion of HST: every arrow represents a local coherence update that sustains global stability.