Equations
- m.empty = rbtree.empty m
Equations
- m.to_list = rbtree.to_list m
Equations
- m.min = rbtree.min m
Equations
- m.max = rbtree.max m
def
rbmap.fold
{α : Type u}
{β : Type v}
{δ : Type w}
{lt : α → α → Prop} :
(α → β → δ → δ) → rbmap α β lt → δ → δ
Equations
- rbmap.fold f m d = rbtree.fold (λ (e : α × β), f e.fst e.snd) m d
def
rbmap.rev_fold
{α : Type u}
{β : Type v}
{δ : Type w}
{lt : α → α → Prop} :
(α → β → δ → δ) → rbmap α β lt → δ → δ
Equations
- rbmap.rev_fold f m d = rbtree.rev_fold (λ (e : α × β), f e.fst e.snd) m d
Equations
- rbmap.mem k m = rbmap.mem._match_1 k m m.val
- rbmap.mem._match_1 k m (_x.black_node e _x_1) = rbtree.mem (k, e.snd) m
- rbmap.mem._match_1 k m (_x.red_node e _x_1) = rbtree.mem (k, e.snd) m
- rbmap.mem._match_1 k m rbnode.leaf = false
@[instance]
Equations
- rbmap.has_mem = {mem := rbmap.mem lt}
def
rbmap.rbmap_lt_dec
{α : Type u}
{β : Type v}
{lt : α → α → Prop}
[h : decidable_rel lt] :
decidable_rel (rbmap_lt lt)
Equations
- rbmap.rbmap_lt_dec = λ (a b : α × β), h a.fst b.fst
Equations
- m.insert k v = rbtree.insert m (k, v)
Equations
- m.find_entry k = rbmap.find_entry._match_1 m k m.val
- rbmap.find_entry._match_1 m k (_x.black_node e _x_1) = rbtree.find m (k, e.snd)
- rbmap.find_entry._match_1 m k (_x.red_node e _x_1) = rbtree.find m (k, e.snd)
- rbmap.find_entry._match_1 m k rbnode.leaf = option.none
Equations
Equations
- m.find k = rbmap.to_value (m.find_entry k)
Equations
- m.contains k = (m.find_entry k).is_some
def
rbmap.from_list
{α : Type u}
{β : Type v}
(l : list (α × β))
(lt : α → α → Prop . "default_lt")
[decidable_rel lt] :
rbmap α β lt
Equations
- rbmap.from_list l lt = list.foldl (λ (m : rbmap α β lt) (p : α × β), m.insert p.fst p.snd) (mk_rbmap α β lt) l
def
rbmap_of
{α : Type u}
{β : Type v}
(l : list (α × β))
(lt : α → α → Prop . "default_lt")
[decidable_rel lt] :
rbmap α β lt
Equations
- rbmap_of l lt = rbmap.from_list l lt