A dictionary ⟨K→V⟩ : partial mapping with enumerable key-value pairs. GP §3.5. Represented as sorted association list with unique keys.
Constructor
Dict.mk
Fields
entries : List (K × V)
The Gray Paper's partial-function / dictionary type D⟨K, V⟩ is modeled as an
association list.
Dict (K V : Type) [BEq K] : TypeDict (K V : Type) [BEq K] : Type
A dictionary ⟨K→V⟩ : partial mapping with enumerable key-value pairs. GP §3.5. Represented as sorted association list with unique keys.
Dict.mk
entries : List (K × V)
Lookup: d[k]. GP §3.5.
Insert or update a key-value pair.
Remove a key from the dictionary.
Number of entries.
Domain: 𝒦(d). GP §3.5.
Range: 𝒱(d). GP §3.5.
Dictionary subtraction: d ∖ s. GP §3.5.