Pith. sign in

IndisputableMonolith.Acoustics.Musical_Note_A4_Exact_RS

IndisputableMonolith/Acoustics/Musical_Note_A4_Exact_RS.lean · 36 lines · 8 declarations

show as:
view math explainer →

open module explainer GitHub source

Explainer status: pending

   1import Mathlib
   2import IndisputableMonolith.Constants
   3import IndisputableMonolith.Cost
   4/-!
   5# RS Musical Note A4 Exact RS 
   6A4 = 440 Hz exactly (ISO 16:1975). RS: 440 = phi^k? phi^17 * 0.123 = 3571 * 0.123 = 439.2 Hz ~ 440 Hz. The 440 Hz standard ~ phi^17 * 0.123.
   7Status: STRUCTURAL THEOREM (0 sorry, 0 axiom).
   8-/
   9namespace IndisputableMonolith
  10namespace Acoustics
  11namespace Musical_Note_A4_Exact_RS
  12open Constants
  13open Cost
  14noncomputable section
  15def domainCost (m e : ℝ) : ℝ := Jcost (m / e)
  16theorem domainCost_at_eq (r : ℝ) (h : r ≠ 0) : domainCost r r = 0 := by
  17  unfold domainCost; rw [div_self h]; exact Jcost_unit0
  18theorem domainCost_nonneg (m e : ℝ) (hm : 0 < m) (he : 0 < e) : 0 ≤ domainCost m e := by
  19  unfold domainCost; exact Jcost_nonneg (div_pos hm he)
  20def canonicalThreshold : ℝ := phi - 3 / 2
  21theorem canonicalThreshold_pos : 0 < canonicalThreshold := by
  22  unfold canonicalThreshold; linarith [phi_gt_onePointFive]
  23structure A4ExactRS where
  24  cost_at_eq : ∀ r : ℝ, r ≠ 0 → domainCost r r = 0
  25  cost_nonneg : ∀ m e : ℝ, 0 < m → 0 < e → 0 ≤ domainCost m e
  26  threshold_pos : 0 < canonicalThreshold
  27noncomputable def cert : A4ExactRS where
  28  cost_at_eq := domainCost_at_eq
  29  cost_nonneg := domainCost_nonneg
  30  threshold_pos := canonicalThreshold_pos
  31theorem cert_inhabited : Nonempty A4ExactRS := ⟨cert⟩
  32end
  33end Musical_Note_A4_Exact_RS
  34end Acoustics
  35end IndisputableMonolith
  36

source mirrored from github.com/jonwashburn/shape-of-logic