diff --git a/content/rooms/fragments/v2-state-res.md b/content/rooms/fragments/v2-state-res.md
index e666d7f8..cd73e2ad 100644
--- a/content/rooms/fragments/v2-state-res.md
+++ b/content/rooms/fragments/v2-state-res.md
@@ -82,10 +82,15 @@ selecting, among all the candidate vertices, the smallest vertex using
the above comparison relation.
**Mainline ordering.**
-Given an `m.room.power_levels` event *P*, the *mainline of* *P* is the
-list of events generated by starting with *P* and recursively taking the
-`m.room.power_levels` events from the `auth_events`, ordered such that
-*P* is last. Given another event *e*, the *closest mainline event to*
+Let *P* = *P*0 be an `m.room.power_levels` event.
+Starting with *i* = 0, repeatedly fetch *P**i*+1, the
+`m.room.power_levels` event in the `auth_events` of *Pi*.
+Increment *i* and repeat until *Pi* has no `m.room.power_levels`
+event in its `auth_events`.
+The *mainline of P*0 is the list of events
+ [*P*n , ... , *P*1, *P*0].
+
+Given another event *e*, the *closest mainline event to*
*e* is the first event encountered in the mainline when iteratively
descending through the `m.room.power_levels` events in the `auth_events`
starting at *e*. If no mainline event is encountered when iteratively