pub trait Module:
Display
+ Any
+ Send
+ Sync {
type Algebra: Algebra;
Show 16 methods
// Required methods
fn algebra(&self) -> Arc<Self::Algebra>;
fn min_degree(&self) -> i32;
fn max_computed_degree(&self) -> i32;
fn dimension(&self, degree: i32) -> usize;
fn act_on_basis(
&self,
result: FpSliceMut<'_>,
coeff: u32,
op_degree: i32,
op_index: usize,
mod_degree: i32,
mod_index: usize,
);
fn basis_element_to_string(&self, degree: i32, idx: usize) -> String;
// Provided methods
fn compute_basis(&self, degree: i32) { ... }
fn is_unit(&self) -> bool { ... }
fn prime(&self) -> ValidPrime { ... }
fn max_degree(&self) -> Option<i32> { ... }
fn max_generator_degree(&self) -> Option<i32> { ... }
fn total_dimension(&self) -> usize { ... }
fn act(
&self,
result: FpSliceMut<'_>,
coeff: u32,
op_degree: i32,
op_index: usize,
input_degree: i32,
input: FpSlice<'_>,
) { ... }
fn act_by_element(
&self,
result: FpSliceMut<'_>,
coeff: u32,
op_degree: i32,
op: FpSlice<'_>,
input_degree: i32,
input: FpSlice<'_>,
) { ... }
fn act_by_element_on_basis(
&self,
result: FpSliceMut<'_>,
coeff: u32,
op_degree: i32,
op: FpSlice<'_>,
input_degree: i32,
input_index: usize,
) { ... }
fn element_to_string(&self, degree: i32, element: FpSlice<'_>) -> String { ... }
}Expand description
A bounded below module over an algebra.
To accommodate for infinite modules (e.g. modules in a free resolution), every module is potentially only define up to a degree. The extent to which the module is defined is kept track by two functions:
-
Module::max_computed_degreegives the maximum degree for which the module is fully defined. It is guaranteed that the module will never change up to this degree in the future. -
Module::compute_basisextends the internal data to support querying data up to (and including) a given degree. In general, we can run this beyond the max computed degree.
A useful example to keep in mind is a FreeModule, where we have
specified the generators up to some degree t. Then t is the max computed degree, while
compute_basis computes data such as the offset of existing generators in potentially higher
degrees.
Required Associated Types§
Required Methods§
Sourcefn min_degree(&self) -> i32
fn min_degree(&self) -> i32
The minimum degree of the module, which is required to be bounded below
Sourcefn max_computed_degree(&self) -> i32
fn max_computed_degree(&self) -> i32
The maximum t for which the module is fully defined at t. See Module documentation
for more details.
fn act_on_basis( &self, result: FpSliceMut<'_>, coeff: u32, op_degree: i32, op_index: usize, mod_degree: i32, mod_index: usize, )
Sourcefn basis_element_to_string(&self, degree: i32, idx: usize) -> String
fn basis_element_to_string(&self, degree: i32, idx: usize) -> String
The name of a basis element. This is useful for debugging and printing results.
Provided Methods§
Sourcefn compute_basis(&self, degree: i32)
fn compute_basis(&self, degree: i32)
Compute internal data of the module so that we can query information up to degree degree.
This should be run by the user whenever they want to query such information.
This function must be idempotent, and defaults to a no-op.
See Module documentation for more details.
Sourcefn prime(&self) -> ValidPrime
fn prime(&self) -> ValidPrime
The prime the module is over, which should be equal to the prime of the algebra.
Sourcefn max_degree(&self) -> Option<i32>
fn max_degree(&self) -> Option<i32>
max_degree is the a degree such that if t > max_degree, then self.dimension(t) = 0.
Sourcefn max_generator_degree(&self) -> Option<i32>
fn max_generator_degree(&self) -> Option<i32>
Maximum degree of a generator under the Steenrod action. Every element in higher degree must be obtainable from applying a Steenrod action to a lower degree element.
fn total_dimension(&self) -> usize
Sourcefn act(
&self,
result: FpSliceMut<'_>,
coeff: u32,
op_degree: i32,
op_index: usize,
input_degree: i32,
input: FpSlice<'_>,
)
fn act( &self, result: FpSliceMut<'_>, coeff: u32, op_degree: i32, op_index: usize, input_degree: i32, input: FpSlice<'_>, )
The length of input need not be equal to the dimension of the module in said degree.
Missing entries are interpreted to be 0, while extra entries must be zero.
This flexibility is useful when resolving to a stem. The point is that we have elements in
degree t that are guaranteed to not contain generators of degree t, and we don’t know
what generators will be added in degree t yet.
fn act_by_element( &self, result: FpSliceMut<'_>, coeff: u32, op_degree: i32, op: FpSlice<'_>, input_degree: i32, input: FpSlice<'_>, )
fn act_by_element_on_basis( &self, result: FpSliceMut<'_>, coeff: u32, op_degree: i32, op: FpSlice<'_>, input_degree: i32, input_index: usize, )
Sourcefn element_to_string(&self, degree: i32, element: FpSlice<'_>) -> String
fn element_to_string(&self, degree: i32, element: FpSlice<'_>) -> String
Gives the name of an element. The default implementation is derived from
Module::basis_element_to_string in the obvious way.