Documentation

Std.Data.TreeSet.Slice

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

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