IndisputableMonolith.Verification.CoshPropertiesCert
IndisputableMonolith/Verification/CoshPropertiesCert.lean · 74 lines · 1 declarations
show as:
view math explainer →
1import Mathlib
2import IndisputableMonolith.Cost.FunctionalEquation
3
4namespace IndisputableMonolith
5namespace Verification
6namespace CoshProperties
7
8open IndisputableMonolith.Cost.FunctionalEquation
9open Real
10
11/-!
12# Cosh Properties Certificate: ODE and Initial Conditions
13
14This certificate packages the verification that cosh is indeed a solution
15to the ODE H'' = H with initial conditions H(0) = 1, H'(0) = 0.
16
17## Key Results
18
191. **cosh(0) = 1**: Initial value condition
202. **sinh(0) = 0**: cosh'(0) = sinh(0) = 0
213. **cosh'' = cosh**: The ODE that cosh satisfies
22
23## Why this matters for the certificate chain
24
25The ODE uniqueness theorem says: if H'' = H with H(0) = 1, H'(0) = 0, then H = cosh.
26
27But we need to verify that cosh actually satisfies these conditions! Otherwise
28the uniqueness theorem would be vacuously true (no solution exists).
29
30This certificate verifies:
31- cosh is a solution (satisfies the ODE)
32- cosh has the right initial conditions
33- Therefore cosh is THE unique solution
34
35## Mathematical Content
36
37From the definitions:
38- cosh t = (exp t + exp(-t)) / 2
39- sinh t = (exp t - exp(-t)) / 2
40
41We verify:
42- cosh(0) = (1 + 1) / 2 = 1
43- sinh(0) = (1 - 1) / 2 = 0
44- cosh' = sinh
45- sinh' = cosh
46- Therefore cosh'' = cosh
47-/
48
49structure CoshPropertiesCert where
50 deriving Repr
51
52/-- Verification predicate: cosh satisfies the ODE with correct initial conditions.
53
54This certifies:
551. cosh(0) = 1 (initial value)
562. cosh'(0) = sinh(0) = 0 (initial derivative)
573. cosh'' = cosh (the ODE) -/
58@[simp] def CoshPropertiesCert.verified (_c : CoshPropertiesCert) : Prop :=
59 -- Initial conditions
60 (Real.cosh 0 = 1 ∧ deriv (fun x => Real.cosh x) 0 = 0) ∧
61 -- ODE: cosh'' = cosh
62 (∀ t : ℝ, deriv (deriv (fun x => Real.cosh x)) t = Real.cosh t)
63
64/-- Top-level theorem: the certificate verifies. -/
65@[simp] theorem CoshPropertiesCert.verified_any (c : CoshPropertiesCert) :
66 CoshPropertiesCert.verified c := by
67 constructor
68 · exact cosh_initials
69 · exact cosh_second_deriv_eq
70
71end CoshProperties
72end Verification
73end IndisputableMonolith
74