Documentation

Std.Data.TreeMap.Slice

This module provides slice notation for TreeMap slices and implements an iterator for those slices.

instance Std.TreeMap.instSliceableRiiSlice {α : Type u} {β : Type v} (cmp : ααOrdering := by exact compare) :
Equations
    @[simp]
    theorem Std.TreeMap.toList_rii {α : Type u} {β : Type v} (cmp : ααOrdering := by exact compare) {t : TreeMap α β cmp} :
    instance Std.TreeMap.instSliceableRicSlice {α : Type u} {β : Type v} (cmp : ααOrdering := by exact compare) :
    Equations
      @[simp]
      theorem Std.TreeMap.toList_ric {α : Type u} {β : Type v} (cmp : ααOrdering := by exact compare) [TransCmp cmp] {t : TreeMap α β cmp} {bound : α} :
      Slice.toList (Ric.Sliceable.mkSlice t *...=bound) = List.filter (fun (e : α × β) => (cmp e.fst bound).isLE) t.toList
      instance Std.TreeMap.instSliceableRioSlice {α : Type u} {β : Type v} (cmp : ααOrdering := by exact compare) :
      Equations
        @[simp]
        theorem Std.TreeMap.toList_rio {α : Type u} {β : Type v} (cmp : ααOrdering := by exact compare) [TransCmp cmp] {t : TreeMap α β cmp} {bound : α} :
        Slice.toList (Rio.Sliceable.mkSlice t *...bound) = List.filter (fun (e : α × β) => (cmp e.fst bound).isLT) t.toList
        instance Std.TreeMap.instSliceableRciSlice {α : Type u} {β : Type v} (cmp : ααOrdering := by exact compare) :
        Equations
          @[simp]
          theorem Std.TreeMap.toList_rci {α : Type u} {β : Type v} (cmp : ααOrdering := by exact compare) [TransCmp cmp] {t : TreeMap α β cmp} {bound : α} :
          Slice.toList (Rci.Sliceable.mkSlice t bound...*) = List.filter (fun (e : α × β) => (cmp e.fst bound).isGE) t.toList
          instance Std.TreeMap.instSliceableRcoSlice {α : Type u} {β : Type v} (cmp : ααOrdering := by exact compare) :
          Equations
            @[simp]
            theorem Std.TreeMap.toList_rco {α : Type u} {β : Type v} (cmp : ααOrdering := by exact compare) [TransCmp cmp] {t : TreeMap α β cmp} {lowerBound upperBound : α} :
            Slice.toList (Rco.Sliceable.mkSlice t lowerBound...upperBound) = List.filter (fun (e : α × β) => decide ((cmp e.fst lowerBound).isGE = true (cmp e.fst upperBound).isLT = true)) t.toList
            instance Std.TreeMap.instSliceableRccSlice {α : Type u} {β : Type v} (cmp : ααOrdering := by exact compare) :
            Equations
              @[simp]
              theorem Std.TreeMap.toList_rcc {α : Type u} {β : Type v} (cmp : ααOrdering := by exact compare) [TransCmp cmp] {t : TreeMap α β cmp} {lowerBound upperBound : α} :
              Slice.toList (Rcc.Sliceable.mkSlice t lowerBound...=upperBound) = List.filter (fun (e : α × β) => decide ((cmp e.fst lowerBound).isGE = true (cmp e.fst upperBound).isLE = true)) t.toList
              instance Std.TreeMap.instSliceableRoiSlice {α : Type u} {β : Type v} (cmp : ααOrdering := by exact compare) :
              Equations
                @[simp]
                theorem Std.TreeMap.toList_roi {α : Type u} {β : Type v} (cmp : ααOrdering := by exact compare) [TransCmp cmp] {t : TreeMap α β cmp} {bound : α} :
                Slice.toList (Roi.Sliceable.mkSlice t bound<...*) = List.filter (fun (e : α × β) => (cmp e.fst bound).isGT) t.toList
                instance Std.TreeMap.instSliceableRocSlice {α : Type u} {β : Type v} (cmp : ααOrdering := by exact compare) :
                Equations
                  @[simp]
                  theorem Std.TreeMap.toList_roc {α : Type u} {β : Type v} (cmp : ααOrdering := by exact compare) [TransCmp cmp] {t : TreeMap α β cmp} {lowerBound upperBound : α} :
                  Slice.toList (Roc.Sliceable.mkSlice t lowerBound<...=upperBound) = List.filter (fun (e : α × β) => decide ((cmp e.fst lowerBound).isGT = true (cmp e.fst upperBound).isLE = true)) t.toList
                  instance Std.TreeMap.instSliceableRooSlice {α : Type u} {β : Type v} (cmp : ααOrdering := by exact compare) :
                  Equations
                    @[simp]
                    theorem Std.TreeMap.toList_roo {α : Type u} {β : Type v} (cmp : ααOrdering := by exact compare) [TransCmp cmp] {t : TreeMap α β cmp} {lowerBound upperBound : α} :
                    Slice.toList (Roo.Sliceable.mkSlice t lowerBound<...upperBound) = List.filter (fun (e : α × β) => decide ((cmp e.fst lowerBound).isGT = true (cmp e.fst upperBound).isLT = true)) t.toList