File size: 3,851 Bytes
4a56cd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import OAI.Probability.ContinuumTransition.GrandPartition

namespace OAI

section
open scoped Topology BigOperators ENNReal
open Filter MeasureTheory Set
namespace ContinuumTemperature

theorem log_factorial_lower (N : β„•) :
    (N : ℝ) * Real.log N - N ≀ Real.log (N.factorial : ℝ) := by
  by_cases hN : N = 0
  Β· simp [hN]
  Β· have hpos : (0 : ℝ) < N := Nat.cast_pos.mpr (Nat.pos_of_ne_zero hN)
    have hf : (0 : ℝ) < N.factorial := Nat.cast_pos.mpr (Nat.factorial_pos N)
    have hh := Real.pow_div_factorial_le_exp (N : ℝ) hpos.le N
    have hl := Real.log_le_log (div_pos (pow_pos hpos _) hf) hh
    rw [Real.log_div (pow_ne_zero _ hpos.ne') hf.ne', Real.log_pow, Real.log_exp] at hl
    linarith

theorem boltzmann_le_of_energy_lower {Ο† : ℝ β†’ ℝ} {Ξ² E : ℝ} (hΞ² : 0 ≀ Ξ²)
    {N : β„•} {x : Fin N β†’ Space} (hE : (E : EReal) ≀ energy Ο† x) :
    boltzmann Ο† Ξ² x ≀ Real.exp (-Ξ² * E) := by
  unfold boltzmann
  split_ifs with htop
  Β· exact (Real.exp_pos _).le
  Β· apply Real.exp_le_exp.mpr
    have he := EReal.toReal_le_toReal hE (EReal.coe_ne_bot _) htop
    simp only [EReal.toReal_coe] at he
    exact mul_le_mul_of_nonpos_left he (neg_nonpos.mpr hΞ²)

theorem partition_le_factorial_of_energy_bound {Ο† : ℝ β†’ ℝ}
    (hΟ† : Measurable (radialPotential Ο†)) {Ξ² B L E : ℝ} (hΞ² : 0 ≀ Ξ²) (hL : 0 ≀ L)
    (hstable : βˆ€ (N : β„•) (x : Fin N β†’ Space),
      ((-B * (N : ℝ) : ℝ) : EReal) ≀ energy Ο† x) {N : β„•} (hN : N β‰  0)
    (hE : βˆ€ x : Fin N β†’ Space, (βˆ€ i, x i ∈ cube L) β†’ (E : EReal) ≀ energy Ο† x) :
    partition Ο† Ξ² L N ≀ (L ^ 3) ^ N / (N.factorial : ℝ) * Real.exp (-Ξ² * E) := by
  let S := {x : Fin N β†’ Space | βˆ€ i, x i ∈ cube L}
  have hS : MeasurableSet S := (isCompact_configurations L N).measurableSet
  have hfin : IsFiniteMeasure (volume.restrict S) :=
    ⟨by simpa only [Measure.restrict_apply_univ] using
      (isCompact_configurations L N).measure_lt_top (μ := volume)⟩
  have hh : βˆ€α΅ x βˆ‚volume.restrict S, boltzmann Ο† Ξ² x ≀ Real.exp (-Ξ² * E) := by
    apply (ae_restrict_iff' hS).mpr
    exact ae_of_all _ (fun x hx => boltzmann_le_of_energy_lower hΞ² (hE x hx))
  have hi := integral_mono_ae (integrableOn_boltzmann hφ hβ hstable L N)
    (integrable_const (Real.exp (-Ξ² * E))) hh
  have hc : (∫ x in S, Real.exp (-β * E)) = L ^ (3 * N) * Real.exp (-β * E) := by
    rw [setIntegral_const, Measure.real, volume_configurations, ENNReal.toReal_pow,
      ENNReal.toReal_ofReal hL, smul_eq_mul]
  rw [hc] at hi
  unfold partition
  rw [ite_eq_right hN]
  calc
    _ ≀ (1 / (N.factorial : ℝ)) * (L ^ (3 * N) * Real.exp (-Ξ² * E)) :=
      mul_le_mul_of_nonneg_left hi (by positivity)
    _ = _ := by rw [pow_mul]; ring

theorem neg_log_partition_lower {Ο† : ℝ β†’ ℝ}
    (hΟ† : Measurable (radialPotential Ο†)) {Ξ² B L E : ℝ} (hΞ² : 0 ≀ Ξ²) (hL : 0 < L)
    (hstable : βˆ€ (N : β„•) (x : Fin N β†’ Space),
      ((-B * (N : ℝ) : ℝ) : EReal) ≀ energy Ο† x) {N : β„•} (hN : N β‰  0)
    (hE : βˆ€ x : Fin N β†’ Space, (βˆ€ i, x i ∈ cube L) β†’ (E : EReal) ≀ energy Ο† x) :
    Ξ² * E + N * Real.log ((N : ℝ) / L ^ 3) - N ≀ -Real.log (partition Ο† Ξ² L N) := by
  have hnpos : (0 : ℝ) < N := Nat.cast_pos.mpr (Nat.pos_of_ne_zero hN)
  have hfp : (0 : ℝ) < N.factorial := Nat.cast_pos.mpr (Nat.factorial_pos N)
  have hLp : 0 < L ^ 3 := pow_pos hL _
  have hZ := partition_pos hφ hβ hL hstable N
  have hu := partition_le_factorial_of_energy_bound hφ hβ hL.le hstable hN hE
  have hl := Real.log_le_log hZ hu
  rw [Real.log_mul (div_pos (pow_pos hLp _) hfp).ne' (Real.exp_pos _).ne',
    Real.log_div (pow_pos hLp _).ne' hfp.ne', Real.log_pow, Real.log_exp] at hl
  rw [Real.log_div hnpos.ne' hLp.ne']
  have hf := log_factorial_lower N
  nlinarith

end ContinuumTemperature
end

end OAI