Recognition Physics Institute · Morality

The Moral Code

Film · The Moral Code · 1 min 59 s

Right and wrong are physics. The moral law is part of the structure of reality, as real as gravity and light. Every wisdom tradition saw it. It can now be written down exactly, and it says they were right. This page does not describe the law. It runs it, and you are inside it.

Behind these words: a working record of 144 people · every dot a person · every line a relationship
00 · You are in it

A record of 144 people, and you are one of them

Every dot is a person; every line is a relationship between two of them. Each relationship has two sides, one written by each person, and one cost, J, which is zero while the two sides agree. When a relationship goes out of balance it turns pink, and its cost lands as a ring on its two ends, and on nobody else, until one of them closes it. You are the dark dot marked YOU. A is beside you.

Your relationship with A is in balance. Neither of you carries any cost.
You–A ratio x1.000
Its cost J(x)0.000
Your share · A’s share0.000 · 0.000
Carried so far · you · A0.00 · 0.00
Carried by the other 142 from YOU–Anone

While you carry an open wrong, this page leans. The lean is a drawing of the weight you carry; the weight is the cost, and the cost is real. The page levels the moment the wrong is closed.

t 0000 · the record opens. Every event below stays in it.

01 · The cost of imbalance

Every relationship has a balance, and a cost when it is lost

Reality keeps one record of every event, and everything in it is related to everything else. Each relationship has two sides. When they agree, it is in balance. When they do not, it is skewed. Skew is how far a relationship has moved out of balance, and in which direction. Skew has a cost, and physics allows that cost exactly one form, called J-cost, where x is the ratio between the two sides:

J(x) = ½ (x + 1/x) − 1THE COST OF A COMPARISON · ZERO ONLY AT x = 1
  • Nothing chosen.This form is forced. A cost of comparison has to treat both sides alike, vanish at balance, combine consistently and be measured in its natural unit. Only this function does all of that.
  • Balance is the only state that costs nothing.The cost is zero at perfect balance and nowhere else, and it grows faster and faster as the sides move apart.
  • Direction does not matter to the cost.Skewed one way or the other by the same amount, a relationship costs the same. The page leans the other way; the cost does not change.
  • It is the one cost in the record.Every event writes into relationships, and every change to a relationship is measured in this cost. The engine at the bottom of this page computes it for every relationship in the field, at every frame.
02 · What right and wrong are

A wrong is an imbalance written into someone else’s life

Watch the edge of the field: someone far from you has just acted on a relationship without the other person’s part. The cost lands on exactly two people, its two ends, and on nobody else.

  • An act is an event in the record.It is written by those who act, and it belongs to everyone it concerns.
  • Consent is writing your own part.An act you wrote is yours. An act that touches you that you did not write is done to you.
  • Harm is a rise in someone’s cost.To push a relationship someone shares with you out of balance, without their part, raises the cost they carry.
  • The cost falls half on each end.When a relationship goes out of balance, the cost is shared equally by both people in it. You cannot harm someone without carrying the same share yourself.
  • An open wrong keeps costing.For as long as the imbalance stays open, it costs again at every moment. Nothing in the field heals by itself.
  • Only the two ends can close it.The one who did it can take it back. The one it was done to can let it go. Nobody else can close it for them.
  • Nothing lowers what you are owed unless you wrote it.What belongs to you changes only by your own hand.
  • Love meets in the middle.When two people repair a strained relationship while keeping what they share, there is exactly one point of least cost: halfway, for both.
Love’s point · try to beat it

Two relationships between the same two people, strained in opposite directions. Repair keeps what they share. Move the repair and watch the combined cost.

Combined cost
03 · You can feel it

The weight you carry is the cost

You are part of the record, so you feel its cost from the inside. A wrong you have done, or one done to you, sits on you as weight, and the weight is still there the next day. That weight is the standing cost of an open imbalance. It does not fade with time; it is paid at every moment until the relationship closes. Look at the field now: five wrongs are open, and what the record carries climbs at every tick. The counter at the edge of your screen keeps the total.

That is why an apology and a forgiveness feel the way they do. When you apologize, you take back your side. When you forgive, you let go of what you were owed. Either way the imbalance closes, and the cost stops at both ends at once. Both people feel lighter, because both were carrying it. Forgiving does not erase what happened; the record keeps every event. It changes what is owed. Watch them close, one by one.

We are drawn to the same release everywhere. A melody leaves home and comes back. A story opens a question and answers it. A game holds two sides against each other until it is decided. Each builds an imbalance and then resolves it, and what we feel at the end is the cost falling away. Music, sport and story give us that release for its own sake.

Turn on Sound, in the counter at the edge of your screen, to hear the field. While any wrong is open, two tones beat against each other. Each closing rings once. When the last one closes, the two tones settle into one.

