Skip to content

Commit

Permalink
Merge pull request #263 from FlynnFehre/monomorphism_function
Browse files Browse the repository at this point in the history
Added ButterflyFaithfulMonomorphismIntoSimplicialSurface and AllButterflyFaithfulMonomorphismsIntoSimplicialSurface
  • Loading branch information
ReymondAkpanya authored Sep 11, 2024
2 parents 7a6385a + b5eb0fd commit da1ca2d
Show file tree
Hide file tree
Showing 8 changed files with 1,163 additions and 10 deletions.
Binary file not shown.
428 changes: 428 additions & 0 deletions doc/images/_Wrapper_Butterfly_Faithful_Monomorphism_Hexagon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
319 changes: 319 additions & 0 deletions doc/tikz-files/Image_Butterfly_Faithful_Monomorphism_Hexagon.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,319 @@
\documentclass{standalone}

\pagestyle{empty}
% This document contains the TikZ-header for all our LaTeX-computations.
% It especially contains all global graphic parameters.

\usepackage{amsmath, amssymb, amsfonts} % Standard Math-stuff

\usepackage{ifthen}

\usepackage{tikz}
\usetikzlibrary{calc}
\usetikzlibrary{positioning}
\usetikzlibrary{shapes}
\usetikzlibrary{patterns}


% Sometimes we want to implement different behaviour for the generated
% HTML-pictures (for example, shading is not supported in HTML).
% For that we define a macro to check whether we run the code with
% htlatex. The code comes from
% https://tex.stackexchange.com/questions/93852/what-is-the-correct-way-to-check-for-latex-pdflatex-and-html-in-the-same-latex
\makeatletter
\edef\texforht{TT\noexpand\fi
\@ifpackageloaded{tex4ht}
{\noexpand\iftrue}
{\noexpand\iffalse}}
\makeatother


