Eine aufbereitete Darstellung der Quelle

 
     
 
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung


Quelle  UnitBall.lean   Sprache: Lean

 

/-
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
-/

module

public import Mathlib.Analysis.Normed.Field.Lemmas
public import Mathlib.Analysis.Normed.Group.BallSphere

/-!
# Algebraic structures on unit balls and spheres

In this file we define algebraic structures (`Semigroup`, `CommSemigroup`, `Monoid`, `CommMonoid`,
`Group`, `CommGroup`) on `Metric.ball (0 : ��) 1`, `Metric.closedBall (0 : ��) 1`, and
`Metric.sphere (0 : ��) 1`. In each case we use the weakest possible typeclass assumption on `��`,
from `NonUnitalSeminormedRing` to `NormedField`.
-/


@[expose] public section


open Set Metric

variable {�� : Type*}

/-!
### Algebraic structures on `Metric.ball 0 1`
-/


/-- Unit ball in a non-unital seminormed ring as a bundled `Subsemigroup`. -/
def Subsemigroup.unitBall (�� : Type*) [NonUnitalSeminormedRing ��] : Subsemigroup �� where
  carrier := ball (0 : ��) 1
  mul_mem' hx hy := by
    rw [mem_ball_zero_iff] at *
    exact (norm_mul_le _ _).trans_lt ((mul_le_of_le_one_right (norm_nonneg _) hy.le).trans_lt hx)

@[simp] lemma Subsemigroup.mem_unitBall (�� : Type*) [NonUnitalSeminormedRing ��] {x : ��} :
    x ∈ Subsemigroup.unitBall �� ↔ ‖x‖ < 1 := by
  simp [Subsemigroup.unitBall]

instance Metric.unitBall.instSemigroup [NonUnitalSeminormedRing ��] : Semigroup (ball (0 : ��) 1) :=
  inferInstanceAs <| Semigroup (Subsemigroup.unitBall ��)

instance Metric.unitBall.instContinuousMul [NonUnitalSeminormedRing ��] :
    ContinuousMul (ball (0 : ��) 1) :=
  (Subsemigroup.unitBall ��).continuousMul

instance Metric.unitBall.instCommSemigroup [SeminormedCommRing ��] :
    CommSemigroup (ball (0 : ��) 1) :=
  inferInstanceAs <| CommSemigroup (Subsemigroup.unitBall ��)

instance Metric.unitBall.instHasDistribNeg [NonUnitalSeminormedRing ��] :
    HasDistribNeg (ball (0 : ��) 1) :=
  Subtype.coe_injective.hasDistribNeg ((↑) : ball (0 : ��) 1 → ��) (fun _ => rfl) fun _ _ => rfl

@[simp, norm_cast]
protected theorem Metric.unitBall.coe_mul [NonUnitalSeminormedRing ��] (x y : ball (0 : ��) 1) :
    ↑(x * y) = (x * y : ��) :=
  rfl

instance Metric.unitBall.instZero [Zero ��] [PseudoMetricSpace ��] : Zero (ball (0 : ��) 1) :=
  ⟨⟨0, by simp⟩⟩

@[simp, norm_cast]
protected theorem Metric.unitBall.coe_zero [Zero ��] [PseudoMetricSpace ��] :
    ((0 : ball (0 : ��) 1) : ��) = 0 :=
  rfl

@[simp, norm_cast]
protected theorem Metric.unitBall.coe_eq_zero [Zero ��] [PseudoMetricSpace ��] {a : ball (0 : ��) 1} :
    (a : ��) = 0 ↔ a = 0 :=
  Subtype.val_injective.eq_iff' unitBall.coe_zero

instance Metric.unitBall.instSemigroupWithZero [NonUnitalSeminormedRing ��] :
    SemigroupWithZero (ball (0 : ��) 1) where
  zero_mul _ := Subtype.ext <| zero_mul _
  mul_zero _ := Subtype.ext <| mul_zero _

instance Metric.unitBall.instIsLeftCancelMulZero [NonUnitalSeminormedRing ��]
    [IsLeftCancelMulZero ��] : IsLeftCancelMulZero (ball (0 : ��) 1) :=
  Subtype.val_injective.isLeftCancelMulZero _ rfl fun _ _ ↦ rfl

