roseking's picture
Add lean source and binary files (part 95)
b224933 verified
Raw History Blame Contribute Delete
1.97 kB
13
structure System (ι : Type uι) [Fintype ι] where
body · 7 lines
  ratio : ι → ℝ
  offset : ι → ℝ
  weight : ι → ℝ
  ratio_pos : ∀ i, 0 < |ratio i|
  ratio_lt_one : ∀ i, |ratio i| < 1
  weight_pos : ∀ i, 0 < weight i
  weight_sum : ∑ i, weight i = 1
25
def affine (S : System ι) (i : ι) (x : ℝ) : ℝ := S.ratio i * x + S.offset i
27
def wordAffine (S : System ι) : List ι → ℝ × ℝ
body · 3 lines
  | [] => (1, 0)
  | i :: w => (S.ratio i * (S.wordAffine w).1,
      S.ratio i * (S.wordAffine w).2 + S.offset i)
32
def completeMap (S : System ι) {n : ℕ} (w : Fin n → ι) : ℝ × ℝ :=
body · 1 line
  S.wordAffine (List.ofFn w)
35
noncomputable def wordWeight (S : System ι) {n : ℕ} (w : Fin n → ι) : ℝ :=
body · 1 line
  ∏ j, S.weight (w j)
38
noncomputable def mapSupport (S : System ι) (n : ℕ) : Finset (ℝ × ℝ) := by
body · 2 lines
  classical
  exact Finset.univ.image (S.completeMap (n := n))
42
noncomputable def mapMass (S : System ι) (n : ℕ) (g : ℝ × ℝ) : ℝ := by
body · 3 lines
  classical
  exact ∑ w ∈ (Finset.univ : Finset (Fin n → ι)).filter (S.completeMap · = g),
    S.wordWeight w
47
noncomputable def walkEntropy (S : System ι) (n : ℕ) : ℝ :=
body · 1 line
  (∑ g ∈ S.mapSupport n, Real.negMulLog (S.mapMass n g)) / Real.log 2
50
noncomputable def entropyRate (S : System ι) : ℝ :=
body · 1 line
  sInf (Set.range fun n : ℕ => S.walkEntropy (n + 1) / (n + 1 : ℕ))
53
noncomputable def lyapunov (S : System ι) : ℝ :=
body · 1 line
  -(∑ i, S.weight i * (Real.log |S.ratio i| / Real.log 2))
56
def SelfSimilar (S : System ι) (μ : Measure ℝ) : Prop :=
body · 1 line
  μ = ∑ i, ENNReal.ofReal (S.weight i) • μ.map (S.affine i)
59
noncomputable def lowerHausdorffDimension (μ : Measure ℝ) : ℝ≥0∞ :=
body · 1 line
  ⨅ (E : Set ℝ) (_ : MeasurableSet E) (_ : 0 < μ E), dimH E