pub struct BarRecursion {
pub max_depth: usize,
pub bar: Vec<bool>,
}Expand description
Simulate Spector’s bar recursion up to a bounded depth.
This corresponds to the BarRecursor kernel axiom.
Fields§
§max_depth: usizeMaximum recursion depth allowed.
bar: Vec<bool>The bar predicate: returns true when recursion should stop.
Implementations§
Source§impl BarRecursion
impl BarRecursion
Sourcepub fn set_bar(&mut self, n: usize)
pub fn set_bar(&mut self, n: usize)
Set the bar at position n (meaning: sequences of length n satisfy the bar).
Sourcepub fn compute(
&self,
n: usize,
y_val: impl Fn(usize) -> i64,
h_step: impl Fn(usize, i64) -> i64,
) -> i64
pub fn compute( &self, n: usize, y_val: impl Fn(usize) -> i64, h_step: impl Fn(usize, i64) -> i64, ) -> i64
Compute the bar recursion value for sequence length n using functionals Y and H.
y_val(n) is the “stopping value” when n is in the bar.
h_step(n, prev) computes the step from n using the previous value.
Trait Implementations§
Source§impl Clone for BarRecursion
impl Clone for BarRecursion
Source§fn clone(&self) -> BarRecursion
fn clone(&self) -> BarRecursion
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BarRecursion
impl RefUnwindSafe for BarRecursion
impl Send for BarRecursion
impl Sync for BarRecursion
impl Unpin for BarRecursion
impl UnsafeUnpin for BarRecursion
impl UnwindSafe for BarRecursion
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more