Skip to main content

Reduction

Struct Reduction 

Source
pub struct Reduction {
    pub image: Vec<Lit>,
    pub target_num_vars: usize,
}
Expand description

A reduction ρ: F' → F — a sign-respecting variable→literal map. It acts on clauses, on substitution witnesses (by conjugation ρσρ⁻¹), and hence on whole refutations. When ρ(F') ⊆ F (the source embeds into the target), ρ carries any refutation of F' to one of F. This is the morphism along which the transfer functor moves collapses between problems.

Fields§

§image: Vec<Lit>

image[v] = ρ(+v), a literal over the target’s variables.

§target_num_vars: usize

Implementations§

Source§

impl Reduction

Source

pub fn apply_lit(&self, l: Lit) -> Lit

ρ applied to a literal (sign-respecting).

Source

pub fn apply_clause(&self, c: &[Lit]) -> Vec<Lit>

ρ applied to a clause.

Source

pub fn apply_step(&self, step: &ProofStep) -> ProofStep

ρ applied to a proof step (clause + witness).

Source§

impl Reduction

Source

pub fn is_bijective(&self) -> bool

Is ρ an isomorphism (a bijective, sign-respecting variable renaming)? Such reductions are the invertible 1-morphisms — they make problems-and-reductions a groupoid.

Source

pub fn inverse(&self) -> Option<Reduction>

The inverse isomorphism ρ⁻¹ (if ρ is bijective).

Source

pub fn compose(&self, other: &Reduction) -> Reduction

Composition self ∘ other (apply other then self).

Source

pub fn is_identity(&self) -> bool

Is ρ the identity reduction?

Source

pub fn is_loop_at(&self, formula: &[Vec<Lit>]) -> bool

Is ρ a loop at F — an isomorphism F → F carrying the clause set onto itself? A loop is exactly an automorphism of F. The loops at F are π₁(F) of the groupoid, and they form the symmetry group of F.

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