math / data /lean /OAI /Probability /ContinuumTransition /AppendAttraction.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
2.68 kB
import OAI.Probability.ContinuumTransition.MaskedComparison
namespace OAI
section
open scoped BigOperators
open MeasureTheory Set
namespace ContinuumTemperature
def prepend (a : ℝ) (Οƒ : β„• β†’ ℝ) : β„• β†’ ℝ
| 0 => a
| n+1 => Οƒ n
@[simp] theorem prepend_zero (a : ℝ) (Οƒ : β„• β†’ ℝ) : prepend a Οƒ 0 = a := rfl
@[simp] theorem prepend_succ (a : ℝ) (Οƒ : β„• β†’ ℝ) (n : β„•) : prepend a Οƒ (n+1) = Οƒ n := rfl
theorem summable_prepend (a : ℝ) {Οƒ : β„• β†’ ℝ} (hs : Summable Οƒ) : Summable (prepend a Οƒ) := by
exact (summable_nat_add_iff 1).mp hs
theorem tsum_prepend (a : ℝ) {Οƒ : β„• β†’ ℝ} (hs : Summable Οƒ) :
βˆ‘' n, prepend a Οƒ n = a+βˆ‘' n, Οƒ n := by
exact (summable_prepend a hs).tsum_eq_zero_add
theorem prepend_nonneg {a : ℝ} {Οƒ : β„• β†’ ℝ} (ha : 0 ≀ a) (hΟƒ : βˆ€ n, 0 ≀ Οƒ n) :
βˆ€ n, 0 ≀ prepend a Οƒ n
| 0 => ha
| n+1 => hσ n
theorem prepend_ge_one {a : ℝ} {Οƒ : β„• β†’ ℝ} (ha : 1 ≀ a) (hΟƒ : βˆ€ n, 1 ≀ Οƒ n) :
βˆ€ n, 1 ≀ prepend a Οƒ n
| 0 => ha
| n+1 => hσ n
theorem attraction_prepend (t : ℝ) {a S : ℝ} {Οƒ R : β„• β†’ ℝ}
(hΟƒ : βˆ€ n, 0 ≀ Οƒ n) (hR : βˆ€ n, 1 ≀ R n) (hs : Summable Οƒ) (r : ℝ) :
attraction t (prepend a Οƒ) (prepend S R) r = t*a*scaledKernelProfile S r+attraction t Οƒ R r := by
unfold attraction
have he : (fun n => prepend a Οƒ n*scaledKernelProfile (prepend S R n) r) =
prepend (a*scaledKernelProfile S r) (fun n => Οƒ n*scaledKernelProfile (R n) r) := by
funext n; cases n <;> rfl
rw [he, tsum_prepend _ (summable_attraction_terms hσ hR hs r)]
ring
theorem physicalProfile_prepend (t : ℝ) {a S : ℝ} {Οƒ R : β„• β†’ ℝ}
(hΟƒ : βˆ€ n, 0 ≀ Οƒ n) (hR : βˆ€ n, 1 ≀ R n) (hs : Summable Οƒ) (r : ℝ) :
physicalProfile t (prepend a Οƒ) (prepend S R) r = physicalProfile t Οƒ R r-t*a*scaledKernelProfile S r := by
unfold physicalProfile
rw [attraction_prepend t hσ hR hs]
ring
theorem attraction_zero (t : ℝ) (R : β„• β†’ ℝ) (r : ℝ) : attraction t (fun _ => 0) R r = 0 := by
simp [attraction]
theorem cutReference_prepend (t a S : ℝ) {Οƒ R : β„• β†’ ℝ}
(hΟƒ : βˆ€ n, 0 ≀ Οƒ n) (hR : βˆ€ n, 1 ≀ R n) (hs : Summable Οƒ) (q : β„•) (x y : Space) :
cutReference t (prepend 0 Οƒ) (prepend a (fun _ => 0)) (prepend S R) q x y =
blockCut q (fun x y => physicalProfile t Οƒ R β€–x-yβ€–) x y-t*a*scaledKernelProfile S β€–x-yβ€– := by
unfold cutReference
simp only [physicalProfile_prepend t hσ hR hs, mul_zero, zero_mul, sub_zero]
rw [attraction_prepend t (fun _ => le_refl 0) hR (summable_zero), attraction_zero, add_zero]
end ContinuumTemperature
end
end OAI