MuResolution

Struct MuResolution 

Source
pub struct MuResolution<const U: bool, CC: ChainComplex>
where CC::Algebra: MuAlgebra<U>,
{ 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: bool

Whether 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: bool

Whether 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>
where CC::Algebra: MuAlgebra<U>,

Source

pub fn new(complex: Arc<CC>) -> Self

Source

pub fn new_with_save( complex: Arc<CC>, save_dir: impl Into<SaveDirectory>, ) -> Result<Self>

Source

pub fn set_name(&mut self, name: String)

Source

pub fn name(&self) -> &str

Source

fn add_generators(&self, b: Bidegree, num_new_gens: usize)

Source

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.

Source

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.

Source

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 calculate
  • t - 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.

Source

pub fn compute_through_bidegree_with_callback( &self, max: Bidegree, cb: impl FnMut(Bidegree), )

Source

pub fn compute_through_stem(&self, max: Bidegree)

This function resolves up till a fixed stem instead of a fixed t.

Source

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>
where CC::Algebra: MuAlgebra<U>,

Source§

impl<const U: bool, CC: ChainComplex> ChainComplex for MuResolution<U, CC>
where CC::Algebra: MuAlgebra<U>,

Source§

type Algebra = <CC as ChainComplex>::Algebra

Source§

type Homomorphism = MuFreeModuleHomomorphism<U, MuFreeModule<U, <MuResolution<U, CC> as ChainComplex>::Algebra>>

Source§

type Module = MuFreeModule<U, <MuResolution<U, CC> as ChainComplex>::Algebra>

Source§

fn algebra(&self) -> Arc<Self::Algebra>

Source§

fn module(&self, s: i32) -> Arc<Self::Module>

Source§

fn zero_module(&self) -> Arc<Self::Module>

Source§

fn min_degree(&self) -> i32

Source§

fn has_computed_bidegree(&self, b: Bidegree) -> bool

If the complex has been computed at bidegree (s, t). This means the module has been computed at (s, t), and so has the differential at (s, t). In the case of a free module, the target of the differential, namely the bidegree (s - 1, t), need not be computed, as long as all the generators hit by the differential have already been computed.
Source§

fn differential(&self, s: i32) -> Arc<Self::Homomorphism>

This returns the differential starting from the sth module.
Source§

fn compute_through_bidegree(&self, b: Bidegree)

Ensure all bidegrees less than or equal to (s, t) have been computed
Source§

fn next_homological_degree(&self) -> i32

The first s such that self.module(s) is not defined.
Source§

fn apply_quasi_inverse<T, S>( &self, results: &mut [T], b: Bidegree, inputs: &[S], ) -> bool
where for<'a> &'a mut T: Into<FpSliceMut<'a>>, for<'a> &'a S: Into<FpSlice<'a>>,

Apply the quasi-inverse of the (s, t)th differential to the list of inputs and results. This defaults to applying self.differentials(s).quasi_inverse(t), but in some cases the quasi-inverse might be stored separately on disk. Read more
Source§

fn save_dir(&self) -> &SaveDirectory

A directory used to save information about the chain complex.
Source§

fn prime(&self) -> ValidPrime

Source§

fn iter_stem(&self) -> StemIterator<'_, Self>

Iterate through all defined bidegrees in increasing order of stem.
Source§

fn save_file(&self, kind: SaveKind, b: Bidegree) -> SaveFile<Self::Algebra>

Get the save file of a bidegree

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<const U: bool, CC> FreeChainComplex<U> for CC
where CC: ChainComplex<Module = MuFreeModule<U, <CC as ChainComplex>::Algebra>, Homomorphism = MuFreeModuleHomomorphism<U, MuFreeModule<U, <CC as ChainComplex>::Algebra>>>, <CC as ChainComplex>::Algebra: MuAlgebra<U>,

Source§

fn graded_dimension_string(&self) -> String

Source§

fn to_sseq(&self) -> Sseq<2, Adams>

Source§

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>>>

Computes the filtration one product. Read more
Source§

fn number_of_gens_in_bidegree(&self, b: Bidegree) -> usize

Source§

fn iter_nonzero_stem(&self) -> impl Iterator<Item = Bidegree> + '_

Iterate through all nonzero bidegrees in increasing order of stem.
Source§

fn boundary_string(&self, g: BidegreeGenerator) -> String

Get a string representation of d(gen), where d is the differential of the resolution.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more