pub trait Prop: 'static + Sized + Clone {
// Provided methods
fn double_neg(self) -> Dneg<Self> { ... }
fn map_any<T>(self) -> Imply<T, Self> { ... }
fn nnexcm() -> Not<Not<ExcM<Self>>> { ... }
}
Expand description
A proposition that might be decidable or undecidable.
Provided Methods§
sourcefn double_neg(self) -> Dneg<Self>
fn double_neg(self) -> Dneg<Self>
Get double negation rule from proof.
sourcefn map_any<T>(self) -> Imply<T, Self>
fn map_any<T>(self) -> Imply<T, Self>
Maps anything into itself.
Examples found in repository?
examples/ps_bool.rs (line 89)
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
fn def_not<X: LProp>(_not: Self::Not, f: Mem<X>) -> And<
Imply<Q<X, Self::False>, Q<Inc<X>, Self::True>>,
Imply<Q<X, Self::True>, Q<Inc<X>, Self::False>>,
>
where X: POrd<Inc<X>>
{
let f = f.read();
let f1 = f.clone();
let f2 = f.clone();
(Rc::new(move |eq_x_false| {
let p = assume_naive();
p((eq_x_false, (f1.clone(), unsafe {Self::const_true().map_any()})))
}),
Rc::new(move |eq_x_true| {
let p = assume_naive();
p((eq_x_true, (f2.clone(), unsafe {Self::const_false().map_any()})))
})
)
}
fn def_false1<X: LProp>(_false1: Self::False1, f: Imply<X, Inc<X>>) -> And<
Imply<Q<X, Self::False>, Q<Inc<X>, Self::False>>,
Imply<Q<X, Self::True>, Q<Inc<X>, Self::False>>,
>
where X: POrd<Inc<X>>
{
let f1 = f.clone();
let f2 = f.clone();
(Rc::new(move |eq_x_false| {
let p = assume_naive();
p((eq_x_false, (f1.clone(), unsafe {Self::const_false().map_any()})))
}),
Rc::new(move |eq_x_true| {
let p = assume_naive();
p((eq_x_true, (f2.clone(), unsafe {Self::const_false().map_any()})))
})
)
}
fn def_true1<X: LProp>(_true1: Self::True1, f: Imply<X, Inc<X>>) -> And<
Imply<Q<X, Self::False>, Q<Inc<X>, Self::True>>,
Imply<Q<X, Self::True>, Q<Inc<X>, Self::True>>,
>
where X: POrd<Inc<X>>
{
let f1 = f.clone();
let f2 = f.clone();
(Rc::new(move |eq_x_false| {
let p = assume_naive();
p((eq_x_false, (f1.clone(), unsafe {Self::const_true().map_any()})))
}),
Rc::new(move |eq_x_true| {
let p = assume_naive();
p((eq_x_true, (f2.clone(), unsafe {Self::const_true().map_any()})))
})
)
}