abbrev
definition
Stream
show as:
view math explainer →
open explainer
Generate a durable explainer page for this declaration.
open lean source
IndisputableMonolith.Measurement on GitHub at line 17.
browse module
All declarations in this module, on Recognition.
explainer page
depends on
used by
-
VorticityVoxel -
blockSumAligned8 -
Cylinder -
firstBlockSum_eq_Z_on_cylinder -
observeAvg8 -
subBlockSum8 -
sumFirst -
Cylinder -
extendPeriodic8 -
mem_Cylinder_zero -
Stream -
sumFirst -
sumFirst_eq_zero_of_all_false -
sumFirst_eq_Z_on_cylinder -
sumFirst_nonneg -
sumFirst_zero -
blockSumAligned8 -
blockSum_equals_Z_on_cylinder_first -
Cylinder -
extendPeriodic8 -
firstBlockSum_eq_Z_on_cylinder -
observeAvg8 -
Stream -
subBlockSum8 -
sumFirst -
sumFirst_eq_Z_on_cylinder
formal source
14open Classical
15
16/-- Boolean streams as used by the measurement layer. -/
17abbrev Stream := PatternLayer.Stream
18
19/-- Finite windows of length `n`. -/
20abbrev Pattern (n : Nat) := PatternLayer.Pattern n
21
22/-- Integer functional counting ones in a window. -/
23abbrev Z_of_window {n : Nat} (w : Pattern n) : Nat := PatternLayer.Z_of_window w
24
25/-- Cylinder set of streams matching a window. -/
26abbrev Cylinder {n : Nat} (w : Pattern n) : Set Stream := PatternLayer.Cylinder w
27
28/-- Periodic extension of an 8-bit window. -/
29abbrev extendPeriodic8 := PatternLayer.extendPeriodic8
30
31/-- Sum of the first `m` bits of a stream. -/
32abbrev sumFirst (m : Nat) (s : Stream) : Nat := PatternLayer.sumFirst m s
33
34/-- Sum of one 8-tick sub-block starting at index `j * 8`. -/
35abbrev subBlockSum8 (s : Stream) (j : Nat) : Nat := MeasurementLayer.subBlockSum8 s j
36
37/-- Aligned block sum over `k` copies of the 8-tick window. -/
38abbrev blockSumAligned8 (k : Nat) (s : Stream) : Nat := MeasurementLayer.blockSumAligned8 k s
39
40/-- Averaged (per-window) observation over aligned blocks. -/
41abbrev observeAvg8 (k : Nat) (s : Stream) : Nat := MeasurementLayer.observeAvg8 k s
42
43/-- On any stream lying in the cylinder of an 8-bit window, the first block sum equals `Z`. -/
44lemma firstBlockSum_eq_Z_on_cylinder (w : Pattern 8) {s : Stream}
45 (hs : s ∈ Cylinder w) :
46 subBlockSum8 s 0 = Z_of_window w := by
47 simpa [subBlockSum8, Cylinder, Z_of_window]