unlisted
ubuntu2004o
��c<� � @ sd d dl Z d dlmZ d dlmZ d dlmZ d dlmZ d dl m
Z
d dlmZ G dd � d e�Z
dS )
� N)�
SageObject)�matrix)�flatten)�
cached_method)�QQ)�lcmc @ sV e Zd ZdZdd� Zdd� Zdd� Zdd � Zd
d� Ze dd
� �Z
edd� �Zedd� �Z
edd� �Zedd� �Zedd� �Zedd� �Zedd� �Zedd� �Zdd� Zee d d!� ��Zee d"d#� ��Zd$d%� Zd&d'� Zd(d)� Ze d*d+� �Zd,d-� Zd.d/� Zd0d1� Zd2d3� Zd4d5� Zd6d7� Z d8d9� Z!dFd;d<�Z"d=d>� Z#ed?d@� �Z$dAdB� Z%dCdD� Z&dES )G�EmbeddedLevelGrapha5
LevelGraph inside a generalised stratum.
Note that the points of the enveloping GeneralisedStratum are of the form
(i,j) where i is the component and j the index of sig of that component,
while the points of the level graph are numbers 1,...,n.
Thus, dmp is a dictionary mapping integers to tuples of integers.
Attributes:
* LG (LevelGraph): underlying LevelGraph
* X (GeneralisedStratum): enveloping stratum
* dmp (dict): (bijective!) dictionary marked points of LG -> points of stratum
* dmp_inv (dict): inverse of dmp
* dlevels (dict): (bijective!) dictionary levels of LG -> new level numbering
* dlevels_inv (dict): inverse of dlevels
* top (GeneralisedStratum): (if self is a BIC) top component
* bot (GeneralisedStratum): (if self is a BIC) bottom component
* clutch_dict (dict): (if self is a BIC) dictionary mapping points of top
stratum to points of bottom stratum where there is an edge in self.
* emb_top (dict): (if self is a BIC) dictionary mapping points of stratum top
to the corresponding points of the enveloping stratum.
* emb_bot (dict): (if self is a BIC) dictionary mapping points of stratum bot
to the corresponding points of the enveloping stratum.
* automorphisms (list of list of dicts): automorphisms
* codim (int): codimension of LevelGraph in stratum
number_of_levels (int): Number of levels of self.
Note that attempting to access any of the attributes top, bot, clutch_dict,
emb_top or emb_bot will raise a ValueError if self is not a BIC.
c C s� || _ || _|| _dd� |�� D �| _| �� || _dd� |�� D �| _d| _d| _ d| _
d| _d| _d| _
i | _d| _| j �� | _tt| j�� ��| _dS )ag
Initialises EmbeddedLevelGraph.
Args:
LG (LevelGraph): underlying LevelGraph
X (GeneralisedStratum): enveloping stratum
dmp (dictionary): (bijective!) dictionary marked points of LG -> points of stratum
dlevels (dictionary): (bijective!) dictionary levels of LG -> new level numbering
c S � i | ]\}}||�qS � r
��.0�key�valuer
r
�K/home/user/Introduction lectures/admcycles/diffstrata/embeddedlevelgraph.py�
<dictcomp>: � z/EmbeddedLevelGraph.__init__.<locals>.<dictcomp>c S r r
r
r r
r
r r = r N)�LG�X�dmp�items�dmp_inv�add_vertices_at_infinity�dlevelsZdlevels_inv�_top�_bot�_clutch_dict�_emb_top�_emb_bot�_automorphisms�_level�_ell�codim�len�set�keys�number_of_levels)�selfr r r r r
r
r �__init__- s"