|
137 | 137 |
|
138 | 138 | lemma toLp_apply (x : ∀ i, α i) (i : ι) : toLp p x i = x i := rfl |
139 | 139 |
|
| 140 | +section Single |
| 141 | +variable [DecidableEq ι] |
| 142 | +variable {β} |
| 143 | + |
| 144 | +section Zero |
| 145 | +variable [∀ i, Zero (β i)] |
| 146 | + |
| 147 | +/-- The vector given in `PiLp` by being `a : β i` at coordinate `i : ι` and `0 : β j` at |
| 148 | +all other coordinates `j`. -/ |
| 149 | +def single (i : ι) (a : β i) : PiLp p β := toLp p (Pi.single i a) |
| 150 | + |
| 151 | +@[simp] |
| 152 | +lemma ofLp_single (i : ι) (a : β i) : ofLp (single p i a) = Pi.single i a := rfl |
| 153 | + |
| 154 | +@[simp] |
| 155 | +lemma toLp_single (i : ι) (a : β i) : toLp p (Pi.single i a) = single p i a := rfl |
| 156 | + |
| 157 | +@[simp] |
| 158 | +lemma single_eq_same (i : ι) (a : β i) : single p i a i = a := by |
| 159 | + rw [ofLp_single, Pi.single_eq_same] |
| 160 | + |
| 161 | +@[simp] |
| 162 | +lemma single_eq_of_ne {i i' : ι} (h : i' ≠ i) (a : β i) : single p i a i' = 0 := by |
| 163 | + rw [ofLp_single, Pi.single_eq_of_ne h] |
| 164 | + |
| 165 | +/-- Changing the hypothesis direction in `PiLp.single_eq_of_ne` for for ease of use by simp. -/ |
| 166 | +@[simp] |
| 167 | +lemma single_eq_of_ne' {i i' : ι} (h : i ≠ i') (a : β i) : single p i a i' = 0 := by |
| 168 | + rw [ofLp_single, Pi.single_eq_of_ne' h] |
| 169 | + |
| 170 | +end Zero |
| 171 | + |
| 172 | +@[simp] |
| 173 | +lemma single_apply [Zero 𝕜] (i : ι) (a : 𝕜) (j : ι) : |
| 174 | + (single p i a : PiLp p (fun _ ↦ 𝕜)) j = ite (j = i) a 0 := by |
| 175 | + rw [← toLp_single, PiLp.toLp_apply, ← Pi.single_apply i a j] |
| 176 | + |
| 177 | +section AddCommGroup |
| 178 | +variable [∀ i, AddCommGroup (β i)] |
| 179 | + |
| 180 | +@[simp] |
| 181 | +theorem single_eq_zero_iff (p : ℝ≥0∞) (i : ι) {a : β i} : |
| 182 | + single p i a = 0 ↔ a = 0 := |
| 183 | + (toLp_eq_zero p).trans Pi.single_eq_zero_iff |
| 184 | + |
| 185 | +lemma single_add (p : ℝ≥0∞) (i : ι) {a b : β i} : |
| 186 | + single p i (a + b) = single p i a + single p i b := by |
| 187 | + simp_rw [← toLp_single, Pi.single_add, toLp_add] |
| 188 | + |
| 189 | +lemma single_sub (p : ℝ≥0∞) (i : ι) {a b : β i} : |
| 190 | + single p i (a - b) = single p i a - single p i b := by |
| 191 | + simp_rw [← toLp_single, Pi.single_sub, toLp_sub] |
| 192 | + |
| 193 | +lemma single_neg (p : ℝ≥0∞) (i : ι) {a : β i} : |
| 194 | + single p i (-a) = -single p i a := by |
| 195 | + simp_rw [← toLp_single, Pi.single_neg, toLp_neg] |
| 196 | + |
| 197 | +end AddCommGroup |
| 198 | + |
| 199 | +end Single |
| 200 | + |
140 | 201 | section DistNorm |
141 | 202 |
|
142 | 203 | variable [Fintype ι] |
@@ -798,8 +859,7 @@ theorem _root_.LinearIsometryEquiv.piLpCongrLeft_symm (e : ι ≃ ι') : |
798 | 859 | @[simp high] |
799 | 860 | theorem _root_.LinearIsometryEquiv.piLpCongrLeft_single [DecidableEq ι] [DecidableEq ι'] |
800 | 861 | (e : ι ≃ ι') (i : ι) (v : E) : |
801 | | - LinearIsometryEquiv.piLpCongrLeft p 𝕜 E e (toLp p <| Pi.single i v) = |
802 | | - toLp p (Pi.single (e i) v) := by |
| 862 | + LinearIsometryEquiv.piLpCongrLeft p 𝕜 E e (single p i v) = single p (e i) v := by |
803 | 863 | ext x |
804 | 864 | simp [LinearIsometryEquiv.piLpCongrLeft_apply, Equiv.piCongrLeft', |
805 | 865 | Pi.single, Function.update, Equiv.symm_apply_eq] |
@@ -847,8 +907,7 @@ theorem _root_.LinearIsometryEquiv.piLpCongrRight_symm (e : ∀ i, α i ≃ₗ |
847 | 907 | @[simp high] |
848 | 908 | theorem _root_.LinearIsometryEquiv.piLpCongrRight_single (e : ∀ i, α i ≃ₗᵢ[𝕜] β i) [DecidableEq ι] |
849 | 909 | (i : ι) (v : α i) : |
850 | | - LinearIsometryEquiv.piLpCongrRight p e (toLp p <| Pi.single i v) = |
851 | | - toLp p (Pi.single i (e _ v)) := |
| 910 | + LinearIsometryEquiv.piLpCongrRight p e (single p i v) = single p i (e _ v) := |
852 | 911 | PiLp.ext <| Pi.apply_single (e ·) (fun _ => map_zero _) _ _ |
853 | 912 |
|
854 | 913 | end piLpCongrRight |
@@ -927,46 +986,68 @@ variable [DecidableEq ι] |
927 | 986 |
|
928 | 987 | set_option backward.isDefEq.respectTransparency false in |
929 | 988 | @[simp] |
930 | | -theorem nnnorm_toLp_single (i : ι) (b : β i) : |
931 | | - ‖toLp p (Pi.single i b)‖₊ = ‖b‖₊ := by |
| 989 | +theorem nnnorm_single (i : ι) (b : β i) : ‖single p i b‖₊ = ‖b‖₊ := by |
932 | 990 | haveI : Nonempty ι := ⟨i⟩ |
933 | 991 | induction p generalizing hp with |
934 | 992 | | top => |
935 | 993 | simp_rw [nnnorm_eq_ciSup] |
936 | 994 | refine |
937 | 995 | ciSup_eq_of_forall_le_of_forall_lt_exists_gt (fun j => ?_) fun n hn => ⟨i, hn.trans_eq ?_⟩ |
938 | 996 | · obtain rfl | hij := Decidable.eq_or_ne i j |
939 | | - · rw [Pi.single_eq_same] |
940 | | - · rw [Pi.single_eq_of_ne' hij, nnnorm_zero] |
| 997 | + · rw [single_eq_same] |
| 998 | + · rw [single_eq_of_ne' _ hij, nnnorm_zero] |
941 | 999 | exact zero_le _ |
942 | | - · rw [Pi.single_eq_same] |
| 1000 | + · rw [single_eq_same] |
943 | 1001 | | coe p => |
944 | 1002 | have hp0 : (p : ℝ) ≠ 0 := |
945 | 1003 | mod_cast (zero_lt_one.trans_le <| Fact.out (p := 1 ≤ (p : ℝ≥0∞))).ne' |
946 | 1004 | rw [nnnorm_eq_sum ENNReal.coe_ne_top, ENNReal.coe_toReal, Fintype.sum_eq_single i, |
947 | | - toLp_apply, Pi.single_eq_same, ← NNReal.rpow_mul, one_div, |
| 1005 | + toLp_apply, single_eq_same, ← NNReal.rpow_mul, one_div, |
948 | 1006 | mul_inv_cancel₀ hp0, NNReal.rpow_one] |
949 | 1007 | intro j hij |
950 | | - rw [toLp_apply, Pi.single_eq_of_ne hij, nnnorm_zero, NNReal.zero_rpow hp0] |
| 1008 | + rw [toLp_apply, single_eq_of_ne _ hij, nnnorm_zero, NNReal.zero_rpow hp0] |
| 1009 | + |
| 1010 | +@[deprecated nnnorm_single (since := "2026-03-15")] |
| 1011 | +theorem nnnorm_toLp_single (i : ι) (b : β i) : ‖toLp p (Pi.single i b)‖₊ = ‖b‖₊ := |
| 1012 | + nnnorm_single p β i b |
951 | 1013 |
|
952 | 1014 | @[simp] |
| 1015 | +lemma norm_single (i : ι) (b : β i) : ‖single p i b‖ = ‖b‖ := |
| 1016 | + congr_arg ((↑) : ℝ≥0 → ℝ) <| nnnorm_single p β i b |
| 1017 | + |
| 1018 | +@[deprecated norm_single (since := "2026-03-15")] |
953 | 1019 | lemma norm_toLp_single (i : ι) (b : β i) : ‖toLp p (Pi.single i b)‖ = ‖b‖ := |
954 | | - congr_arg ((↑) : ℝ≥0 → ℝ) <| nnnorm_toLp_single p β i b |
| 1020 | + norm_single p β i b |
955 | 1021 |
|
956 | 1022 | @[simp] |
| 1023 | +lemma nndist_single_same (i : ι) (b₁ b₂ : β i) : |
| 1024 | + nndist (single p i b₁) (single p i b₂) = nndist b₁ b₂ := by |
| 1025 | + rw [nndist_eq_nnnorm, nndist_eq_nnnorm, ← single_sub, nnnorm_single] |
| 1026 | + |
| 1027 | +@[deprecated nndist_single_same (since := "2026-03-15")] |
957 | 1028 | lemma nndist_toLp_single_same (i : ι) (b₁ b₂ : β i) : |
958 | | - nndist (toLp p (Pi.single i b₁)) (toLp p (Pi.single i b₂)) = nndist b₁ b₂ := by |
959 | | - rw [nndist_eq_nnnorm, nndist_eq_nnnorm, ← toLp_sub, ← Pi.single_sub, nnnorm_toLp_single] |
| 1029 | + nndist (toLp p (Pi.single i b₁)) (toLp p (Pi.single i b₂)) = nndist b₁ b₂ := |
| 1030 | + nndist_single_same p β i b₁ b₂ |
960 | 1031 |
|
961 | 1032 | @[simp] |
| 1033 | +lemma dist_single_same (i : ι) (b₁ b₂ : β i) : |
| 1034 | + dist (single p i b₁) (single p i b₂) = dist b₁ b₂ := |
| 1035 | + congr_arg ((↑) : ℝ≥0 → ℝ) <| nndist_single_same p β i b₁ b₂ |
| 1036 | + |
| 1037 | +@[deprecated dist_single_same (since := "2026-03-15")] |
962 | 1038 | lemma dist_toLp_single_same (i : ι) (b₁ b₂ : β i) : |
963 | 1039 | dist (toLp p (Pi.single i b₁)) (toLp p (Pi.single i b₂)) = dist b₁ b₂ := |
964 | | - congr_arg ((↑) : ℝ≥0 → ℝ) <| nndist_toLp_single_same p β i b₁ b₂ |
| 1040 | + dist_single_same p β i b₁ b₂ |
965 | 1041 |
|
966 | 1042 | @[simp] |
| 1043 | +lemma edist_single_same (i : ι) (b₁ b₂ : β i) : |
| 1044 | + edist (single p i b₁) (single p i b₂) = edist b₁ b₂ := by |
| 1045 | + simp only [edist_nndist, nndist_single_same p β i b₁ b₂] |
| 1046 | + |
| 1047 | +@[deprecated edist_single_same (since := "2026-03-15")] |
967 | 1048 | lemma edist_toLp_single_same (i : ι) (b₁ b₂ : β i) : |
968 | | - edist (toLp p (Pi.single i b₁)) (toLp p (Pi.single i b₂)) = edist b₁ b₂ := by |
969 | | - simp only [edist_nndist, nndist_toLp_single_same p β i b₁ b₂] |
| 1049 | + edist (toLp p (Pi.single i b₁)) (toLp p (Pi.single i b₂)) = edist b₁ b₂ := |
| 1050 | + edist_single_same p β i b₁ b₂ |
970 | 1051 |
|
971 | 1052 | end Single |
972 | 1053 |
|
@@ -1061,8 +1142,8 @@ def basisFun : Basis ι 𝕜 (PiLp p fun _ : ι => 𝕜) := |
1061 | 1142 |
|
1062 | 1143 | @[simp] |
1063 | 1144 | theorem basisFun_apply [DecidableEq ι] (i) : |
1064 | | - basisFun p 𝕜 ι i = toLp p (Pi.single i 1) := by |
1065 | | - simp_rw [basisFun, Basis.coe_ofEquivFun, WithLp.coe_symm_linearEquiv] |
| 1145 | + basisFun p 𝕜 ι i = single p i 1 := by |
| 1146 | + simp_rw [basisFun, Basis.coe_ofEquivFun, WithLp.coe_symm_linearEquiv, toLp_single] |
1066 | 1147 |
|
1067 | 1148 | @[simp] |
1068 | 1149 | theorem basisFun_repr (x : PiLp p fun _ : ι => 𝕜) (i : ι) : (basisFun p 𝕜 ι).repr x i = x i := |
|
0 commit comments