pith. machine review for the scientific record. sign in
theorem

bigO_mul_subset

proved
show as:
view math explainer →
module
IndisputableMonolith.Relativity.Analysis.Landau
domain
Relativity
line
51 · github
papers citing
none yet

open explainer

Read the cached plain-language explainer.

open lean source

IndisputableMonolith.Relativity.Analysis.Landau on GitHub at line 51.

browse module

All declarations in this module, on Recognition.

explainer page

A cached Ask Recognition explainer exists for this declaration.

open explainer

depends on

formal source

  48    _ = (C₁ + C₂) * |max (|f x|) (|g x|)| := by rw [abs_of_nonneg hmax_nonneg]
  49
  50/-- O(f) · O(g) ⊆ O(f·g). -/
  51theorem bigO_mul_subset (f g : ℝ → ℝ) (a : ℝ) :
  52  ∀ h₁ h₂, IsBigO h₁ f a → IsBigO h₂ g a →
  53    IsBigO (fun x => h₁ x * h₂ x) (fun x => f x * g x) a := by
  54  intro h₁ h₂ hf hg
  55  rcases hf with ⟨C₁, hC₁pos, M₁, hM₁pos, hf⟩
  56  rcases hg with ⟨C₂, hC₂pos, M₂, hM₂pos, hg⟩
  57  refine ⟨C₁ * C₂, by nlinarith, min M₁ M₂, lt_min hM₁pos hM₂pos, ?_⟩
  58  intro x hx
  59  have hx₁ : |x - a| < M₁ := lt_of_lt_of_le hx (min_le_left _ _)
  60  have hx₂ : |x - a| < M₂ := lt_of_lt_of_le hx (min_le_right _ _)
  61  have hf' := hf x hx₁
  62  have hg' := hg x hx₂
  63  calc |h₁ x * h₂ x|
  64      = |h₁ x| * |h₂ x| := abs_mul _ _
  65    _ ≤ (C₁ * |f x|) * (C₂ * |g x|) :=
  66        mul_le_mul hf' hg' (abs_nonneg _) (by linarith [mul_nonneg (le_of_lt hC₁pos) (abs_nonneg (f x))])
  67    _ = (C₁ * C₂) * (|f x| * |g x|) := by ring
  68    _ = (C₁ * C₂) * |f x * g x| := by rw [abs_mul]
  69
  70/-- Scalar multiplication: c · O(f) = O(g) when f = O(g). -/
  71theorem bigO_const_mul (c : ℝ) (f g : ℝ → ℝ) (a : ℝ) :
  72  IsBigO f g a → IsBigO (fun x => c * f x) g a := by
  73  intro hf
  74  rcases hf with ⟨C, hCpos, M, hMpos, hbound⟩
  75  have hCpos' : 0 < (|c| + 1) * C := by
  76    have h1 : 0 < |c| + 1 := by have := abs_nonneg c; linarith
  77    exact mul_pos h1 hCpos
  78  refine ⟨(|c| + 1) * C, hCpos', M, hMpos, ?_⟩
  79  intro x hx
  80  have hx' := hbound x hx
  81  calc |c * f x|