pub enum Universe {
Prop,
Type(u32),
}Expand description
Universe levels in the type hierarchy.
The hierarchy is: Prop : Type 1 : Type 2 : Type 3 : …
Propis the universe of propositions (proof-irrelevant in full CIC)Type(n)is the universe of types at level n
Variants§
Implementations§
Source§impl Universe
impl Universe
Sourcepub fn max(&self, other: &Universe) -> Universe
pub fn max(&self, other: &Universe) -> Universe
Get the maximum of two universes (for Pi type formation)
Sourcepub fn is_subtype_of(&self, other: &Universe) -> bool
pub fn is_subtype_of(&self, other: &Universe) -> bool
Check if this universe is a subtype of another (cumulativity).
Subtyping rules:
- Prop ≤ Type(i) for all i
- Type(i) ≤ Type(j) if i ≤ j
- Type(i) is NOT ≤ Prop
Trait Implementations§
impl Eq for Universe
impl StructuralPartialEq for Universe
Auto Trait Implementations§
impl Freeze for Universe
impl RefUnwindSafe for Universe
impl Send for Universe
impl Sync for Universe
impl Unpin for Universe
impl UnwindSafe for Universe
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