Skip to main content

Decidable

Trait Decidable 

Source
pub trait Decidable {
    type Proof;

    // Required method
    fn decide(&self) -> Decision<Self::Proof>;

    // Provided method
    fn is_decidably_true(&self) -> bool { ... }
}
Expand description

A type whose truth value is decidable.

Analogous to Lean 4’s Decidable typeclass. Implementors produce a Decision when asked.

Required Associated Types§

Source

type Proof

The proof type when the proposition holds.

Required Methods§

Source

fn decide(&self) -> Decision<Self::Proof>

Decide the proposition, returning the decision.

Provided Methods§

Source

fn is_decidably_true(&self) -> bool

Shorthand: returns true iff the proposition holds.

Implementors§