mathematics_in_lean

My solutions for this book

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39
  40. 40
  41. 41
  42. 42
  43. 43
  44. 44
  45. 45
  46. 46
  47. 47
  48. 48
  49. 49
  50. 50
  51. 51
  52. 52
  53. 53
  54. 54
  55. 55
  56. 56
  57. 57
  58. 58
  59. 59
  60. 60
  61. 61
  62. 62
  63. 63
  64. 64
import Mathlib.Tactic
import Mathlib.Analysis.NormedSpace.FiniteDimension
import Mathlib.Analysis.Convolution
import Mathlib.MeasureTheory.Function.Jacobian
import Mathlib.MeasureTheory.Integral.Bochner
import Mathlib.MeasureTheory.Measure.Lebesgue.Basic

open Set Filter

open Topology Filter ENNReal

open MeasureTheory

noncomputable section
variable {α : Type*} [MeasurableSpace α]
variable {μ : Measure α}

section
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace  E] [CompleteSpace E] {f : α  E}

example {f g : α  E} (hf : Integrable f μ) (hg : Integrable g μ) :
     a, f a + g a μ =  a, f a μ +  a, g a μ :=
  integral_add hf hg

example {s : Set α} (c : E) :  x in s, c μ = (μ s).toReal  c :=
  set_integral_const c

open Filter

example {F :   α  E} {f : α  E} (bound : α  ) (hmeas :  n, AEStronglyMeasurable (F n) μ)
    (hint : Integrable bound μ) (hbound :  n,  a μ, F n a  bound a)
    (hlim :  a μ, Tendsto (fun n :   F n a) atTop (𝓝 (f a))) :
    Tendsto (fun n   a, F n a μ) atTop (𝓝 ( a, f a μ)) :=
  tendsto_integral_of_dominated_convergence bound hmeas hint hbound hlim

example {α : Type*} [MeasurableSpace α] {μ : Measure α} [SigmaFinite μ] {β : Type*}
    [MeasurableSpace β] {ν : Measure β} [SigmaFinite ν] (f : α × β  E)
    (hf : Integrable f (μ.prod ν)) :  z, f z  μ.prod ν =  x,  y, f (x, y) ν μ :=
  integral_prod f hf

end

section

open Convolution

variable {𝕜 : Type*} {G : Type*} {E : Type*} {E' : Type*} {F : Type*} [NormedAddCommGroup E]
  [NormedAddCommGroup E'] [NormedAddCommGroup F] [NontriviallyNormedField 𝕜] [NormedSpace 𝕜 E]
  [NormedSpace 𝕜 E'] [NormedSpace 𝕜 F] [MeasurableSpace G] [NormedSpace  F] [CompleteSpace F]
  [Sub G]

example (f : G  E) (g : G  E') (L : E L[𝕜] E' L[𝕜] F) (μ : Measure G) :
    f [L, μ] g = fun x   t, L (f t) (g (x - t)) μ :=
  rfl

end

example {E : Type*} [NormedAddCommGroup E] [NormedSpace  E] [FiniteDimensional  E]
    [MeasurableSpace E] [BorelSpace E] (μ : Measure E) [μ.IsAddHaarMeasure] {F : Type*}
    [NormedAddCommGroup F] [NormedSpace  F] [CompleteSpace F] {s : Set E} {f : E  E}
    {f' : E  E L[] E} (hs : MeasurableSet s)
    (hf :  x : E, x  s  HasFDerivWithinAt f (f' x) s x) (h_inj : InjOn f s) (g : E  F) :
     x in f '' s, g x μ =  x in s, |(f' x).det|  g (f x) μ :=
  integral_image_eq_integral_abs_det_fderiv_smul μ hs hf h_inj g