diff --git a/changelogs/room_versions/newsfragments/1043.clarification b/changelogs/room_versions/newsfragments/1043.clarification new file mode 100644 index 00000000..49e552f4 --- /dev/null +++ b/changelogs/room_versions/newsfragments/1043.clarification @@ -0,0 +1 @@ +Adjust mathematical notation used in the description of state resolution to render better in browsers. \ No newline at end of file diff --git a/content/rooms/fragments/v2-state-res.md b/content/rooms/fragments/v2-state-res.md index b238e1d8..d12f45c3 100644 --- a/content/rooms/fragments/v2-state-res.md +++ b/content/rooms/fragments/v2-state-res.md @@ -2,20 +2,19 @@ toc_hide: true --- -The room state *S*′(*E*) after an event *E* is defined in terms of the -room state *S*(*E*) before *E*, and depends on whether *E* is a state +The room state *S′(E)* after an event *E* is defined in terms of the +room state *S(E)* before *E*, and depends on whether *E* is a state event or a message event: -- If *E* is a message event, then *S*′(*E*) = *S*(*E*). -- If *E* is a state event, then *S*′(*E*) is *S*(*E*), except that its - entry corresponding to *E*'s `event_type` and `state_key` is - replaced by *E*'s `event_id`. +- If *E* is a message event, then *S′(E)* = *S(E)*. +- If *E* is a state event, then *S′(E)* is *S(E)*, except that its + entry corresponding to the `event_type` and `state_key` of *E* is + replaced by the `event_id` of *E*. -The room state *S*(*E*) before *E* is the *resolution* of the set of -states {*S*′(*E*1), *S*′(*E*2), …} consisting of -the states after each of *E*'s `prev_event`s -{*E*1, *E*2, …}, where the resolution of a set of -states is given in the algorithm below. +The room state *S(E)* before *E* is the *resolution* of the set of +states {*S′(E*1*)*, *S′(E*2*)*, …} +after the `prev_event`s {*E*1, *E*2, …} of *E*. +The resolution of a set of states is given in the algorithm below. #### Definitions diff --git a/content/rooms/v1.md b/content/rooms/v1.md index 1519873b..a69e3d5d 100644 --- a/content/rooms/v1.md +++ b/content/rooms/v1.md @@ -66,18 +66,18 @@ This is fixed in the state resolution algorithm introduced in room version 2. {{% /boxes/warning %}} -The room state *S*′(*E*) after an event *E* is defined in terms of the +The room state *S′*(*E*) after an event *E* is defined in terms of the room state *S*(*E*) before *E*, and depends on whether *E* is a state event or a message event: -- If *E* is a message event, then *S*′(*E*) = *S*(*E*). -- If *E* is a state event, then *S*′(*E*) is *S*(*E*), except that its - entry corresponding to *E*'s `event_type` and `state_key` is - replaced by *E*'s `event_id`. +- If *E* is a message event, then *S′(E)* = *S(E)*. +- If *E* is a state event, then *S′(E)* is *S(E)*, except that its + entry corresponding to the `event_type` and `state_key` of *E* is + replaced by the `event_id` of *E*. -The room state *S*(*E*) before *E* is the *resolution* of the set of -states {*S*′(*E*′), *S*′(*E*″), …} consisting of the states after each -of *E*'s `prev_event`s {*E*′, *E*″, …}. +The room state *S(E)* before *E* is the *resolution* of the set of +states {*S′(E′)*, *S′(E″)*, …} after the `prev_events` {*E′*, *E″*, …}. +of *E*. The *resolution* of a set of states is defined as follows. The resolved state is built up in a number of passes; here we use *R* to refer to the