@[protected]
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
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
def
rbmap.insert
{α : Type u}
{β : Type v}
{lt : α → α → Prop}
[decidable_rel lt]
(m : rbmap α β lt)
(k : α)
(v : β) :
rbmap α β lt
Equations
- m.insert k v = rbtree.insert m (k, v)
def
rbmap.find_entry
{α : Type u}
{β : Type v}
{lt : α → α → Prop}
[decidable_rel lt]
(m : rbmap α β lt)
(k : α) :
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
def
rbmap.find
{α : Type u}
{β : Type v}
{lt : α → α → Prop}
[decidable_rel lt]
(m : rbmap α β lt)
(k : α) :
option β
Equations
- m.find k = rbmap.to_value (m.find_entry k)
def
rbmap.contains
{α : Type u}
{β : Type v}
{lt : α → α → Prop}
[decidable_rel lt]
(m : rbmap α β lt)
(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