feat(Topology,Analysis): discrete topology metric space and normed groups#27664
feat(Topology,Analysis): discrete topology metric space and normed groups#27664pechersky wants to merge 7 commits into
Conversation
…oups Explicit construction of the discrete topology metric space and normed groups where `dist x y = 1` for all `x != y` Provide PseudoMetricSpace, MetricSpace, Seminormed(Add)Group, and Normed(Add)Group constructions
PR summary bd4da70be5Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
| This takes an explicit `DiscreteTopology` instance to ensure that the forgetful | ||
| inheritance to topology matches. -/ |
There was a problem hiding this comment.
Because I don't want people installing this discrete metric space unless they really mean to.
There was a problem hiding this comment.
Why do you replace the topology but not the uniformity?
| def NormedGroup.ofDiscreteTopology [TopologicalSpace G] [DiscreteTopology G] | ||
| [Group G] [DecidableEq G] : NormedGroup G where |
There was a problem hiding this comment.
Does this one imply SeminormedGroup.ofDiscreteTopology?
|
I guess I don't understand why we need to do everything for MetricSpace etc. and then do it again for PseudoMetricSpace. Does MetricSpace not imply PseudoMetricSpace? |
|
This pull request has conflicts, please merge |
|
Why do it for PseudoMetricSpace when we did it for MetricSpace? Because I want the construction to be available earlier in import tree without having to bring in metric spaces. One could also ask, why have it for MetricSpace if we have it for PseudoMetricSpace? And that's so that there are shortcut constructions that give as rich of an object as possible. |
|
I see, I missed the fact that MS depends on PMS because github orders files alphabetically |
Co-authored-by: Kenny Lau <kc_kennylau@yahoo.com.hk>
| dist_self := by simp | ||
| dist_comm := by intros; split_ifs <;> simp_all | ||
| dist_triangle := by intros; split_ifs <;> simp_all | ||
| edist_dist := by intros; split_ifs <;> simp_all |
There was a problem hiding this comment.
| dist_self := by simp | |
| dist_comm := by intros; split_ifs <;> simp_all | |
| dist_triangle := by intros; split_ifs <;> simp_all | |
| edist_dist := by intros; split_ifs <;> simp_all | |
| dist_self := by grind | |
| dist_comm := by grind | |
| dist_triangle := by grind | |
| edist_dist := by aesop |
if you want
| def ofDiscreteTopology [TopologicalSpace X] | ||
| [DiscreteTopology X] [DecidableEq X] : MetricSpace X where | ||
| __ := PseudoMetricSpace.ofDiscreteTopology (X := X) | ||
| eq_of_dist_eq_zero := by simp [PseudoMetricSpace.ofDiscreteTopology_dist_def] |
There was a problem hiding this comment.
| eq_of_dist_eq_zero := by simp [PseudoMetricSpace.ofDiscreteTopology_dist_def] | |
| eq_of_dist_eq_zero := by grind |
| variable [TopologicalSpace X] [DiscreteTopology X] [DecidableEq X] | ||
|
|
||
| lemma ofDiscreteTopology_dist_def (x y : X) : | ||
| letI := ofDiscreteTopology (X := X) | ||
| dist x y = if x = y then 0 else 1 := | ||
| rfl | ||
|
|
||
| lemma ofDiscreteTopology_uniformSpace_eq_bot : | ||
| (MetricSpace.ofDiscreteTopology (X := X)).toUniformSpace = ⊥ := | ||
| PseudoMetricSpace.ofDiscreteTopology_uniformSpace_eq_bot | ||
|
|
||
| lemma ofDiscreteTopology_discreteUniformity : | ||
| @DiscreteUniformity X (ofDiscreteTopology (X := X)).toUniformSpace := | ||
| PseudoMetricSpace.ofDiscreteTopology_discreteUniformity |
There was a problem hiding this comment.
| variable [TopologicalSpace X] [DiscreteTopology X] [DecidableEq X] | |
| lemma ofDiscreteTopology_dist_def (x y : X) : | |
| letI := ofDiscreteTopology (X := X) | |
| dist x y = if x = y then 0 else 1 := | |
| rfl | |
| lemma ofDiscreteTopology_uniformSpace_eq_bot : | |
| (MetricSpace.ofDiscreteTopology (X := X)).toUniformSpace = ⊥ := | |
| PseudoMetricSpace.ofDiscreteTopology_uniformSpace_eq_bot | |
| lemma ofDiscreteTopology_discreteUniformity : | |
| @DiscreteUniformity X (ofDiscreteTopology (X := X)).toUniformSpace := | |
| PseudoMetricSpace.ofDiscreteTopology_discreteUniformity | |
| section | |
| variable [TopologicalSpace X] [DiscreteTopology X] [DecidableEq X] | |
| attribute [local instance] ofDiscreteTopology | |
| @[grind =] lemma ofDiscreteTopology_dist_def (x y : X) : dist x y = if x = y then 0 else 1 := | |
| rfl | |
| lemma ofDiscreteTopology_uniformSpace_eq_bot : (ofDiscreteTopology (X := X)).toUniformSpace = ⊥ := | |
| PseudoMetricSpace.ofDiscreteTopology_uniformSpace_eq_bot | |
| lemma ofDiscreteTopology_discreteUniformity : DiscreteUniformity X := | |
| PseudoMetricSpace.ofDiscreteTopology_discreteUniformity | |
| end |
|
This pull request has conflicts, please merge |
Explicit construction of the discrete topology metric space and normed groups where
dist x y = 1for allx != yProvide PseudoMetricSpace, MetricSpace, Seminormed(Add)Group, and Normed(Add)Group constructions