fiber-bundles-0.1.0: Fiber bundles and related algebraic structures.

Safe HaskellSafe
LanguageHaskell2010

Data.FiberBundle.Section

Contents

Synopsis

Bundle Sections

data BundleSection a Source #

A BundleSection corresponds to a function f :: Base a -> a such that base . f = id. In this encoding we only store values that are different from a unit.

Instances
(Eq a, Eq (Base a)) => Eq (BundleSection a) Source # 
Instance details

Defined in Data.FiberBundle.Section

(Show a, Show (Base a)) => Show (BundleSection a) Source # 
Instance details

Defined in Data.FiberBundle.Section

(MonoidBundle a, Ord (Base a), Eq a) => Semigroup (BundleSection a) Source # 
Instance details

Defined in Data.FiberBundle.Section

(MonoidBundle a, Ord (Base a), Eq a) => Monoid (BundleSection a) Source # 
Instance details

Defined in Data.FiberBundle.Section

(GroupBundle a, Ord (Base a), Eq a) => Group (BundleSection a) Source # 
Instance details

Defined in Data.FiberBundle.Section

value :: (MonoidBundle a, Ord (Base a)) => BundleSection a -> Base a -> a Source #

The underlying function of the BundleSection.

Construction

insert :: (AbelianBundle a, MonoidBundle a, Ord (Base a), Eq a) => a -> BundleSection a -> BundleSection a Source #

Insert a value in a BundleSection, by combining the given value to the value that is present in the corresponding fiber. Synonym for insertLeft, simplified for when the operation is commutative.

insertLeft :: (MonoidBundle a, Ord (Base a), Eq a) => a -> BundleSection a -> BundleSection a Source #

Insert a value in a BundleSection, by combining the given value to the value that is present in the corresponding fiber. The new value is combined from the left: new <> old.

insertRight :: (MonoidBundle a, Ord (Base a), Eq a) => a -> BundleSection a -> BundleSection a Source #

Insert a value in a BundleSection, by combining the given value to the value that is present in the corresponding fiber. The new value is combined from the right: old <> new.

fromList :: (AbelianBundle a, MonoidBundle a, Ord (Base a), Eq a) => [a] -> BundleSection a Source #

Build a BundleSection from a list of elements. Elements belonging to the same fiber are combined. This is a synonym for fromListLeft, simplified for when the operation is commutative.

fromListLeft :: (MonoidBundle a, Ord (Base a), Eq a) => [a] -> BundleSection a Source #

Build a BundleSection from a list of elements. Elements belonging to the same fiber are combined. The new value is combined from the left: new <> old.

fromListRight :: (MonoidBundle a, Ord (Base a), Eq a) => [a] -> BundleSection a Source #

Build a BundleSection from a list of elements. Elements belonging to the same fiber are combined. The new value is combined from the right: old <> new.

Transformation

map :: (AbelianBundle b, MonoidBundle b, Ord (Base b), Eq b) => BundleMorphism a b -> BundleSection a -> BundleSection b Source #

Maps a BundleSection from a MonoidBundle to another. We expect the BundleMorphism to be a monoid morphism in each fiber.

Also, b should be an AbelianBundle since there is no guarantee on the order on which fibers are combined.

WARNING: This function can error if the BundleMorphism is not lawful.

mapMonotonic :: (MonoidBundle b, Ord (Base b), Eq b) => BundleMorphism a b -> BundleSection a -> BundleSection b Source #

The same as map, but in the case where the Base part of the BundleMorphism is monotonic. In this case the mapping between fibers is injective. Therefore, there is no combination of different fibers and the AbelianBundle requisite can be dropped.

Destruction

toList :: BundleSection a -> [a] Source #

Retrieve all the non-unit values for the BundleSection.