/
Basic.lean
1300 lines (1039 loc) · 56.4 KB
/
Basic.lean
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/-
Copyright (c) 2018 Patrick Massot. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Patrick Massot, Johannes Hölzl
-/
import Mathlib.Algebra.Algebra.NonUnitalSubalgebra
import Mathlib.Algebra.Algebra.Subalgebra.Basic
import Mathlib.Analysis.Normed.Group.Basic
import Mathlib.GroupTheory.OrderOfElement
import Mathlib.Topology.Instances.NNReal
import Mathlib.Topology.MetricSpace.DilationEquiv
#align_import analysis.normed.field.basic from "leanprover-community/mathlib"@"f06058e64b7e8397234455038f3f8aec83aaba5a"
/-!
# Normed fields
In this file we define (semi)normed rings and fields. We also prove some theorems about these
definitions.
-/
variable {α : Type*} {β : Type*} {γ : Type*} {ι : Type*}
open Filter Metric Bornology
open scoped Topology BigOperators NNReal ENNReal uniformity Pointwise
/-- A non-unital seminormed ring is a not-necessarily-unital ring
endowed with a seminorm which satisfies the inequality `‖x y‖ ≤ ‖x‖ ‖y‖`. -/
class NonUnitalSeminormedRing (α : Type*) extends Norm α, NonUnitalRing α,
PseudoMetricSpace α where
/-- The distance is induced by the norm. -/
dist_eq : ∀ x y, dist x y = norm (x - y)
/-- The norm is submultiplicative. -/
norm_mul : ∀ a b, norm (a * b) ≤ norm a * norm b
#align non_unital_semi_normed_ring NonUnitalSeminormedRing
/-- A seminormed ring is a ring endowed with a seminorm which satisfies the inequality
`‖x y‖ ≤ ‖x‖ ‖y‖`. -/
class SeminormedRing (α : Type*) extends Norm α, Ring α, PseudoMetricSpace α where
/-- The distance is induced by the norm. -/
dist_eq : ∀ x y, dist x y = norm (x - y)
/-- The norm is submultiplicative. -/
norm_mul : ∀ a b, norm (a * b) ≤ norm a * norm b
#align semi_normed_ring SeminormedRing
-- see Note [lower instance priority]
/-- A seminormed ring is a non-unital seminormed ring. -/
instance (priority := 100) SeminormedRing.toNonUnitalSeminormedRing [β : SeminormedRing α] :
NonUnitalSeminormedRing α :=
{ β with }
#align semi_normed_ring.to_non_unital_semi_normed_ring SeminormedRing.toNonUnitalSeminormedRing
/-- A non-unital normed ring is a not-necessarily-unital ring
endowed with a norm which satisfies the inequality `‖x y‖ ≤ ‖x‖ ‖y‖`. -/
class NonUnitalNormedRing (α : Type*) extends Norm α, NonUnitalRing α, MetricSpace α where
/-- The distance is induced by the norm. -/
dist_eq : ∀ x y, dist x y = norm (x - y)
/-- The norm is submultiplicative. -/
norm_mul : ∀ a b, norm (a * b) ≤ norm a * norm b
#align non_unital_normed_ring NonUnitalNormedRing
-- see Note [lower instance priority]
/-- A non-unital normed ring is a non-unital seminormed ring. -/
instance (priority := 100) NonUnitalNormedRing.toNonUnitalSeminormedRing
[β : NonUnitalNormedRing α] : NonUnitalSeminormedRing α :=
{ β with }
#align non_unital_normed_ring.to_non_unital_semi_normed_ring NonUnitalNormedRing.toNonUnitalSeminormedRing
/-- A normed ring is a ring endowed with a norm which satisfies the inequality `‖x y‖ ≤ ‖x‖ ‖y‖`. -/
class NormedRing (α : Type*) extends Norm α, Ring α, MetricSpace α where
/-- The distance is induced by the norm. -/
dist_eq : ∀ x y, dist x y = norm (x - y)
/-- The norm is submultiplicative. -/
norm_mul : ∀ a b, norm (a * b) ≤ norm a * norm b
#align normed_ring NormedRing
/-- A normed division ring is a division ring endowed with a seminorm which satisfies the equality
`‖x y‖ = ‖x‖ ‖y‖`. -/
class NormedDivisionRing (α : Type*) extends Norm α, DivisionRing α, MetricSpace α where
/-- The distance is induced by the norm. -/
dist_eq : ∀ x y, dist x y = norm (x - y)
/-- The norm is multiplicative. -/
norm_mul' : ∀ a b, norm (a * b) = norm a * norm b
#align normed_division_ring NormedDivisionRing
-- see Note [lower instance priority]
/-- A normed division ring is a normed ring. -/
instance (priority := 100) NormedDivisionRing.toNormedRing [β : NormedDivisionRing α] :
NormedRing α :=
{ β with norm_mul := fun a b => (NormedDivisionRing.norm_mul' a b).le }
#align normed_division_ring.to_normed_ring NormedDivisionRing.toNormedRing
-- see Note [lower instance priority]
/-- A normed ring is a seminormed ring. -/
instance (priority := 100) NormedRing.toSeminormedRing [β : NormedRing α] : SeminormedRing α :=
{ β with }
#align normed_ring.to_semi_normed_ring NormedRing.toSeminormedRing
-- see Note [lower instance priority]
/-- A normed ring is a non-unital normed ring. -/
instance (priority := 100) NormedRing.toNonUnitalNormedRing [β : NormedRing α] :
NonUnitalNormedRing α :=
{ β with }
#align normed_ring.to_non_unital_normed_ring NormedRing.toNonUnitalNormedRing
/-- A non-unital seminormed commutative ring is a non-unital commutative ring endowed with a
seminorm which satisfies the inequality `‖x y‖ ≤ ‖x‖ ‖y‖`. -/
class NonUnitalSeminormedCommRing (α : Type*) extends NonUnitalSeminormedRing α where
/-- Multiplication is commutative. -/
mul_comm : ∀ x y : α, x * y = y * x
/-- A non-unital normed commutative ring is a non-unital commutative ring endowed with a
norm which satisfies the inequality `‖x y‖ ≤ ‖x‖ ‖y‖`. -/
class NonUnitalNormedCommRing (α : Type*) extends NonUnitalNormedRing α where
/-- Multiplication is commutative. -/
mul_comm : ∀ x y : α, x * y = y * x
-- see Note [lower instance priority]
/-- A non-unital normed commutative ring is a non-unital seminormed commutative ring. -/
instance (priority := 100) NonUnitalNormedCommRing.toNonUnitalSeminormedCommRing
[β : NonUnitalNormedCommRing α] : NonUnitalSeminormedCommRing α :=
{ β with }
/-- A seminormed commutative ring is a commutative ring endowed with a seminorm which satisfies
the inequality `‖x y‖ ≤ ‖x‖ ‖y‖`. -/
class SeminormedCommRing (α : Type*) extends SeminormedRing α where
/-- Multiplication is commutative. -/
mul_comm : ∀ x y : α, x * y = y * x
#align semi_normed_comm_ring SeminormedCommRing
/-- A normed commutative ring is a commutative ring endowed with a norm which satisfies
the inequality `‖x y‖ ≤ ‖x‖ ‖y‖`. -/
class NormedCommRing (α : Type*) extends NormedRing α where
/-- Multiplication is commutative. -/
mul_comm : ∀ x y : α, x * y = y * x
#align normed_comm_ring NormedCommRing
-- see Note [lower instance priority]
/-- A seminormed commutative ring is a non-unital seminormed commutative ring. -/
instance (priority := 100) SeminormedCommRing.toNonUnitalSeminormedCommRing
[β : SeminormedCommRing α] : NonUnitalSeminormedCommRing α :=
{ β with }
-- see Note [lower instance priority]
/-- A normed commutative ring is a non-unital normed commutative ring. -/
instance (priority := 100) NormedCommRing.toNonUnitalNormedCommRing
[β : NormedCommRing α] : NonUnitalNormedCommRing α :=
{ β with }
-- see Note [lower instance priority]
/-- A normed commutative ring is a seminormed commutative ring. -/
instance (priority := 100) NormedCommRing.toSeminormedCommRing [β : NormedCommRing α] :
SeminormedCommRing α :=
{ β with }
#align normed_comm_ring.to_semi_normed_comm_ring NormedCommRing.toSeminormedCommRing
instance PUnit.normedCommRing : NormedCommRing PUnit :=
{ PUnit.normedAddCommGroup, PUnit.commRing with
norm_mul := fun _ _ => by simp }
/-- A mixin class with the axiom `‖1‖ = 1`. Many `NormedRing`s and all `NormedField`s satisfy this
axiom. -/
class NormOneClass (α : Type*) [Norm α] [One α] : Prop where
/-- The norm of the multiplicative identity is 1. -/
norm_one : ‖(1 : α)‖ = 1
#align norm_one_class NormOneClass
export NormOneClass (norm_one)
attribute [simp] norm_one
@[simp]
theorem nnnorm_one [SeminormedAddCommGroup α] [One α] [NormOneClass α] : ‖(1 : α)‖₊ = 1 :=
NNReal.eq norm_one
#align nnnorm_one nnnorm_one
theorem NormOneClass.nontrivial (α : Type*) [SeminormedAddCommGroup α] [One α] [NormOneClass α] :
Nontrivial α :=
nontrivial_of_ne 0 1 <| ne_of_apply_ne norm <| by simp
#align norm_one_class.nontrivial NormOneClass.nontrivial
-- see Note [lower instance priority]
instance (priority := 100) NonUnitalSeminormedCommRing.toNonUnitalCommRing
[β : NonUnitalSeminormedCommRing α] : NonUnitalCommRing α :=
{ β with }
-- see Note [lower instance priority]
instance (priority := 100) SeminormedCommRing.toCommRing [β : SeminormedCommRing α] : CommRing α :=
{ β with }
#align semi_normed_comm_ring.to_comm_ring SeminormedCommRing.toCommRing
-- see Note [lower instance priority]
instance (priority := 100) NonUnitalNormedRing.toNormedAddCommGroup [β : NonUnitalNormedRing α] :
NormedAddCommGroup α :=
{ β with }
#align non_unital_normed_ring.to_normed_add_comm_group NonUnitalNormedRing.toNormedAddCommGroup
-- see Note [lower instance priority]
instance (priority := 100) NonUnitalSeminormedRing.toSeminormedAddCommGroup
[NonUnitalSeminormedRing α] : SeminormedAddCommGroup α :=
{ ‹NonUnitalSeminormedRing α› with }
#align non_unital_semi_normed_ring.to_seminormed_add_comm_group NonUnitalSeminormedRing.toSeminormedAddCommGroup
instance ULift.normOneClass [SeminormedAddCommGroup α] [One α] [NormOneClass α] :
NormOneClass (ULift α) :=
⟨by simp [ULift.norm_def]⟩
instance Prod.normOneClass [SeminormedAddCommGroup α] [One α] [NormOneClass α]
[SeminormedAddCommGroup β] [One β] [NormOneClass β] : NormOneClass (α × β) :=
⟨by simp [Prod.norm_def]⟩
#align prod.norm_one_class Prod.normOneClass
instance Pi.normOneClass {ι : Type*} {α : ι → Type*} [Nonempty ι] [Fintype ι]
[∀ i, SeminormedAddCommGroup (α i)] [∀ i, One (α i)] [∀ i, NormOneClass (α i)] :
NormOneClass (∀ i, α i) :=
⟨by simp [Pi.norm_def]; exact Finset.sup_const Finset.univ_nonempty 1⟩
#align pi.norm_one_class Pi.normOneClass
instance MulOpposite.normOneClass [SeminormedAddCommGroup α] [One α] [NormOneClass α] :
NormOneClass αᵐᵒᵖ :=
⟨@norm_one α _ _ _⟩
#align mul_opposite.norm_one_class MulOpposite.normOneClass
section NonUnitalSeminormedRing
variable [NonUnitalSeminormedRing α]
theorem norm_mul_le (a b : α) : ‖a * b‖ ≤ ‖a‖ * ‖b‖ :=
NonUnitalSeminormedRing.norm_mul _ _
#align norm_mul_le norm_mul_le
theorem nnnorm_mul_le (a b : α) : ‖a * b‖₊ ≤ ‖a‖₊ * ‖b‖₊ := by
simpa only [← norm_toNNReal, ← Real.toNNReal_mul (norm_nonneg _)] using
Real.toNNReal_mono (norm_mul_le _ _)
#align nnnorm_mul_le nnnorm_mul_le
theorem one_le_norm_one (β) [NormedRing β] [Nontrivial β] : 1 ≤ ‖(1 : β)‖ :=
(le_mul_iff_one_le_left <| norm_pos_iff.mpr (one_ne_zero : (1 : β) ≠ 0)).mp
(by simpa only [mul_one] using norm_mul_le (1 : β) 1)
#align one_le_norm_one one_le_norm_one
theorem one_le_nnnorm_one (β) [NormedRing β] [Nontrivial β] : 1 ≤ ‖(1 : β)‖₊ :=
one_le_norm_one β
#align one_le_nnnorm_one one_le_nnnorm_one
theorem Filter.Tendsto.zero_mul_isBoundedUnder_le {f g : ι → α} {l : Filter ι}
(hf : Tendsto f l (𝓝 0)) (hg : IsBoundedUnder (· ≤ ·) l ((‖·‖) ∘ g)) :
Tendsto (fun x => f x * g x) l (𝓝 0) :=
hf.op_zero_isBoundedUnder_le hg (· * ·) norm_mul_le
#align filter.tendsto.zero_mul_is_bounded_under_le Filter.Tendsto.zero_mul_isBoundedUnder_le
theorem Filter.isBoundedUnder_le_mul_tendsto_zero {f g : ι → α} {l : Filter ι}
(hf : IsBoundedUnder (· ≤ ·) l (norm ∘ f)) (hg : Tendsto g l (𝓝 0)) :
Tendsto (fun x => f x * g x) l (𝓝 0) :=
hg.op_zero_isBoundedUnder_le hf (flip (· * ·)) fun x y =>
(norm_mul_le y x).trans_eq (mul_comm _ _)
#align filter.is_bounded_under_le.mul_tendsto_zero Filter.isBoundedUnder_le_mul_tendsto_zero
/-- In a seminormed ring, the left-multiplication `AddMonoidHom` is bounded. -/
theorem mulLeft_bound (x : α) : ∀ y : α, ‖AddMonoidHom.mulLeft x y‖ ≤ ‖x‖ * ‖y‖ :=
norm_mul_le x
#align mul_left_bound mulLeft_bound
/-- In a seminormed ring, the right-multiplication `AddMonoidHom` is bounded. -/
theorem mulRight_bound (x : α) : ∀ y : α, ‖AddMonoidHom.mulRight x y‖ ≤ ‖x‖ * ‖y‖ := fun y => by
rw [mul_comm]
exact norm_mul_le y x
#align mul_right_bound mulRight_bound
/-- A non-unital subalgebra of a non-unital seminormed ring is also a non-unital seminormed ring,
with the restriction of the norm. -/
instance NonUnitalSubalgebra.nonUnitalSeminormedRing {𝕜 : Type*} [CommRing 𝕜] {E : Type*}
[NonUnitalSeminormedRing E] [Module 𝕜 E] (s : NonUnitalSubalgebra 𝕜 E) :
NonUnitalSeminormedRing s :=
{ s.toSubmodule.seminormedAddCommGroup, s.toNonUnitalRing with
norm_mul := fun a b => norm_mul_le a.1 b.1 }
/-- A non-unital subalgebra of a non-unital normed ring is also a non-unital normed ring, with the
restriction of the norm. -/
instance NonUnitalSubalgebra.nonUnitalNormedRing {𝕜 : Type*} [CommRing 𝕜] {E : Type*}
[NonUnitalNormedRing E] [Module 𝕜 E] (s : NonUnitalSubalgebra 𝕜 E) : NonUnitalNormedRing s :=
{ s.nonUnitalSeminormedRing with
eq_of_dist_eq_zero := eq_of_dist_eq_zero }
instance ULift.nonUnitalSeminormedRing : NonUnitalSeminormedRing (ULift α) :=
{ ULift.seminormedAddCommGroup, ULift.nonUnitalRing with
norm_mul := fun x y => (norm_mul_le x.down y.down : _) }
/-- Non-unital seminormed ring structure on the product of two non-unital seminormed rings,
using the sup norm. -/
instance Prod.nonUnitalSeminormedRing [NonUnitalSeminormedRing β] :
NonUnitalSeminormedRing (α × β) :=
{ seminormedAddCommGroup, instNonUnitalRing with
norm_mul := fun x y =>
calc
‖x * y‖ = ‖(x.1 * y.1, x.2 * y.2)‖ := rfl
_ = max ‖x.1 * y.1‖ ‖x.2 * y.2‖ := rfl
_ ≤ max (‖x.1‖ * ‖y.1‖) (‖x.2‖ * ‖y.2‖) :=
(max_le_max (norm_mul_le x.1 y.1) (norm_mul_le x.2 y.2))
_ = max (‖x.1‖ * ‖y.1‖) (‖y.2‖ * ‖x.2‖) := by simp [mul_comm]
_ ≤ max ‖x.1‖ ‖x.2‖ * max ‖y.2‖ ‖y.1‖ := by
apply max_mul_mul_le_max_mul_max <;> simp [norm_nonneg]
_ = max ‖x.1‖ ‖x.2‖ * max ‖y.1‖ ‖y.2‖ := by simp [max_comm]
_ = ‖x‖ * ‖y‖ := rfl
}
#align prod.non_unital_semi_normed_ring Prod.nonUnitalSeminormedRing
/-- Non-unital seminormed ring structure on the product of finitely many non-unital seminormed
rings, using the sup norm. -/
instance Pi.nonUnitalSeminormedRing {π : ι → Type*} [Fintype ι]
[∀ i, NonUnitalSeminormedRing (π i)] : NonUnitalSeminormedRing (∀ i, π i) :=
{ Pi.seminormedAddCommGroup, Pi.nonUnitalRing with
norm_mul := fun x y =>
NNReal.coe_mono <|
calc
(Finset.univ.sup fun i => ‖x i * y i‖₊) ≤
Finset.univ.sup ((fun i => ‖x i‖₊) * fun i => ‖y i‖₊) :=
Finset.sup_mono_fun fun _ _ => norm_mul_le _ _
_ ≤ (Finset.univ.sup fun i => ‖x i‖₊) * Finset.univ.sup fun i => ‖y i‖₊ :=
Finset.sup_mul_le_mul_sup_of_nonneg _ (fun _ _ => zero_le _) fun _ _ => zero_le _
}
#align pi.non_unital_semi_normed_ring Pi.nonUnitalSeminormedRing
instance MulOpposite.instNonUnitalSeminormedRing : NonUnitalSeminormedRing αᵐᵒᵖ where
__ := instNonUnitalRing
__ := instSeminormedAddCommGroup
norm_mul := MulOpposite.rec' fun x ↦ MulOpposite.rec' fun y ↦
(norm_mul_le y x).trans_eq (mul_comm _ _)
#align mul_opposite.non_unital_semi_normed_ring MulOpposite.instNonUnitalSeminormedRing
end NonUnitalSeminormedRing
section SeminormedRing
variable [SeminormedRing α]
/-- A subalgebra of a seminormed ring is also a seminormed ring, with the restriction of the
norm. -/
instance Subalgebra.seminormedRing {𝕜 : Type*} [CommRing 𝕜] {E : Type*} [SeminormedRing E]
[Algebra 𝕜 E] (s : Subalgebra 𝕜 E) : SeminormedRing s :=
{ s.toSubmodule.seminormedAddCommGroup, s.toRing with
norm_mul := fun a b => norm_mul_le a.1 b.1 }
#align subalgebra.semi_normed_ring Subalgebra.seminormedRing
/-- A subalgebra of a normed ring is also a normed ring, with the restriction of the norm. -/
instance Subalgebra.normedRing {𝕜 : Type*} [CommRing 𝕜] {E : Type*} [NormedRing E]
[Algebra 𝕜 E] (s : Subalgebra 𝕜 E) : NormedRing s :=
{ s.seminormedRing with
eq_of_dist_eq_zero := eq_of_dist_eq_zero }
#align subalgebra.normed_ring Subalgebra.normedRing
theorem Nat.norm_cast_le : ∀ n : ℕ, ‖(n : α)‖ ≤ n * ‖(1 : α)‖
| 0 => by simp
| n + 1 => by
rw [n.cast_succ, n.cast_succ, add_mul, one_mul]
exact norm_add_le_of_le (Nat.norm_cast_le n) le_rfl
#align nat.norm_cast_le Nat.norm_cast_le
theorem List.norm_prod_le' : ∀ {l : List α}, l ≠ [] → ‖l.prod‖ ≤ (l.map norm).prod
| [], h => (h rfl).elim
| [a], _ => by simp
| a::b::l, _ => by
rw [List.map_cons, List.prod_cons, @List.prod_cons _ _ _ ‖a‖]
refine' le_trans (norm_mul_le _ _) (mul_le_mul_of_nonneg_left _ (norm_nonneg _))
exact List.norm_prod_le' (List.cons_ne_nil b l)
#align list.norm_prod_le' List.norm_prod_le'
theorem List.nnnorm_prod_le' {l : List α} (hl : l ≠ []) : ‖l.prod‖₊ ≤ (l.map nnnorm).prod :=
(List.norm_prod_le' hl).trans_eq <| by simp [NNReal.coe_list_prod, List.map_map]
#align list.nnnorm_prod_le' List.nnnorm_prod_le'
theorem List.norm_prod_le [NormOneClass α] : ∀ l : List α, ‖l.prod‖ ≤ (l.map norm).prod
| [] => by simp
| a::l => List.norm_prod_le' (List.cons_ne_nil a l)
#align list.norm_prod_le List.norm_prod_le
theorem List.nnnorm_prod_le [NormOneClass α] (l : List α) : ‖l.prod‖₊ ≤ (l.map nnnorm).prod :=
l.norm_prod_le.trans_eq <| by simp [NNReal.coe_list_prod, List.map_map]
#align list.nnnorm_prod_le List.nnnorm_prod_le
theorem Finset.norm_prod_le' {α : Type*} [NormedCommRing α] (s : Finset ι) (hs : s.Nonempty)
(f : ι → α) : ‖∏ i in s, f i‖ ≤ ∏ i in s, ‖f i‖ := by
rcases s with ⟨⟨l⟩, hl⟩
have : l.map f ≠ [] := by simpa using hs
simpa using List.norm_prod_le' this
#align finset.norm_prod_le' Finset.norm_prod_le'
theorem Finset.nnnorm_prod_le' {α : Type*} [NormedCommRing α] (s : Finset ι) (hs : s.Nonempty)
(f : ι → α) : ‖∏ i in s, f i‖₊ ≤ ∏ i in s, ‖f i‖₊ :=
(s.norm_prod_le' hs f).trans_eq <| by simp [NNReal.coe_prod]
#align finset.nnnorm_prod_le' Finset.nnnorm_prod_le'
theorem Finset.norm_prod_le {α : Type*} [NormedCommRing α] [NormOneClass α] (s : Finset ι)
(f : ι → α) : ‖∏ i in s, f i‖ ≤ ∏ i in s, ‖f i‖ := by
rcases s with ⟨⟨l⟩, hl⟩
simpa using (l.map f).norm_prod_le
#align finset.norm_prod_le Finset.norm_prod_le
theorem Finset.nnnorm_prod_le {α : Type*} [NormedCommRing α] [NormOneClass α] (s : Finset ι)
(f : ι → α) : ‖∏ i in s, f i‖₊ ≤ ∏ i in s, ‖f i‖₊ :=
(s.norm_prod_le f).trans_eq <| by simp [NNReal.coe_prod]
#align finset.nnnorm_prod_le Finset.nnnorm_prod_le
/-- If `α` is a seminormed ring, then `‖a ^ n‖₊ ≤ ‖a‖₊ ^ n` for `n > 0`.
See also `nnnorm_pow_le`. -/
theorem nnnorm_pow_le' (a : α) : ∀ {n : ℕ}, 0 < n → ‖a ^ n‖₊ ≤ ‖a‖₊ ^ n
| 1, _ => by simp only [pow_one, le_rfl]
| n + 2, _ => by
simpa only [pow_succ' _ (n + 1)] using
le_trans (nnnorm_mul_le _ _) (mul_le_mul_left' (nnnorm_pow_le' a n.succ_pos) _)
#align nnnorm_pow_le' nnnorm_pow_le'
/-- If `α` is a seminormed ring with `‖1‖₊ = 1`, then `‖a ^ n‖₊ ≤ ‖a‖₊ ^ n`.
See also `nnnorm_pow_le'`. -/
theorem nnnorm_pow_le [NormOneClass α] (a : α) (n : ℕ) : ‖a ^ n‖₊ ≤ ‖a‖₊ ^ n :=
Nat.recOn n (by simp only [Nat.zero_eq, pow_zero, nnnorm_one, le_rfl])
fun k _hk => nnnorm_pow_le' a k.succ_pos
#align nnnorm_pow_le nnnorm_pow_le
/-- If `α` is a seminormed ring, then `‖a ^ n‖ ≤ ‖a‖ ^ n` for `n > 0`. See also `norm_pow_le`. -/
theorem norm_pow_le' (a : α) {n : ℕ} (h : 0 < n) : ‖a ^ n‖ ≤ ‖a‖ ^ n := by
simpa only [NNReal.coe_pow, coe_nnnorm] using NNReal.coe_mono (nnnorm_pow_le' a h)
#align norm_pow_le' norm_pow_le'
/-- If `α` is a seminormed ring with `‖1‖ = 1`, then `‖a ^ n‖ ≤ ‖a‖ ^ n`.
See also `norm_pow_le'`. -/
theorem norm_pow_le [NormOneClass α] (a : α) (n : ℕ) : ‖a ^ n‖ ≤ ‖a‖ ^ n :=
Nat.recOn n (by simp only [Nat.zero_eq, pow_zero, norm_one, le_rfl])
fun n _hn => norm_pow_le' a n.succ_pos
#align norm_pow_le norm_pow_le
theorem eventually_norm_pow_le (a : α) : ∀ᶠ n : ℕ in atTop, ‖a ^ n‖ ≤ ‖a‖ ^ n :=
eventually_atTop.mpr ⟨1, fun _b h => norm_pow_le' a (Nat.succ_le_iff.mp h)⟩
#align eventually_norm_pow_le eventually_norm_pow_le
instance ULift.seminormedRing : SeminormedRing (ULift α) :=
{ ULift.nonUnitalSeminormedRing, ULift.ring with }
/-- Seminormed ring structure on the product of two seminormed rings,
using the sup norm. -/
instance Prod.seminormedRing [SeminormedRing β] : SeminormedRing (α × β) :=
{ nonUnitalSeminormedRing, instRing with }
#align prod.semi_normed_ring Prod.seminormedRing
/-- Seminormed ring structure on the product of finitely many seminormed rings,
using the sup norm. -/
instance Pi.seminormedRing {π : ι → Type*} [Fintype ι] [∀ i, SeminormedRing (π i)] :
SeminormedRing (∀ i, π i) :=
{ Pi.nonUnitalSeminormedRing, Pi.ring with }
#align pi.semi_normed_ring Pi.seminormedRing
instance MulOpposite.instSeminormedRing : SeminormedRing αᵐᵒᵖ where
__ := instRing
__ := instNonUnitalSeminormedRing
#align mul_opposite.semi_normed_ring MulOpposite.instSeminormedRing
end SeminormedRing
section NonUnitalNormedRing
variable [NonUnitalNormedRing α]
instance ULift.nonUnitalNormedRing : NonUnitalNormedRing (ULift α) :=
{ ULift.nonUnitalSeminormedRing, ULift.normedAddCommGroup with }
/-- Non-unital normed ring structure on the product of two non-unital normed rings,
using the sup norm. -/
instance Prod.nonUnitalNormedRing [NonUnitalNormedRing β] : NonUnitalNormedRing (α × β) :=
{ Prod.nonUnitalSeminormedRing, Prod.normedAddCommGroup with }
#align prod.non_unital_normed_ring Prod.nonUnitalNormedRing
/-- Normed ring structure on the product of finitely many non-unital normed rings, using the sup
norm. -/
instance Pi.nonUnitalNormedRing {π : ι → Type*} [Fintype ι] [∀ i, NonUnitalNormedRing (π i)] :
NonUnitalNormedRing (∀ i, π i) :=
{ Pi.nonUnitalSeminormedRing, Pi.normedAddCommGroup with }
#align pi.non_unital_normed_ring Pi.nonUnitalNormedRing
instance MulOpposite.instNonUnitalNormedRing : NonUnitalNormedRing αᵐᵒᵖ where
__ := instNonUnitalRing
__ := instNonUnitalSeminormedRing
__ := instNormedAddCommGroup
#align mul_opposite.non_unital_normed_ring MulOpposite.instNonUnitalNormedRing
end NonUnitalNormedRing
section NormedRing
variable [NormedRing α]
theorem Units.norm_pos [Nontrivial α] (x : αˣ) : 0 < ‖(x : α)‖ :=
norm_pos_iff.mpr (Units.ne_zero x)
#align units.norm_pos Units.norm_pos
theorem Units.nnnorm_pos [Nontrivial α] (x : αˣ) : 0 < ‖(x : α)‖₊ :=
x.norm_pos
#align units.nnnorm_pos Units.nnnorm_pos
instance ULift.normedRing : NormedRing (ULift α) :=
{ ULift.seminormedRing, ULift.normedAddCommGroup with }
/-- Normed ring structure on the product of two normed rings, using the sup norm. -/
instance Prod.normedRing [NormedRing β] : NormedRing (α × β) :=
{ nonUnitalNormedRing, instRing with }
#align prod.normed_ring Prod.normedRing
/-- Normed ring structure on the product of finitely many normed rings, using the sup norm. -/
instance Pi.normedRing {π : ι → Type*} [Fintype ι] [∀ i, NormedRing (π i)] :
NormedRing (∀ i, π i) :=
{ Pi.seminormedRing, Pi.normedAddCommGroup with }
#align pi.normed_ring Pi.normedRing
instance MulOpposite.instNormedRing : NormedRing αᵐᵒᵖ where
__ := instRing
__ := instSeminormedRing
__ := instNormedAddCommGroup
#align mul_opposite.normed_ring MulOpposite.instNormedRing
end NormedRing
section NonUnitalSeminormedCommRing
variable [NonUnitalSeminormedCommRing α]
instance ULift.nonUnitalSeminormedCommRing : NonUnitalSeminormedCommRing (ULift α) :=
{ ULift.nonUnitalSeminormedRing, ULift.nonUnitalCommRing with }
/-- Non-unital seminormed commutative ring structure on the product of two non-unital seminormed
commutative rings, using the sup norm. -/
instance Prod.nonUnitalSeminormedCommRing [NonUnitalSeminormedCommRing β] :
NonUnitalSeminormedCommRing (α × β) :=
{ nonUnitalSeminormedRing, instNonUnitalCommRing with }
/-- Non-unital seminormed commutative ring structure on the product of finitely many non-unital
seminormed commutative rings, using the sup norm. -/
instance Pi.nonUnitalSeminormedCommRing {π : ι → Type*} [Fintype ι]
[∀ i, NonUnitalSeminormedCommRing (π i)] : NonUnitalSeminormedCommRing (∀ i, π i) :=
{ Pi.nonUnitalSeminormedRing, Pi.nonUnitalCommRing with }
instance MulOpposite.instNonUnitalSeminormedCommRing : NonUnitalSeminormedCommRing αᵐᵒᵖ where
__ := instNonUnitalSeminormedRing
__ := instNonUnitalCommRing
end NonUnitalSeminormedCommRing
section NonUnitalNormedCommRing
variable [NonUnitalNormedCommRing α]
/-- A non-unital subalgebra of a non-unital seminormed commutative ring is also a non-unital
seminormed commutative ring, with the restriction of the norm. -/
instance NonUnitalSubalgebra.nonUnitalSeminormedCommRing {𝕜 : Type*} [CommRing 𝕜] {E : Type*}
[NonUnitalSeminormedCommRing E] [Module 𝕜 E] (s : NonUnitalSubalgebra 𝕜 E) :
NonUnitalSeminormedCommRing s :=
{ s.nonUnitalSeminormedRing, s.toNonUnitalCommRing with }
/-- A non-unital subalgebra of a non-unital normed commutative ring is also a non-unital normed
commutative ring, with the restriction of the norm. -/
instance NonUnitalSubalgebra.nonUnitalNormedCommRing {𝕜 : Type*} [CommRing 𝕜] {E : Type*}
[NonUnitalNormedCommRing E] [Module 𝕜 E] (s : NonUnitalSubalgebra 𝕜 E) :
NonUnitalNormedCommRing s :=
{ s.nonUnitalSeminormedCommRing, s.nonUnitalNormedRing with }
instance ULift.nonUnitalNormedCommRing : NonUnitalNormedCommRing (ULift α) :=
{ ULift.nonUnitalSeminormedCommRing, ULift.normedAddCommGroup with }
/-- Non-unital normed commutative ring structure on the product of two non-unital normed
commutative rings, using the sup norm. -/
instance Prod.nonUnitalNormedCommRing [NonUnitalNormedCommRing β] :
NonUnitalNormedCommRing (α × β) :=
{ Prod.nonUnitalSeminormedCommRing, Prod.normedAddCommGroup with }
/-- Normed commutative ring structure on the product of finitely many non-unital normed
commutative rings, using the sup norm. -/
instance Pi.nonUnitalNormedCommRing {π : ι → Type*} [Fintype ι]
[∀ i, NonUnitalNormedCommRing (π i)] : NonUnitalNormedCommRing (∀ i, π i) :=
{ Pi.nonUnitalSeminormedCommRing, Pi.normedAddCommGroup with }
instance MulOpposite.instNonUnitalNormedCommRing : NonUnitalNormedCommRing αᵐᵒᵖ where
__ := instNonUnitalNormedRing
__ := instNonUnitalSeminormedCommRing
end NonUnitalNormedCommRing
section SeminormedCommRing
variable [SeminormedCommRing α]
instance ULift.seminormedCommRing : SeminormedCommRing (ULift α) :=
{ ULift.nonUnitalSeminormedRing, ULift.commRing with }
/-- Seminormed commutative ring structure on the product of two seminormed commutative rings,
using the sup norm. -/
instance Prod.seminormedCommRing [SeminormedCommRing β] : SeminormedCommRing (α × β) :=
{ Prod.nonUnitalSeminormedCommRing, instCommRing with }
/-- Seminormed commutative ring structure on the product of finitely many seminormed commutative
rings, using the sup norm. -/
instance Pi.seminormedCommRing {π : ι → Type*} [Fintype ι] [∀ i, SeminormedCommRing (π i)] :
SeminormedCommRing (∀ i, π i) :=
{ Pi.nonUnitalSeminormedCommRing, Pi.ring with }
instance MulOpposite.instSeminormedCommRing : SeminormedCommRing αᵐᵒᵖ where
__ := instSeminormedRing
__ := instNonUnitalSeminormedCommRing
end SeminormedCommRing
section NormedCommRing
/-- A subalgebra of a seminormed commutative ring is also a seminormed commutative ring, with the
restriction of the norm. -/
instance Subalgebra.seminormedCommRing {𝕜 : Type*} [CommRing 𝕜] {E : Type*} [SeminormedCommRing E]
[Algebra 𝕜 E] (s : Subalgebra 𝕜 E) : SeminormedCommRing s :=
{ s.seminormedRing, s.toCommRing with }
/-- A subalgebra of a normed commutative ring is also a normed commutative ring, with the
restriction of the norm. -/
instance Subalgebra.normedCommRing {𝕜 : Type*} [CommRing 𝕜] {E : Type*} [NormedCommRing E]
[Algebra 𝕜 E] (s : Subalgebra 𝕜 E) : NormedCommRing s :=
{ s.seminormedCommRing, s.normedRing with }
variable [NormedCommRing α]
instance ULift.normedCommRing : NormedCommRing (ULift α) :=
{ ULift.normedRing (α := α), ULift.seminormedCommRing with }
/-- Normed commutative ring structure on the product of two normed commutative rings, using the sup
norm. -/
instance Prod.normedCommRing [NormedCommRing β] : NormedCommRing (α × β) :=
{ nonUnitalNormedRing, instCommRing with }
/-- Normed commutative ring structure on the product of finitely many normed commutative rings,
using the sup norm. -/
instance Pi.normedCommutativeRing {π : ι → Type*} [Fintype ι] [∀ i, NormedCommRing (π i)] :
NormedCommRing (∀ i, π i) :=
{ Pi.seminormedCommRing, Pi.normedAddCommGroup with }
instance MulOpposite.instNormedCommRing : NormedCommRing αᵐᵒᵖ where
__ := instNormedRing
__ := instSeminormedCommRing
end NormedCommRing
-- see Note [lower instance priority]
instance (priority := 100) semi_normed_ring_top_monoid [NonUnitalSeminormedRing α] :
ContinuousMul α :=
⟨continuous_iff_continuousAt.2 fun x =>
tendsto_iff_norm_sub_tendsto_zero.2 <| by
have : ∀ e : α × α,
‖e.1 * e.2 - x.1 * x.2‖ ≤ ‖e.1‖ * ‖e.2 - x.2‖ + ‖e.1 - x.1‖ * ‖x.2‖ := by
intro e
calc
‖e.1 * e.2 - x.1 * x.2‖ ≤ ‖e.1 * (e.2 - x.2) + (e.1 - x.1) * x.2‖ := by
rw [_root_.mul_sub, _root_.sub_mul, sub_add_sub_cancel]
-- Porting note: `ENNReal.{mul_sub, sub_mul}` should be protected
_ ≤ ‖e.1‖ * ‖e.2 - x.2‖ + ‖e.1 - x.1‖ * ‖x.2‖ :=
norm_add_le_of_le (norm_mul_le _ _) (norm_mul_le _ _)
refine squeeze_zero (fun e => norm_nonneg _) this ?_
convert
((continuous_fst.tendsto x).norm.mul
((continuous_snd.tendsto x).sub tendsto_const_nhds).norm).add
(((continuous_fst.tendsto x).sub tendsto_const_nhds).norm.mul _)
-- Porting note: `show` used to select a goal to work on
rotate_right
show Tendsto _ _ _
exact tendsto_const_nhds
simp⟩
#align semi_normed_ring_top_monoid semi_normed_ring_top_monoid
-- see Note [lower instance priority]
/-- A seminormed ring is a topological ring. -/
instance (priority := 100) semi_normed_top_ring [NonUnitalSeminormedRing α] : TopologicalRing α
where
#align semi_normed_top_ring semi_normed_top_ring
section NormedDivisionRing
variable [NormedDivisionRing α] {a : α}
@[simp]
theorem norm_mul (a b : α) : ‖a * b‖ = ‖a‖ * ‖b‖ :=
NormedDivisionRing.norm_mul' a b
#align norm_mul norm_mul
instance (priority := 900) NormedDivisionRing.to_normOneClass : NormOneClass α :=
⟨mul_left_cancel₀ (mt norm_eq_zero.1 (one_ne_zero' α)) <| by rw [← norm_mul, mul_one, mul_one]⟩
#align normed_division_ring.to_norm_one_class NormedDivisionRing.to_normOneClass
instance isAbsoluteValue_norm : IsAbsoluteValue (norm : α → ℝ)
where
abv_nonneg' := norm_nonneg
abv_eq_zero' := norm_eq_zero
abv_add' := norm_add_le
abv_mul' := norm_mul
#align is_absolute_value_norm isAbsoluteValue_norm
@[simp]
theorem nnnorm_mul (a b : α) : ‖a * b‖₊ = ‖a‖₊ * ‖b‖₊ :=
NNReal.eq <| norm_mul a b
#align nnnorm_mul nnnorm_mul
/-- `norm` as a `MonoidWithZeroHom`. -/
@[simps]
def normHom : α →*₀ ℝ where
toFun := (‖·‖)
map_zero' := norm_zero
map_one' := norm_one
map_mul' := norm_mul
#align norm_hom normHom
/-- `nnnorm` as a `MonoidWithZeroHom`. -/
@[simps]
def nnnormHom : α →*₀ ℝ≥0 where
toFun := (‖·‖₊)
map_zero' := nnnorm_zero
map_one' := nnnorm_one
map_mul' := nnnorm_mul
#align nnnorm_hom nnnormHom
@[simp]
theorem norm_pow (a : α) : ∀ n : ℕ, ‖a ^ n‖ = ‖a‖ ^ n :=
(normHom.toMonoidHom : α →* ℝ).map_pow a
#align norm_pow norm_pow
@[simp]
theorem nnnorm_pow (a : α) (n : ℕ) : ‖a ^ n‖₊ = ‖a‖₊ ^ n :=
(nnnormHom.toMonoidHom : α →* ℝ≥0).map_pow a n
#align nnnorm_pow nnnorm_pow
protected theorem List.norm_prod (l : List α) : ‖l.prod‖ = (l.map norm).prod :=
(normHom.toMonoidHom : α →* ℝ).map_list_prod _
#align list.norm_prod List.norm_prod
protected theorem List.nnnorm_prod (l : List α) : ‖l.prod‖₊ = (l.map nnnorm).prod :=
(nnnormHom.toMonoidHom : α →* ℝ≥0).map_list_prod _
#align list.nnnorm_prod List.nnnorm_prod
@[simp]
theorem norm_div (a b : α) : ‖a / b‖ = ‖a‖ / ‖b‖ :=
map_div₀ (normHom : α →*₀ ℝ) a b
#align norm_div norm_div
@[simp]
theorem nnnorm_div (a b : α) : ‖a / b‖₊ = ‖a‖₊ / ‖b‖₊ :=
map_div₀ (nnnormHom : α →*₀ ℝ≥0) a b
#align nnnorm_div nnnorm_div
@[simp]
theorem norm_inv (a : α) : ‖a⁻¹‖ = ‖a‖⁻¹ :=
map_inv₀ (normHom : α →*₀ ℝ) a
#align norm_inv norm_inv
@[simp]
theorem nnnorm_inv (a : α) : ‖a⁻¹‖₊ = ‖a‖₊⁻¹ :=
NNReal.eq <| by simp
#align nnnorm_inv nnnorm_inv
@[simp]
theorem norm_zpow : ∀ (a : α) (n : ℤ), ‖a ^ n‖ = ‖a‖ ^ n :=
map_zpow₀ (normHom : α →*₀ ℝ)
#align norm_zpow norm_zpow
@[simp]
theorem nnnorm_zpow : ∀ (a : α) (n : ℤ), ‖a ^ n‖₊ = ‖a‖₊ ^ n :=
map_zpow₀ (nnnormHom : α →*₀ ℝ≥0)
#align nnnorm_zpow nnnorm_zpow
theorem dist_inv_inv₀ {z w : α} (hz : z ≠ 0) (hw : w ≠ 0) :
dist z⁻¹ w⁻¹ = dist z w / (‖z‖ * ‖w‖) := by
rw [dist_eq_norm, inv_sub_inv' hz hw, norm_mul, norm_mul, norm_inv, norm_inv, mul_comm ‖z‖⁻¹,
mul_assoc, dist_eq_norm', div_eq_mul_inv, mul_inv]
#align dist_inv_inv₀ dist_inv_inv₀
theorem nndist_inv_inv₀ {z w : α} (hz : z ≠ 0) (hw : w ≠ 0) :
nndist z⁻¹ w⁻¹ = nndist z w / (‖z‖₊ * ‖w‖₊) :=
NNReal.eq <| dist_inv_inv₀ hz hw
#align nndist_inv_inv₀ nndist_inv_inv₀
lemma antilipschitzWith_mul_left {a : α} (ha : a ≠ 0) : AntilipschitzWith (‖a‖₊⁻¹) (a * ·) :=
AntilipschitzWith.of_le_mul_dist fun _ _ ↦ by simp [dist_eq_norm, ← _root_.mul_sub, ha]
lemma antilipschitzWith_mul_right {a : α} (ha : a ≠ 0) : AntilipschitzWith (‖a‖₊⁻¹) (· * a) :=
AntilipschitzWith.of_le_mul_dist fun _ _ ↦ by
simp [dist_eq_norm, ← _root_.sub_mul, ← mul_comm (‖a‖), ha]
/-- Multiplication by a nonzero element `a` on the left
as a `DilationEquiv` of a normed division ring. -/
@[simps!]
def DilationEquiv.mulLeft (a : α) (ha : a ≠ 0) : α ≃ᵈ α where
toEquiv := Equiv.mulLeft₀ a ha
edist_eq' := ⟨‖a‖₊, nnnorm_ne_zero_iff.2 ha, fun x y ↦ by
simp [edist_nndist, nndist_eq_nnnorm, ← mul_sub]⟩
/-- Multiplication by a nonzero element `a` on the right
as a `DilationEquiv` of a normed division ring. -/
@[simps!]
def DilationEquiv.mulRight (a : α) (ha : a ≠ 0) : α ≃ᵈ α where
toEquiv := Equiv.mulRight₀ a ha
edist_eq' := ⟨‖a‖₊, nnnorm_ne_zero_iff.2 ha, fun x y ↦ by
simp [edist_nndist, nndist_eq_nnnorm, ← sub_mul, ← mul_comm (‖a‖₊)]⟩
namespace Filter
@[simp]
lemma comap_mul_left_cobounded {a : α} (ha : a ≠ 0) :
comap (a * ·) (cobounded α) = cobounded α :=
Dilation.comap_cobounded (DilationEquiv.mulLeft a ha)
@[simp]
lemma map_mul_left_cobounded {a : α} (ha : a ≠ 0) :
map (a * ·) (cobounded α) = cobounded α :=
DilationEquiv.map_cobounded (DilationEquiv.mulLeft a ha)
@[simp]
lemma comap_mul_right_cobounded {a : α} (ha : a ≠ 0) :
comap (· * a) (cobounded α) = cobounded α :=
Dilation.comap_cobounded (DilationEquiv.mulRight a ha)
@[simp]
lemma map_mul_right_cobounded {a : α} (ha : a ≠ 0) :
map (· * a) (cobounded α) = cobounded α :=
DilationEquiv.map_cobounded (DilationEquiv.mulRight a ha)
/-- Multiplication on the left by a nonzero element of a normed division ring tends to infinity at
infinity. -/
theorem tendsto_mul_left_cobounded {a : α} (ha : a ≠ 0) :
Tendsto (a * ·) (cobounded α) (cobounded α) :=
(map_mul_left_cobounded ha).le
#align filter.tendsto_mul_left_cobounded Filter.tendsto_mul_left_cobounded
/-- Multiplication on the right by a nonzero element of a normed division ring tends to infinity at
infinity. -/
theorem tendsto_mul_right_cobounded {a : α} (ha : a ≠ 0) :
Tendsto (· * a) (cobounded α) (cobounded α) :=
(map_mul_right_cobounded ha).le
#align filter.tendsto_mul_right_cobounded Filter.tendsto_mul_right_cobounded
@[simp]
lemma inv_cobounded₀ : (cobounded α)⁻¹ = 𝓝[≠] 0 := by
rw [← comap_norm_atTop, ← Filter.comap_inv, ← comap_norm_nhdsWithin_Ioi_zero,
← inv_atTop₀, ← Filter.comap_inv]
simp only [comap_comap, (· ∘ ·), norm_inv]
@[simp]
lemma inv_nhdsWithin_ne_zero : (𝓝[≠] (0 : α))⁻¹ = cobounded α := by
rw [← inv_cobounded₀, inv_inv]
lemma tendsto_inv₀_cobounded' : Tendsto Inv.inv (cobounded α) (𝓝[≠] 0) :=
inv_cobounded₀.le
theorem tendsto_inv₀_cobounded : Tendsto Inv.inv (cobounded α) (𝓝 0) :=
tendsto_inv₀_cobounded'.mono_right inf_le_left
lemma tendsto_inv₀_nhdsWithin_ne_zero : Tendsto Inv.inv (𝓝[≠] 0) (cobounded α) :=
inv_nhdsWithin_ne_zero.le
end Filter
-- see Note [lower instance priority]
instance (priority := 100) NormedDivisionRing.to_hasContinuousInv₀ : HasContinuousInv₀ α := by
refine' ⟨fun r r0 => tendsto_iff_norm_sub_tendsto_zero.2 _⟩
have r0' : 0 < ‖r‖ := norm_pos_iff.2 r0
rcases exists_between r0' with ⟨ε, ε0, εr⟩
have : ∀ᶠ e in 𝓝 r, ‖e⁻¹ - r⁻¹‖ ≤ ‖r - e‖ / ‖r‖ / ε := by
filter_upwards [(isOpen_lt continuous_const continuous_norm).eventually_mem εr] with e he
have e0 : e ≠ 0 := norm_pos_iff.1 (ε0.trans he)
calc
‖e⁻¹ - r⁻¹‖ = ‖r‖⁻¹ * ‖r - e‖ * ‖e‖⁻¹ := by
rw [← norm_inv, ← norm_inv, ← norm_mul, ← norm_mul, _root_.mul_sub, _root_.sub_mul,
mul_assoc _ e, inv_mul_cancel r0, mul_inv_cancel e0, one_mul, mul_one]
-- Porting note: `ENNReal.{mul_sub, sub_mul}` should be `protected`
_ = ‖r - e‖ / ‖r‖ / ‖e‖ := by field_simp [mul_comm]
_ ≤ ‖r - e‖ / ‖r‖ / ε := by gcongr
refine' squeeze_zero' (eventually_of_forall fun _ => norm_nonneg _) this _
refine' (((continuous_const.sub continuous_id).norm.div_const _).div_const _).tendsto' _ _ _
simp
#align normed_division_ring.to_has_continuous_inv₀ NormedDivisionRing.to_hasContinuousInv₀
-- see Note [lower instance priority]
/-- A normed division ring is a topological division ring. -/
instance (priority := 100) NormedDivisionRing.to_topologicalDivisionRing : TopologicalDivisionRing α
where
#align normed_division_ring.to_topological_division_ring NormedDivisionRing.to_topologicalDivisionRing
protected lemma IsOfFinOrder.norm_eq_one (ha : IsOfFinOrder a) : ‖a‖ = 1 :=
((normHom : α →*₀ ℝ).toMonoidHom.isOfFinOrder ha).eq_one $ norm_nonneg _
#align norm_one_of_pow_eq_one IsOfFinOrder.norm_eq_one
example [Monoid β] (φ : β →* α) {x : β} {k : ℕ+} (h : x ^ (k : ℕ) = 1) :
‖φ x‖ = 1 := (φ.isOfFinOrder <| isOfFinOrder_iff_pow_eq_one.2 ⟨_, k.2, h⟩).norm_eq_one
#noalign norm_map_one_of_pow_eq_one
end NormedDivisionRing
/-- A normed field is a field with a norm satisfying ‖x y‖ = ‖x‖ ‖y‖. -/
class NormedField (α : Type*) extends Norm α, Field α, MetricSpace α where
/-- The distance is induced by the norm. -/
dist_eq : ∀ x y, dist x y = norm (x - y)
/-- The norm is multiplicative. -/
norm_mul' : ∀ a b, norm (a * b) = norm a * norm b
#align normed_field NormedField
/-- A nontrivially normed field is a normed field in which there is an element of norm different
from `0` and `1`. This makes it possible to bring any element arbitrarily close to `0` by
multiplication by the powers of any element, and thus to relate algebra and topology. -/
class NontriviallyNormedField (α : Type*) extends NormedField α where
/-- The norm attains a value exceeding 1. -/
non_trivial : ∃ x : α, 1 < ‖x‖
#align nontrivially_normed_field NontriviallyNormedField
/-- A densely normed field is a normed field for which the image of the norm is dense in `ℝ≥0`,
which means it is also nontrivially normed. However, not all nontrivally normed fields are densely
normed; in particular, the `Padic`s exhibit this fact. -/
class DenselyNormedField (α : Type*) extends NormedField α where
/-- The range of the norm is dense in the collection of nonnegative real numbers. -/
lt_norm_lt : ∀ x y : ℝ, 0 ≤ x → x < y → ∃ a : α, x < ‖a‖ ∧ ‖a‖ < y
#align densely_normed_field DenselyNormedField
section NormedField
/-- A densely normed field is always a nontrivially normed field.
See note [lower instance priority]. -/
instance (priority := 100) DenselyNormedField.toNontriviallyNormedField [DenselyNormedField α] :
NontriviallyNormedField α where
non_trivial :=
let ⟨a, h, _⟩ := DenselyNormedField.lt_norm_lt 1 2 zero_le_one one_lt_two
⟨a, h⟩
#align densely_normed_field.to_nontrivially_normed_field DenselyNormedField.toNontriviallyNormedField
variable [NormedField α]
-- see Note [lower instance priority]
instance (priority := 100) NormedField.toNormedDivisionRing : NormedDivisionRing α :=
{ ‹NormedField α› with }
#align normed_field.to_normed_division_ring NormedField.toNormedDivisionRing
-- see Note [lower instance priority]
instance (priority := 100) NormedField.toNormedCommRing : NormedCommRing α :=
{ ‹NormedField α› with norm_mul := fun a b => (norm_mul a b).le }
#align normed_field.to_normed_comm_ring NormedField.toNormedCommRing
@[simp]
theorem norm_prod (s : Finset β) (f : β → α) : ‖∏ b in s, f b‖ = ∏ b in s, ‖f b‖ :=
map_prod normHom.toMonoidHom f s
#align norm_prod norm_prod
@[simp]
theorem nnnorm_prod (s : Finset β) (f : β → α) : ‖∏ b in s, f b‖₊ = ∏ b in s, ‖f b‖₊ :=
map_prod nnnormHom.toMonoidHom f s
#align nnnorm_prod nnnorm_prod
end NormedField
namespace NormedField
section Nontrivially
variable (α) [NontriviallyNormedField α]
theorem exists_one_lt_norm : ∃ x : α, 1 < ‖x‖ :=
‹NontriviallyNormedField α›.non_trivial
#align normed_field.exists_one_lt_norm NormedField.exists_one_lt_norm
theorem exists_lt_norm (r : ℝ) : ∃ x : α, r < ‖x‖ :=
let ⟨w, hw⟩ := exists_one_lt_norm α
let ⟨n, hn⟩ := pow_unbounded_of_one_lt r hw
⟨w ^ n, by rwa [norm_pow]⟩
#align normed_field.exists_lt_norm NormedField.exists_lt_norm
theorem exists_norm_lt {r : ℝ} (hr : 0 < r) : ∃ x : α, 0 < ‖x‖ ∧ ‖x‖ < r :=
let ⟨w, hw⟩ := exists_lt_norm α r⁻¹
⟨w⁻¹, by rwa [← Set.mem_Ioo, norm_inv, ← Set.mem_inv, Set.inv_Ioo_0_left hr]⟩
#align normed_field.exists_norm_lt NormedField.exists_norm_lt
theorem exists_norm_lt_one : ∃ x : α, 0 < ‖x‖ ∧ ‖x‖ < 1 :=
exists_norm_lt α one_pos
#align normed_field.exists_norm_lt_one NormedField.exists_norm_lt_one
variable {α}
@[instance]
theorem punctured_nhds_neBot (x : α) : NeBot (𝓝[≠] x) := by
rw [← mem_closure_iff_nhdsWithin_neBot, Metric.mem_closure_iff]
rintro ε ε0
rcases exists_norm_lt α ε0 with ⟨b, hb0, hbε⟩
refine' ⟨x + b, mt (Set.mem_singleton_iff.trans add_right_eq_self).1 <| norm_pos_iff.1 hb0, _⟩
rwa [dist_comm, dist_eq_norm, add_sub_cancel_left]
#align normed_field.punctured_nhds_ne_bot NormedField.punctured_nhds_neBot
@[instance]
theorem nhdsWithin_isUnit_neBot : NeBot (𝓝[{ x : α | IsUnit x }] 0) := by
simpa only [isUnit_iff_ne_zero] using punctured_nhds_neBot (0 : α)
#align normed_field.nhds_within_is_unit_ne_bot NormedField.nhdsWithin_isUnit_neBot
end Nontrivially
section Densely
variable (α) [DenselyNormedField α]