def
definition
protocolSpec
show as:
view math explainer →
open explainer
Generate a durable explainer page for this declaration.
open lean source
IndisputableMonolith.Foundation.OptionAEmpiricalProtocol on GitHub at line 31.
browse module
All declarations in this module, on Recognition.
explainer page
depends on
used by
formal source
28 deriving DecidableEq, Repr
29
30/-- The empirical protocol associated to a combination. -/
31def protocolSpec (c : CombinationID) : ProtocolSpec where
32 dataset := datasetClass c
33 observable := predictedObservable c
34 failure := failureMode c
35
36/-- A combination is protocol-falsifiable when it has a dataset class, a
37predicted observable, and a failure mode in the registry. -/
38def ProtocolFalsifiable (c : CombinationID) : Prop :=
39 ∃ d : DatasetClass, ∃ o : PredictedObservable, ∃ f : FailureMode,
40 datasetClass c = d ∧ predictedObservable c = o ∧ failureMode c = f
41
42theorem protocolFalsifiable_all (c : CombinationID) :
43 ProtocolFalsifiable c := by
44 unfold ProtocolFalsifiable
45 exact ⟨datasetClass c, predictedObservable c, failureMode c, rfl, rfl, rfl⟩
46
47/-- A concrete protocol record matches a combination when all three fields agree. -/
48def ProtocolMatches (c : CombinationID) (p : ProtocolSpec) : Prop :=
49 p.dataset = datasetClass c ∧
50 p.observable = predictedObservable c ∧
51 p.failure = failureMode c
52
53theorem protocolSpec_matches (c : CombinationID) :
54 ProtocolMatches c (protocolSpec c) := by
55 simp [ProtocolMatches, protocolSpec]
56
57/-- Each implemented combination has a unique empirical protocol record. -/
58theorem uniqueProtocolSpec (c : CombinationID) :
59 ∃! p : ProtocolSpec, ProtocolMatches c p := by
60 refine ⟨protocolSpec c, protocolSpec_matches c, ?_⟩
61 intro p hp