instance Metric.unitBall.instIsRightCancelMulZero [NonUnitalSeminormedRing ��]
    [IsRightCancelMulZero ��] : IsRightCancelMulZero (ball (0 : ��) 1) :=
  Subtype.val_injective.isRightCancelMulZero _ rfl fun _ _ ↦ rfl

instance Metric.unitBall.instIsCancelMulZero [NonUnitalSeminormedRing ��]
    [IsCancelMulZero ��] : IsCancelMulZero (ball (0 : ��) 1) where

/-!
### Algebraic instances for `Metric.closedBall 0 1`
-/


/-- Closed unit ball in a non-unital seminormed ring as a bundled `Subsemigroup`. -/
def Subsemigroup.unitClosedBall (�� : Type*) [NonUnitalSeminormedRing ��] : Subsemigroup �� where
  carrier := closedBall 0 1
  mul_mem' hx hy := by
    rw [mem_closedBall_zero_iff] at *
    exact (norm_mul_le _ _).trans ((mul_le_of_le_one_left (norm_nonneg _) hx).trans hy)

instance Metric.unitClosedBall.instSemigroup [NonUnitalSeminormedRing ��] :
    Semigroup (closedBall (0 : ��) 1) :=
  inferInstanceAs <| Semigroup (Subsemigroup.unitClosedBall ��)

instance Metric.unitClosedBall.instHasDistribNeg [NonUnitalSeminormedRing ��] :
    HasDistribNeg (closedBall (0 : ��) 1) :=
  Subtype.coe_injective.hasDistribNeg ((↑) : closedBall (0 : ��) 1 → ��) (fun _ => rfl) fun _ _ => rfl

instance Metric.unitClosedBall.instContinuousMul [NonUnitalSeminormedRing ��] :
    ContinuousMul (closedBall (0 : ��) 1) :=
  (Subsemigroup.unitClosedBall ��).continuousMul

@[simp, norm_cast]
protected theorem Metric.unitClosedBall.coe_mul [NonUnitalSeminormedRing ��]
    (x y : closedBall (0 : ��) 1) : ↑(x * y) = (x * y : ��) :=
  rfl

instance Metric.unitClosedBall.instZero [Zero ��] [PseudoMetricSpace ��] :
    Zero (closedBall (0 : ��) 1) where
  zero := ⟨0, by simp⟩

@[simp, norm_cast]
protected lemma Metric.unitClosedBall.coe_zero [Zero ��] [PseudoMetricSpace ��] :
    ((0 : closedBall (0 : ��) 1) : ��) = 0 :=
  rfl

@[simp, norm_cast]
protected lemma Metric.unitClosedBall.coe_eq_zero [Zero ��] [PseudoMetricSpace ��]
    {a : closedBall (0 : ��) 1} : (a : ��) = 0 ↔ a = 0 :=
  Subtype.val_injective.eq_iff' unitClosedBall.coe_zero

instance Metric.unitClosedBall.instSemigroupWithZero [NonUnitalSeminormedRing ��] :
    SemigroupWithZero (closedBall (0 : ��) 1) where
  zero_mul _ := Subtype.ext <| zero_mul _
  mul_zero _ := Subtype.ext <| mul_zero _

