pub struct Signature { /* private fields */ }Expand description
What a settled constant’s type says about its applications, at one universe instantiation.
The type’s telescope Π (x₀ : A₀) … (xₙ₋₁ : Aₙ₋₁), B, walked once under fresh variables,
gives the universe uᵢ of every binder type and v of the result. Universes do not depend on
terms, so these are the universes of every application’s parts too: an argument at position
i is a proof exactly when uᵢ is zero, and an application to k ≤ n arguments, whose type
is Π (xₖ : Aₖ) … , B, lives in imax(uₖ, … imax(uₙ₋₁, v)) — zero exactly when v is. So
whether an application is a proof is read off its head and its argument count, without
inferring a type. Past the telescope — a result type that becomes a Π only once arguments are
substituted — nothing is known.
Implementations§
Source§impl Signature
impl Signature
Sourcepub fn proof_args(&self) -> u64
pub fn proof_args(&self) -> u64
The argument positions (below MAX_TRACKED) whose binder type is a proposition.
Sourcepub fn is_proof(&self, k: usize) -> Option<bool>
pub fn is_proof(&self, k: usize) -> Option<bool>
Whether an application to k arguments is a proof, if the telescope says.
Sourcepub fn is_proposition(&self, k: usize) -> Option<bool>
pub fn is_proposition(&self, k: usize) -> Option<bool>
Whether an application to k arguments is a proposition, if the telescope says: only a
full application whose result is a sort is a type at all.