5D Library › Dream Motif Bipartite Graphs, Deterministic Oracle Decks and Subconscious Prior Activation · 中文
Chapter 2. Reverse Dreams, Direct Dreams and Day Residue
Two reading rules, one base rate
Traditional dream books allow a dream to come true in two ways: directly (a dream of money means money) or in reverse (a dream of death means long life). The Han scholar Wang Fu listed both “direct” and “reverse” among his ten kinds of dream (Chapter 7). How often does a dream “come true” by chance under each rule? Take a simple world: each day a notable event happens with probability 0.30, good or bad with equal chance, independently of the dream.
Calculation
# Chapter 2. p03: Direct dreams, reverse dreams and the base rate of a
# "dream that came true". A dream is read as good or bad news. Each day a
# notable event happens with probability 0.30, good or bad with equal
# chance, independently of the dream. The interpreter may (a) accept only
# the direct reading, or (b) also the reverse reading ("dreaming of death
# means long life"), and may look for the matching event within k days.
# Also: the expected number of striking matches among a million users.
import math
P_EVENT = 0.30
def p_fulfilled(k, reverse):
per_day = P_EVENT if reverse else P_EVENT / 2
return 1 - (1 - per_day) ** k
def p_signal(k, reverse, hit=0.9):
# a genuine signal is fulfilled with probability `hit` on its own; the
# same chance events that fulfil any dream can fulfil it too, so the two
# routes combine independently: 1 - (1 - hit) * (1 - per_day) ** k
per_day = P_EVENT if reverse else P_EVENT / 2
return 1 - (1 - hit) * (1 - per_day) ** k
def bits(p_true_if_signal, p_true_if_not):
# information (bits) a "fulfilled" verdict carries about whether the
# dream was a real signal, prior 0.5, via mutual information
p1, p0 = p_true_if_signal, p_true_if_not
m = (p1 + p0) / 2
h = lambda q: 0.0 if q in (0.0, 1.0) else \
-q * math.log2(q) - (1 - q) * math.log2(1 - q)
return h(m) - (h(p1) + h(p0)) / 2
if __name__ == "__main__":
print(" window direct only direct or reverse")
for k in (1, 3, 7, 30):
print(" {:3d} d {:9.3f} {:9.3f}".format(
k, p_fulfilled(k, False), p_fulfilled(k, True)))
# a genuine signal fulfils itself with probability 0.9, and chance
# events can fulfil it as well (independent composition, see p_signal)
print(" bits a verdict carries (prior 0.5, signal fulfils 0.9):")
print(" 1-day direct: {:.3f}; 30-day direct or reverse: {:.6f}"
.format(bits(p_signal(1, False), p_fulfilled(1, False)),
bits(p_signal(30, True), p_fulfilled(30, True))))
users, p_strike = 1000000, 1e-4
night = users * p_strike
print(" 1,000,000 users, chance match 1 in 10,000 per night:")
print(" {:,.0f} striking stories a night, {:,.0f} a year".format(
night, night * 365))
print(" P(at least one tonight) = {:.6f}".format(
1 - (1 - p_strike) ** users))
# window direct only direct or reverse
# 1 d 0.150 0.300
# 3 d 0.386 0.657
# 7 d 0.679 0.918
# 30 d 0.992 1.000
# bits a verdict carries (prior 0.5, signal fulfils 0.9):
# 1-day direct: 0.482; 30-day direct or reverse: 0.000007
# 1,000,000 users, chance match 1 in 10,000 per night:
# 100 striking stories a night, 36,500 a year
# P(at least one tonight) = 1.000000With the direct reading only and a one-day window, a dream comes true 0.150 of the time; within a week, 0.679; within a month, 0.992. Allowing the reverse reading doubles the daily chance: 0.300 in one day, 0.918 within a week, 1.000 within a month. A verdict that is certain whatever happens carries no information. Suppose a genuine signal fulfils itself with probability 0.9 and can also be fulfilled by the same chance events as any other dream; the two routes are independent, so it comes true with probability 1 – (1 – 0.9)(1 – daily chance)^k. Then a one-day direct verdict carries 0.482 bits about whether the dream was a signal, while a thirty-day “direct or reverse” verdict carries only 0.000007 bits: signal and chance both come true almost surely, and the verdict can no longer tell them apart. Scale matters too (Diaconis and Mosteller 1989): among 1,000,000 users, a chance match that is one in 10,000 per night yields 100 striking stories every night and 36,500 a year, and the probability that at least one happens tonight is 1.000000.
Day residue, dream lag and the weekly routine
Dreams do borrow from waking life. In diary studies, events of the previous one or two days are incorporated more often (the day-residue effect), and there is a second rise about five to seven days later (the dream-lag effect) (Nielsen et al. 2004). Combine that with a weekly routine, and an innocent mechanism produces “precognition”: a motif borrowed from seven days ago falls on the same weekday as tomorrow, when the routine repeats.
Calculation
# Chapter 2. p04: Day residue, the dream-lag effect and weekly routines.
# 12 kinds of daily event; each kind has 1 to 3 routine weekdays when it
# happens with probability 0.80 (otherwise 0.03). Each night 3 dream
# motifs are drawn: with probability 0.40 a random kind, otherwise an
# event of a past day chosen by lag weights 1:0.30 2:0.20 3:0.08 4:0.06
# 5:0.12 6:0.14 7:0.10 (higher at 1-2 and 5-7 days, the pattern reported
# for day residue and dream lag). A motif "comes true" if its kind
# happens the next day. 3,000 weeks, seed 89.
import random
LAGS = (0.30, 0.20, 0.08, 0.06, 0.12, 0.14, 0.10)
K = 12
def world(rng, routine=True):
days = [set(rng.sample(range(7), rng.choice((1, 2, 3))))
for _ in range(K)]
if routine:
return [[0.80 if d in days[k] else 0.03 for d in range(7)]
for k in range(K)]
mean = [sum(0.80 if d in days[k] else 0.03 for d in range(7)) / 7
for k in range(K)]
return [[mean[k]] * 7 for k in range(K)]
def run(routine, weeks=3000, seed=89):
rng = random.Random(seed)
p = world(rng, routine)
T = 7 * weeks
ev = [[k for k in range(K) if rng.random() < p[k][t % 7]]
for t in range(T)]
hits = {lag: [0, 0] for lag in range(8)}
for t in range(7, T - 1):
for _ in range(3):
if rng.random() < 0.40:
lag, kind = 0, rng.randrange(K)
else:
lag = rng.choices(range(1, 8), LAGS)[0]
day = ev[t - lag + 1]
kind = rng.choice(day) if day else rng.randrange(K)
hits[lag][0] += kind in ev[t + 1]
hits[lag][1] += 1
return hits
def rate(h, keys):
return sum(h[k][0] for k in keys) / sum(h[k][1] for k in keys)
if __name__ == "__main__":
for routine in (True, False):
h = run(routine)
print(" weekly routine: {}".format("yes" if routine else "no"))
print(" next-day hit rate: random motif {:.3f}, residue {:.3f}"
.format(rate(h, [0]), rate(h, range(1, 8))))
print(" by lag: 1-2 days {:.3f}, 3-6 days {:.3f}, 7 days {:.3f}"
.format(rate(h, [1, 2]), rate(h, [3, 4, 5, 6]),
rate(h, [7])))
res = sum(h[k][0] for k in range(1, 8))
print(" share of residue hits from lag 7: {:.3f} (of residue"
" motifs {:.3f})".format(h[7][0] / res, h[7][1] / sum(
h[k][1] for k in range(1, 8))))
# weekly routine: yes
# next-day hit rate: random motif 0.241, residue 0.245
# by lag: 1-2 days 0.179, 3-6 days 0.206, 7 days 0.735
# share of residue hits from lag 7: 0.301 (of residue motifs 0.100)
# weekly routine: no
# next-day hit rate: random motif 0.236, residue 0.272
# by lag: 1-2 days 0.274, 3-6 days 0.270, 7 days 0.274
# share of residue hits from lag 7: 0.102 (of residue motifs 0.102)In a world with weekly routines, random motifs come true the next day 0.241 of the time and residue motifs 0.245, almost the same on average. But by lag the picture splits: residues of the last one or two days come true only 0.179 of the time (routines rarely repeat on consecutive days), residues of three to six days 0.206, and residues of exactly seven days ago 0.735. Seven-day residues are 0.100 of all residue motifs but 0.301 of the residue motifs that come true. Without weekly routines the lag pattern disappears (0.274, 0.270, 0.274); residues still come true slightly more often than random motifs (0.272 against 0.236) simply because frequent events are both remembered and repeated.
Note
What the lag numbers mean. The lag weights in p04 only follow the shape reported by diary studies (a rise at one to two days and at five to seven days); they are not fitted to any data set. The conclusion does not depend on the exact values: whenever dreams borrow from the past and life repeats on a cycle, some dreams will “come true” for that reason alone.
Hypothesis · not established
The author’s interpretation (not yet tested): among dreams that users of a dream app report as “came true”, the share whose matching event recurs on the same weekday is at least twice the share of weekly-recurring events among all events. What would show it wrong: in a diary study pairing dreams with dated events, “came true” dreams are no more tied to weekly-recurring events than other dreams are.
Summary
A reading rule that accepts both direct and reverse fulfilment comes true by chance 0.918 of the time within a week and carries no information. Real day residue and the dream-lag effect, meeting a weekly routine, make seven-day residues come true 0.735 of the time; striking matches are expected wherever life repeats.
References
Fan, Y. (2026). Dream Motif Bipartite Graphs, Deterministic Oracle Decks and Subconscious Prior Activation: REM Semantic Spreading, SHA-256 Fisher-Yates Permutations and Retroactive Coincidence Rates [梦境意象二分图、确定性哈希牌卡与潜意识先验激活] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090233 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).