def
definition
radius
show as:
view math explainer →
open explainer
Read the cached plain-language explainer.
open lean source
IndisputableMonolith.Complexity.CellularAutomata on GitHub at line 55.
browse module
All declarations in this module, on Recognition.
explainer page
depends on
used by
-
fr_valence_one -
k_larger_shell_than_li -
li_larger_than_f -
lower_z_more_remaining -
normalizedRadius -
oganesson_full_shell -
radiusProxy -
screeningFactor -
shellNumber -
shellRadiusProxy -
icosahedral_order -
coeff_bound_of_uniformBounds -
ca_k_local -
step -
Window -
row_rydberg_over_rest -
two_pi_not_D3 -
milkyWayData -
cmb_horizon -
ParticleHorizon -
meters_to_Gly -
knet_from_cone_projection -
anita_event_energy -
ea004_certificate -
upgoing_statistically_limited -
udg_surface_brightness -
stepRatio_logSpiral_closed_form -
Coil -
SpiralArray -
Jcost -
phi_is_optimal_compression -
tesla_turbine_master -
TurbineGeometry -
bounceRadius_pos -
echoDelay -
predictedEchoDelay -
predictedRung -
blackHoleEchoesCert -
bounceRadius_two_step -
echoDelay_pos
formal source
52/-! ## Local Update Rules -/
53
54/-- Neighborhood radius for the CA -/
55def radius : ℕ := 1
56
57/-- Local neighborhood: cells at positions i-1, i, i+1 -/
58structure Neighborhood where
59 left : CellState
60 center : CellState
61 right : CellState
62
63/-- Extract neighborhood from tape at position i -/
64noncomputable def extractNeighborhood (tape : Tape) (i : ℤ) : Neighborhood :=
65 { left := tape (i - 1)
66 , center := tape i
67 , right := tape (i + 1) }
68
69/-- The local update rule -/
70def localRule (n : Neighborhood) : CellState :=
71 match n.left, n.center, n.right with
72 -- Signal propagation: Signal moves right
73 | _, .Signal, .Wire => .Signal
74 | _, .Signal, .Blank => .Signal
75 -- Wire carries signal
76 | .Signal, .Wire, _ => .Signal
77 | .Signal, .Blank, _ => .Blank -- Signal consumed
78 -- AND gate: both inputs must be One
79 | .One, .Gate, .One => .One
80 | .One, .Gate, .Zero => .Zero
81 | .Zero, .Gate, .One => .Zero
82 | .Zero, .Gate, .Zero => .Zero
83 -- OR gate: either input is One
84 | .One, .Wire, .One => .One
85 | .One, .Wire, .Zero => .One