Skip to main content

Levels

Struct Levels 

Source
pub struct Levels { /* private fields */ }

Implementations§

Source§

impl Levels

Source

pub fn new() -> Levels

Source

pub fn intern(&mut self, node: LevelNode) -> LevelId

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn node(&self, l: LevelId) -> LevelNode

Source

pub fn has_param(&self, l: LevelId) -> bool

Source

pub fn list(&mut self, ls: &[LevelId]) -> LevelsId

Source

pub fn get_list(&self, id: LevelsId) -> &[LevelId]

Source

pub fn succ(&mut self, l: LevelId) -> LevelId

Source

pub fn sprop(&mut self) -> LevelId

LOGOS’s SProp (see LevelNode::SProp).

Source

pub fn is_sprop(&self, l: LevelId) -> bool

Source

pub fn param(&mut self, n: NameId) -> LevelId

Source

pub fn max_raw(&mut self, a: LevelId, b: LevelId) -> LevelId

Source

pub fn imax_raw(&mut self, a: LevelId, b: LevelId) -> LevelId

Source

pub fn of_nat(&mut self, n: u64) -> LevelId

Source

pub fn is_never_zero(&self, l: LevelId) -> bool

Syntactic: true only when l is nonzero under every assignment (is_never_zero).

Source

pub fn max(&mut self, a: LevelId, b: LevelId) -> LevelId

Lean’s mkLevelMax': max with the cheap simplifications the kernel applies.

Source

pub fn imax(&mut self, a: LevelId, b: LevelId) -> LevelId

Lean’s mkLevelIMax'.

Source

pub fn instantiate( &mut self, l: LevelId, ps: &[NameId], us: &[LevelId], ) -> LevelId

Replaces each Param(ps[i]) by us[i].

Source

pub fn substitution(&mut self, ps: &[NameId], us: LevelsId) -> SubstId

The substitution of the levels us for the parameters ps (pairwise; a parameter without a level is left as it is). Replacing each parameter by itself is the identity.

Source

pub fn subst(&mut self, l: LevelId, s: SubstId) -> LevelId

l under the substitution s — exactly Levels::instantiate with its parameters and levels, remembered.

Source

pub fn subst_list(&mut self, ls: LevelsId, s: SubstId) -> LevelsId

Every level of ls under the substitution s.

Source

pub fn mentions_sprop(&self, l: LevelId) -> bool

Whether SProp occurs anywhere in l.

Source

pub fn mentions_param(&self, l: LevelId, p: NameId) -> bool

Whether l mentions the parameter p.

Source

pub fn undef_param(&self, l: LevelId, ps: &[NameId]) -> Option<NameId>

The first parameter of l not listed in ps.

Source

pub fn leq(&mut self, u: LevelId, v: LevelId) -> bool

u ≤ v under every assignment of the parameters.

Source

pub fn equiv(&mut self, u: LevelId, v: LevelId) -> bool

Source

pub fn equiv_lists(&mut self, a: LevelsId, b: LevelsId) -> bool

Source

pub fn is_always_zero(&self, l: LevelId) -> bool

l is zero under every assignment of its parameters. Exact, and structural: a successor never is, a parameter may be one, max a b is exactly when both are, imax a b exactly when b is (it is 0 when b is and at least b otherwise).

Trait Implementations§

Source§

impl Clone for Levels

Source§

fn clone(&self) -> Levels

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for Levels

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.