proofs.rs

Claim #1 — Verification of even_or_odd::is_even (with kani 0.68.0)

even_or_odd::is_even

pub fn is_even<T>(number: T) -> bool where T: std::ops::Rem<Output = T> + std::cmp::PartialEq<T> + From<u8>

Tool: kani 0.68.0

This claim has no explanation of its own. Read the report Overview, and treat the preconditions and evidence below as authoritative. See Concepts and terminology.

Preconditions

true

Evidence

https://github.com/nyuichi/even-or-odd-verification/blob/2a31ef64bbff220d9fcf2e1d4b13fb04934a5621/src/lib.rs#L25-L29

What is trusted

From the report

The result relies on Kani and CBMC correctly modeling and checking Rust u32 operations. No user-defined stubs or assumed helper contracts are used.

Technical limitations

From the report

Only is_even instantiated with u32 is covered. Other instantiations of this generic API, custom trait implementations, and is_odd are not verified. Equivalence of the entire verification fork to the crates.io release is not formally proved.

Tool limitations

Verification is scoped to the selected harnesses, assumptions, concrete types, target architecture, and any stubs or models used. Kani does not detect every form of Rust undefined behavior. In particular, data races and violations of reference aliasing rules are not fully checked. Uninitialized-memory checks require experimental support. Concurrent execution and panic stack unwinding are not modeled. A successful run should not be interpreted as excluding all Rust UB. References: https://model-checking.github.io/kani/undefined-behaviour.html https://model-checking.github.io/kani/rust-feature-support.html

Updated 2026-09-24 05:03 UTC

kani 0.68.0 — version details

Read and join the discussion on the report →