structure
Std.DTreeMap.Internal.Cell
(α : Type u)
[Ord α]
(β : α → Type v)
(k : α → Ordering)
:
Type (max u v)
Type for representing the place in a tree map where a mapping for k
could live.
Internal implementation detail of the tree map.
- inner : Option ((a : α) × β a)
The mapping.
If there is a mapping, then it has a matching key.
Instances For
def
Std.DTreeMap.Internal.Cell.ofEq
{α : Type u}
{β : α → Type v}
[Ord α]
{k : α → Ordering}
(k' : α)
(v' : β k')
(hcmp : ∀ [inst : OrientedOrd α], k k' = Ordering.eq)
:
Cell α β k
Create a cell with a matching key. Internal implementation detail of the tree map
Equations
- Std.DTreeMap.Internal.Cell.ofEq k' v' hcmp = { inner := some ⟨k', v'⟩, property := ⋯ }
Instances For
Create a cell with a matching key. Internal implementation detail of the tree map
Equations
Instances For
@[simp]
theorem
Std.DTreeMap.Internal.Cell.ofEq_inner
{α : Type u}
{β : α → Type v}
[Ord α]
{k : α → Ordering}
{k' : α}
{v' : β k'}
{h : ∀ [inst : OrientedOrd α], k k' = Ordering.eq}
:
def
Std.DTreeMap.Internal.Cell.empty
{α : Type u}
{β : α → Type v}
[Ord α]
{k : α → Ordering}
:
Cell α β k
Create an empty cell. Internal implementation detail of the tree map
Equations
- Std.DTreeMap.Internal.Cell.empty = { inner := none, property := ⋯ }
Instances For
def
Std.DTreeMap.Internal.Cell.ofOption
{α : Type u}
{β : α → Type v}
[Ord α]
(k : α)
(v? : Option (β k))
:
Internal implementation detail of the tree map
Equations
Instances For
@[simp]
theorem
Std.DTreeMap.Internal.Cell.contains_ofEq
{α : Type u}
{β : α → Type v}
[Ord α]
{k : α → Ordering}
{k' : α}
{v' : β k'}
{h : ∀ [inst : OrientedOrd α], k k' = Ordering.eq}
:
def
Std.DTreeMap.Internal.Cell.get?
{α : Type u}
{β : α → Type v}
[Ord α]
[OrientedOrd α]
[LawfulEqOrd α]
{k : α}
(c : Cell α β (compare k))
:
Option (β k)
Internal implementation detail of the tree map
Instances For
@[simp]
theorem
Std.DTreeMap.Internal.Cell.get?_empty
{α : Type u}
{β : α → Type v}
[Ord α]
[OrientedOrd α]
[LawfulEqOrd α]
{k : α}
:
def
Std.DTreeMap.Internal.Cell.alter
{α : Type u}
{β : α → Type v}
[Ord α]
[OrientedOrd α]
[LawfulEqOrd α]
{k : α}
(f : Option (β k) → Option (β k))
(c : Cell α β (compare k))
:
Internal implementation detail of the tree map
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Std.DTreeMap.Internal.Cell.Const.alter
{α : Type u}
{β : Type v}
[Ord α]
[OrientedOrd α]
{k : α}
(f : Option β → Option β)
(c : Cell α (fun (x : α) => β) (compare k))
:
Internal implementation detail of the tree map
Equations
- Std.DTreeMap.Internal.Cell.Const.alter f c = match c.inner with | none => Std.DTreeMap.Internal.Cell.ofOption k (f none) | some ⟨fst, v'⟩ => Std.DTreeMap.Internal.Cell.ofOption k (f (some v'))
Instances For
def
Std.DTreeMap.Internal.List.findCell
{α : Type u}
{β : α → Type v}
[Ord α]
(l : List ((a : α) × β a))
(k : α → Ordering)
:
Cell α β k
Internal implementation detail of the tree map
Equations
- Std.DTreeMap.Internal.List.findCell l k = { inner := List.find? (fun (x : (a : α) × β a) => k x.fst == Ordering.eq) l, property := ⋯ }