-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: port Analysis.Normed.Group.BallSphere (#2771)
- Loading branch information
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/- | ||
Copyright (c) 2022 Yury Kudryashov. All rights reserved. | ||
Released under Apache 2.0 license as described in the file LICENSE. | ||
Authors: Yury Kudryashov, Heather Macbeth | ||
! This file was ported from Lean 3 source module analysis.normed.group.ball_sphere | ||
! leanprover-community/mathlib commit 3339976e2bcae9f1c81e620836d1eb736e3c4700 | ||
! Please do not edit these lines, except to modify the commit id | ||
! if you have ported upstream changes. | ||
-/ | ||
import Mathlib.Analysis.Normed.Group.Basic | ||
|
||
/-! | ||
# Negation on spheres and balls | ||
In this file we define `InvolutiveNeg` and `ContinuousNeg` instances for spheres, open balls, and | ||
closed balls in a semi normed group. | ||
-/ | ||
|
||
|
||
open Metric Set | ||
|
||
variable {E : Type _} [i : SeminormedAddCommGroup E] {r : ℝ} | ||
|
||
/-- We equip the sphere, in a seminormed group, with a formal operation of negation, namely the | ||
antipodal map. -/ | ||
instance : InvolutiveNeg (sphere (0 : E) r) where | ||
neg := Subtype.map Neg.neg fun w => by simp | ||
neg_neg x := Subtype.ext <| neg_neg x.1 | ||
|
||
@[simp] | ||
theorem coe_neg_sphere {r : ℝ} (v : sphere (0 : E) r) : ↑(-v) = (-v : E) := | ||
rfl | ||
#align coe_neg_sphere coe_neg_sphere | ||
|
||
-- porting note: todo: need to specify instance to avoid timeout | ||
instance : ContinuousNeg (sphere (0 : E) r) := | ||
@Inducing.continuousNeg (sphere (0 : E) r) E _ _ _ _ TopologicalAddGroup.toContinuousNeg | ||
Subtype.val inducing_subtype_val fun _ => rfl | ||
|
||
/-- We equip the ball, in a seminormed group, with a formal operation of negation, namely the | ||
antipodal map. -/ | ||
instance {r : ℝ} : InvolutiveNeg (ball (0 : E) r) where | ||
neg := Subtype.map Neg.neg fun w => by simp | ||
neg_neg x := Subtype.ext <| neg_neg x.1 | ||
|
||
@[simp] theorem coe_neg_ball {r : ℝ} (v : ball (0 : E) r) : ↑(-v) = (-v : E) := rfl | ||
#align coe_neg_ball coe_neg_ball | ||
|
||
-- porting note: todo: need to specify instance to avoid timeout | ||
instance : ContinuousNeg (ball (0 : E) r) := | ||
@Inducing.continuousNeg (ball (0 : E) r) E _ _ _ _ TopologicalAddGroup.toContinuousNeg | ||
Subtype.val inducing_subtype_val fun _ => rfl | ||
|
||
/-- We equip the closed ball, in a seminormed group, with a formal operation of negation, namely the | ||
antipodal map. -/ | ||
instance {r : ℝ} : InvolutiveNeg (closedBall (0 : E) r) where | ||
neg := Subtype.map Neg.neg fun w => by simp | ||
neg_neg x := Subtype.ext <| neg_neg x.1 | ||
|
||
@[simp] theorem coe_neg_closedBall {r : ℝ} (v : closedBall (0 : E) r) : ↑(-v) = (-v : E) := rfl | ||
#align coe_neg_closed_ball coe_neg_closedBall | ||
|
||
-- porting note: todo: need to specify instance to avoid timeout | ||
instance : ContinuousNeg (closedBall (0 : E) r) := | ||
@Inducing.continuousNeg (closedBall (0 : E) r) E _ _ _ _ TopologicalAddGroup.toContinuousNeg | ||
Subtype.val inducing_subtype_val fun _ => rfl |