Skip to main content

ExtSpace

Struct ExtSpace 

Source
pub struct ExtSpace(/* private fields */);
Expand description

Ext^k(M, N) as an explicit vector space: the resolution prefix, RREF cocycle and coboundary bases in generator-block coordinates, the deterministic complement of the coboundaries inside the cocycles, and one representative cocycle per complement row.

Two spaces are compatible when their sources are Module::ptr_eq, their targets are Module::ptr_eq, and their degrees are equal. Every stored matrix is deterministic, so recomputed compatible spaces carry identical bases and class coordinates transport verbatim.

Cloning is cheap (a reference count bump).

Implementations§

Source§

impl ExtSpace

Source

pub fn new(m: &Module, n: &Module, k: usize) -> Result<ExtSpace, ExtError>

Builds Ext^k(m, n) from the minimal resolution prefix resolve(m, k + 1). Zero modules give zero spaces. A finite resolution that ends before degree k gives the zero space with the zero module as cochain term. Errors when the modules do not share one algebra or k + 1 is not representable.

Source

pub fn dim(&self) -> usize

dim_Fp Ext^k(M, N): the number of complement rows. Equals crate::ext::ext_dim(m, n, k).

Source

pub fn source(&self) -> &Module

The source module M.

Source

pub fn target(&self) -> &Module

The target module N.

Source

pub fn degree(&self) -> usize

The cohomological degree k.

Source

pub fn cochain_term(&self) -> &Module

The source of degree-k cochains: P_k of the minimal resolution, or the zero module when the finite resolution ends before k.

Source

pub fn representatives(&self) -> &[Morphism]

One representative cocycle P_k -> N per complement row, in row order.

Source

pub fn cocycle_basis(&self) -> &DenseMat

The RREF basis of Z^k = ker delta^k in generator-block coordinates, one vector per row.

Source

pub fn coboundary_basis(&self) -> &DenseMat

The RREF basis of B^k = im delta^{k-1} in generator-block coordinates, one vector per row; no rows at degree 0.

Source

pub fn complement_basis(&self) -> &DenseMat

The complement of B^k in Z^k, in scan order. Class coordinates index these rows.

Source

pub fn is_compatible(&self, other: &ExtSpace) -> bool

Whether class coordinates transport verbatim between the two spaces: sources pointer-equal, targets pointer-equal, degrees equal.

Source

pub fn matches(&self, other: &ExtSpace) -> bool

Whether the two compatible spaces carry the same stored data: the resolution prefix term by term and differential by differential, the cochain term, the cocycle, coboundary and complement bases, and the representatives.

Incompatible spaces are never equal. Terms and representatives are compared entry by entry, because a recomputed space owns fresh module values that no pointer test can match.

Source

pub fn matches_recomputation(&self) -> bool

Whether every stored matrix equals a fresh ExtSpace::new over the live endpoint modules, by ExtSpace::matches.

Rechecks that read this space (action matrices, socle, cocycle reduction) use the stored resolution and bases, so a tampered space would otherwise certify itself.

Source

pub fn zero_class(&self) -> ExtClass

The zero class of this space.

Source

pub fn identity_class(&self) -> Result<ExtClass, ExtClassError>

The Yoneda unit: the class of the augmentation in Ext^0(M, M). Errors unless the space has degree 0 and pointer-equal endpoints.

Source

pub fn class_from_cocycle( &self, f: &Morphism, ) -> Result<ExtClass, ExtClassError>

The class of the cocycle f: P_k -> N: checks both endpoints by Module::ptr_eq, checks d_{k+1}.then(f) = 0, then reduces modulo B^k by solving f against the complement rows stacked above the coboundary basis and keeping the complement part.

Source

pub fn class_from_coordinates( &self, coords: &[Fp], ) -> Result<ExtClass, ExtClassError>

The class with the given coordinates over the complement basis. Errors on a wrong length and on entries that are not canonical elements of the modules’ field.

Trait Implementations§

Source§

impl Clone for ExtSpace

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ExtSpace

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.