Skip to main content

LiaCert

Struct LiaCert 

Source
pub struct LiaCert { /* private fields */ }
Expand description

A refutation of a constraint system, as the multipliers that refute it.

Farkas’ lemma in the form the checker uses: if every λᵢ ≥ 0 and Σ λᵢ·formᵢ is a CONSTANT c with c > 0 — or with c ≥ 0 when some λᵢ > 0 weights a STRICT constraint — then no assignment satisfies every formᵢ ≤ 0 at once, because that assignment would have to make a non-negative combination of non-positive numbers positive.

This is Lean’s Justification flattened. Lean keeps the derivation as a TREE of combo a j b k nodes (Lean/Elab/Tactic/Omega/Core.lean:49) because it must assemble a proof TERM out of combo_sat' applications; a checker that only has to agree with a VERDICT can multiply the tree out into one multiplier per assumption and check a single dot product. Same certificate, one level flatter, and the flattening is what makes the checker fit on a page.

Implementations§

Source§

impl LiaCert

Source

pub fn multipliers(&self) -> &[BigInt]

The multipliers, in constraint order.

Source

pub fn from_multipliers(multipliers: Vec<BigInt>) -> LiaCert

Build a certificate from raw multipliers — the door a test uses to hand the checker a LIE and require it to be refused. A certificate no mutation can spoil is a certificate nothing is checking.

Trait Implementations§

Source§

impl Clone for LiaCert

Source§

fn clone(&self) -> LiaCert

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for LiaCert

Source§

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

Formats the value using the given formatter. Read more
Source§

impl PartialEq for LiaCert

Source§

fn eq(&self, other: &LiaCert) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for LiaCert

Source§

impl StructuralPartialEq for LiaCert

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