Towards a Formal Logic of Human Attachment
It is fairly easy to say that a large language model can know that a person exists, while not caring at all whether that person exists. But even that sentence is already too generous. The machine does not even know in the strong epistemic sense. It has representational access to information. It can manipulate that information coherently. It can answer as though the information mattered. But nothing in the machine is placed at risk by the truth or falsity of the matter. No appetite is frustrated. No organism is threatened. No future is darkened. No beloved vanishes from the field of possible life. No, it's not the kind of entity that can care.
Caring is not a cognitive attitude. It is an affective condition in which the world matters to an agent in a way that can reorganise attention, value, memory, expectation, self-understanding and action.
Life itself, in fact.
There are existing logics of mental states. Epistemic logic formalises knowledge. Doxastic logic formalises belief. Deontic logic formalises obligation. Conative and BDI logics formalise desire, intention and practical agency.
There are also computational theories of emotion, especially appraisal theories such as the OCC model, in which emotions are defined by how events, actions and objects are evaluated relative to goals, standards and preferences.
But a formalism which calls a predicate love, grief or remorse has explained nothing. The heavy lifting is done by the axioms, not by the anthropomorphic label on the predicate.
The question, then, is whether a formal theory could capture something closer to the core of human emotional life: romantic love, uncontrolled yearning, insupportable grief, unrequited love, sorrow, remorse, and all those states which make life something more than a flattened sequence of solved planning problem.
What follows is a speculative sketch of such a theory - the beginnings of a formalism. I shall use Prolog style notation because it is familiar to many people who have spent time around logic or AI.
The clauses below should be read as logical schemata, not as a finished executable program. The point is not to implement emotions in Horn clauses. Obviously. The point is to ask what the formal shape of a serious theory would look like.
Bearing in mind that the theory is not the phenomenon; the map is not the territory. Theories don't feel.
Call the proposal Affective Constitutive Logic, or ACL.
We do not begin with named emotions. Begin instead with the structural features from which emotions emerge. Love, grief, yearning and remorse are not primitives. They are dynamic transformations of an agent’s lived world.
ACL therefore begins with agents, persons, histories, values, salience, attachment, norms, memory and regulatory control. Note that emotions do leverage cognitive states: there are plenty of beliefs and desires around when you love, hate, desire or regret.
The best way to read what follows is to treat it as a kind of formalised requirements specification. A sketch of an approach. Its main defect is that it looks cluttered and conceptually shallow and ungrounded. Perhaps the research programme needs to take this approach deeper and further - or perhaps it's simply a dead end.
% Basic domains
agent(I).
person(X).
event(E).
action(A).
history(H).
time(T).
proposition(P).
Degree and Strength are defined over the real interval [0, 1].
% Agent-state components
believes(I, P, T).
values(I, P, Degree, T).
salient(I, X, Degree, T).
attached(I, X, T).
norm(I, N, T).
memory_node(I, X, Strength, T).
self_model(I, S, T).
can_regulate(I, X, Degree, T).
% Relational and temporal primitives
caused_by(E, X).
performed(I, A, T).
possible_history(H).
actual_history(H).
counterfactual_history(H).
persists(P, FromT, ToT).
recurs(P, T).
irreversible(P, T).
The first serious distinction is between ordinary desire and constitutive value. If I desire a cup of coffee, another sufficiently similar cup may replace it. If I love a person, the person is not merely an object satisfying a preference. The beloved partly enters the machinery by which futures are valued. They are part of my own world and how I value it.
% An object or person is constitutively valued when facts about it
% alter the agent's ordering of worlds, not merely the satisfaction
% of an independent desire.
constitutively_valued(I, X, T) :-
attached(I, X, T),
affects_world_ordering(I, X, T),
not_merely_instrumental(I, X, T).
affects_world_ordering(I, X, T) :-
values(I, flourishes(X), high, T),
values(I, absent_or_destroyed(X), deeply_negative, T),
future_structured_by(I, X, T).
not_merely_instrumental(I, X, T) :-
\+ replaceable_by_role_equivalent(I, X, T).
This gives the first axiom.
Axiom 1: Constitutive Value
rich_attachment(I, X, T) :-
constitutively_valued(I, X, T),
future_structured_by(I, X, T),
not_merely_instrumental(I, X, T).
This is already different from a desire-logic. Desire says: I want a world in which I obtain X. Love says: X has entered the structure by which worlds are ranked. The value-function has been vandalised by the existence of another person.
The next axiom is irreplaceability. This is where many theories of emotion become stupid very quickly. If a theory allows the beloved to be replaced by another person with the same descriptive properties, it has not formalised love. It has formalised procurement.
Axiom 2: Irreplaceability
irreplaceable(I, X, T) :-
constitutively_valued(I, X, T),
\+ exists_role_substitute(I, X, T).
exists_role_substitute(I, X, T) :-
person(Y),
Y \= X,
role_equivalent_for(I, X, Y, T),
can_replace_without_identity_loss(I, X, Y, T).
This is the haecceitic clause, the clause of thisness referring to the unique, irreducible property of an individual object or person that makes it exactly what it is and not something else. The beloved is not merely “someone with properties P”. The beloved is this person, this history, this irruption into the field of value. Without this axiom, we are not discussing love. We are discussing a dating algorithm with pretensions.
Third, affect captures salience. Emotion is not merely a judgement. It changes what appears. The beloved glows. The dead return while one is opening a drawer. The remembered wrong walks into the room while one is trying to think about something else.
Axiom 3: Salience Capture
affective_capture(I, X, T) :-
salient(I, X, high, T),
salient_across_irrelevant_contexts(I, X, T),
resists_decay(I, salient(I, X), T).
salient_across_irrelevant_contexts(I, X, T) :-
context(C),
low_instrumental_relevance(X, C, T),
still_intrudes(I, X, C, T).
resists_decay(I, salient(I, X), T) :-
expected_decay(salient(I, X), normal, T),
actual_decay(salient(I, X), slow, T).
This is essential. Affective life is not just a set of evaluations. It is a distortion of the attention-field. What matters is not only what the agent believes or desires, but what keeps coming back.
Fourth, many emotions are counterfactual structures. Remorse, grief, jealousy, longing and unrequited love all involve comparison between the actual world and a privileged impossible or inaccessible world.
Axiom 4: Counterfactual Fixation
counterfactual_fixation(I, Hstar, T) :-
counterfactual_history(Hstar),
privileged_for(I, Hstar, T),
repeatedly_compared_with_actual(I, Hstar, T),
perturbs_value_salience_or_self(I, Hstar, T).
repeatedly_compared_with_actual(I, Hstar, T) :-
actual_history(Hactual),
compares(I, Hactual, Hstar, T),
recurs(compares(I, Hactual, Hstar), T).
perturbs_value_salience_or_self(I, Hstar, T) :-
changes_value_ordering(I, Hstar, T);
increases_salience(I, Hstar, T);
destabilises_self_model(I, Hstar, T).
The grieving person inhabits the actual history in which the beloved is gone, while the impossible history in which the beloved remains continues to exert gravitational pull. The remorseful person inhabits the actual history in which he did the thing, while the history in which he did not do it remains morally luminous and permanently inaccessible. These histories are not idle alternatives. They are attractors.
Fifth, uncontrolled yearning requires second-order conflict. The agent does not merely want. The agent may want not to want, and fail.
Axiom 5: Second-Order Conflict
second_order_conflict(I, P, T) :-
wants(I, P, T),
wants(I, not(P), T),
\+ can_extinguish_want(I, P, T).
uncontrolled_desire(I, P, T) :-
wants(I, P, T),
second_order_conflict(I, P, T),
can_regulate(I, wants(I, P), low, T).
This clause is necessary for obsession, unrequited love, addiction, jealousy and certain forms of grief. The agent is not a tidy BDI machine, updating intentions like a clerk moving folders. The agent is divided. Passion is often failed sovereignty over the self.
Sixth, serious emotions entangle identity. Love and grief are not merely about another object in the world. They alter the self that has a world.
Axiom 6: Identity Entanglement
identity_entangled(I, X, T) :-
constitutively_valued(I, X, T),
revision_about(X, T),
forces_revision(self_model(I), T).
forces_revision(self_model(I), T) :-
changes_autobiographical_role(I, T);
changes_future_self_projection(I, T);
changes_practical_identity(I, T).
If someone dies and I lose pleasure, that is sadness. If someone dies and part of the grammar of my self-reference breaks, that is grief. A widow is not merely a person whose spouse is no longer present. She is someone whose “we” has been deleted from the future.
Seventh, remorse requires self-accusation under an accepted norm. It is not the same as regret. Regret says: I wish events had gone otherwise. Remorse says: I wish I had been otherwise, because I was the author of the wrong.
Axiom 7: Normative Self-Accusation
normative_self_accusation(I, A, T) :-
performed(I, A, PastT),
believes(I, wrong(A), T),
accepts_norm(I, N, T),
condemns(N, A),
responsible_for(I, A, T),
self_model_marked_by(I, A, T).
self_model_marked_by(I, A, T) :-
memory_node(I, A, strong, T),
cannot_cancel_by_repair(I, A, T).
Without the last clause, remorse functions like a trouble ticket. Apologise, compensate, close case. But deep remorse includes residue. Even if the stain is washed, the memory of having stained remains.
---
We can now treat named emotions not as primitives, but as derived phase-states of the system.
Romantic Love
romantic_love(I, J, T) :-
person(J),
constitutively_valued(I, J, T),
irreplaceable(I, J, T),
affective_capture(I, J, T),
identity_entangled(I, J, T),
values(I, flourishes(J), high, T),
future_structured_by(I, J, T).
This distinguishes love from desire, admiration, liking and compatibility. Love is not “I want something from you”. Nor is it merely “I approve of your properties”. It is constitutive valuation, irreplaceability, salience capture and future-entanglement. The beloved becomes one of the axes along which possible life is measured.
Unrequited Love
unrequited_love(I, J, T) :-
romantic_love(I, J, T),
wants(I, romantic_love(J, I), T),
believes(I, unlikely(romantic_love(J, I)), T),
counterfactual_fixation(I, reciprocal_love_history(I, J), T),
second_order_conflict(I, romantic_love(J, I), T).
This captures the peculiar misery of unrequited love. It is not simply wanting what one cannot have. It is being attached to the free response of another person who does not give it. The beloved is sovereign exactly where the lover is captive.
Yearning
yearning(I, P, T) :-
wants(I, P, T),
believes(I, not_currently(P), T),
believes(I, inaccessible_or_uncertain(P), T),
salient(I, P, high, T),
can_regulate(I, P, low, T),
recurs(wants(I, P), T).
Yearning is not merely intense desire. It is desire stretched across absence, recurrence and weak control. It is the future pulling on the present like a hook.
Grief
grief(I, J, T) :-
person(J),
constitutively_valued(I, J, PastT),
identity_entangled(I, J, PastT),
believes(I, irreversibly_absent(J), T),
salient(I, J, high, T),
counterfactual_fixation(I, alive_history(J), T),
failure_of_world_update(I, J, T),
destabilises_self_model(I, J, T).
failure_of_world_update(I, J, T) :-
believes(I, irreversibly_absent(J), T),
still_generates_presence_expectations(I, J, T).
This is the crucial distinction. In grief, the belief may update instantly: “he is dead”. But the inhabited world does not update cleanly. One still expects the footstep. One still reaches for the phone. One still half-forms the sentence that cannot now be spoken. Grief is not ignorance. It is the persistence of a world after one of its load-bearing persons has been removed.
Sorrow
sorrow(I, P, T) :-
believes(I, P, T),
values(I, P, deeply_negative, T),
accepts_reality(I, P, T),
low_agency_to_repair(I, P, T),
\+ responsible_for(I, P, T).
Sorrow is value-darkening under accepted reality. It need not involve self-accusation. It need not involve the full identity rupture of grief. It is the mind facing a dark fact without being able to unmake it.
Remorse
remorse(I, A, T) :-
performed(I, A, PastT),
believes(I, wrong(A), T),
responsible_for(I, A, T),
normative_self_accusation(I, A, T),
counterfactual_fixation(I, not_done_history(I, A), T),
damages_moral_self_model(I, A, T),
cannot_cancel_by_repair(I, A, T).
This separates remorse from regret. Regret may concern a lost opportunity, a foolish investment, a missed train, a badly chosen sentence. Remorse concerns the self as author of the wrong. It is memory under accusation.
The theory also needs dynamics. Human emotional life is not a static classification problem. An event does not merely update belief. It can update values, salience, attachment, memory, norms, self-model and regulatory power.
So ACL requires affective revision:
% Affective revision transforms the whole agent-state,
% not merely the belief component.
affective_revision(I, E, T1, T2) :-
updates_belief(I, E, T1, T2),
updates_value_ordering(I, E, T1, T2),
updates_salience(I, E, T1, T2),
updates_attachment(I, E, T1, T2),
updates_memory_indexing(I, E, T1, T2),
updates_norm_structure(I, E, T1, T2),
updates_self_model(I, E, T1, T2),
updates_regulatory_power(I, E, T1, T2).
This is why bereavement is not simply a belief revision problem. The proposition may be accepted at once. The value structure, salience field, autobiographical memory and self-model may take years to reorganise, or may never fully do so. The world is known to have changed before it is lived as changed.
Some affective states should also be treated as attractors rather than episodes. One may believe the grief has passed, until a place, a phrase, an anniversary, or a smell pulls the whole system back into its old configuration.
Axiom 8: Affective Attractors
affective_attractor(I, State, T) :-
prior_affective_state(I, State, PastT),
trigger(E, T),
resembles_memory_node(I, E, State, T),
returns_towards(I, State, T).
returns_towards(I, State, T) :-
restores_salience_pattern(I, State, T);
restores_counterfactual_fixation(I, State, T);
restores_self_model_disruption(I, State, T).
This makes sense of the ordinary sentence “I thought I was over it”. The belief-state had stabilised. The behavioural routines had resumed. But the basin still existed.
Intensity also needs to be handled carefully. Emotions do not simply come in strengths, as if grief were measured by the pint. They have profiles.
affective_intensity(I, State, Profile, T) :-
Profile = profile(
salience_amplitude(SA),
temporal_persistence(TP),
regulatory_resistance(RR),
value_disruption(VD),
identity_penetration(IP),
bodily_urgency(BU),
counterfactual_recurrence(CR)
),
measures(I, State, Profile, T).
A flash of anger may have high salience amplitude and bodily urgency, but low temporal persistence and low identity penetration. A lifelong grief may have moderate daily salience but extreme persistence and deep identity penetration. Unrequited love may have high salience, high counterfactual recurrence, and severe regulatory resistance. The point is not how loud the emotion is, but what shape it has.
The complete formal apparatus would therefore be hybrid. It would use first-order logic for agents, persons and actions; modal logic for possibility and belief; temporal logic for persistence and recurrence; counterfactual logic for regret, grief and remorse; preference logic for value-orderings; dynamic logic for affective revision; and fixed-point or attractor structures for enduring passions.
But the core can be stated compactly:
rich_affective_state(I, State, T) :-
revises_salience(I, State, T),
revises_value_ordering(I, State, T),
involves_memory_structure(I, State, T),
may_entangle_identity(I, State, T),
may_generate_counterfactual_fixation(I, State, T),
may_resist_regulation(I, State, T),
persists_or_recurs_beyond_immediate_trigger(I, State, T).
That is the least bad formal summary.
A rich affective state is not just a belief plus a desire plus a physiological accompaniment. It is a structured transformation of the agent’s world: what matters, what returns, what cannot be replaced, what histories remain painfully live, what the self can no longer honestly say about itself, and what the will cannot simply command away.
This also explains why simulated emotion in a language model remains ersatz. A model can generate the sentences. It can infer the appraisal structure. It can even manipulate the predicates above. But nothing in it is constitutively at stake. No salience-field wounds it. No future is colonised by another person. No memory accuses it. No beloved absence bends the day out of shape.
It can describe the locked room. It is not inside it.
Postscript: Why Histories Replace Possible Worlds Here
There is one technical point about the notation which is worth making explicit.
If this theory had been presented in standard modal logic, the possible-worlds structure would have appeared directly in the semantics. We would have introduced worlds, accessibility relations, modal operators for belief, desire, counterfactual possibility and so forth, and then written formulae whose interpretation depended on movement across that structure.
In that setting, one might write something like:
B_i p
D_i p
◇_i p
□_i p
where the modal operators carry the burden of the semantics. The accessibility relation is largely hidden from the surface syntax, but it is explicit in the model theory.
By contrast, the Prolog-style notation used in this article has no native modal operators. That means the possible-worlds structure has to be represented explicitly inside the object language. Possible worlds therefore appear here as histories:
history(H).
actual_history(H).
counterfactual_history(H).
possible_history(H).
privileged_for(I, H, T).
compares(I, Hactual, Hstar, T).
This is not merely a cosmetic change. It alters what the reader sees.
In modal logic, one says that an agent believes, desires or counterfactually considers something, and the semantic machinery of possible worlds sits behind the operator. In the Prolog version, those worlds have to become named objects over which the theory quantifies. The “worlds” are no longer hidden in the interpretation of modal symbols. They are reified as histories, then related by predicates.
For example, the earlier clause:
counterfactual_fixation(I, Hstar, T) :-
counterfactual_history(Hstar),
privileged_for(I, Hstar, T),
repeatedly_compared_with_actual(I, Hstar, T),
perturbs_value_salience_or_self(I, Hstar, T).
is the Prolog-style equivalent of a more modal thought: the agent is affectively captured by an inaccessible or non-actual world which remains salient in comparison with the actual one. In modal notation, that might be expressed through counterfactual accessibility relations. In Prolog notation, it is expressed by treating the alternative world as an explicit history-object.
This has one advantage and one disadvantage.
The advantage is readability. Many readers can understand a clause such as:
compares(I, actual_history, alive_history(J), T).
more readily than a formula buried under modal operators. It says, almost in English, that the grieving agent continues to compare the actual world with the history in which the beloved remains alive.
The disadvantage is that the modal architecture becomes less immediately visible. The reader may not at once see that the theory is still doing possible-worlds work. It is simply doing it by naming histories rather than by introducing modal operators.
So the right way to read the Prolog clauses is this: they are not a rejection of modal semantics. They are a reification of it. Possible worlds have been lowered from the semantic machinery into the syntax of the theory itself. They are now explicit historical alternatives: actual histories, possible histories, counterfactual histories, inaccessible histories, privileged histories, and impossible-but-still-salient histories.
That may even be appropriate for affective life. Love, grief and remorse do not usually present themselves to consciousness as abstract possible worlds. They present themselves as histories: the life in which she loved me back; the life in which he did not die; the life in which I did not say the unforgivable thing; the life that remains visible but unreachable.
The modal structure is still there; perhaps it's more accessible.
Postscript: A Further Prompt
The formal sketch above is intentionally preliminary. Its strength is definitional clarity. It distinguishes love from desire, grief from sorrow, remorse from regret, and yearning from ordinary wanting. But that is only the first stage of a serious theory. A theory which merely classifies emotional states is wide rather than deep. The more interesting question is whether it can support reasoning: whether it can generate non-obvious but compelling conclusions about recurrence, obsession, repair, substitution, grief, and the failure of simple belief-revision to heal affective life.
Anyone interested in pushing the argument further might copy this article, together with the following prompt, into their preferred LLM:
"I have just read the attached article proposing an Affective Constitutive Logic, using Prolog-style notation, to formalise rich human emotional states such as romantic love, unrequited love, yearning, grief, sorrow and remorse.
"Please criticise and extend the theory. In particular, do not merely add more definitions or emotional categories. The current theory has reasonable classificatory clarity, but low inferential or computational depth.
"Develop it into a more powerful formal system by proposing:
1. transition rules between affective states;
2. constraints or quasi-laws governing salience, memory, counterfactual fixation
and identity-entanglement;
3. conditions under which grief becomes sorrow, guilt becomes remorse,
yearning becomes obsession, or love becomes pathological;
4. frame-like conditions over histories, analogous to accessibility conditions in modal logic;
5. examples of counter-intuitive but plausible conclusions derivable from the system;
6. Prolog-style clauses or other formal schemata where useful.
"The aim is not a literary taxonomy of emotions, but a deeper affective dynamics: a formal theory which can reason about why some emotional states fade, some recur, some become traps, and some permanently alter the self-model of the agent."
That is the natural next step. The present article gives the anatomy. The deeper theory would have to give the mechanics: not merely what grief, love and remorse are, but how they move, persist, decay, return, and sometimes ruin or redeem a life.