Skip to main content

WellKnown

Struct WellKnown 

Source
pub struct WellKnown {
Show 43 fields pub nat: NameId, pub nat_zero: NameId, pub nat_succ: NameId, pub nat_add: NameId, pub nat_sub: NameId, pub nat_mul: NameId, pub nat_pow: NameId, pub nat_gcd: NameId, pub nat_mod: NameId, pub nat_div: NameId, pub nat_beq: NameId, pub nat_ble: NameId, pub nat_land: NameId, pub nat_lor: NameId, pub nat_xor: NameId, pub nat_shift_left: NameId, pub nat_shift_right: NameId, pub nat_pred: NameId, pub nat_bitwise: NameId, pub bool_: NameId, pub bool_true: NameId, pub bool_false: NameId, pub string: NameId, pub string_of_list: NameId, pub char_: NameId, pub char_of_nat: NameId, pub list_nil: NameId, pub list_cons: NameId, pub list: NameId, pub eq: NameId, pub quot: NameId, pub quot_mk: NameId, pub quot_lift: NameId, pub quot_ind: NameId, pub installed_quot: Option<QuotNames>, pub logos_true: Option<NameId>, pub eager_reduce: NameId, pub opt_param: NameId, pub auto_param: NameId, pub out_param: NameId, pub semi_out_param: NameId, pub nested_prefix: NameId, pub u: NameId,
}

Fields§

§nat: NameId§nat_zero: NameId§nat_succ: NameId§nat_add: NameId§nat_sub: NameId§nat_mul: NameId§nat_pow: NameId§nat_gcd: NameId§nat_mod: NameId§nat_div: NameId§nat_beq: NameId§nat_ble: NameId§nat_land: NameId§nat_lor: NameId§nat_xor: NameId§nat_shift_left: NameId§nat_shift_right: NameId§nat_pred: NameId§nat_bitwise: NameId§bool_: NameId§bool_true: NameId§bool_false: NameId§string: NameId§string_of_list: NameId§char_: NameId§char_of_nat: NameId§list_nil: NameId§list_cons: NameId§list: NameId§eq: NameId§quot: NameId§quot_mk: NameId§quot_lift: NameId§quot_ind: NameId§installed_quot: Option<QuotNames>

A second quotient the theory admits beside its own: under LOGOS’s theory, the one a kernel installs (kernel.quot.*, quotient::Kind’s names) for content imported from Lean.

§logos_true: Option<NameId>

The theory’s own true beside the primitives’ Bool.true, where they differ: LOGOS’s true, read by the decide fast path (Kernel::is_true_constant).

§eager_reduce: NameId§opt_param: NameId§auto_param: NameId§out_param: NameId§semi_out_param: NameId§nested_prefix: NameId§u: NameId

Implementations§

Source§

impl WellKnown

Source

pub fn new(n: &mut Names) -> WellKnown

Source

pub fn logos(n: &mut Names) -> WellKnown

The same meanings in a LOGOS context. LOGOS’s own constants keep its spelling: Nat, Zero/Succ, Eq and the quotient’s Quot_mk/Quot_lift/Quot_ind, its true read by the decide fast path. A meaning only Lean content has (the Nat operations, Bool, Char, String, List, the elaborator’s markers) is spelled as the Lean importer names it in a LOGOS context (dag::name::kernel_name_of_components), so an imported Nat.div is the primitive it is, checked and computed as in Lean’s theory.

Source

pub fn quot_names(&self) -> QuotNames

The theory’s own quotient.

Source

pub fn primitives(&self) -> [NameId; 24]

The names Lean’s kernel treats as primitive: declaring one is only allowed in its canonical form.

Trait Implementations§

Source§

impl Clone for WellKnown

Source§

fn clone(&self) -> WellKnown

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

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.