def
definition
matchesPhiPeak
show as:
view math explainer →
open explainer
Read the cached plain-language explainer.
open lean source
IndisputableMonolith.Experiments.Protocols on GitHub at line 80.
browse module
All declarations in this module, on Recognition.
explainer page
depends on
used by
formal source
77 min_matches : ℕ := 3
78
79/-- Check if a measured frequency matches any φ^n prediction -/
80noncomputable def matchesPhiPeak (f : ℝ) (tolerance : ℝ) : Bool :=
81 (|f - φ^(-2 : ℤ)| < tolerance) ||
82 (|f - φ^(-1 : ℤ)| < tolerance) ||
83 (|f - 1| < tolerance) ||
84 (|f - φ| < tolerance) ||
85 (|f - φ^(2 : ℤ)| < tolerance) ||
86 (|f - φ^(3 : ℤ)| < tolerance)
87
88/-- The EEG prediction is falsified if too few peaks match -/
89def isEEGFalsified (data : EEGFalsification) : Prop :=
90 (data.measured_peaks.filter (matchesPhiPeak · data.tolerance)).length < data.min_matches
91
92/-! ## Mode Ratio Predictions -/
93
94/-- Consciousness state classification -/
95inductive ConsciousnessState
96 | baseline
97 | flow
98 | analytical
99 | meditation
100 | sleep
101 deriving DecidableEq, Repr
102
103/-- M2/M4 ratio measurement protocol -/
104structure ModeRatioProtocol where
105 /-- States to measure -/
106 states : List ConsciousnessState := [.baseline, .flow, .analytical, .meditation]
107 /-- Number of trials per state -/
108 trials_per_state : ℕ := 20
109 /-- Measurement modality -/
110 modality : String := "EEG_coherence"