def
definition
PhiPow
show as:
view math explainer →
open explainer
Read the cached plain-language explainer.
open lean source
IndisputableMonolith.RecogSpec.Scales on GitHub at line 47.
browse module
All declarations in this module, on Recognition.
explainer page
depends on
used by
formal source
44 simp [twoPowZ]
45
46/-- φ-power wrapper. -/
47noncomputable def PhiPow (x : ℝ) : ℝ := Real.exp (Real.log (Constants.phi) * x)
48
49lemma PhiPow_add (x y : ℝ) : PhiPow (x + y) = PhiPow x * PhiPow y := by
50 unfold PhiPow
51 have hx : Real.log (Constants.phi) * (x + y)
52 = Real.log (Constants.phi) * x + Real.log (Constants.phi) * y := by
53 ring
54 simp [hx, Real.exp_add]
55
56lemma PhiPow_sub (x y : ℝ) : PhiPow (x - y) = PhiPow x / PhiPow y := by
57 unfold PhiPow
58 have hx : Real.log (Constants.phi) * (x - y)
59 = Real.log (Constants.phi) * x + Real.log (Constants.phi) * (-y) := by
60 ring
61 calc
62 Real.exp (Real.log (Constants.phi) * (x - y))
63 = Real.exp (Real.log (Constants.phi) * x + Real.log (Constants.phi) * (-y)) := by
64 simp [hx]
65 _ = Real.exp (Real.log (Constants.phi) * x)
66 * Real.exp (Real.log (Constants.phi) * (-y)) := by
67 simp [Real.exp_add]
68 _ = Real.exp (Real.log (Constants.phi) * x)
69 * (Real.exp (Real.log (Constants.phi) * y))⁻¹ := by
70 simp [Real.exp_neg]
71 _ = Real.exp (Real.log (Constants.phi) * x)
72 / Real.exp (Real.log (Constants.phi) * y) := by
73 simp [div_eq_mul_inv]
74
75@[simp] lemma PhiPow_zero : PhiPow 0 = 1 := by
76 unfold PhiPow; simp
77