inductive
definition
Valence
show as:
view math explainer →
open explainer
Read the cached plain-language explainer.
open lean source
IndisputableMonolith.MusicTheory.Valence on GitHub at line 81.
browse module
All declarations in this module, on Recognition.
explainer page
used by
formal source
78
79/-! ## Valence Classification -/
80
81inductive Valence
82 | positive
83 | negative
84 | neutral
85 deriving DecidableEq, Repr
86
87noncomputable def classifyValence (r : ℝ) (threshold : ℝ) : Valence :=
88 if ledgerSkew r > threshold then .positive
89 else if ledgerSkew r < -threshold then .negative
90 else .neutral
91
92theorem major_is_positive :
93 classifyValence majorThird 0 = .positive := by
94 unfold classifyValence
95 rw [major_third_skew]
96 norm_num
97
98theorem minor_is_positive_but_less :
99 classifyValence minorThird 0 = .positive := by
100 unfold classifyValence
101 rw [minor_third_skew]
102 norm_num
103
104/-! ## Why Music Moves Us
105
106The skew difference between major and minor thirds IS the valence
107difference experienced by the listener. Music literally modulates
108the ledger skew σ, and σ IS hedonic experience. -/
109
110theorem valence_difference :
111 ledgerSkew majorThird - ledgerSkew minorThird = 5 / 60 := by