@@ -42,14 +42,22 @@ open_locale topological_space
42
42
43
43
namespace asymptotics
44
44
45
- variables {α : Type *} {β : Type *} {γ : Type *} {δ : Type *}
45
+ variables {α : Type *} {β : Type *} {γ : Type *} {δ : Type *} {𝕜 : Type *} {𝕜' : Type *}
46
46
47
47
section
48
48
variables [has_norm β] [has_norm γ] [has_norm δ]
49
49
50
+ /-- The Landau notation `is_O f g l` where `f` and `g` are two functions on a type `α` and `l` is
51
+ a filter on `α`, means that eventually for `l`, `∥f∥` is bounded by a constant multiple of `∥g∥`.
52
+ In other words, `∥f∥ / ∥g∥` is eventually bounded, modulo division by zero issues that are avoided
53
+ by this definition. -/
50
54
def is_O (f : α → β) (g : α → γ) (l : filter α) : Prop :=
51
55
∃ c > 0 , { x | ∥ f x ∥ ≤ c * ∥ g x ∥ } ∈ l
52
56
57
+ /-- The Landau notation `is_o f g l` where `f` and `g` are two functions on a type `α` and `l` is
58
+ a filter on `α`, means that eventually for `l`, `∥f∥` is bounded by an arbitrarily small constant
59
+ multiple of `∥g∥`. In other words, `∥f∥ / ∥g∥` tends to `0` along `l`, modulo division by zero
60
+ issues that are avoided by this definition. -/
53
61
def is_o (f : α → β) (g : α → γ) (l : filter α) : Prop :=
54
62
∀ c > 0 , { x | ∥ f x ∥ ≤ c * ∥ g x ∥ } ∈ l
55
63
@@ -450,12 +458,12 @@ end
450
458
end
451
459
452
460
section
453
- variables [has_norm β] [normed_field γ ]
461
+ variables [has_norm β] [normed_field 𝕜 ]
454
462
455
463
open normed_field
456
464
457
465
theorem is_O_const_one (c : β) (l : filter α) :
458
- is_O (λ x : α, c) (λ x, (1 : γ )) l :=
466
+ is_O (λ x : α, c) (λ x, (1 : 𝕜 )) l :=
459
467
begin
460
468
rw is_O_iff,
461
469
refine ⟨∥c∥, _⟩,
467
475
end
468
476
469
477
section
470
- variables [normed_field β ] [normed_group γ]
478
+ variables [normed_field 𝕜 ] [normed_group γ]
471
479
472
- theorem is_O_const_mul_left {f : α → β } {g : α → γ} {l : filter α} (h : is_O f g l) (c : β ) :
480
+ theorem is_O_const_mul_left {f : α → 𝕜 } {g : α → γ} {l : filter α} (h : is_O f g l) (c : 𝕜 ) :
473
481
is_O (λ x, c * f x) g l :=
474
482
begin
475
483
cases classical.em (c = 0 ) with h'' h'',
@@ -484,7 +492,7 @@ theorem is_O_const_mul_left {f : α → β} {g : α → γ} {l : filter α} (h :
484
492
exact mul_le_mul_of_nonneg_left h₀ (norm_nonneg _)
485
493
end
486
494
487
- theorem is_O_const_mul_left_iff {f : α → β } {g : α → γ} {l : filter α} {c : β } (hc : c ≠ 0 ) :
495
+ theorem is_O_const_mul_left_iff {f : α → 𝕜 } {g : α → γ} {l : filter α} {c : 𝕜 } (hc : c ≠ 0 ) :
488
496
is_O (λ x, c * f x) g l ↔ is_O f g l :=
489
497
begin
490
498
split,
@@ -494,8 +502,7 @@ begin
494
502
intro h, apply is_O_const_mul_left h
495
503
end
496
504
497
- theorem is_o_const_mul_left {f : α → β} {g : α → γ} {l : filter α}
498
- (h : is_o f g l) (c : β) :
505
+ theorem is_o_const_mul_left {f : α → 𝕜} {g : α → γ} {l : filter α} (h : is_o f g l) (c : 𝕜) :
499
506
is_o (λ x, c * f x) g l :=
500
507
begin
501
508
cases classical.em (c = 0 ) with h'' h'',
@@ -509,7 +516,7 @@ begin
509
516
rw [←mul_assoc, mul_div_cancel' _ cne0]
510
517
end
511
518
512
- theorem is_o_const_mul_left_iff {f : α → β } {g : α → γ} {l : filter α} {c : β } (hc : c ≠ 0 ) :
519
+ theorem is_o_const_mul_left_iff {f : α → 𝕜 } {g : α → γ} {l : filter α} {c : 𝕜 } (hc : c ≠ 0 ) :
513
520
is_o (λ x, c * f x) g l ↔ is_o f g l :=
514
521
begin
515
522
split,
523
530
end
524
531
525
532
section
526
- variables [normed_group β] [normed_field γ ]
533
+ variables [normed_group β] [normed_field 𝕜 ]
527
534
528
- theorem is_O_of_is_O_const_mul_right {f : α → β} {g : α → γ } {l : filter α} {c : γ }
535
+ theorem is_O_of_is_O_const_mul_right {f : α → β} {g : α → 𝕜 } {l : filter α} {c : 𝕜 }
529
536
(h : is_O f (λ x, c * g x) l) :
530
537
is_O f g l :=
531
538
begin
@@ -539,7 +546,7 @@ begin
539
546
rw [normed_field.norm_mul, mul_assoc]
540
547
end
541
548
542
- theorem is_O_const_mul_right_iff {f : α → β} {g : α → γ } {l : filter α} {c : γ } (hc : c ≠ 0 ) :
549
+ theorem is_O_const_mul_right_iff {f : α → β} {g : α → 𝕜 } {l : filter α} {c : 𝕜 } (hc : c ≠ 0 ) :
543
550
is_O f (λ x, c * g x) l ↔ is_O f g l :=
544
551
begin
545
552
split,
@@ -550,7 +557,7 @@ begin
550
557
convert h, ext, rw [←mul_assoc, inv_mul_cancel hc, one_mul]
551
558
end
552
559
553
- theorem is_o_of_is_o_const_mul_right {f : α → β} {g : α → γ } {l : filter α} {c : γ }
560
+ theorem is_o_of_is_o_const_mul_right {f : α → β} {g : α → 𝕜 } {l : filter α} {c : 𝕜 }
554
561
(h : is_o f (λ x, c * g x) l) :
555
562
is_o f g l :=
556
563
begin
@@ -563,7 +570,7 @@ begin
563
570
ext x, rw [normed_field.norm_mul, ←mul_assoc, div_mul_cancel _ cne0]
564
571
end
565
572
566
- theorem is_o_const_mul_right {f : α → β} {g : α → γ } {l : filter α} {c : γ } (hc : c ≠ 0 ) :
573
+ theorem is_o_const_mul_right {f : α → β} {g : α → 𝕜 } {l : filter α} {c : 𝕜 } (hc : c ≠ 0 ) :
567
574
is_o f (λ x, c * g x) l ↔ is_o f g l :=
568
575
begin
569
576
split,
@@ -575,7 +582,7 @@ begin
575
582
end
576
583
577
584
theorem is_o_one_iff {f : α → β} {l : filter α} :
578
- is_o f (λ x, (1 : γ )) l ↔ tendsto f l (𝓝 0 ) :=
585
+ is_o f (λ x, (1 : 𝕜 )) l ↔ tendsto f l (𝓝 0 ) :=
579
586
begin
580
587
rw [normed_group.tendsto_nhds_zero, is_o], split,
581
588
{ intros h e epos,
@@ -589,7 +596,7 @@ begin
589
596
end
590
597
591
598
theorem is_O_one_of_tendsto {f : α → β} {l : filter α} {y : β}
592
- (h : tendsto f l (𝓝 y)) : is_O f (λ x, (1 : γ )) l :=
599
+ (h : tendsto f l (𝓝 y)) : is_O f (λ x, (1 : 𝕜 )) l :=
593
600
begin
594
601
have Iy : ∥y∥ < ∥y∥ + 1 := lt_add_one _,
595
602
refine ⟨∥y∥ + 1 , lt_of_le_of_lt (norm_nonneg _) Iy, _⟩,
@@ -616,9 +623,9 @@ h₁.to_is_O.trans_tendsto
616
623
end
617
624
618
625
section
619
- variables [normed_field β ] [normed_field γ ]
626
+ variables [normed_field 𝕜 ] [normed_field 𝕜' ]
620
627
621
- theorem is_O_mul {f₁ f₂ : α → β } {g₁ g₂ : α → γ } {l : filter α}
628
+ theorem is_O_mul {f₁ f₂ : α → 𝕜 } {g₁ g₂ : α → 𝕜' } {l : filter α}
622
629
(h₁ : is_O f₁ g₁ l) (h₂ : is_O f₂ g₂ l) :
623
630
is_O (λ x, f₁ x * f₂ x) (λ x, g₁ x * g₂ x) l :=
624
631
begin
@@ -631,7 +638,7 @@ begin
631
638
exact mul_le_mul hx₁ hx₂ (norm_nonneg _) (mul_nonneg (le_of_lt c₁pos) (norm_nonneg _))
632
639
end
633
640
634
- theorem is_o_mul_left {f₁ f₂ : α → β } {g₁ g₂ : α → γ } {l : filter α}
641
+ theorem is_o_mul_left {f₁ f₂ : α → 𝕜 } {g₁ g₂ : α → 𝕜' } {l : filter α}
635
642
(h₁ : is_O f₁ g₁ l) (h₂ : is_o f₂ g₂ l) :
636
643
is_o (λ x, f₁ x * f₂ x) (λ x, g₁ x * g₂ x) l :=
637
644
begin
@@ -645,12 +652,12 @@ begin
645
652
rw [mul_left_comm]
646
653
end
647
654
648
- theorem is_o_mul_right {f₁ f₂ : α → β } {g₁ g₂ : α → γ } {l : filter α}
655
+ theorem is_o_mul_right {f₁ f₂ : α → 𝕜 } {g₁ g₂ : α → 𝕜' } {l : filter α}
649
656
(h₁ : is_o f₁ g₁ l) (h₂ : is_O f₂ g₂ l) :
650
657
is_o (λ x, f₁ x * f₂ x) (λ x, g₁ x * g₂ x) l :=
651
658
by convert is_o_mul_left h₂ h₁; simp only [mul_comm]
652
659
653
- theorem is_o_mul {f₁ f₂ : α → β } {g₁ g₂ : α → γ } {l : filter α}
660
+ theorem is_o_mul {f₁ f₂ : α → 𝕜 } {g₁ g₂ : α → 𝕜' } {l : filter α}
654
661
(h₁ : is_o f₁ g₁ l) (h₂ : is_o f₂ g₂ l) :
655
662
is_o (λ x, f₁ x * f₂ x) (λ x, g₁ x * g₂ x) l :=
656
663
is_o_mul_left h₁.to_is_O h₂
@@ -663,11 +670,11 @@ scalar multiplication is multiplication.
663
670
-/
664
671
665
672
section
666
- variables {K : Type *} [normed_field K ] [normed_group β] [normed_space K β] [normed_group γ]
673
+ variables [normed_field 𝕜 ] [normed_group β] [normed_space 𝕜 β] [normed_group γ]
667
674
668
675
set_option class.instance_max_depth 43
669
676
670
- theorem is_O_const_smul_left {f : α → β} {g : α → γ} {l : filter α} (h : is_O f g l) (c : K ) :
677
+ theorem is_O_const_smul_left {f : α → β} {g : α → γ} {l : filter α} (h : is_O f g l) (c : 𝕜 ) :
671
678
is_O (λ x, c • f x) g l :=
672
679
begin
673
680
rw [←is_O_norm_left], simp only [norm_smul],
@@ -676,15 +683,15 @@ begin
676
683
apply h
677
684
end
678
685
679
- theorem is_O_const_smul_left_iff {f : α → β} {g : α → γ} {l : filter α} {c : K } (hc : c ≠ 0 ) :
686
+ theorem is_O_const_smul_left_iff {f : α → β} {g : α → γ} {l : filter α} {c : 𝕜 } (hc : c ≠ 0 ) :
680
687
is_O (λ x, c • f x) g l ↔ is_O f g l :=
681
688
begin
682
689
have cne0 : ∥c∥ ≠ 0 , from mt (norm_eq_zero _).mp hc,
683
690
rw [←is_O_norm_left], simp only [norm_smul],
684
691
rw [is_O_const_mul_left_iff cne0, is_O_norm_left]
685
692
end
686
693
687
- theorem is_o_const_smul_left {f : α → β} {g : α → γ} {l : filter α} (h : is_o f g l) (c : K ) :
694
+ theorem is_o_const_smul_left {f : α → β} {g : α → γ} {l : filter α} (h : is_o f g l) (c : 𝕜 ) :
688
695
is_o (λ x, c • f x) g l :=
689
696
begin
690
697
rw [←is_o_norm_left], simp only [norm_smul],
@@ -693,7 +700,7 @@ begin
693
700
apply h
694
701
end
695
702
696
- theorem is_o_const_smul_left_iff {f : α → β} {g : α → γ} {l : filter α} {c : K } (hc : c ≠ 0 ) :
703
+ theorem is_o_const_smul_left_iff {f : α → β} {g : α → γ} {l : filter α} {c : 𝕜 } (hc : c ≠ 0 ) :
697
704
is_o (λ x, c • f x) g l ↔ is_o f g l :=
698
705
begin
699
706
have cne0 : ∥c∥ ≠ 0 , from mt (norm_eq_zero _).mp hc,
@@ -704,19 +711,19 @@ end
704
711
end
705
712
706
713
section
707
- variables {K : Type *} [normed_group β] [normed_field K ] [normed_group γ] [normed_space K γ]
714
+ variables [normed_group β] [normed_field 𝕜 ] [normed_group γ] [normed_space 𝕜 γ]
708
715
709
716
set_option class.instance_max_depth 43
710
717
711
- theorem is_O_const_smul_right {f : α → β} {g : α → γ} {l : filter α} {c : K } (hc : c ≠ 0 ) :
718
+ theorem is_O_const_smul_right {f : α → β} {g : α → γ} {l : filter α} {c : 𝕜 } (hc : c ≠ 0 ) :
712
719
is_O f (λ x, c • g x) l ↔ is_O f g l :=
713
720
begin
714
721
have cne0 : ∥c∥ ≠ 0 , from mt (norm_eq_zero _).mp hc,
715
722
rw [←is_O_norm_right], simp only [norm_smul],
716
723
rw [is_O_const_mul_right_iff cne0, is_O_norm_right]
717
724
end
718
725
719
- theorem is_o_const_smul_right {f : α → β} {g : α → γ} {l : filter α} {c : K } (hc : c ≠ 0 ) :
726
+ theorem is_o_const_smul_right {f : α → β} {g : α → γ} {l : filter α} {c : 𝕜 } (hc : c ≠ 0 ) :
720
727
is_o f (λ x, c • g x) l ↔ is_o f g l :=
721
728
begin
722
729
have cne0 : ∥c∥ ≠ 0 , from mt (norm_eq_zero _).mp hc,
@@ -727,12 +734,12 @@ end
727
734
end
728
735
729
736
section
730
- variables {K : Type *} [normed_field K ] [normed_group β] [normed_space K β]
731
- [normed_group γ] [normed_space K γ]
737
+ variables [normed_field 𝕜 ] [normed_group β] [normed_space 𝕜 β]
738
+ [normed_group γ] [normed_space 𝕜 γ]
732
739
733
740
set_option class.instance_max_depth 43
734
741
735
- theorem is_O_smul {k : α → K } {f : α → β} {g : α → γ} {l : filter α} (h : is_O f g l) :
742
+ theorem is_O_smul {k : α → 𝕜 } {f : α → β} {g : α → γ} {l : filter α} (h : is_O f g l) :
736
743
is_O (λ x, k x • f x) (λ x, k x • g x) l :=
737
744
begin
738
745
rw [←is_O_norm_left, ←is_O_norm_right], simp only [norm_smul],
@@ -741,7 +748,7 @@ begin
741
748
exact h
742
749
end
743
750
744
- theorem is_o_smul {k : α → K } {f : α → β} {g : α → γ} {l : filter α} (h : is_o f g l) :
751
+ theorem is_o_smul {k : α → 𝕜 } {f : α → β} {g : α → γ} {l : filter α} (h : is_o f g l) :
745
752
is_o (λ x, k x • f x) (λ x, k x • g x) l :=
746
753
begin
747
754
rw [←is_o_norm_left, ←is_o_norm_right], simp only [norm_smul],
@@ -753,13 +760,13 @@ end
753
760
end
754
761
755
762
section
756
- variables [normed_field β ]
763
+ variables [normed_field 𝕜 ]
757
764
758
- theorem tendsto_nhds_zero_of_is_o {f g : α → β } {l : filter α} (h : is_o f g l) :
765
+ theorem tendsto_nhds_zero_of_is_o {f g : α → 𝕜 } {l : filter α} (h : is_o f g l) :
759
766
tendsto (λ x, f x / (g x)) l (𝓝 0 ) :=
760
767
have eq₁ : is_o (λ x, f x / g x) (λ x, g x / g x) l,
761
768
from is_o_mul_right h (is_O_refl _ _),
762
- have eq₂ : is_O (λ x, g x / g x) (λ x, (1 : β )) l,
769
+ have eq₂ : is_O (λ x, g x / g x) (λ x, (1 : 𝕜 )) l,
763
770
begin
764
771
use [1 , zero_lt_one],
765
772
filter_upwards [univ_mem_sets], simp,
@@ -769,10 +776,10 @@ have eq₂ : is_O (λ x, g x / g x) (λ x, (1 : β)) l,
769
776
end ,
770
777
is_o_one_iff.mp (eq₁.trans_is_O eq₂)
771
778
772
- private theorem is_o_of_tendsto {f g : α → β } {l : filter α}
779
+ private theorem is_o_of_tendsto {f g : α → 𝕜 } {l : filter α}
773
780
(hgf : ∀ x, g x = 0 → f x = 0 ) (h : tendsto (λ x, f x / (g x)) l (𝓝 0 )) :
774
781
is_o f g l :=
775
- have eq₁ : is_o (λ x, f x / (g x)) (λ x, (1 : β )) l,
782
+ have eq₁ : is_o (λ x, f x / (g x)) (λ x, (1 : 𝕜 )) l,
776
783
from is_o_one_iff.mpr h,
777
784
have eq₂ : is_o (λ x, f x / g x * g x) g l,
778
785
by convert is_o_mul_right eq₁ (is_O_refl _ _); simp,
@@ -787,11 +794,27 @@ have eq₃ : is_O f (λ x, f x / g x * g x) l,
787
794
end ,
788
795
eq₃.trans_is_o eq₂
789
796
790
- theorem is_o_iff_tendsto {f g : α → β } {l : filter α}
797
+ theorem is_o_iff_tendsto {f g : α → 𝕜 } {l : filter α}
791
798
(hgf : ∀ x, g x = 0 → f x = 0 ) :
792
799
is_o f g l ↔ tendsto (λ x, f x / (g x)) l (𝓝 0 ) :=
793
800
iff.intro tendsto_nhds_zero_of_is_o (is_o_of_tendsto hgf)
794
801
802
+ theorem is_o_pow_pow {m n : ℕ} (h : m < n) :
803
+ is_o (λ(x : 𝕜), x^n) (λx, x^m) (𝓝 0 ) :=
804
+ begin
805
+ let p := n - m,
806
+ have nmp : n = m + p := (nat.add_sub_cancel' (le_of_lt h)).symm,
807
+ have : (λ(x : 𝕜), x^m) = (λx, x^m * 1 ), by simp,
808
+ simp only [this , pow_add, nmp],
809
+ refine is_o_mul_left (is_O_refl _ _) (is_o_one_iff.2 _),
810
+ convert (continuous_pow p).tendsto (0 : 𝕜),
811
+ exact (zero_pow (nat.sub_pos_of_lt h)).symm
812
+ end
813
+
814
+ theorem is_o_pow_id {n : ℕ} (h : 1 < n) :
815
+ is_o (λ(x : 𝕜), x^n) (λx, x) (𝓝 0 ) :=
816
+ by { convert is_o_pow_pow h, simp }
817
+
795
818
end
796
819
797
820
end asymptotics
0 commit comments