/-- Closed unit ball in a seminormed ring as a bundled `Submonoid`. -/
def Submonoid.unitClosedBall (�� : Type*) [SeminormedRing ��] [NormOneClass ��] : Submonoid �� :=
  { Subsemigroup.unitClosedBall �� with
    carrier := closedBall 0 1
    one_mem' := mem_closedBall_zero_iff.2 norm_one.le }

set_option backward.isDefEq.respectTransparency.types false in
@[simp] lemma Submonoid.mem_unitClosedBall (�� : Type*) [SeminormedRing ��] [NormOneClass ��] {x : ��} :
    x ∈ Submonoid.unitClosedBall �� ↔ ‖x‖ ≤ 1 := by
  simp [Submonoid.unitClosedBall]

instance Metric.unitClosedBall.instMonoid [SeminormedRing ��] [NormOneClass ��] :
    Monoid (closedBall (0 : ��) 1) :=
  inferInstanceAs <| Monoid (Submonoid.unitClosedBall ��)

instance Metric.unitClosedBall.instCommMonoid [SeminormedCommRing ��] [NormOneClass ��] :
    CommMonoid (closedBall (0 : ��) 1) :=
  inferInstanceAs <| CommMonoid (Submonoid.unitClosedBall ��)

@[simp, norm_cast]
protected theorem Metric.unitClosedBall.coe_one [SeminormedRing ��] [NormOneClass ��] :
    ((1 : closedBall (0 : ��) 1) : ��) = 1 :=
  rfl

@[simp, norm_cast]
protected theorem Metric.unitClosedBall.coe_eq_one [SeminormedRing ��] [NormOneClass ��]
    {a : closedBall (0 : ��) 1} : (a : ��) = 1 ↔ a = 1 :=
  Subtype.val_injective.eq_iff' unitClosedBall.coe_one

@[simp, norm_cast]
protected theorem Metric.unitClosedBall.coe_pow [SeminormedRing ��] [NormOneClass ��]
    (x : closedBall (0 : ��) 1) (n : ℕ) : ↑(x ^ n) = (x : ��) ^ n :=
  rfl

instance Metric.unitClosedBall.instMonoidWithZero [SeminormedRing ��] [NormOneClass ��] :
    MonoidWithZero (closedBall (0 : ��) 1) where

instance Metric.unitClosedBall.instIsCancelMulZero [SeminormedRing ��] [IsCancelMulZero ��]
    [NormOneClass ��] : IsCancelMulZero (closedBall (0 : ��) 1) :=
  Subtype.val_injective.isCancelMulZero _ rfl fun _ _ ↦ rfl

/-!
### Algebraic instances on the unit sphere
-/


/-- Unit sphere in a seminormed ring (with strictly multiplicative norm) as a bundled
`Submonoid`. -/

@[simps]
def Submonoid.unitSphere (�� : Type*) [SeminormedRing ��] [NormMulClass ��] [NormOneClass ��] :
    Submonoid �� where
  carrier := sphere (0 : ��) 1
  mul_mem' hx hy := by
    rw [mem_sphere_zero_iff_norm] at *
    simp [*]
  one_mem' := mem_sphere_zero_iff_norm.2 norm_one

instance Metric.unitSphere.instInv [NormedDivisionRing ��] : Inv (sphere (0 : ��) 1) where
  inv x := ⟨x⁻¹, mem_sphere_zero_iff_norm.2 <| by
    rw [norm_inv, mem_sphere_zero_iff_norm.1 x.coe_prop, inv_one]⟩

@[simp, norm_cast]
theorem Metric.unitSphere.coe_inv [NormedDivisionRing ��] (x : sphere (0 : ��) 1) :
    ↑x⁻¹ = (x⁻¹ : ��) :=
  rfl

instance Metric.unitSphere.instDiv [NormedDivisionRing ��] : Div (sphere (0 : ��) 1) where
  div x y := .mk (x / y) <| mem_sphere_zero_iff_norm.2 <| by
    rw [norm_div, mem_sphere_zero_iff_norm.1 x.2, mem_sphere_zero_iff_norm.1 y.coe_prop, div_one]

@[simp, norm_cast]
protected theorem Metric.unitSphere.coe_div [NormedDivisionRing ��] (x y : sphere (0 : ��) 1) :
    ↑(x / y) = (x / y : ��) :=
  rfl

instance Metric.unitSphere.instZPow [NormedDivisionRing ��] : Pow (sphere (0 : ��) 1) ℤ where
  pow x n := .mk ((x : ��) ^ n) <| by
    rw [mem_sphere_zero_iff_norm, norm_zpow, mem_sphere_zero_iff_norm.1 x.coe_prop, one_zpow]

@[simp, norm_cast]
theorem Metric.unitSphere.coe_zpow [NormedDivisionRing ��] (x : sphere (0 : ��) 1) (n : ℤ) :
    ↑(x ^ n) = (x : ��) ^ n :=
  rfl

instance Metric.unitSphere.instMonoid [SeminormedRing ��] [NormMulClass ��] [NormOneClass ��] :
    Monoid (sphere (0 : ��) 1) :=
  inferInstanceAs <| Monoid (Submonoid.unitSphere ��)

instance Metric.unitSphere.instCommMonoid [SeminormedCommRing ��] [NormMulClass ��] [NormOneClass ��] :
    CommMonoid (sphere (0 : ��) 1) :=
  inferInstanceAs <| CommMonoid (Submonoid.unitSphere ��)

@[simp, norm_cast]
protected theorem Metric.unitSphere.coe_one [SeminormedRing ��] [NormMulClass ��] [NormOneClass ��] :
    ((1 : sphere (0 : ��) 1) : ��) = 1 :=
  rfl

@[simp, norm_cast]
theorem Metric.unitSphere.coe_mul [SeminormedRing ��] [NormMulClass ��] [NormOneClass ��]
    (x y : sphere (0 : ��) 1) : ↑(x * y) = (x * y : ��) :=
  rfl

@[simp, norm_cast]
theorem Metric.unitSphere.coe_pow [SeminormedRing ��] [NormMulClass ��] [NormOneClass ��]
    (x : sphere (0 : ��) 1) (n : ℕ) : ↑(x ^ n) = (x : ��) ^ n :=
  rfl

/-- Monoid homomorphism from the unit sphere in a normed division ring to the group of units. -/
def unitSphereToUnits (�� : Type*) [NormedDivisionRing ��] : sphere (0 : ��) 1 →* Units �� :=
  Units.liftRight (Submonoid.unitSphere ��).subtype
    (fun x => Units.mk0 x <| ne_zero_of_mem_unit_sphere _) fun _x => rfl

@[simp]
theorem unitSphereToUnits_apply_coe [NormedDivisionRing ��] (x : sphere (0 : ��) 1) :
    (unitSphereToUnits �� x : ��) = x :=
  rfl

theorem unitSphereToUnits_injective [NormedDivisionRing ��] :
    Function.Injective (unitSphereToUnits ��) := fun x y h =>
  Subtype.ext <| by convert! congr($(h).val)

instance Metric.unitSphere.instGroup [NormedDivisionRing ��] : Group (sphere (0 : ��) 1) :=
  fast_instance% unitSphereToUnits_injective.group (unitSphereToUnits ��) (Units.ext rfl)
    (fun _x _y => Units.ext rfl)
    (fun _x => Units.ext rfl) (fun _x _y => Units.ext <| div_eq_mul_inv _ _)
    (fun x n => Units.ext (Units.val_pow_eq_pow_val (unitSphereToUnits �� x) n).symm) fun x n =>
    Units.ext (Units.val_zpow_eq_zpow_val (unitSphereToUnits �� x) n).symm

instance Metric.sphere.instHasDistribNeg [SeminormedRing ��] [NormMulClass ��] [NormOneClass ��] :
    HasDistribNeg (sphere (0 : ��) 1) :=
  Subtype.coe_injective.hasDistribNeg ((↑) : sphere (0 : ��) 1 → ��) (fun _ => rfl) fun _ _ => rfl

instance Metric.sphere.instContinuousMul [SeminormedRing ��] [NormMulClass ��] [NormOneClass ��] :
    ContinuousMul (sphere (0 : ��) 1) :=
  (Submonoid.unitSphere ��).continuousMul

instance Metric.sphere.instIsTopologicalGroup [NormedDivisionRing ��] :
    IsTopologicalGroup (sphere (0 : ��) 1) where
  continuous_inv := (continuous_subtype_val.inv₀ ne_zero_of_mem_unit_sphere).subtype_mk _

instance Metric.sphere.instCommGroup [NormedField ��] : CommGroup (sphere (0 : ��) 1) where

Messung
CHZG
9010010096

¤ Dauer der Verarbeitung: 0.6 Sekunden  (vorverarbeitet am  2026-11-24) ¤

*© Formatika GbR, Deutschland







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,188,151
#Domains=932,658