#[non_exhaustive]pub struct Model {
pub worlds: Vec<World>,
pub world: u32,
}Expand description
A finite Kripke model: worlds, arrows from each world to the worlds directly above it, whose reflexive and transitive closure is the order, and the atoms each world forces. It names one world, the one it is about: for a countermodel, the world where the sequent fails.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.worlds: Vec<World>The worlds, by index.
world: u32The world the model is about, by index.
Implementations§
Source§impl Model
impl Model
Sourcepub fn forcing(
&self,
sequent: &Sequent,
logic: Logic,
limits: &Limits,
stop: impl FnMut(Progress) -> bool,
) -> Result<Forcing, Error>
pub fn forcing( &self, sequent: &Sequent, logic: Logic, limits: &Limits, stop: impl FnMut(Progress) -> bool, ) -> Result<Forcing, Error>
Checks that the model is one of logic and computes what each of
its worlds forces, for every formula of the sequent’s arena.
A model of the logic has:
- at least one world, the model’s world among them;
- every arrow to a world of the model, and no cycle of arrows (the order is a partial order: two worlds each above the other would be one world);
- every world forcing the atoms, and
⊥, of every world below it; ⊥forced only in minimal logic;- one world in classical logic.
An atom the sequent does not name changes nothing the sequent’s formulas force, though it must grow along the arrows as the others do. An arrow written twice is one arrow.
Forcing is computed world by world, the worlds above first. An atom
is forced where the world forces it, and ⊥ where the world forces
it (minimal logic). ∧ and ∨ follow from their parts there. An
implication, a negation (¬A read as A → ⊥) or an equivalence is
forced where it holds there and is forced at every world directly
above, which then forces it at every world above. The stop is asked
once per world in each pass over the worlds. Besides the table
(MODEL_CELLS) the check holds a few words per world, arrow and
atom, which limits.memory_bytes bounds.
§Errors
Error::Model for a model that is not one of the logic, naming
what fails; Error::Succedents for more than one formula right
of ⊢ outside classical logic; Refusal::Memory where the check
would compute more than MODEL_CELLS cells or hold more than
limits.memory_bytes, and Refusal::Stopped when the stop
fired, neither a verdict on the model.
Sourcepub fn refutes(
&self,
sequent: &Sequent,
logic: Logic,
limits: &Limits,
stop: impl FnMut(Progress) -> bool,
) -> Result<(), Error>
pub fn refutes( &self, sequent: &Sequent, logic: Logic, limits: &Limits, stop: impl FnMut(Progress) -> bool, ) -> Result<(), Error>
Checks that the model refutes the sequent in logic: it is a model
of the logic (forcing), and its world forces
every formula left of ⊢ and not the formula right of it (⊥
where there is none; classically, none of them).
§Errors
As forcing, and Error::Model naming the
hypothesis the model’s world does not force or the conclusion it
forces.
Trait Implementations§
Source§impl<'a> Deserialize<'a> for Model
impl<'a> Deserialize<'a> for Model
Source§fn deserialize<D: Deserializer<'a>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'a>>(deserializer: D) -> Result<Self, D::Error>
Deserializes a model within the default limits, as
wire::upgrade does.
impl Eq for Model
Source§impl Readable for Model
impl Readable for Model
impl StructuralPartialEq for Model
Auto Trait Implementations§
impl Forget for Model
impl Freeze for Model
impl Move for Model
impl RefUnwindSafe for Model
impl Send for Model
impl Sync for Model
impl Unpin for Model
impl UnsafeUnpin for Model
impl UnwindSafe for Model
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
T, using the provided data to resolve any offsets.