Conceptcore
Dependent and refinement types
Also called dependent types, dependent type, refinement types, refinement type, liquid types, length-indexed vectors, pi types, sigma types, subrange types, const generics.
A dependent type depends on a value, such as a vector type that includes its length. A refinement type adds a predicate, such as 0 to 100. Both move checks from run time to compile time.
- Applies to
- core-languages
Idea
A dependent type is a type that depends on a value. The type Vect 3 Int, a list of exactly three integers, includes the number 3, and a function can say that it returns Vect (n + m) a when it joins a Vect n a and a Vect m a. A refinement type is a base type with a predicate, such as {v: Int | 0 <= v < n}, the integers that are valid indexes of a list of length n. Both kinds of type let the compiler check facts about values, such as lengths, ranges and orders, that ordinary types leave to tests and run-time checks. Full dependent types are found in proof assistants and research languages such as Agda, Rocq, Lean and Idris. Mainstream languages have weaker forms: array lengths in types, const generics, validated wrapper types and range constraints.
# Refinement types: a base type plus a predicate, as in {v: int | 0 <= v < n}
def check(facts, need, names):
"""Prove that the facts imply the need, or return a counterexample.
A search over small values stands in for the SMT solver."""
for vals in ((i, n) for i in range(-1, 9) for n in range(0, 9)):
env = dict(zip(names, vals))
if all(f(**env) for f in facts) and not need(**env):
return "rejected, counterexample " + ", ".join(
f"{k} = {v}" for k, v in env.items())
return "accepted"
in_bounds = lambda i, n: 0 <= i < n # what xs[i] needs, with n = len(xs) >= 0
facts = {
"no check": [],
"if i >= 0": [lambda i, n: i >= 0],
"if 0 <= i < n": [lambda i, n: 0 <= i < n],
}
for label, fs in facts.items():
print(f"xs[i] under {label}:", check(fs, in_bounds, ("i", "n")))
# Dependent types: the type of a result can depend on a value
def vec(n): # Vect n: a list whose length is part of its type
return ("Vect", n)
def append(t, u): # (++) : Vect n -> Vect m -> Vect (n + m)
return vec(t[1] + u[1])
def zip_type(t, u): # zip : Vect n -> Vect n -> Vect n
if t != u:
return f"type error: {t} and {u} differ"
return t
ab = append(vec(2), vec(3))
print("append(Vect 2, Vect 3) :", ab)
print("zip with Vect 5 :", zip_type(ab, vec(5)))
print("zip with Vect 4 :", zip_type(ab, vec(4)))
xs[i] under no check: rejected, counterexample i = -1, n = 0
xs[i] under if i >= 0: rejected, counterexample i = 0, n = 0
xs[i] under if 0 <= i < n: accepted
append(Vect 2, Vect 3) : ('Vect', 5)
zip with Vect 5 : ('Vect', 5)
zip with Vect 4 : type error: ('Vect', 5) and ('Vect', 4) differ
The first part checks the index expression xs[i] as a refinement type checker does. The access needs 0 <= i < n, and the checker must prove it from the facts that hold at that point in the program, which come from the conditions of the enclosing if statements. With no facts, or with only i >= 0, the checker finds a counterexample: an empty list. With both bounds it accepts the access, and the program needs no bounds check when it runs. The second part computes types from values: the type of append adds the two lengths, and zip accepts two vectors only when their length types are equal.
How it works
Types that depend on values. In a dependently typed language, types are values. Idris says so directly: "In Idris, types are first class, meaning that they can be computed and manipulated (and passed to functions) just like any other language construct."1 A family of types such as Vect n a is a function from a number and a type to a type. A dependent function type, often written (n : Nat) -> Vect n a, describes a function whose result type depends on the value of its argument. A dependent pair, such as a number n together with a Vect n a, holds a value whose type depends on the first part. The Idris tutorial shows what this gives: the type of append "states that the resulting vector’s length will be the sum of the input lengths", and Idris rejects a definition that breaks this.1
Checking needs evaluation. To check that Vect (2 + 3) Int and Vect 5 Int are the same type, the compiler must run 2 + 3. A type checker for dependent types therefore contains an evaluator, and it compares types after it reduces them. Because a function that never ends could make type checking never end, most dependently typed languages require that functions used in types are total: they end and handle every input. Values that are known only at run time stay as variables, and the checker reasons about them with the rules for each function, for example that 0 + m reduces to m.
Propositions as types. A dependent type can state any property, such as that a list is sorted or that two values are equal, and a value of that type is a proof of the property. This correspondence makes dependently typed languages into proof assistants: "Because of strong typing and dependent types, Agda can be used as a proof assistant, allowing one to prove mathematical theorems (in a constructive setting) and to run such proofs as algorithms."2 Rocq, Lean and Agda are used to check proofs in mathematics and to verify compilers and operating system kernels.
Refinement types. A refinement type keeps the types of an ordinary language and adds a predicate from a logic that a solver can decide, usually linear arithmetic, equality and arrays. The type {v: Int | v > 0} is a subtype of Int, and one refinement is a subtype of another when its predicate implies the other predicate. The checker collects the facts that hold at each point, from conditions, assignments and the refinements of the inputs, and asks an SMT solver, such as Z3, whether they imply what each operation needs. If the solver finds a counterexample, the program is rejected, as in the example. LiquidHaskell adds refinement types to Haskell and says that it "makes illegal values be unrepresentable".3 Liquid types infer most refinements from a small set of templates, so the programmer annotates only the important functions.
Weaker forms in mainstream languages. Most languages get some of the benefit without a solver. Types indexed by constants put a number in a type when the number is known at compile time: Go array types such as [3]float64, C++ templates such as std::array<T, N>, and Rust's const generics, where "Const generic parameters allow items to be generic over constant values".4 C++20 can state predicates on such values; each concept "is a predicate, evaluated at compile time, and becomes a part of the interface of a template where it is used as a constraint".5 C99 goes the other way: the type of a variable-length array depends on a run-time value, and "on another pass over the same code, it may be allocated with a different size", but C does not check that the sizes agree.6
Refinements checked at run time. Where the compiler cannot prove a predicate, a type can still carry it. A smart constructor, a function that is the only way to make a value of the type, checks the predicate once, and all later code can trust it. Rust's NonZero is such a type in the standard library: "A value that is known not to equal zero."7 SQL databases attach predicates to types with domains: "A domain is essentially a data type with optional constraints (restrictions on the allowed set of values)."8 Python's Annotated is a "Special typing form to add context-specific metadata to an annotation", which libraries use for constraints such as minimum and maximum values.9
In languages
| Language | Verdict | Note |
|---|---|---|
| Python | Idiom | |
| C++ | Idiom | |
| Java | Idiom | |
| C | Idiom | |
| C# | Idiom | |
| JavaScript | Idiom | |
| TypeScript | Idiom | Branded types, literal types and template literal types refine a type at compile time, but no example file exists. |
| Go | Idiom | |
| Rust | Idiom | |
| Kotlin | Idiom | Value classes with an init block check a predicate when the value is made, but no example file exists because kotlinc is not installed. |
| SQL | Native | CREATE DOMAIN defines a type with CHECK constraints, and CHECK constraints refine columns, but no example file exists. |
| Bash | Does not apply | Bash values are strings with no types to refine. |
| PowerShell | Native | Validation attributes such as ValidateRange constrain a variable and are checked at each assignment, but no example file exists because pwsh is not installed. |
| HTML | Does not apply | HTML has no types; form attributes such as min, max and pattern are checked by the browser. |
| CSS | Does not apply | CSS has no user-defined types. |
| Regular expressions | Does not apply | Regular expressions have no types. |
| Language | Verdict | Mechanism |
|---|---|---|
| Python | idiom | Annotated metadata and checks at run time; Pydantic |
| JavaScript | idiom | smart constructors with private fields |
| TypeScript | idiom | branded types, literal types and template literal types |
| Java | idiom | records with compact constructors |
| Kotlin | idiom | value classes with init checks |
| C# | idiom | record structs with private constructors and factories |
| Go | idiom | unexported fields and constructors; array lengths in types |
| Rust | idiom | const generics, NonZero and validated newtypes |
| C | idiom | variably modified types, not checked; checked constructors |
| C++ | idiom | non-type template parameters and requires clauses |
| Bash | n/a | values are strings |
| PowerShell | native | validation attributes on variables, checked at each assignment |
| SQL | native | CREATE DOMAIN and CHECK constraints |
| Regex | n/a | no types |
| HTML | n/a | no types; form attributes such as min and pattern |
| CSS | n/a | no user-defined types |
No core general-purpose language has full dependent types or refinement types that the compiler proves with a solver, so each one gets the idiom verdict. The languages that have them, such as Idris, Agda, Lean, Rocq, F*, ATS and LiquidHaskell, are research languages and proof assistants. PowerShell and SQL are native in a narrower sense: they attach a predicate to a variable or a column type, and they check it each time a value is stored.
The example files show the two directions. Rust, C++ and Go put constant values in types, and the Rust and C++ fails blocks show the compiler rejecting a call because two lengths differ or a size predicate is false. C shows a type that depends on a run-time value but is not checked. Python, JavaScript, Java and C# carry a predicate in a type and check it once at run time, in a constructor or a decorator, and the C# file shows how a struct default can bypass the check.
from dataclasses import dataclass
from typing import Annotated, get_type_hints
@dataclass(frozen=True)
class Pred: # metadata that states a refinement
text: str
test: object
Percent = Annotated[int, Pred("0 <= v <= 100", lambda v: 0 <= v <= 100)]
NonEmpty = Annotated[str, Pred("len(v) > 0", lambda v: len(v) > 0)]
def refined(fn): # check each refinement when the function is called
hints = get_type_hints(fn, include_extras=True)
def wrapper(*args):
for name, value in zip(fn.__code__.co_varnames, args):
for meta in getattr(hints.get(name), "__metadata__", ()):
if not meta.test(value):
raise ValueError(f"{name} = {value!r} breaks {meta.text}")
return fn(*args)
return wrapper
@refined
def progress(task: NonEmpty, done: Percent) -> str:
return f"{task}: {'#' * (done // 10):<10} {done}%"
print(Percent.__metadata__[0].text)
print(progress("build", 70))
for args in [("build", 140), ("", 50)]:
try:
progress(*args)
except ValueError as err:
print("ValueError:", err)
0 <= v <= 100
build: ####### 70%
ValueError: done = 140 breaks 0 <= v <= 100
ValueError: task = '' breaks len(v) > 0
- Verdict: idiom. Python has no refinement or dependent types.
typing.Annotatedattaches metadata to a type, and the example stores a predicate there and checks it in a decorator when the function is called. Type checkers such as mypy ignore metadata that they do not know, so the check happens only at run time. Libraries such as Pydantic and annotated-types use the same form for constraints such asGt(0)andMaxLen(10).
#include <array>
#include <cstddef>
#include <iostream>
// A requires-clause is a predicate on the template arguments, checked at
// compile time: first() exists only for arrays that are not empty.
template <typename T, std::size_t N>
requires(N > 0)
T first(const std::array<T, N>& a) {
return a[0];
}
// The size of the result is computed from the sizes of the arguments.
template <typename T, std::size_t N, std::size_t M>
std::array<T, N + M> concat(const std::array<T, N>& a, const std::array<T, M>& b) {
std::array<T, N + M> out{};
for (std::size_t i = 0; i < N; i++) out[i] = a[i];
for (std::size_t i = 0; i < M; i++) out[N + i] = b[i];
return out;
}
int main() {
std::array<int, 2> a{1, 2};
std::array<int, 3> b{3, 4, 5};
auto c = concat(a, b);
static_assert(c.size() == 5);
std::cout << "concat size " << c.size() << ", first " << first(c) << "\n";
std::cout << "first of b: " << first(b) << "\n";
}
concat size 5, first 1
first of b: 3
This code does not compile, on purpose.
#include <array>
#include <cstddef>
template <typename T, std::size_t N>
requires(N > 0)
T first(const std::array<T, N>& a) {
return a[0];
}
int main() {
std::array<int, 0> empty{};
return first(empty);
}
- Verdict: idiom. C++ templates take values as parameters, such as the size
Nofstd::array<T, N>, and C++20requiresclauses state predicates on them that the compiler checks.concatcomputes the size of its result from the sizes of its arguments,N + M, asVectdoes in Idris. The fails block callsfirston an empty array, and the compiler rejects it because0 > 0is false. All these values must be known at compile time.
import java.util.List;
public class Main {
// A refinement checked once, in the compact constructor
record Percent(int value) {
Percent {
if (value < 0 || value > 100)
throw new IllegalArgumentException(value + " is not in 0..100");
}
}
// Non-empty by construction: first() needs no check and cannot fail
record NonEmptyList<T>(T head, List<T> tail) {
T first() { return head; }
int size() { return 1 + tail.size(); }
}
static double discount(double price, Percent pct) {
return price - price * pct.value() / 100.0;
}
public static void main(String[] args) {
System.out.println(discount(80, new Percent(25)));
var xs = new NonEmptyList<>("a", List.of("b", "c"));
System.out.println("first " + xs.first() + ", size " + xs.size());
try {
new Percent(120);
} catch (IllegalArgumentException e) {
System.out.println("IllegalArgumentException: " + e.getMessage());
}
}
}
60.0
first a, size 3
IllegalArgumentException: 120 is not in 0..100
- Verdict: idiom. Java has no refinement types. A record with a compact constructor checks its predicate once, when the value is made, and the type
Percentthen stands for the refined set.NonEmptyListmakes the predicate structural: it always has a head, sofirst()cannot fail. The compiler does not prove the predicate; a bad value fails at run time, at the constructor.
#include <stdio.h>
/* The type of m depends on the run-time values rows and cols:
it is "array of rows arrays of cols int", a variably modified type. */
static int trace(size_t n, int m[n][n]) {
int sum = 0;
for (size_t i = 0; i < n; i++)
sum += m[i][i];
return sum;
}
static void fill(size_t rows, size_t cols) {
int m[rows][cols];
for (size_t i = 0; i < rows; i++)
for (size_t j = 0; j < cols; j++)
m[i][j] = (int)(i * cols + j);
printf("int[%zu][%zu]: sizeof %zu bytes, row %zu bytes", rows, cols,
sizeof m, sizeof m[0]);
if (rows == cols)
printf(", trace %d", trace(rows, m));
printf("\n");
}
int main(void) {
for (size_t n = 2; n <= 4; n++)
fill(n, n);
fill(2, 5);
return 0;
}
int[2][2]: sizeof 16 bytes, row 8 bytes, trace 3
int[3][3]: sizeof 36 bytes, row 12 bytes, trace 12
int[4][4]: sizeof 64 bytes, row 16 bytes, trace 30
int[2][5]: sizeof 40 bytes, row 20 bytes
- Verdict: idiom. C99 has variably modified types: the type of a variable-length array, such as
int m[rows][cols], depends on values known only at run time, andsizeofand indexing use them. This is a form of dependent type, but C does not check it: nothing stops a call totracewith a wrongn. C has no refinement types; a struct with a checked constructor function is the usual idiom.
using System;
using System.Collections.Generic;
Console.WriteLine(Discount(80, Percent.Of(25)));
var xs = new NonEmpty<string>("a", ["b", "c"]);
Console.WriteLine($"first {xs.First}, count {xs.Count}");
try
{
Percent.Of(120);
}
catch (ArgumentOutOfRangeException e)
{
Console.WriteLine($"ArgumentOutOfRangeException: {e.ParamName} = {e.ActualValue}");
}
Console.WriteLine(default(Percent).Value); // the struct default skips the check
static double Discount(double price, Percent pct) => price - price * pct.Value / 100.0;
readonly record struct Percent
{
public int Value { get; }
private Percent(int value) => Value = value;
public static Percent Of(int n) =>
n is >= 0 and <= 100 ? new Percent(n)
: throw new ArgumentOutOfRangeException(nameof(n), n, "not in 0..100");
}
sealed record NonEmpty<T>(T First, IReadOnlyList<T> Rest)
{
public int Count => 1 + Rest.Count;
}
60
first a, count 3
ArgumentOutOfRangeException: n = 120
0
- Verdict: idiom. C# has no refinement types. A record struct with a private constructor and a factory method checks the predicate when the value is made. The last line shows a gap of this idiom for structs:
default(Percent)makes a value without the factory, here 0, so the invariant must allow the default value, or the type must be a class.
// A smart constructor: the only way to get a Percent checks the predicate
class Percent {
#value;
constructor(value, key) {
if (key !== Percent.#key) throw new TypeError("use Percent.of");
this.#value = value;
}
static #key = Symbol("Percent");
static of(n) {
if (!Number.isInteger(n) || n < 0 || n > 100) {
throw new RangeError(`${n} is not an integer from 0 to 100`);
}
return new Percent(n, Percent.#key);
}
get value() { return this.#value; }
}
function discount(price, pct) { // trusts pct, because a Percent was checked
if (!(pct instanceof Percent)) throw new TypeError("pct must be a Percent");
return price - (price * pct.value) / 100;
}
console.log(discount(80, Percent.of(25)));
for (const attempt of [() => Percent.of(120), () => new Percent(120),
() => discount(80, 25)]) {
try {
attempt();
} catch (err) {
console.log(`${err.name}: ${err.message}`);
}
}
60
RangeError: 120 is not an integer from 0 to 100
TypeError: use Percent.of
TypeError: pct must be a Percent
- Verdict: idiom. JavaScript has no static types. A smart constructor gives the same guarantee at run time:
Percent.ofis the only way to make aPercent, because the constructor needs a private key, so everyPercentholds a valid value. A function that takes aPercentchecks the class once and then trusts the value. TypeScript adds branded types for the same idea at compile time.
package main
import (
"errors"
"fmt"
)
// Port holds a TCP port number from 1 to 65535. The field is unexported,
// so code in other packages can get a Port only from NewPort.
type Port struct{ n uint16 }
func NewPort(n int) (Port, error) {
if n < 1 || n > 65535 {
return Port{}, errors.New(fmt.Sprint(n, " is not a port number"))
}
return Port{uint16(n)}, nil
}
func (p Port) Number() int { return int(p.n) }
// The length of an array is part of its type: [3]float64 is not [2]float64.
func dot(a, b [3]float64) float64 {
return a[0]*b[0] + a[1]*b[1] + a[2]*b[2]
}
func main() {
for _, n := range []int{8080, 0, 70000} {
if p, err := NewPort(n); err != nil {
fmt.Println("error:", err)
} else {
fmt.Println("port", p.Number())
}
}
fmt.Println(dot([3]float64{1, 2, 3}, [3]float64{4, 5, 6}))
var pair [2]float64
fmt.Printf("%T and %T are different types\n", pair, [3]float64{})
}
port 8080
error: 0 is not a port number
error: 70000 is not a port number
32
[2]float64 and [3]float64 are different types
- Verdict: idiom. Go has no refinement types. A struct with an unexported field and a constructor that returns an error keeps the predicate for all code outside the package. The length of a Go array is part of its type, so
dotaccepts only arrays of length 3, but the length must be a constant and generic code cannot take it as a parameter.
use std::num::NonZero;
// The length N is a constant parameter of the type [i32; N]
fn dot<const N: usize>(a: [i32; N], b: [i32; N]) -> i32 {
a.iter().zip(b.iter()).map(|(x, y)| x * y).sum()
}
// A divisor of type NonZero<u32> cannot be zero, so the division needs no check
fn per_item(total: u32, count: NonZero<u32>) -> u32 {
total / count
}
fn main() {
println!("dot: {}", dot([1, 2, 3], [4, 5, 6]));
println!("dot: {}", dot([1, 2], [3, 4]));
for n in [4u32, 0] {
match NonZero::new(n) {
Some(count) => println!("12 / {} = {}", n, per_item(12, count)),
None => println!("{} is rejected where the NonZero is made", n),
}
}
println!("size of Option<NonZero<u32>>: {} bytes", size_of::<Option<NonZero<u32>>>());
}
dot: 32
dot: 11
12 / 4 = 3
0 is rejected where the NonZero is made
size of Option<NonZero<u32>>: 4 bytes
This code does not compile, on purpose. The error is E0308.
fn dot<const N: usize>(a: [i32; N], b: [i32; N]) -> i32 {
a.iter().zip(b.iter()).map(|(x, y)| x * y).sum()
}
fn main() {
println!("{}", dot([1, 2, 3], [4, 5]));
}
- Verdict: idiom. Rust has no dependent types, but const generics let a type depend on a constant value:
dottakes two arrays of the same lengthN, for anyN. The fails block passes arrays of lengths 3 and 2, and the compiler rejects the call with E0308, mismatched types.NonZero<u32>in the standard library is a refinement ofu32that the type checks when the value is made, soper_itemneeds no check for zero, andOption<NonZero<u32>>uses the zero bit pattern forNoneand fits in 4 bytes.
Variations and related ideas
- Full dependent types. Agda, Rocq, Lean and Idris let types contain any total expression. Agda is "an extension of Martin-Löf’s type theory".2
- Indexed types. Haskell's generalized algebraic data types,
DataKindsand type families, and OCaml's GADTs, put values such as lengths at the type level without full dependent types. See sum types. - Refinement type systems. LiquidHaskell, F*, Flux for Rust and Liquid Java check predicates with an SMT solver. Dafny and SPARK Ada verify contracts in a similar way.
- Subrange types. Pascal's
0..100and Ada'srange 0 .. 100are refinements of integers, checked at run time and sometimes removed by the compiler. - Smart constructors and newtypes. A wrapper type that only a checked function can make, often summed up as parse, don't validate. See assertions for checks that do not change the type.
- Linear and quantitative types. Idris 2 marks some arguments as used zero times, so lengths and proofs that exist only for the type checker are erased before the program runs.
- Gradual verification. Some systems check a refinement statically where they can and insert a run-time check elsewhere, as gradual typing does for ordinary types.
Pitfalls
- The proof burden. A dependent type checker knows that
0 + mismfrom the definition of+, but not thatm + 0ism. Code that reverses aVectwith an accumulator needs a proof of such facts, and the work can exceed the work to write the code. - Solver limits. SMT solvers decide linear arithmetic, but nonlinear arithmetic, such as
x * y > 0, and quantifiers can time out or fail. Refinement checkers then reject correct code or need hints. - Mathematical and machine integers. A refinement proved over unbounded integers can fail with 32-bit or 64-bit values that overflow. Use a logic of bit vectors, or check the bounds of the machine type too.
- Defaults and zero values bypass the constructor. In Go any package can write
Port{}, a port of 0, and in C#default(Percent)makes a value without the factory. Deserialization and reflection can also skip the check. Allow the zero value in the invariant, or make the type a class or an interface. - Metadata that nothing checks.
Annotatedconstraints and doc comments look like types, but a type checker ignores them, and a check happens only where code runs it. - Long compile times. Type-level computation with C++ templates or Rust const generics creates one copy of the code for each value, and complex constraints give long error messages.
Cost
Refinements and dependent types that the compiler proves cost nothing at run time, and they can make code faster: a proved bounds check can be removed, which was the aim of Dependent ML. Indexes and proofs are usually erased before the program runs; if they are not, a length stored as a unary natural number costs memory and time. A smart constructor costs one check when the value is made and none after. A refinement can also save space: Option<NonZero<u32>> fits in 4 bytes because zero is free to mean None. The main cost is at compile time, where type checking runs code and calls a solver, and in the programmer's time to write types, invariants and proofs.
History
N. G. de Bruijn's Automath, from 1967, was the first language to check proofs with dependent types. Per Martin-Löf presented his intuitionistic type theory in 1972 and revised it through the 1970s and 1980s; it is the basis of Agda and of much later work.2 Thierry Coquand and Gérard Huet defined the calculus of constructions in 1985 and 1988, the basis of the Coq proof assistant, now named Rocq. On the refinement side, Pascal had subrange types in 1970 and Ada had range constraints in 1983. Tim Freeman and Frank Pfenning introduced refinement types for ML in 1991, and Hongwei Xi and Frank Pfenning used dependent types to remove array bounds checks in Dependent ML in 1998.
Lennart Augustsson's Cayenne, from 1998, and Conor McBride and James McKinna's Epigram, from 2004, applied dependent types to general programming. Ulf Norell's Agda 2 appeared in 2007, Edwin Brady described Idris in 2013 and released Idris 2 in 2020,1 and Leonardo de Moura started Lean in 2013. Patrick Rondon, Ming Kawaguchi and Ranjit Jhala introduced liquid types in 2008, which led to LiquidHaskell in 2014.3 Mainstream languages added weaker forms: C99 variable-length arrays in 1999,6 C++20 concepts in 2020,5 and Rust const generics in 2021.4
References
- Types and Functions, Idris 2 documentation, Dependent Types, Vectors
- What is Agda?, Agda documentation, Introduction
- LiquidHaskell, home page, Introduction
- Generic parameters, The Rust Reference, Const generics
- Constraints and concepts, cppreference.com, Concepts
- Array declaration, cppreference.com, Variable-length arrays
- Struct NonZero, Rust standard library documentation, Description
- CREATE DOMAIN, PostgreSQL documentation, Description
- typing, Support for type hints, Python documentation, typing.Annotated
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag ADHEJ9 Edit this page History Report an error Markdown