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

Data.FiberBundle.Section

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 detailsDefined in Data.FiberBundle.Section Methods(==) :: BundleSection a -> BundleSection a -> Bool #(/=) :: BundleSection a -> BundleSection a -> Bool # (Show a, Show (Base a)) => Show (BundleSection a) Source # Instance detailsDefined in Data.FiberBundle.Section MethodsshowsPrec :: Int -> BundleSection a -> ShowS #show :: BundleSection a -> String #showList :: [BundleSection a] -> ShowS # (MonoidBundle a, Ord (Base a), Eq a) => Semigroup (BundleSection a) Source # Instance detailsDefined in Data.FiberBundle.Section Methods(<>) :: BundleSection a -> BundleSection a -> BundleSection a #stimes :: Integral b => b -> BundleSection a -> BundleSection a # (MonoidBundle a, Ord (Base a), Eq a) => Monoid (BundleSection a) Source # Instance detailsDefined in Data.FiberBundle.Section Methodsmconcat :: [BundleSection a] -> BundleSection a # (GroupBundle a, Ord (Base a), Eq a) => Group (BundleSection a) Source # Instance detailsDefined in Data.FiberBundle.Section Methodspow :: Integral x => BundleSection a -> x -> BundleSection a #

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.