Skip to main content

WitnessRule

Enum WitnessRule 

Source
pub enum WitnessRule {
    SolverAcceptance,
    DeclaredRowRelative,
}
Expand description

Which accepting test the witness-refutation gate uses to decide that a sampled point satisfies a row.

The two forms exist because the question the witness answers is not always the same question. Both are accepting tests, so both must fail closed — when in doubt, accept the point, withdraw the verdict, keep the proof unclaimed.

Variants§

§

SolverAcceptance

Default, and the only rule for any path where the solve can run.

Accepts a row when the residual is negligible at the row’s live magnitude through the clamped form tol * max(scale, 1) — i.e. exactly what the solver’s own acceptance test would wave through. This is the #380 rule: never certify what the solver itself would accept as feasible, or the same model reports “proved infeasible” with presolve on and Solve_Succeeded with it off.

§

DeclaredRowRelative

Only for paths where the solve provably cannot run, so no Solve_Succeeded counterfactual exists to contradict (today: the too-few-degrees-of-freedom gate, gh#391).

Accepts a row when the residual is negligible relative to the row’s declared magnitude, max(|g_l|, |g_u|) over its finite bounds, with no absolute clamp. Declared, not live: the live value moves with the sampled point, while the bounds are the magnitude the modeller wrote the row in — the same “declared, not live” pattern fbbt_infeasibility_survives_margin uses for its per-row margin.

Why the clamp has to go here: tol * max(scale, 1) reinstates an absolute floor once the row’s magnitude drops below 1, so multiplying every row of an infeasible model by 1e-12 — which changes the feasible set not at all — makes every point of the box “satisfy” every row and withdraws a scale-free bound-propagation proof. That is the whole of gh#391: s*x == 0.2*s with s*x == 0.8*s crosses by 0.6 at every s, yet the verdict flipped at s <= ~3e-8.

Why it is still safe: the clamp’s job is to not demand more precision than the solver promised, because a solver converges to absolute residuals. On this path the solver never produces a point at all, so there is no converged residual to be compatible with — the alternative to the proof is a structural error, not a solution.

The b = 0 hazard is handled explicitly and fails closed: a homogeneous row (g_l = g_u = 0, or a row with no finite bound at all) has no declared magnitude, which would make the relative test unsatisfiable by construction — viol == scale for any nonzero float noise — and a genuinely feasible point would fail to refute. Such a row keeps WitnessRule::SolverAcceptance’s clamped form, i.e. the absolute floor.

Trait Implementations§

Source§

impl Clone for WitnessRule

Source§

fn clone(&self) -> WitnessRule

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 Copy for WitnessRule

Source§

impl Debug for WitnessRule

Source§

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

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

impl Default for WitnessRule

Source§

fn default() -> WitnessRule

Returns the “default value” for a type. Read more
Source§

impl Eq for WitnessRule

Source§

impl PartialEq for WitnessRule

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for WitnessRule

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> Instrument for T

Source§

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

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

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> 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.
Source§

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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