IndisputableMonolith.Measurement.RSNative.Calibration.SingleAnchor
IndisputableMonolith/Measurement/RSNative/Calibration/SingleAnchor.lean · 180 lines · 15 declarations
show as:
view math explainer →
1import Mathlib
2import IndisputableMonolith.Measurement.RSNative.Core
3import IndisputableMonolith.Measurement.RSNative.Calibration.SI
4import IndisputableMonolith.Constants.RSNativeUnits
5
6/-!
7# Single-Anchor SI Calibration (RS-native Measurement Framework)
8
9This module provides a **concrete single-anchor calibration protocol** for reporting
10RS-native measurements in SI without introducing any *fit parameters*.
11
12## Idea
13
14- RS-native theory runs in tick/voxel/coh/act with \(c=1\) and no SI numerals.
15- If one wants SI reporting, one must provide a calibration seam.
16- We choose a **single scalar anchor**: `seconds_per_tick` (τ₀ in seconds).
17
18Then we *derive* the full `ExternalCalibration`:
19
20- meters_per_voxel is fixed by the SI definition of \(c\): 299792458 m/s
21- joules_per_coh is fixed by the SI definition of Planck's constant \(h\) (exact),
22 hence \(\hbar = h/(2\pi)\), together with the RS identity `1 act = 1 coh * 1 tick`
23
24So, **only one empirical scalar** is supplied; everything else is derived or definitional.
25-/
26
27namespace IndisputableMonolith
28namespace Measurement
29namespace RSNative
30namespace Calibration
31namespace SingleAnchor
32
33open IndisputableMonolith.Constants.RSNativeUnits
34open IndisputableMonolith.Measurement.RSNative
35
36noncomputable section
37
38/-! ## SI definitional constants (not fit parameters) -/
39
40/-- SI-definitional speed of light in meters per second (exact). -/
41def c_SI : ℝ := 299792458
42
43lemma c_SI_pos : 0 < c_SI := by
44 norm_num [c_SI]
45
46/-- SI-definitional Planck constant \(h\) (exact, 2019 SI): 6.62607015×10⁻³⁴ J·s.
47
48We write this exactly as a rational: 662607015 / 10^42. -/
49noncomputable def h_SI : ℝ :=
50 (662607015 : ℝ) / ((10 : ℝ) ^ (42 : ℕ))
51
52lemma h_SI_pos : 0 < h_SI := by
53 unfold h_SI
54 have hnum : (0 : ℝ) < (662607015 : ℝ) := by norm_num
55 have hden : (0 : ℝ) < (10 : ℝ) ^ (42 : ℕ) := by
56 exact pow_pos (by norm_num : (0 : ℝ) < 10) 42
57 exact div_pos hnum hden
58
59/-- Reduced Planck constant \(\hbar = h/(2\pi)\) (exact given SI definition of \(h\)). -/
60noncomputable def hbar_SI : ℝ :=
61 h_SI / (2 * Real.pi)
62
63lemma hbar_SI_pos : 0 < hbar_SI := by
64 unfold hbar_SI
65 have hden : (0 : ℝ) < 2 * Real.pi := by
66 have h2 : (0 : ℝ) < 2 := by norm_num
67 exact mul_pos h2 Real.pi_pos
68 exact div_pos h_SI_pos hden
69
70/-! ## Calibration protocol (measurement framework) -/
71
72/-- Single-anchor SI calibration protocol: provide τ₀ in seconds.
73
74This is an *explicit* seam. It does not tune any dimensionless RS predictions;
75it only fixes the SI reporting scale. -/
76def tau0_seconds_protocol : Protocol :=
77 { name := "calibration.single_anchor.tau0_seconds"
78 summary :=
79 "Single-anchor SI calibration. Supply τ0 (seconds per tick) as the only empirical scalar. " ++
80 "Derive meters_per_voxel via SI-defined c=299792458 and derive joules_per_coh via SI-defined h (hbar=h/(2π)) " ++
81 "together with RS identity 1 act = 1 coh * 1 tick. No mass-data fitting; this is a reporting seam only."
82 status := .hypothesis
83 assumptions :=
84 [ "A1: τ0 (one RS tick) corresponds to a stable physical duration that can be measured in SI seconds using a declared lab protocol."
85 , "A2: SI definitional constants (c and h) are treated as exact conventions; they introduce no fit freedom."
86 ]
87 falsifiers :=
88 [ "F1: Two independent anchors for τ0 (e.g. time-first vs length-first) disagree beyond stated uncertainties."
89 , "F2: Under the derived calibration, the SI speed consistency check fails beyond uncertainty."
90 ]
91 }
92
93theorem tau0_seconds_protocol_hygienic : Protocol.hygienic tau0_seconds_protocol := by
94 simp [Protocol.hygienic, tau0_seconds_protocol]
95
96/-! ## Derive the full `ExternalCalibration` from one scalar -/
97
98/-- Build a full `ExternalCalibration` from one scalar: τ₀ in seconds. -/
99noncomputable def externalCalibration_of_tau0_seconds (tau0_s : ℝ) (htau : 0 < tau0_s) :
100 ExternalCalibration :=
101 { seconds_per_tick := tau0_s
102 meters_per_voxel := (c_SI : ℝ) * tau0_s
103 joules_per_coh := hbar_SI / tau0_s
104 seconds_pos := htau
105 meters_pos := mul_pos c_SI_pos htau
106 joules_pos := div_pos hbar_SI_pos htau
107 speed_consistent := by
108 have htau_ne : tau0_s ≠ 0 := ne_of_gt htau
109 -- (c_SI * tau0_s) / tau0_s = 299792458
110 simp [c_SI, htau_ne]
111 }
112
113/-! ## Certificate: one-scalar calibration seam (explicit) -/
114
115/-- A calibration certificate bundling:
1161) the single-anchor protocol
1172) one measured scalar τ₀ in seconds
1183) the derived full `ExternalCalibration` used for SI reporting
119
120Everything beyond τ₀ is derived (or SI-definitional). -/
121structure CalibrationCert where
122 /-- The single empirical scalar: τ₀ in seconds (seconds per tick). -/
123 tau0_seconds : Measurement ℝ
124 /-- Protocol is the canonical single-anchor protocol. -/
125 protocol_ok : tau0_seconds.protocol = tau0_seconds_protocol
126 /-- Positivity: τ₀ must be positive. -/
127 tau0_pos : 0 < tau0_seconds.value
128
129/-- The derived `ExternalCalibration` associated to a certificate. -/
130noncomputable def calibration (cert : CalibrationCert) : ExternalCalibration :=
131 externalCalibration_of_tau0_seconds cert.tau0_seconds.value cert.tau0_pos
132
133theorem calibration_protocol_hygienic (cert : CalibrationCert) :
134 Protocol.hygienic cert.tau0_seconds.protocol := by
135 simpa [cert.protocol_ok] using tau0_seconds_protocol_hygienic
136
137/-! ## Consistency checks (derived, not additional parameters) -/
138
139/-- Under the derived calibration, 1 voxel/tick reports exactly c_SI in m/s. -/
140theorem c_reports_exact (cert : CalibrationCert) :
141 IndisputableMonolith.Constants.RSNativeUnits.to_m_per_s (calibration cert)
142 IndisputableMonolith.Constants.RSNativeUnits.c = c_SI := by
143 -- This follows from the `speed_consistent` field plus `c_in_si`.
144 -- Note: RSNativeUnits.c = 1 (voxel/tick).
145 have := IndisputableMonolith.Constants.RSNativeUnits.c_in_si (calibration cert)
146 simpa [c_SI] using this
147
148/-- Under the derived calibration, 1 act reports \(\hbar\) in SI \(J·s\). -/
149theorem one_act_reports_hbar (cert : CalibrationCert) :
150 IndisputableMonolith.Measurement.RSNative.Calibration.SI.to_joule_seconds
151 (calibration cert) (⟨(1 : ℝ)⟩ : Act) = hbar_SI := by
152 -- Expand definitions and cancel τ0_s.
153 have htau_ne : cert.tau0_seconds.value ≠ 0 := ne_of_gt cert.tau0_pos
154 -- to_joule_seconds uses: (A:ℝ) * (joules_per_coh * seconds_per_tick)
155 simp [IndisputableMonolith.Measurement.RSNative.Calibration.SI.to_joule_seconds,
156 calibration, externalCalibration_of_tau0_seconds, htau_ne, hbar_SI]
157
158/-! ## Convenience constructor (for use in examples/tests) -/
159
160/-- Build a certificate from a chosen τ₀ (seconds per tick).
161
162This is a helper for downstream modules; real usage should supply a `Protocol`d
163measurement record coming from a declared empirical procedure. -/
164def mkCert (tau0_s : ℝ) (htau : 0 < tau0_s) : CalibrationCert :=
165 { tau0_seconds :=
166 { value := tau0_s
167 protocol := tau0_seconds_protocol
168 notes := ["Units: SI seconds per RS tick (single-anchor calibration seam)."] }
169 protocol_ok := rfl
170 tau0_pos := htau
171 }
172
173end
174
175end SingleAnchor
176end Calibration
177end RSNative
178end Measurement
179end IndisputableMonolith
180