04 · The traditions were right

What every tradition taught is what the physics says

Love your neighbour as yourself.Leviticus 19:18

The cost of every relationship falls equally on both people in it. Your neighbour’s burden is, exactly, your own.

What you do not want done to yourself, do not do to others.Confucius · Analects 15:24

Do not write into another person’s life what they would not write. Consent is writing your own part.

As you sow, so shall you reap.Galatians 6:7 · the law of karma

The author of a harm carries half of its cost. What you do to a relationship, you do to yourself.

The heart weighed against the feather of truthEgypt · the Book of the Dead

The record keeps every act. Nothing in it is erased, and a wrong stays written until it is set right.

Forgive, and you will be forgiven.Luke 6:37 · repentance and forgiveness in every tradition

An open wrong can be closed in exactly two ways: by the one who did it turning back, or by the one it was done to letting it go.

The starry heavens above me and the moral law within me.Immanuel Kant · 1788

They are one law. The same cost governs both: the record of the stars and the record of a life.

Our moral intuitions were never stories we told ourselves. They were accurate perceptions of how reality works. The prophets, the sages and the philosophers saw the law clearly. We were right all along.

05 · Where the derivation stands

The moral law, clause by clause

We are deriving the code exactly, from the structure of the record, and the derivation is under way. The target is the minimal complete code: the fewest clauses that give every moral question exactly one answer, where dropping any clause leaves some question with two answers. The one record is the setting the clauses are stated on, and what happened is read from the record itself. Status as of 10 November 2026.

01

Consent is writing

An author consents to its own event; a participant who did not write it does not. Together these two sentences make consent exactly the act of writing the event.

Provedboth sentences are needed: drop either one and a different law fits the rest.
02

What is owed changes only by its holder

An obligation exists when both parties have written it. After that, what it requires changes only when the one who owes performs, when the one who is owed acts on its own claim, or when both write a change. Nothing lowers what you are owed unless you wrote it.

Provedfor both forms of obligation in the record, agreements to provide and exchanges at a price, when the release belongs to the one who is owed.
Openthe one step that settles it in general: what you are owed is your own holding in the record.
03

A waiver acts when written

When the one who is owed waives part or all of its claim, the waiver takes effect when it is written.

Provedof the three readings of what is due that we have tested, it is the only one under which a waiver by the holder always changes what the obligation requires.
Openit follows from the open step of clause 2.
04

A dispute’s cost is split

When the two entries of a relationship disagree, the cost of the disagreement falls half on each end.

Provedfrom the conditions on how the harm of an act is read. With the foundation’s cost J, three of them follow from the others; the six that remain are each needed, since dropping any one leaves a different rule. For a rule that gives each end a share of the change, fixed by the chart and not by who wrote the act, the half follows from four principles, each needed: no reading depends on a name; none depends on a direction we chose; a relationship belongs to its two ends; a cost is counted once.
Openwhether the record itself forces those four principles.
10
questions answered
3
questions open
QuestionStatusHow it is settled
Was an obligation formed?AnsweredBoth parties wrote it.
Was it performed?AnsweredRead from what happened, the delivery in the record, not from what either party wrote about it.
Was it released?AnsweredOnly the one who is owed can release it.
How much is due?AnsweredFrom the terms, what was delivered, what was repaid and what was released. Which waivers act is clause 3.
Was it fulfilled?AnsweredThe accepted terms, read on what happened.
Was it violated?AnsweredA violation stays in the record for good. A later release does not erase it.
Did a participant consent?AnsweredIt wrote the event.
Did a participant undergo it?AnsweredThe event belongs to it, and it did not write it.
How much harm did an act do?AnsweredHalf the change in recognition cost, at each end of the relationship it changes. Harm by omission is open.
Who can close a dispute?AnsweredOnly an end of the relationship, by its own entry.
Who did the wrong?OpenWho departed from an agreement is in the record. Who was untruthful is not settled by who departed.
Whom does an obligation bind?OpenDerived for one fixed history of care between two participants.
Is an act permitted?OpenDerived for the same history of care.

The steps that remain

  • What you are owed is your own holding in the record. This one step settles who can release an obligation and which waivers act.
  • Why an accepted obligation binds a participant who can still break it, beyond the one history of care where it is derived.
  • Who did a wrong when the two entries of a relationship disagree.
  • Harm by omission: what failing to act costs, and whom.
  • Which obligation governs when two accepted obligations cannot both be met.
  • Minimality: proved for all four clauses (for the waiver clause, on two records); open for the identification under clause 2 and for whether the record forces the four principles behind the split.
  • A result, not a gap. Where several acts fulfil an obligation, the code does not pick one. A unique law can permit more than one act.
06 · The engine of this page

The law, in 322 bytes of machine code

