Struct AtomId

Source
pub struct AtomId(pub u32);
Expand description

An index into a AtomVec

Tuple Fields§

§0: u32

Implementations§

Source§

impl AtomId

Source

pub const UNDER: AtomId

The atom _. The blank, used to represent wildcards in match

Source

pub const BANG: AtomId

The atom !. In refine, (! thm x y e1 e2 p1 p2) allows passing bound and regular variables, in addition to subproofs

Source

pub const BANG2: AtomId

The atom !!. In refine, (!! thm x y p1 p2) allows passing bound variables and subproofs but not regular variables, in addition to subproofs

Source

pub const VERB: AtomId

The atom :verb. In refine, (:verb p) allows passing an elaborated proof term p in a refine script (without this, the applications in p would be interpreted incorrectly)

Source

pub const CONV: AtomId

The atom :conv. In elaborated proofs, (:conv e c p) is a conversion proof. (The initial colon avoids name collision with MM0 theorems, which don’t allow : in identifiers.)

Source

pub const SYM: AtomId

The atom :sym. In elaborated proofs, (:sym c) is a proof of symmetry. (The initial colon avoids name collision with MM0 theorems, which don’t allow : in identifiers.)

Source

pub const UNFOLD: AtomId

The atom :unfold. In elaborated proofs, (:unfold t es c) is a proof of definitional unfolding. (The initial colon avoids name collision with MM0 theorems, which don’t allow : in identifiers.)

Source

pub const LET: AtomId

The atom :let. In MMU proofs, (:let h p1 p2) is a let-binding for supporting deduplication.

Source

pub const COLON: AtomId

The atom :. In refine, {p : t} is a type ascription for proofs.

Source

pub const QMARK: AtomId

The atom ?. In refine, ? is a proof by “sorry” (stubbing the proof without immediate error)

Source

pub const TERM: AtomId

The atom term. term is an atom used by add-decl to add a term/def declaration

Source

pub const DEF: AtomId

The atom def. def is an atom used by add-decl to add a term/def declaration

Source

pub const AXIOM: AtomId

The atom axiom. axiom is an atom used by add-decl to add an axiom/theorem declaration

Source

pub const THM: AtomId

The atom theorem. theorem is an atom used by add-decl to add an axiom/theorem declaration

Source

pub const PUB: AtomId

The atom pub. pub is an atom used to specify the visibility modifier in add-decl

Source

pub const ABSTRACT: AtomId

The atom abstract. abstract is an atom used to specify the visibility modifier in add-decl

Source

pub const LOCAL: AtomId

The atom local. local is an atom used to specify the visibility modifier in add-decl

Source

pub const SORRY: AtomId

The atom :sorry. :sorry is an atom used by get-decl to print missing proofs

Source

pub const ERROR: AtomId

The atom error. error is an error level recognized by set-reporting

Source

pub const WARN: AtomId

The atom warn. warn is an error level recognized by set-reporting

Source

pub const INFO: AtomId

The atom info. info is an error level recognized by set-reporting

Source

pub const ANNOTATE: AtomId

The atom annotate. The annotate function is a callback used to define what happens when an annotation like @foo def bar = ... is used.

Source

pub const REFINE_EXTRA_ARGS: AtomId

The atom refine-extra-args. The refine-extra-args function is a callback used when an application in refine uses too many arguments.

Source

pub const TO_EXPR_FALLBACK: AtomId

The atom to-expr-fallback. to-expr-fallback is called when elaborating a term that is not otherwise recognized

Source

pub fn on_atoms(f: impl FnMut(&str, AtomId))

Map a function over the list of atom constants (in increasing order).

Source§

impl AtomId

Source

pub fn into_inner(self) -> u32

Convert this newtyped integer into its underlying integer.

Trait Implementations§

Source§

impl Clone for AtomId

Source§

fn clone(&self) -> AtomId

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 Debug for AtomId

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl DeepSizeOf for AtomId

Source§

fn deep_size_of_children(&self, _: &mut Context) -> usize

Returns an estimation of the heap-managed storage of this object. This does not include the size of the object itself. Read more
Source§

fn deep_size_of(&self) -> usize

Returns an estimation of a total size of memory owned by the object, including heap-managed storage. Read more
Source§

fn deep_size_of_with(&self, context: &mut Context) -> usize

Returns an estimation of a total size of memory owned by the object, including heap-managed storage.
Source§

impl Default for AtomId

Source§

fn default() -> AtomId

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

impl Hash for AtomId

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<T> Index<AtomId> for AtomVec<T>

Source§

type Output = T

The returned type after indexing.
Source§

fn index(&self, i: AtomId) -> &T

Performs the indexing (container[index]) operation. Read more
Source§

impl<T> IndexMut<AtomId> for AtomVec<T>

Source§

fn index_mut(&mut self, i: AtomId) -> &mut T

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl Ord for AtomId

Source§

fn cmp(&self, other: &AtomId) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for AtomId

Source§

fn eq(&self, other: &AtomId) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for AtomId

Source§

fn partial_cmp(&self, other: &AtomId) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Copy for AtomId

Source§

impl Eq for AtomId

Source§

impl StructuralPartialEq for AtomId

Auto Trait Implementations§

§

impl Freeze for AtomId

§

impl RefUnwindSafe for AtomId

§

impl Send for AtomId

§

impl Sync for AtomId

§

impl Unpin for AtomId

§

impl UnwindSafe for AtomId

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.