% Define a text=none option for nodes that ignores the given text, from
% https://tex.stackexchange.com/questions/59354/no-text-none-in-tikz
\makeatletter
\newif\iftikz@node@phantom
\tikzset{
phantom/.is if=tikz@node@phantom,
text/.code=%
\edef\tikz@temp{#1}%
\ifx\tikz@temp\tikz@nonetext
\tikz@node@phantomtrue
\else
\tikz@node@phantomfalse
\let\tikz@textcolor\tikz@temp
\fi
}
\usepackage{etoolbox}
\patchcmd\tikz@fig@continue{\tikz@node@transformations}{%
\iftikz@node@phantom
\setbox\pgfnodeparttextbox\hbox{}
\fi\tikz@node@transformations}{}{}
\makeatother

% Find the angle of a given line (within TikZ)
\newcommand{\tikzAngleOfLine}{\tikz@AngleOfLine}
\def\tikz@AngleOfLine(#1)(#2)#3{%
\pgfmathanglebetweenpoints{%
\pgfpointanchor{#1}{center}}{%
\pgfpointanchor{#2}{center}}
\pgfmathsetmacro{#3}{\pgfmathresult}%
}

% Now we define the global styles
% The global styles are defined nestedly. You have to give your tikzpicture
% the global options [vertexStyle, edgeStyle, faceStyle] to activate them.
%
% You can disable labels by using the option nolabels, i.e.
% vertexStyle=nolabels to deactivate vertex labels.
%
% If you want to have a specific style for your picture, you can also use
% this specific meta-style instead of the general style. For example if you
% want to use double edges in one single picture - no matter the style of
% the rest of the document - you can use edgeDouble instead of edgeStyle.
%
% To set the default style, modify the vertexStyle/.default entry.

% Vertex styles
\tikzset{
vertexNodePlain/.style = {fill=#1, shape=circle, inner sep=0pt, minimum size=2pt, text=none},
vertexNodePlain/.default=gray,
vertexPlain/labels/.style = {
vertexNode/.style={vertexNodePlain=##1},
vertexLabel/.style={gray}
},
vertexPlain/nolabels/.style = {
vertexNode/.style={vertexNodePlain=##1},
vertexLabel/.style={text=none}
},
vertexPlain/.style = vertexPlain/#1,
vertexPlain/.default=labels
}
\tikzset{
vertexNodeNormal/.style = {fill=#1, shape=circle, inner sep=0pt, minimum size=4pt, text=none},
vertexNodeNormal/.default = blue,
vertexNormal/labels/.style = {
vertexNode/.style={vertexNodeNormal=##1},
vertexLabel/.style={blue}
},
vertexNormal/nolabels/.style = {
vertexNode/.style={vertexNodeNormal=##1},
vertexLabel/.style={text=none}
},
vertexNormal/.style = vertexNormal/#1,
vertexNormal/.default=labels
}
\tikzset{
vertexNodeBallShading/pdf/.style = {ball color=#1},
vertexNodeBallShading/svg/.style = {fill=#1},
vertexNodeBallShading/.code = {% Conditional shading depending whether we want pdf or svg output
\if\texforht
\tikzset{vertexNodeBallShading/svg=#1!90!black}
\else
\tikzset{vertexNodeBallShading/pdf=#1}
\fi
},
vertexNodeBall/.style = {shape=circle, vertexNodeBallShading=#1, inner sep=2pt, outer sep=0pt, minimum size=3pt, font=\tiny},
vertexNodeBall/.default = white,
vertexBall/labels/.style = {
vertexNode/.style={vertexNodeBall=##1, text=black},
vertexLabel/.style={text=none}
},
vertexBall/nolabels/.style = {
vertexNode/.style={vertexNodeBall=##1, text=none},
vertexLabel/.style={text=none}
},
vertexBall/.style = vertexBall/#1,
vertexBall/.default=labels
}
\tikzset{
vertexStyle/.style={vertexNormal=#1},
vertexStyle/.default = labels
}


% 1) optional: colour of vertex
% 2) position of the vertex
% 3) relative position of the node
% 4) name of the vertex
\newcommand{\vertexLabelR}[4][]{
\ifthenelse{ \equal{#1}{} }
{ \node[vertexNode] (#2 name) at (#2) {#4}; }
{ \node[vertexNode=#1] (#2 name) at (#2) {#4}; }
\node[vertexLabel, #3] at (#2) {#4};
}
% 1) optional: colour of vertex
% 2) position of the vertex
% 3) absolute position of the node
% 4) name of the vertex
\newcommand{\vertexLabelA}[4][]{
\ifthenelse{ \equal{#1}{} }
{ \node[vertexNode] (#2 name) at (#2) {#4}; }
{ \node[vertexNode=#1] (#2 name) at (#2) {#4}; }
\node[vertexLabel] at (#3) {#4};
}


% Edge styles
% If you have trouble with the double-lines overlapping, this might (?) help:
% https://tex.stackexchange.com/questions/288159/closing-the-ends-of-double-line-in-tikz
\newcommand{\edgeLabelColor}{blue!20!white}
\tikzset{
edgeLineNone/.style = {draw=none},
edgeLineNone/.default=black,
edgeNone/labels/.style = {
edge/.style = {edgeLineNone=##1},
edgeLabel/.style = {fill=\edgeLabelColor,font=\small}
},
edgeNone/nolabels/.style = {
edge/.style = {edgeLineNone=##1},
edgeLabel/.style = {text=none}
},
edgeNone/.style = edgeNone/#1,
edgeNone/.default = labels
}
\tikzset{
edgeLinePlain/.style={line join=round, draw=#1},
edgeLinePlain/.default=black,
edgePlain/labels/.style = {
edge/.style={edgeLinePlain=##1},
edgeLabel/.style={fill=\edgeLabelColor,font=\small}
},
edgePlain/nolabels/.style = {
edge/.style={edgeLinePlain=##1},
edgeLabel/.style={text=none}
},
edgePlain/.style = edgePlain/#1,
edgePlain/.default = labels
}
\tikzset{
edgeLineDouble/.style = {very thin, double=#1, double distance=.8pt, line join=round},
edgeLineDouble/.default=gray!90!white,
edgeDouble/labels/.style = {
edge/.style = {edgeLineDouble=##1},
edgeLabel/.style = {fill=\edgeLabelColor,font=\small}
},
edgeDouble/nolabels/.style = {
edge/.style = {edgeLineDouble=##1},
edgeLabel/.style = {text=none}
},
edgeDouble/.style = edgeDouble/#1,
edgeDouble/.default = labels
}
\tikzset{
edgeStyle/.style = {edgePlain=#1},
edgeStyle/.default = labels
}

% Face styles
% Here we have an exception - the style face is always defined.
%
\newcommand{\faceColorY}{yellow!60!white} % yellow
\newcommand{\faceColorB}{blue!60!white} % blue
\newcommand{\faceColorC}{cyan!60} % cyan
\newcommand{\faceColorR}{red!60!white} % red
\newcommand{\faceColorG}{green!60!white} % green
\newcommand{\faceColorO}{orange!50!yellow!70!white} % orange

% define default face colour (and default swap colour)
\newcommand{\faceColor}{\faceColorY}
\newcommand{\faceColorSwap}{\faceColorC}

% define secondary default colours (to use in a single section)
\newcommand{\faceColorFirst}{green!40!white}
\newcommand{\faceColorSecond}{gray!15!white}
\newcommand{\faceColorThird}{red!17!white}
\newcommand{\faceColorFourth}{olive!20!white}

\tikzset{
face/.style = {fill=#1},
face/.default = \faceColor,
faceY/.style = {face=\faceColorY},
faceB/.style = {face=\faceColorB},
faceC/.style = {face=\faceColorC},
faceR/.style = {face=\faceColorR},
faceG/.style = {face=\faceColorG},
faceO/.style = {face=\faceColorO}
}
\tikzset{
faceStyle/labels/.style = {
faceLabel/.style = {}
},
faceStyle/nolabels/.style = {
faceLabel/.style = {text=none}
},
faceStyle/.style = faceStyle/#1,
faceStyle/.default = labels
}
\tikzset{ face/.style={fill=#1} }
\tikzset{ faceSwap/.code=
\ifdefined\swapColors
\tikzset{face=\faceColorSwap}
\else
\tikzset{face=\faceColor}
\fi
}



\usepackage{hyperref}


\begin{document}



\begin{tikzpicture}[vertexStyle, edgeStyle, faceStyle]

\newcommand{\setupCoord}{
\coordinate (Z) at (0,0);
\foreach \i in {1,...,6}{
\coordinate (A\i) at (180-60*\i:2.5);
}
}


\begin{scope}[shift={(3.5,0)}]
\setupCoord

\draw[edge,face]
(Z) -- (A1) -- node[edgeLabel]{1} (A2) -- cycle
(Z) -- node[edgeLabel]{9} (A2) -- node[edgeLabel]{2} (A3) -- cycle
(Z) -- node[edgeLabel]{10} (A3) -- node[edgeLabel]{3} (A4) -- cycle
(Z) -- node[edgeLabel]{11} (A4) -- node[edgeLabel]{4} (A5) -- cycle
(Z) -- node[edgeLabel]{12} (A5) -- node[edgeLabel]{5} (A6) -- cycle
(Z) -- node[edgeLabel]{13} (A6) -- node[edgeLabel]{6} (A1) -- node[edgeLabel]{8} (Z);

\foreach \p/\r/\n in {1/above left/1, 2/above right/2, 3/right/3, 4/below right/4, 5/below left/5, 6/left/6}{
\vertexLabelR{A\p}{\r}{\n}
}
\vertexLabelR{Z}{above}{8}

\foreach \i/\j/\n in {1/2/I, 2/3/II, 3/4/III, 4/5/IV, 5/6/V, 6/1/VI}{
\node[faceLabel] at (barycentric cs:A\i=1,A\j=1,Z=1) {$\n$};
}
\end{scope}


\node at (0,0) {$\rightarrow$};


\begin{scope}[shift={(-3.5,0)}]
\setupCoord

\draw[edge,face]
(Z) -- node[edgeLabel]{5} (A1) -- node[edgeLabel]{1} (A2) -- cycle
(Z) -- node[edgeLabel]{6} (A2) -- node[edgeLabel]{2} (A3) -- cycle
(Z) -- node[edgeLabel]{7} (A3) -- node[edgeLabel]{3} (A4) -- node[edgeLabel]{4} (Z);

\foreach \p/\r/\n in {1/above left/1, 2/above right/2, 3/right/3, 4/below right/4}{
\vertexLabelR{A\p}{\r}{\n}
}
\vertexLabelR{Z}{below left}{5}

\foreach \i/\j/\n in {1/2/I, 2/3/II, 3/4/III}{
\node[faceLabel] at (barycentric cs:A\i=1,A\j=1,Z=1) {$\n$};
}
\end{scope}
\end{tikzpicture}

\end{document}
Loading

0 comments on commit da1ca2d

Please sign in to comment.