Source context

Program Rust

Int

This Rust is the input prepared for Aeneas. Modeling choices explains the adaptations from the production source.

24 // `Debug` supertrait changes neither the concrete primitive integer instances25 // nor any operation used by the algorithms, so it preserves the f6426 // specialization and every inventoried observation independently of GOAL truth.27 pub trait Int:28     Sized29     + Clone30     + Copy31     + ops::Shr<u32, Output = Self>32     + ops::Shl<u32, Output = Self>33     + ops::BitAnd<Output = Self>34     + ops::BitOr<Output = Self>35     + PartialEq36     + CastInto<i16>37 {38     const ZERO: Self;39     const ONE: Self;40 }41 42 macro_rules! int {43     ($($ty:ty),+) => {

Aeneas declaration

The Lean below was mechanically extracted by Aeneas from Rust.

structure num.imp.traits.Int (Self : Type) where
  ZERO : Result Self
  ONE : Result Self
  corecloneCloneInst : core.clone.Clone Self
  coremarkerCopyInst : core.marker.Copy Self
  coreopsbitShrSelfU32SelfInst : core.ops.bit.Shr Self Std.U32 Self
  coreopsbitShlSelfU32SelfInst : core.ops.bit.Shl Self Std.U32 Self
  coreopsbitBitAndInst : core.ops.bit.BitAnd Self Self Self
  coreopsbitBitOrInst : core.ops.bit.BitOr Self Self Self
  corecmpPartialEqInst : core.cmp.PartialEq Self Self
  CastIntoSelfI16Inst : num.imp.traits.CastInto Self Std.I16
Operations used here

BitOr · Rust library

Shl · Rust library

Shr · Rust library

CastInto · Program Rust

Source details
Declarationnum.imp.traits.Int
Filenum/imp/../../traits.rs
Lines27:0–40:1
Program versionRevised program