Source context

Rust library

bitand

This is Rust standard-library source from the compiler version used in the run.

175             type Output = $t;176 177             #[inline]178             fn bitand(self, rhs: $t) -> $t { self & rhs }179         }180 181         forward_ref_binop! { impl BitAnd, bitand for $t, $t,

Aeneas declaration

Aeneas generated this declaration for a Rust library operation. Any authored model recorded for this operation is shown below.

@[rust_fun "core::ops::bit::{core::ops::bit::BitAnd<u64, u64, u64>}::bitand"]
axiom U64.Insts.CoreOpsBitBitAndU64U64.bitand
  : Std.U64 โ†’ Std.U64 โ†’ Result Std.U64

Authored Lean model

Trellis authored this Lean model for an operation outside the mechanical extraction. Modeling choices explains its behavior and review.

Why this model is faithful

import Aeneas
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: ModelU64BitAnd]
def ModelU64BitAnd (x y : Std.U64) : Result Std.U64 :=
-- BODY
  ok (x &&& y)
end dec2flt_model
Source details
DeclarationU64.Insts.CoreOpsBitBitAndU64U64.bitand
File/rustc/library/core/src/ops/bit.rs
Lines178:12โ€“178:42
Program versionOriginal program