pub struct MuResolution<const U: bool, CC: ChainComplex>{
name: String,
lock: Mutex<()>,
complex: Arc<CC>,
modules: OnceBiVec<Arc<MuFreeModule<U, CC::Algebra>>>,
zero_module: Arc<MuFreeModule<U, CC::Algebra>>,
chain_maps: OnceBiVec<Arc<MuFreeModuleHomomorphism<U, CC::Module>>>,
differentials: OnceVec<Arc<MuFreeModuleHomomorphism<U, MuFreeModule<U, CC::Algebra>>>>,
kernels: DashMap<Bidegree, Subspace>,
save_dir: SaveDirectory,
pub should_save: bool,
pub load_quasi_inverse: bool,
}Expand description
A minimal resolution of a chain complex. The functions MuResolution::compute_through_stem and
MuResolution::compute_through_bidegree extends the minimal resolution to the given bidegree.
Fields§
§name: String§lock: Mutex<()>§complex: Arc<CC>§modules: OnceBiVec<Arc<MuFreeModule<U, CC::Algebra>>>§zero_module: Arc<MuFreeModule<U, CC::Algebra>>§chain_maps: OnceBiVec<Arc<MuFreeModuleHomomorphism<U, CC::Module>>>§differentials: OnceVec<Arc<MuFreeModuleHomomorphism<U, MuFreeModule<U, CC::Algebra>>>>§kernels: DashMap<Bidegree, Subspace>For each internal degree, store the kernel of the most recently calculated chain map as
returned by generate_old_kernel_and_compute_new_kernel, to be used if we run
compute_through_degree again.
save_dir: SaveDirectory§should_save: boolWhether we should save newly computed data to the disk. This has no effect if there is no
save file. Defaults to self.save_dir.is_some().
load_quasi_inverse: boolWhether we should keep the quasi-inverses of the differentials.
If set to false,
- If there is no save file, then the quasi-inverse will not be computed.
- If there is a save file, then the quasi-inverse will be computed, written to disk, and dropped from memory. We will not load quasi-inverses from save files.
Note that this only applies to quasi-inverses of differentials. The quasi-inverses to the augmentation map are useful when the target chain complex is not concentrated in one degree, and they tend to be quite small anyway.
Implementations§
Source§impl<const U: bool, CC: ChainComplex> MuResolution<U, CC>
impl<const U: bool, CC: ChainComplex> MuResolution<U, CC>
pub fn new(complex: Arc<CC>) -> Self
pub fn new_with_save( complex: Arc<CC>, save_dir: impl Into<SaveDirectory>, ) -> Result<Self>
pub fn set_name(&mut self, name: String)
pub fn name(&self) -> &str
fn add_generators(&self, b: Bidegree, num_new_gens: usize)
Sourcefn extend_through_degree(&self, max_s: i32)
fn extend_through_degree(&self, max_s: i32)
This function prepares the Resolution object to perform computations up to the
specified s degree. It does not perform any computations by itself. It simply lengthens
the OnceVecs modules, chain_maps, etc. to the right length.
Sourcefn get_kernel(&self, b: Bidegree) -> Subspace
fn get_kernel(&self, b: Bidegree) -> Subspace
Gets the kernel of the differential starting at $(s, t)$. If this was previously computed, we simply retrieve the value (and remove it from the cache). Otherwise, we compute the kernel. This requires the differential to be computed at $(s, t - 1)$, but not $(s, t)$ itself. Indeed, the new generators added to $(s, t)$ are by construction not in the kernel.
Sourcefn step_resolution(&self, b: Bidegree)
fn step_resolution(&self, b: Bidegree)
Call our resolution $X$, and the chain complex to resolve $C$. This is a legitimate resolution if the map $f: X \to C$ induces an isomorphism on homology. This is the same as saying the cofiber is exact. The cofiber is given by the complex
$$ X_s \oplus C_{s+1} \to X_{s-1} \oplus C_s \to X_{s-2} \oplus C_{s-1} \to \cdots $$
where the differentials are given by
$$ \begin{pmatrix} d_X & 0 \\ (-1)^s f & d_C \end{pmatrix} $$
Our method of producing $X_{s, t}$ and the chain maps are as follows. Suppose we have already built the chain map and differential for $X_{s-1, t}$ and $X_{s, t-1}$. Since $X_s$ is a free module, the generators in degree $< t$ gives us a bunch of elements in $X_s$ already, and we know exactly where they get mapped to. Let $T$ be the $\mathbb{F}_p$ vector space generated by these elements. Then we already have a map
$$ T \to X_{s-1, t} \oplus C_{s, t}$$
and we know this hits the kernel of the map
$$ D = X_{s-1, t} \oplus C_{s, t} \to X_{s-2, t} \oplus C_{s-1, t}. $$
What we need to do now is to add generators to $X_{s, t}$ to hit the entirity of this kernel. Note that we don’t have to do this. Some of the elements in the kernel might be hit by $C_{s+1, t}$ and we don’t have to hit them, but we opt to add generators to hit it anyway.
If we do it this way, then we know the composite of the map
$$ T \to X_{s-1, t} \oplus C_{s, t} \to C_{s, t} $$
has to be surjective, since the image of $C_{s, t}$ under $D$ is also in the image of $X_{s-1, t}$. So our first step is to add generators to $X_{s, t}$ such that this composite is surjective.
After adding these generators, we need to decide where to send them to. We know their values in the $C_{s, t}$ component, but we need to use a quasi-inverse to find the element in $X_{s-1, t}$ that hits the corresponding image of $C_{s, t}$. This tells us the $X_{s-1, t}$ component.
Finally, we need to add further generators to $X_{s, t}$ to hit all the elements in the kernel of
$$ X_{s-1, t} \to X_{s-2, t} \oplus C_{s-1, t}. $$
This kernel was recorded by the previous iteration of the method in old_kernel, so this
step is doable as well.
Note that if we add our new generators conservatively, then the kernel of the maps
$$ \begin{aligned} T &\to X_{s-1, t} \oplus C_{s, t} \\ X_{s, t} &\to X_{s-1, t} \oplus C_{s, t} \end{aligned} $$ agree.
In the code, we first row reduce the matrix of the map from $T$. This lets us record the kernel which is what the function returns at the end. This computation helps us perform the future steps since we need to know about the cokernel of this map.
§Arguments
s- The s degree to calculatet- The t degree to calculate
To run step_resolution(s, t), we must have already had run step_resolution(s, t - 1)
and step_resolution(s - 1, t - 1). It is more efficient if we have in fact run
step_resolution(s - 1, t), so try your best to arrange calls to be run in this order.
pub fn compute_through_bidegree_with_callback( &self, max: Bidegree, cb: impl FnMut(Bidegree), )
Sourcepub fn compute_through_stem(&self, max: Bidegree)
pub fn compute_through_stem(&self, max: Bidegree)
This function resolves up till a fixed stem instead of a fixed t.
pub fn compute_through_stem_with_callback( &self, max: Bidegree, cb: impl FnMut(Bidegree), )
Trait Implementations§
Source§impl<const U: bool, CC: ChainComplex> AugmentedChainComplex for MuResolution<U, CC>
impl<const U: bool, CC: ChainComplex> AugmentedChainComplex for MuResolution<U, CC>
type ChainMap = MuFreeModuleHomomorphism<U, <CC as ChainComplex>::Module>
type TargetComplex = CC
fn target(&self) -> Arc<Self::TargetComplex>
fn chain_map(&self, s: i32) -> Arc<Self::ChainMap>
Source§impl<const U: bool, CC: ChainComplex> ChainComplex for MuResolution<U, CC>
impl<const U: bool, CC: ChainComplex> ChainComplex for MuResolution<U, CC>
type Algebra = <CC as ChainComplex>::Algebra
type Homomorphism = MuFreeModuleHomomorphism<U, MuFreeModule<U, <MuResolution<U, CC> as ChainComplex>::Algebra>>
type Module = MuFreeModule<U, <MuResolution<U, CC> as ChainComplex>::Algebra>
fn algebra(&self) -> Arc<Self::Algebra>
fn module(&self, s: i32) -> Arc<Self::Module>
fn zero_module(&self) -> Arc<Self::Module>
fn min_degree(&self) -> i32
Source§fn has_computed_bidegree(&self, b: Bidegree) -> bool
fn has_computed_bidegree(&self, b: Bidegree) -> bool
Source§fn differential(&self, s: i32) -> Arc<Self::Homomorphism>
fn differential(&self, s: i32) -> Arc<Self::Homomorphism>
Source§fn compute_through_bidegree(&self, b: Bidegree)
fn compute_through_bidegree(&self, b: Bidegree)
Source§fn next_homological_degree(&self) -> i32
fn next_homological_degree(&self) -> i32
self.module(s) is not defined.Source§fn apply_quasi_inverse<T, S>(
&self,
results: &mut [T],
b: Bidegree,
inputs: &[S],
) -> bool
fn apply_quasi_inverse<T, S>( &self, results: &mut [T], b: Bidegree, inputs: &[S], ) -> bool
self.differentials(s).quasi_inverse(t), but in some cases
the quasi-inverse might be stored separately on disk. Read moreSource§fn save_dir(&self) -> &SaveDirectory
fn save_dir(&self) -> &SaveDirectory
fn prime(&self) -> ValidPrime
Source§fn iter_stem(&self) -> StemIterator<'_, Self> ⓘ
fn iter_stem(&self) -> StemIterator<'_, Self> ⓘ
Auto Trait Implementations§
impl<const U: bool, CC> !Freeze for MuResolution<U, CC>
impl<const U: bool, CC> !RefUnwindSafe for MuResolution<U, CC>
impl<const U: bool, CC> Send for MuResolution<U, CC>
impl<const U: bool, CC> Sync for MuResolution<U, CC>
impl<const U: bool, CC> Unpin for MuResolution<U, CC>
impl<const U: bool, CC> !UnwindSafe for MuResolution<U, CC>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<const U: bool, CC> FreeChainComplex<U> for CCwhere
CC: ChainComplex<Module = MuFreeModule<U, <CC as ChainComplex>::Algebra>, Homomorphism = MuFreeModuleHomomorphism<U, MuFreeModule<U, <CC as ChainComplex>::Algebra>>>,
<CC as ChainComplex>::Algebra: MuAlgebra<U>,
impl<const U: bool, CC> FreeChainComplex<U> for CCwhere
CC: ChainComplex<Module = MuFreeModule<U, <CC as ChainComplex>::Algebra>, Homomorphism = MuFreeModuleHomomorphism<U, MuFreeModule<U, <CC as ChainComplex>::Algebra>>>,
<CC as ChainComplex>::Algebra: MuAlgebra<U>,
fn graded_dimension_string(&self) -> String
fn to_sseq(&self) -> Sseq<2, Adams>
fn filtration_one_products(&self, op_deg: i32, op_idx: usize) -> Product<2>
Source§fn filtration_one_product(
&self,
op_deg: i32,
op_idx: usize,
source: Bidegree,
) -> Option<Vec<Vec<u32>>>
fn filtration_one_product( &self, op_deg: i32, op_idx: usize, source: Bidegree, ) -> Option<Vec<Vec<u32>>>
fn number_of_gens_in_bidegree(&self, b: Bidegree) -> usize
Source§fn iter_nonzero_stem(&self) -> impl Iterator<Item = Bidegree> + '_
fn iter_nonzero_stem(&self) -> impl Iterator<Item = Bidegree> + '_
Source§fn boundary_string(&self, g: BidegreeGenerator) -> String
fn boundary_string(&self, g: BidegreeGenerator) -> String
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more