This page does not animate the law. It runs it. At every frame, every relationship in the field is handed to the 322 bytes below, and they do three things: compute each relationship’s one cost, J; put half of it on each of its two ends; and add to every person what they carry for the moment that passed. Every cost in the field, every share and every amount carried, and the cost and carried totals in the counter at the edge of your screen, come from them.

They are written directly as WebAssembly bytes, the machine code of the virtual machine built into every modern browser, with no compiler and no library. Your browser runs exactly these bytes.

00 61 73 6d 01 00 00 00 01 08 01 60 03 7f 7f 7c 01 7c 03 02 01 00 05 03 01 00 01 07 0e 02 03 6d 65 6d 02 00 04 73 74 65 70 00 00 0a 94 02 01 91 02 02 04 7f 04 7c 20 00 41 05 74 21 05 41 00 21 03 02 40 03 40 20 03 20 01 4f 0d 01 20 05 20 03 41 04 74 6a 44 00 00 00 00 00 00 00 00 39 03 00 20 03 41 01 6a 21 03 0c 00 0b 0b 41 00 21 03 02 40 03 40 20 03 20 00 4f 0d 01 20 03 41 05 74 21 04 20 04 2b 03 00 20 04 2b 03 08 a3 21 07 20 07 44 00 00 00 00 00 00 f0 3f 20 07 a3 a0 44 00 00 00 00 00 00 e0 3f a2 44 00 00 00 00 00 00 f0 3f a1 21 08 20 04 20 08 39 03 18 20 09 20 08 a0 21 09 20 08 44 00 00 00 00 00 00 e0 3f a2 21 0a 20 05 20 04 28 02 10 41 04 74 6a 22 06 20 06 2b 03 00 20 0a a0 39 03 00 20 05 20 04 28 02 14 41 04 74 6a 22 06 20 06 2b 03 00 20 0a a0 39 03 00 20 03 41 01 6a 21 03 0c 00 0b 0b 41 00 21 03 02 40 03 40 20 03 20 01 4f 0d 01 20 05 20 03 41 04 74 6a 22 06 20 06 2b 03 08 20 06 2b 03 00 20 02 a2 a0 39 03 08 20 03 41 01 6a 21 03 0c 00 0b 0b 20 09 0b
The one costHalf on each endAn open wrong keeps costingThe frame that hands over each relationship and person

The one cost

008120 04local.get base
00832b 03 00f64.load offset=0
008620 04local.get base
00882b 03 08f64.load offset=8
008ba3f64.div
008c21 07local.set x
x = a ÷ b: the ratio of the two sides
008e20 07local.get x
009044 00 00 00 00 00 00 f0 3ff64.const 1
009920 07local.get x
009ba3f64.div
009ca0f64.add
009d44 00 00 00 00 00 00 e0 3ff64.const 0.5
00a6a2f64.mul
00a744 00 00 00 00 00 00 f0 3ff64.const 1
00b0a1f64.sub
00b121 08local.set c
c = ½(x + 1/x) − 1: the one cost
00b320 04local.get base
00b520 08local.get c
00b739 03 18f64.store offset=24
keep c with the relationship
00ba20 09local.get total
00bc20 08local.get c
00bea0f64.add
00bf21 09local.set total
add c to the cost in the record

Half on each end

00c120 08local.get c
00c344 00 00 00 00 00 00 e0 3ff64.const 0.5
00cca2f64.mul
00cd21 0alocal.set h
h = c × ½
00cf20 05local.get P0
00d120 04local.get base
00d328 02 10i32.load offset=16
00d641 04i32.const 4
00d874i32.shl
00d96ai32.add
00da22 06local.tee addr
00dc20 06local.get addr
00de2b 03 00f64.load offset=0
00e120 0alocal.get h
00e3a0f64.add
00e439 03 00f64.store offset=0
add h to the first end
00e720 05local.get P0
00e920 04local.get base
00eb28 02 14i32.load offset=20
00ee41 04i32.const 4
00f074i32.shl
00f16ai32.add
00f222 06local.tee addr
00f420 06local.get addr
00f62b 03 00f64.load offset=0
00f920 0alocal.get h
00fba0f64.add
00fc39 03 00f64.store offset=0
add h to the second end

An open wrong keeps costing

011920 05local.get P0
011b20 03local.get k
011d41 04i32.const 4
011f74i32.shl
01206ai32.add
012122 06local.tee addr
012320 06local.get addr
01252b 03 08f64.load offset=8
012820 06local.get addr
012a2b 03 00f64.load offset=0
012d20 02local.get dt
012fa2f64.mul
0130a0f64.add
013139 03 08f64.store offset=8
carried += share × time passed: an open wrong costs again at every moment

Tick 0000 Open 0 Cost now Now 0.000 Carried 0.00