{-| Module : FiniteCategories Description : An example of free subcategory. Copyright : Guillaume Sabbagh 2021 License : GPL-3 Maintainer : guillaumesabbagh@protonmail.com Stability : experimental Portability : portable An example of free subcategory. -} module ExampleSubcategories.ExampleFreeSubcategory ( freeSubcategory, main ) where import ExampleSet.ExamplePowerOrdSet (power) import Subcategories.FreeSubcategory import Set.FinOrdSet import ExportGraphViz.ExportGraphViz import Data.Set import FiniteCategory.FiniteCategory -- | Free subcategory generated by three maps in the set category containing {1,2}, {2,3} and {1,3}. freeSubcategory = FreeSubcategory power [(ar power (fromList [1,2]) (fromList [2,3])) !! 0,(ar power (fromList [2,3]) (fromList [1,3])) !! 0,(ar power (fromList [1,3]) (fromList [1,2])) !! 0] :: FreeSubcategory (FinOrdSet Int) (FinOrdMap Int) (Set Int) -- | Exports previously defined categories as pdf files with GraphViz. main = do putStrLn "Start of ExampleFreeSubcategory" catToPdf freeSubcategory "OutputGraphViz/Examples/Subcategories/freeSubcategory" putStrLn "End of ExampleFreeSubcategory"