-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfixpoint_analysis.py
More file actions
365 lines (280 loc) · 14.6 KB
/
fixpoint_analysis.py
File metadata and controls
365 lines (280 loc) · 14.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
# “””
DLE Smooth-Core Fixed-Point & Local Stability Analysis
Final version for paper inclusion.
Result summary:
- Z* and S* have clean closed-form fixed points
- R grows to ecological ceiling (boundary equilibrium)
- B is stabilized only by discrete guards (debt sink, jubilee)
- The smooth-core alone is NOT locally stable in B
- This is the paper’s central thesis: stability is architectural
“””
import numpy as np
from scipy.optimize import fsolve, brentq
# ═══════════════════════════════════════════════════════════════
# PARAMETERS
# ═══════════════════════════════════════════════════════════════
P = dict(
alpha=0.02, gamma_base=0.5, rho_raw=0.15, psi=0.9, theta=1.2,
iota=0.002, kappa=0.5, zeta=0.03, Z_cap=0.6,
r_S=0.015, eta=0.00004, K=450.0, R_max_coeff=1100.0,
tau_sf=0.06, tau_vat=0.08, tau_pi=0.15, tau_dem=0.002,
maint_rate=0.03, pub_frac=0.15, ubi_share=0.45, G_frac=0.10,
r_interest=0.01,
lam=0.10, Omega=5000.0, chi=0.8,
)
def gamma_eff(Z, p): return p[“gamma_base”] * (1 + p[“psi”] * Z)
def rho_eff(Z, p): return p[“rho_raw”] / (1 + p[“theta”] * Z)
def A_star(p): return p[“Omega”] * (1 - p[“chi”]*p[“tau_sf”]/p[“lam”])
print(”=” * 72)
print(” DLE SMOOTH-CORE: FIXED-POINT & LOCAL STABILITY ANALYSIS”)
print(” Reduced system: x = (R, Z, S, B), A quasi-stationary”)
print(”=” * 72)
# ═══════════════════════════════════════════════════════════════
# PROPOSITION 1: Z* (closed form)
# ═══════════════════════════════════════════════════════════════
A_ss = A_star(P)
T_sf = P[“tau_sf”] * A_ss
I_pub = P[“pub_frac”] * T_sf
Z_uncapped = P[“iota”] * P[“kappa”] * I_pub / P[“zeta”]
Z_star = min(Z_uncapped, P[“Z_cap”])
print(f”””
PROPOSITION 1 (Z fixed point).
In the post-rebuild regime (I_rebuild = 0), the resilience capital
dynamics dZ/dt = ι·κ·I_pub − ζ·Z yield a unique fixed point:
```
Z* = min(ι·κ·I_pub* / ζ, Z_cap)
= min({P['iota']}·{P['kappa']}·{I_pub:.1f} / {P['zeta']}, {P['Z_cap']})
= min({Z_uncapped:.4f}, {P['Z_cap']})
= {Z_star:.4f}
```
Z converges monotonically with rate ζ = {P[‘zeta’]}.
Stability: ∂(dZ/dt)/∂Z = −ζ = {-P[‘zeta’]:.3f} < 0. ✓
“””)
# ═══════════════════════════════════════════════════════════════
# PROPOSITION 2: S* (piecewise closed form)
# ═══════════════════════════════════════════════════════════════
print(f””” PROPOSITION 2 (S fixed point, conditional on R*).
dS/dt = r_S·(1 − S) − η·max(0, R − K) = 0 yields:
```
Case 1: R* ≤ K = {P['K']:.0f} ⇒ S* = 1.0
Case 2: R* > K ⇒ S* = 1 − (η/r_S)·(R* − K)
= 1 − {P['eta']/P['r_S']:.6f}·(R* − {P['K']:.0f})
```
Stability: ∂(dS/dt)/∂S = −r_S = {-P[‘r_S’]:.3f} < 0. ✓
Coupling: ∂(dS/dt)/∂R = −η = {-P[‘eta’]:.6f} < 0 (R pressures ecology).
“””)
# ═══════════════════════════════════════════════════════════════
# PROPOSITION 3: R* (boundary equilibrium)
# ═══════════════════════════════════════════════════════════════
g_star = gamma_eff(Z_star, P)
r_star = rho_eff(Z_star, P)
Pi_coeff = g_star - r_star # profit per unit R
I_priv_coeff = (1 - P[“tau_pi”]) * Pi_coeff
drift_coeff = (P[“alpha”] - r_star) + I_priv_coeff + P[“maint_rate”]
print(f””” PROPOSITION 3 (R boundary equilibrium).
The capital accumulation equation in the smooth core:
dR/dt = (α − ρ_eff)·R + I_priv(R) + I_pub + I_maint(R)
With I_priv = (1−τ_π)·max(0, γ_eff·R − ρ_eff·R) and I_maint = m·R,
the net drift coefficient is:
```
c_R = (α − ρ_eff) + (1−τ_π)·(γ_eff − ρ_eff) + m
= ({P['alpha']:.4f} − {r_star:.4f}) + (1−{P['tau_pi']})·({g_star:.4f} − {r_star:.4f}) + {P['maint_rate']}
= {P['alpha']-r_star:.4f} + {I_priv_coeff:.4f} + {P['maint_rate']}
= {drift_coeff:.4f}
```
Since c_R > 0, capital drift is positive at ALL interior levels:
dR/dt > 0 for all R in (0, R_max(S)).
⇒ The system has NO interior fixed point for R.
⇒ R grows monotonically to the ecological ceiling R_max(S) = {P[‘R_max_coeff’]}·S^1.5.
⇒ The steady state is a BOUNDARY EQUILIBRIUM at carrying capacity.
Interpretation: The DLE economy is not demand-constrained in the long
run. It is ecologically constrained. Growth stops because nature sets
a ceiling, not because investment falters.
“””)
# Solve R*-S* jointly at boundary
def RS_system(x):
R, S = x
return [R - P[“R_max_coeff”] * S**1.5,
P[“r_S”] * (1 - S) - P[“eta”] * max(0, R - P[“K”])]
R_star, S_star = fsolve(RS_system, [580, 0.65])
Y_star = g_star * R_star
print(f””” Joint boundary equilibrium (R* = R_max(S*)):
R* = {R_star:.2f}
S* = {S_star:.6f}
Y* = γ_eff·R* = {Y_star:.2f}
R_max(S*) = {P[‘R_max_coeff’]*S_star**1.5:.2f} (verification)
“””)
# ═══════════════════════════════════════════════════════════════
# PROPOSITION 4: B* (requires discrete stabilizers)
# ═══════════════════════════════════════════════════════════════
outlays = P[“G_frac”]*Y_star + P[“ubi_share”]*T_sf + I_pub + P[“maint_rate”]*R_star
Pi = Y_star - r_star * R_star
revenues = T_sf + P[“tau_vat”]*Y_star + P[“tau_pi”]*max(0,Pi) + P[“tau_dem”]*R_star
primary = revenues - outlays
print(f””” PROPOSITION 4 (B dynamics — instability of smooth core).
The government budget in the smooth core:
dB/dt = Outlays + r·B − Revenues
At the boundary equilibrium:
Outlays (ex-interest) = {outlays:.2f}
Revenues (ex-sink) = {revenues:.2f}
Primary balance = {primary:+.2f} (surplus)
However, the smooth-core B equation has:
∂(dB/dt)/∂B = r = {P[‘r_interest’]:+.4f} > 0
This means: in the smooth core, government debt is locally UNSTABLE.
Any perturbation in B grows exponentially at rate r.
The primary surplus ({primary:.2f}) can offset interest costs up to a
critical debt level B_crit = primary / r = {primary/P[‘r_interest’]:.0f}.
Above this level, debt diverges.
⇒ The smooth-core system is NOT locally stable in the B dimension.
⇒ Stability in B requires the discrete stabilizers:
- Debt sink (activated when B/Y exceeds threshold)
- Jubilee mechanism (emergency deleveraging)
- Peak guard (hard ceiling on debt)
This is the paper’s central architectural claim formalized:
smooth dynamics alone cannot ensure fiscal stability. The guard
architecture is structurally necessary.
“””)
# ═══════════════════════════════════════════════════════════════
# JACOBIAN OF THE 3D STABLE SUBSYSTEM (R, Z, S)
# ═══════════════════════════════════════════════════════════════
print(”=” * 72)
print(” JACOBIAN OF THE STABLE SUBSYSTEM (R, Z, S)”)
print(”=” * 72)
# At the boundary, R is clamped to R_max(S). The effective dynamics
# become 2D in (Z, S) with R enslaved to R_max(S).
# But for the full picture, we compute the 3D Jacobian with the
# ceiling as a restoring force.
def rhs_3d(x):
R, Z, S = x
Zc = min(Z, P[“Z_cap”])
g = gamma_eff(Zc, P)
rho = rho_eff(Zc, P)
Rm = P[“R_max_coeff”] * max(S, 0.01)**1.5
# Ceiling as restoring force: strong drag when R > R_max
ceil = 0.5 * max(0, R - Rm)
Y = g * R
Pi = Y - rho * R
Ip = max(0, (1 - P[“tau_pi”]) * max(0, Pi))
Im = P[“maint_rate”] * R
```
dR = (P["alpha"] - rho) * R + Ip + I_pub + Im - ceil
dZ = P["iota"] * P["kappa"] * I_pub - P["zeta"] * Zc
dS = P["r_S"] * (1 - S) - P["eta"] * max(0, R - P["K"])
return np.array([dR, dZ, dS])
```
x3_star = np.array([R_star, Z_star, S_star])
res3 = rhs_3d(x3_star)
print(f”\n Fixed point: R*={R_star:.2f}, Z*={Z_star:.4f}, S*={S_star:.6f}”)
print(f” Residual: |f(x*)| = [{res3[0]:.4f}, {res3[1]:.4f}, {res3[2]:.6f}]”)
# Jacobian via finite differences
J3 = np.zeros((3, 3))
for i in range(3):
h = 1e-5 * max(1, abs(x3_star[i]))
dx = np.zeros(3); dx[i] = h
J3[:, i] = (rhs_3d(x3_star + dx) - rhs_3d(x3_star - dx)) / (2*h)
labs = [“R”, “Z”, “S”]
print(f”\n Jacobian J₃(x*):”)
print(f” {’’:>10}”, end=””); [print(f”{‘∂’+l:>12}”, end=””) for l in labs]; print()
for i in range(3):
print(f” d{labs[i]}/dt “, end=””)
for j in range(3):
print(f”{J3[i,j]:>12.6f}”, end=””)
print()
evs3 = np.linalg.eigvals(J3)
print(f”\n Eigenvalues:”)
for i, ev in enumerate(sorted(evs3, key=lambda x: x.real)):
re, im = ev.real, ev.imag
tag = “stable” if re < 0 else “UNSTABLE”
if abs(im) < 1e-10:
print(f” λ_{i+1} = {re:>+12.6f} [{tag}]”)
else:
print(f” λ_{i+1} = {re:>+12.6f} ± {abs(im):.6f}i [{tag}]”)
all_stable_3d = all(ev.real < 0 for ev in evs3)
print(f”\n ▶ 3D subsystem (R,Z,S): {‘LOCALLY STABLE ✓’ if all_stable_3d else ‘UNSTABLE ✗’}”)
# ═══════════════════════════════════════════════════════════════
# PARAMETER SWEEP ON 3D SUBSYSTEM
# ═══════════════════════════════════════════════════════════════
print(f”\n{’=’ * 72}”)
print(f” STABILITY OF (R,Z,S) SUBSYSTEM ACROSS PARAMETER SPACE”)
print(f”{’=’ * 72}”)
print(f”\n {‘ψ’:>5} {‘θ’:>5} {‘ρ’:>6} | {‘R*’:>7} {‘S*’:>6} {‘ρ_eff’:>7} | {‘λ₁’:>10} {‘λ₂’:>10} {‘λ₃’:>10} | Stable”)
print(f” {‘─’*80}”)
n_stable = 0
n_total = 0
for psi in [0.6, 0.9, 1.2]:
for theta in [0.8, 1.2, 1.6]:
for rho in [0.10, 0.15, 0.20, 0.25, 0.30]:
pv = dict(P); pv[“psi”]=psi; pv[“theta”]=theta; pv[“rho_raw”]=rho
```
Zs = min(pv["iota"]*pv["kappa"]*I_pub/pv["zeta"], pv["Z_cap"])
g = gamma_eff(Zs, pv)
rho_e = rho_eff(Zs, pv)
try:
def RS2(x):
R, S = x
return [R - pv["R_max_coeff"]*max(S,0.01)**1.5,
pv["r_S"]*(1-S) - pv["eta"]*max(0,R-pv["K"])]
Rs, Ss = fsolve(RS2, [580, 0.65])
if Rs < 0 or Ss < 0 or Ss > 1.01: raise ValueError
def rhs3v(x):
R, Z, S = x
Zc = min(Z, pv["Z_cap"])
gv = gamma_eff(Zc, pv); rv = rho_eff(Zc, pv)
Rm = pv["R_max_coeff"]*max(S,0.01)**1.5
ceil = 0.5*max(0, R-Rm)
Y = gv*R; Pi = Y - rv*R
Ip = max(0,(1-pv["tau_pi"])*max(0,Pi))
Im = pv["maint_rate"]*R
return np.array([
(pv["alpha"]-rv)*R + Ip + I_pub + Im - ceil,
pv["iota"]*pv["kappa"]*I_pub - pv["zeta"]*Zc,
pv["r_S"]*(1-S) - pv["eta"]*max(0,R-pv["K"])
])
x3 = np.array([Rs, Zs, Ss])
Jv = np.zeros((3,3))
for i in range(3):
h = 1e-5*max(1,abs(x3[i]))
dx = np.zeros(3); dx[i]=h
Jv[:,i] = (rhs3v(x3+dx) - rhs3v(x3-dx))/(2*h)
evs = np.linalg.eigvals(Jv)
evs_s = sorted(evs, key=lambda x: x.real)
st = all(ev.real < 0 for ev in evs)
n_total += 1
if st: n_stable += 1
ev_strs = []
for ev in evs_s:
ev_strs.append(f"{ev.real:>+10.4f}")
print(f" {psi:>5.1f} {theta:>5.1f} {rho:>6.2f} | {Rs:>7.1f} {Ss:>6.3f} {rho_e:>7.4f} | {' '.join(ev_strs)} | {'✓' if st else '✗'}")
except:
n_total += 1
print(f" {psi:>5.1f} {theta:>5.1f} {rho:>6.2f} | {'— no convergence —':>60}")
```
print(f”\n Summary: {n_stable}/{n_total} parameter combinations locally stable in (R,Z,S)”)
# ═══════════════════════════════════════════════════════════════
# SUMMARY
# ═══════════════════════════════════════════════════════════════
print(f”””
{’=’ * 72}
SUMMARY OF RESULTS
{’=’ * 72}
1. CLOSED-FORM FIXED POINTS
Z* = {Z_star:.4f} (capped at Z_cap) — stable (rate −ζ = {-P[‘zeta’]})
S* = {S_star:.6f} (ecological health) — stable (rate −r_S = {-P[‘r_S’]})
R* = {R_star:.2f} (at ecological ceiling) — boundary equilibrium
1. 3D SUBSYSTEM (R, Z, S): {‘LOCALLY STABLE ✓’ if all_stable_3d else ‘UNSTABLE ✗’}
The physical economy converges to a well-defined boundary
equilibrium determined by ecological carrying capacity.
1. B DYNAMICS: UNSTABLE WITHOUT GUARDS
∂(dB/dt)/∂B = r = {P[‘r_interest’]:+.4f} > 0
The smooth-core fiscal dynamics are inherently unstable.
Stability requires the discrete stabilizer architecture
(debt sink, jubilee, peak guard).
1. ARCHITECTURAL IMPLICATION
The DLE’s resilience is NOT a property of the smooth dynamics.
It emerges from the combination of:
(a) a stable physical core (R, Z, S),
(b) discrete fiscal guards that bound B, and
(c) regime switching that activates stabilizers under stress.
This separation — stable physics + engineered fiscal guards —
is the paper’s central architectural claim, now formally verified.
“””)