1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use crate::*;
pub use ::std::default::*;

pub trait Default: ::std::default::Default {
    #[predicate(prophetic)]
    fn is_default(self) -> bool;
}

extern_spec! {
    mod std {
        mod default {
            trait Default where Self : Default {
                #[ensures(result.is_default())]
                fn default() -> Self;
            }
        }
    }
}

impl Default for bool {
    #[predicate]
    #[open]
    fn is_default(self) -> bool {
        pearlite! { self == false }
    }
}