Copyright | (c) Justus Sagemüller 2013 |
---|---|
License | GPL v3 |
Maintainer | (@) sagemueller $ geo.uni-koeln.de |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
This is something of a first attempt at formalising manifolds and continuous mappings thereon. They work (check out http://hackage.haskell.org/package/dynamic-plot-0.1.0.0 for a use case), but aren't very efficient. The interface might well change considerably in the future.
- data domain :--> codomain where
- Continuous :: (Manifold d, Manifold c, v ~ TangentSpace d, u ~ TangentSpace c, δ ~ Metric v, ε ~ Metric u) => {
- runContinuous :: Chart d -> v -> (Chart c, u, ε -> Option δ)
- Continuous :: (Manifold d, Manifold c, v ~ TangentSpace d, u ~ TangentSpace c, δ ~ Metric v, ε ~ Metric u) => {
- continuous_id' :: Manifold m => m :--> m
- const__ :: (Manifold c, Manifold d) => c -> d :--> c
- flatContinuous :: (FlatManifold v, FlatManifold w, δ ~ Metric v, ε ~ Metric w) => (v -> (w, ε -> Option δ)) -> v :--> w
- runFlatContinuous :: (FlatManifold v, FlatManifold w, δ ~ Metric v, ε ~ Metric w) => (v :--> w) -> v -> (w, ε -> Option δ)
- data Chart :: * -> * where
- IdChart :: FlatManifold v => Chart v
- Chart :: (Manifold m, v ~ TangentSpace m, FlatManifold v) => {
- chartInMap :: v :--> m
- chartOutMap :: m -> Maybe (m :--> v)
- chartKind :: ChartKind
- data ChartKind
- type FlatManifold v = (MetricSpace v, Manifold v, v ~ TangentSpace v)
- isInUpperHemi :: EuclidSpace v => v -> Bool
- type Atlas m = [Chart m]
- class (MetricSpace (TangentSpace m), Metric (TangentSpace m) ~ ℝ) => Manifold m where
- type TangentSpace m :: *
- localAtlas :: m -> Atlas m
- vectorSpaceAtlas :: FlatManifold v => v -> Atlas v
- type Representsℝ r = (EqFloating r, FlatManifold r, r ~ Scalar r, r ~ Metric r)
- continuousFlatFunction :: (FlatManifold d, FlatManifold c, ε ~ Metric c, δ ~ Metric d) => (d -> (c, ε -> Option δ)) -> d :--> c
- type CntnRealFunction = Representsℝ r => r :--> r
- sin__ :: CntnRealFunction
- asinh__ :: CntnRealFunction
- tanh__ :: CntnRealFunction
- cosh__ :: CntnRealFunction
- sinh__ :: CntnRealFunction
- exp__ :: CntnRealFunction
- atan__ :: CntnRealFunction
- cos__ :: CntnRealFunction
- cntnFuncsCombine :: forall d v c c' c'' ε ε' ε''. (FlatManifold c, FlatManifold c', FlatManifold c'', ε ~ Metric c, ε' ~ Metric c', ε'' ~ Metric c'', ε ~ ε', ε ~ ε'') => (c' -> c'' -> (c, ε -> (ε', ε''))) -> (d :--> c') -> (d :--> c'') -> d :--> c
- data CntnFuncValue d c
- = CntnFuncValue {
- runCntnFuncValue :: d :--> c
- | CntnFuncConst c
- = CntnFuncValue {
- cntnFnValsFunc :: (FlatManifold c, FlatManifold c', Manifold d, ε ~ Metric c, ε ~ Metric c') => (c' -> (c, ε -> Option ε)) -> CntnFuncValue d c' -> CntnFuncValue d c
- cntnFnValsCombine :: forall d c c' c'' ε ε' ε''. (FlatManifold c, FlatManifold c', FlatManifold c'', Manifold d, ε ~ Metric c, ε' ~ Metric c', ε'' ~ Metric c'', ε ~ ε', ε ~ ε'') => (c' -> c'' -> (c, ε -> (ε', (ε', ε''), ε''))) -> CntnFuncValue d c' -> CntnFuncValue d c'' -> CntnFuncValue d c
- finiteGraphContinℝtoℝ :: GraphWindowSpec -> (Double :--> Double) -> [(Double, Double)]
- finiteGraphContinℝtoℝ² :: GraphWindowSpec -> (Double :--> (Double, Double)) -> [[(Double, Double)]]
- midBetween :: (VectorSpace v, Fractional (Scalar v)) => [v] -> v
- (.:) :: (c -> d) -> (a -> b -> c) -> a -> b -> d
- just :: a -> Option a
- nothing :: Option a
- class (RealFloat (Metric v), InnerSpace v) => MetricSpace v where
- type EuclidSpace v = (HasBasis v, EqFloating (Scalar v), Eq v)
- type EqFloating f = (Eq f, Ord f, Floating f)
- data GraphWindowSpec = GraphWindowSpec {}
- data ZeroDim k = Origin
- data S⁰
- newtype S¹ = S¹ {}
- data S² = S² {}
- class NaturallyEmbedded m v where
- type Endomorphism a = a -> a
- type ℝ = Double
- type ℝ² = (ℝ, ℝ)
- type ℝ³ = (ℝ², ℝ)
- (^) :: Num a => a -> Int -> a
Documentation
data domain :--> codomain where Source
Continuous mapping.
Continuous :: (Manifold d, Manifold c, v ~ TangentSpace d, u ~ TangentSpace c, δ ~ Metric v, ε ~ Metric u) => (Chart d -> v -> (Chart c, u, ε -> Option δ)) -> d :--> c | |
|
Morphism (:-->) | |
PreArrow (:-->) | |
CartesianAgent (:-->) | |
Category (:-->) | |
Cartesian (:-->) | |
HasAgent (:-->) | |
EnhancedCat (->) (:-->) | |
PointAgent CntnFuncValue (:-->) d c | |
type UnitObject (:-->) = () | |
type Object (:-->) t = Manifold t | |
type PairObjects (:-->) a b = (FlatManifold a, FlatManifold b, Manifold (a, b)) | |
type AgentVal (:-->) d c = CntnFuncValue d c |
continuous_id' :: Manifold m => m :--> m Source
flatContinuous :: (FlatManifold v, FlatManifold w, δ ~ Metric v, ε ~ Metric w) => (v -> (w, ε -> Option δ)) -> v :--> w Source
runFlatContinuous :: (FlatManifold v, FlatManifold w, δ ~ Metric v, ε ~ Metric w) => (v :--> w) -> v -> (w, ε -> Option δ) Source
data Chart :: * -> * where Source
A chart is a homeomorphism from a connected, open subset Q ⊂ M of
an n-manifold M to either the open unit disk Dⁿ ⊂ V ≃ ℝⁿ, or
the half-disk Hⁿ = {x ∊ Dⁿ: x₀≥0}. In e.g. the former case, chartInMap
is thus defined ∀ v ∊ V : |v| < 1, while 'chartOutMap p' will yield Just x
with x ∊ Dⁿ provided p is in Q, and Nothing
otherwise.
Obviously, fromJust .
should be equivalent to chartOutMap
. chartInMap
id
on Dⁿ, and
to chartInMap
. fromJust . chartOutMap
id
on Q.
IdChart :: FlatManifold v => Chart v | |
Chart :: (Manifold m, v ~ TangentSpace m, FlatManifold v) => (v :--> m) -> (m -> Maybe (m :--> v)) -> ChartKind -> Chart m | |
|
LandlockedChart | A M ⇆ Dⁿ chart, for ordinary manifolds |
RimChart | A M ⇆ Hⁿ chart, for manifolds with a rim |
type FlatManifold v = (MetricSpace v, Manifold v, v ~ TangentSpace v) Source
isInUpperHemi :: EuclidSpace v => v -> Bool Source
class (MetricSpace (TangentSpace m), Metric (TangentSpace m) ~ ℝ) => Manifold m where Source
type TangentSpace m :: * Source
localAtlas :: m -> Atlas m Source
Manifold Double | |
Manifold () | |
(FlatManifold v₁, FlatManifold v₂, (~) * (Scalar v₁) (Scalar v₂), MetricSpace (Scalar v₁), (~) * (Metric (Scalar v₁)) ℝ, VectorSpace (v₁, v₂), (~) * (Scalar (v₁, v₂)) (Scalar v₁)) => Manifold (v₁, v₂) |
vectorSpaceAtlas :: FlatManifold v => v -> Atlas v Source
type Representsℝ r = (EqFloating r, FlatManifold r, r ~ Scalar r, r ~ Metric r) Source
continuousFlatFunction :: (FlatManifold d, FlatManifold c, ε ~ Metric c, δ ~ Metric d) => (d -> (c, ε -> Option δ)) -> d :--> c Source
type CntnRealFunction = Representsℝ r => r :--> r Source
cntnFuncsCombine :: forall d v c c' c'' ε ε' ε''. (FlatManifold c, FlatManifold c', FlatManifold c'', ε ~ Metric c, ε' ~ Metric c', ε'' ~ Metric c'', ε ~ ε', ε ~ ε'') => (c' -> c'' -> (c, ε -> (ε', ε''))) -> (d :--> c') -> (d :--> c'') -> d :--> c Source
data CntnFuncValue d c Source
CntnFuncValue | |
| |
CntnFuncConst c |
PointAgent CntnFuncValue (:-->) d c | |
(Representsℝ r, Manifold d) => Floating (CntnFuncValue d r) | |
(Representsℝ r, Manifold d) => Fractional (CntnFuncValue d r) | |
(Representsℝ r, Manifold d) => Num (CntnFuncValue d r) | |
(FlatManifold v, MetricSpace v, (~) * (Metric v) ℝ, FlatManifold (Scalar v), MetricSpace (Scalar v), (~) * (Metric (Scalar v)) ℝ, Manifold d) => VectorSpace (CntnFuncValue d v) | |
(FlatManifold v, Manifold d) => AdditiveGroup (CntnFuncValue d v) | |
type Scalar (CntnFuncValue d v) = CntnFuncValue d (Scalar v) |
cntnFnValsFunc :: (FlatManifold c, FlatManifold c', Manifold d, ε ~ Metric c, ε ~ Metric c') => (c' -> (c, ε -> Option ε)) -> CntnFuncValue d c' -> CntnFuncValue d c Source
cntnFnValsCombine :: forall d c c' c'' ε ε' ε''. (FlatManifold c, FlatManifold c', FlatManifold c'', Manifold d, ε ~ Metric c, ε' ~ Metric c', ε'' ~ Metric c'', ε ~ ε', ε ~ ε'') => (c' -> c'' -> (c, ε -> (ε', (ε', ε''), ε''))) -> CntnFuncValue d c' -> CntnFuncValue d c'' -> CntnFuncValue d c Source
finiteGraphContinℝtoℝ :: GraphWindowSpec -> (Double :--> Double) -> [(Double, Double)] Source
finiteGraphContinℝtoℝ² :: GraphWindowSpec -> (Double :--> (Double, Double)) -> [[(Double, Double)]] Source
midBetween :: (VectorSpace v, Fractional (Scalar v)) => [v] -> v Source
class (RealFloat (Metric v), InnerSpace v) => MetricSpace v where Source
metric :: v -> Metric v Source
metricSq :: v -> Metric v Source
(|*^) :: Metric v -> v -> v Source
metricToScalar :: v -> Metric v -> Scalar v Source
MetricSpace () | |
MetricSpace ℝ | |
(RealFloat r, MetricSpace r, (~) * (Scalar (Complex r)) (Metric r)) => MetricSpace (Complex r) | |
(MetricSpace v, MetricSpace (Scalar v), MetricSpace w, (~) * (Scalar v) (Scalar w), (~) * (Metric v) (Metric (Scalar v)), (~) * (Metric w) (Metric v), (~) * (Metric (Scalar w)) (Metric v), RealFloat (Metric v)) => MetricSpace (v, w) |
type EuclidSpace v = (HasBasis v, EqFloating (Scalar v), Eq v) Source
type EqFloating f = (Eq f, Ord f, Floating f) Source
Eq (ZeroDim k) | |
Show (ZeroDim k) | |
Monoid (ZeroDim k) | |
HasBasis (ZeroDim k) | |
VectorSpace (ZeroDim k) | |
AdditiveGroup (ZeroDim k) | |
VectorSpace k => HasMetric (ZeroDim k) | |
PseudoAffine (ZeroDim k) | |
type Basis (ZeroDim k) = Void | |
type Scalar (ZeroDim k) = k | |
type DualSpace (ZeroDim k) = ZeroDim k | |
type PseudoDiff (ZeroDim k) = ZeroDim k |
Show S¹ | |
PseudoAffine S¹ | |
NaturallyEmbedded S¹ ℝ² | |
type PseudoDiff S¹ = ℝ |
Show S² | |
PseudoAffine S² | |
NaturallyEmbedded S² ℝ³ | |
type PseudoDiff S² = ℝ² |
class NaturallyEmbedded m v where Source
NaturallyEmbedded S² ℝ³ | |
NaturallyEmbedded S¹ ℝ² | |
NaturallyEmbedded S⁰ ℝ | |
(VectorSpace y, VectorSpace z) => NaturallyEmbedded x ((x, y), z) | |
VectorSpace y => NaturallyEmbedded x (x, y) |
type Endomorphism a = a -> a Source