List
Types
inductive List a forall <p:(_ : a) → Bool → Bool>
Measures
size : Int
structuralRank : Int
first : a
rest : (List a)
Constructors
For each type in this module: inductive types list their declared constructors; opaque types list any local function whose name starts with mk and which returns a value of that type.
{l : (List a) | size l = 0 && structuralRank l = 0}
{
l : (List a) | size l = size tl + 1
&&
structuralRank l = structuralRank tl + 1 && structuralRank tl ≥ 0 && first l = hd && rest l = tl
}
Functions
def length (l : (List a)) : Int
def empty (l : (List a)) : Bool
def append (xs : (List a)) (ys : (List a)) : (List a)
def map (f : (x : a) → b) (l : (List a)) : (List b)
def foldr (f : (x : a) → (acc : b) → b) (z : b) (l : (List a)) : b
def reverse_acc (xs : (List a)) (acc : (List a)) : (List a)
def reversed (l : (List a)) : (List a)
def snoc (l : (List a)) (x : a) : (List a)
def sum (l : (List Int)) : Int
def all (p : (x : a) → Bool) (l : (List a)) : Bool