Documentation

Lean.Data.RBTree

def Lean.RBTree (α : Type u) (cmp : ααOrdering) :
Equations
    Instances For
      instance Lean.instInhabitedRBTree {α : Type u_1} {p : ααOrdering} :
      Equations
        @[inline]
        def Lean.mkRBTree (α : Type u) (cmp : ααOrdering) :
        RBTree α cmp
        Equations
          Instances For
            instance Lean.instEmptyCollectionRBTree (α : Type u) (cmp : ααOrdering) :
            Equations
              @[inline]
              def Lean.RBTree.empty {α : Type u} {cmp : ααOrdering} :
              RBTree α cmp
              Equations
                Instances For
                  @[inline]
                  def Lean.RBTree.depth {α : Type u} {cmp : ααOrdering} (f : NatNatNat) (t : RBTree α cmp) :
                  Equations
                    Instances For
                      @[inline]
                      def Lean.RBTree.fold {α : Type u} {β : Type v} {cmp : ααOrdering} (f : βαβ) (init : β) (t : RBTree α cmp) :
                      β
                      Equations
                        Instances For
                          @[inline]
                          def Lean.RBTree.revFold {α : Type u} {β : Type v} {cmp : ααOrdering} (f : βαβ) (init : β) (t : RBTree α cmp) :
                          β
                          Equations
                            Instances For
                              @[inline]
                              def Lean.RBTree.foldM {α : Type u} {β : Type v} {cmp : ααOrdering} {m : Type v → Type w} [Monad m] (f : βαm β) (init : β) (t : RBTree α cmp) :
                              m β
                              Equations
                                Instances For
                                  @[inline]
                                  def Lean.RBTree.forM {α : Type u} {cmp : ααOrdering} {m : Type v → Type w} [Monad m] (f : αm PUnit) (t : RBTree α cmp) :
                                  Equations
                                    Instances For
                                      @[inline]
                                      def Lean.RBTree.forIn {α : Type u} {cmp : ααOrdering} {m : Type u_1 → Type u_2} {σ : Type u_1} [Monad m] (t : RBTree α cmp) (init : σ) (f : ασm (ForInStep σ)) :
                                      m σ
                                      Equations
                                        Instances For
                                          instance Lean.RBTree.instForIn {α : Type u} {cmp : ααOrdering} {m : Type u_1 → Type u_2} :
                                          ForIn m (RBTree α cmp) α
                                          Equations
                                            @[inline]
                                            def Lean.RBTree.isEmpty {α : Type u} {cmp : ααOrdering} (t : RBTree α cmp) :
                                            Equations
                                              Instances For
                                                @[specialize #[]]
                                                def Lean.RBTree.toList {α : Type u} {cmp : ααOrdering} (t : RBTree α cmp) :
                                                List α
                                                Equations
                                                  Instances For
                                                    @[specialize #[]]
                                                    def Lean.RBTree.toArray {α : Type u} {cmp : ααOrdering} (t : RBTree α cmp) :
                                                    Equations
                                                      Instances For
                                                        @[inline]
                                                        def Lean.RBTree.min {α : Type u} {cmp : ααOrdering} (t : RBTree α cmp) :
                                                        Equations
                                                          Instances For
                                                            @[inline]
                                                            def Lean.RBTree.max {α : Type u} {cmp : ααOrdering} (t : RBTree α cmp) :
                                                            Equations
                                                              Instances For
                                                                instance Lean.RBTree.instRepr {α : Type u} {cmp : ααOrdering} [Repr α] :
                                                                Repr (RBTree α cmp)
                                                                Equations
                                                                  @[inline]
                                                                  def Lean.RBTree.insert {α : Type u} {cmp : ααOrdering} (t : RBTree α cmp) (a : α) :
                                                                  RBTree α cmp
                                                                  Equations
                                                                    Instances For
                                                                      @[inline]
                                                                      def Lean.RBTree.erase {α : Type u} {cmp : ααOrdering} (t : RBTree α cmp) (a : α) :
                                                                      RBTree α cmp
                                                                      Equations
                                                                        Instances For
                                                                          @[specialize #[]]
                                                                          def Lean.RBTree.ofList {α : Type u} {cmp : ααOrdering} :
                                                                          List αRBTree α cmp
                                                                          Equations
                                                                            Instances For
                                                                              @[inline]
                                                                              def Lean.RBTree.find? {α : Type u} {cmp : ααOrdering} (t : RBTree α cmp) (a : α) :
                                                                              Equations
                                                                                Instances For
                                                                                  @[inline]
                                                                                  def Lean.RBTree.contains {α : Type u} {cmp : ααOrdering} (t : RBTree α cmp) (a : α) :
                                                                                  Equations
                                                                                    Instances For
                                                                                      def Lean.RBTree.fromList {α : Type u} (l : List α) (cmp : ααOrdering) :
                                                                                      RBTree α cmp
                                                                                      Equations
                                                                                        Instances For
                                                                                          def Lean.RBTree.fromArray {α : Type u} (l : Array α) (cmp : ααOrdering) :
                                                                                          RBTree α cmp
                                                                                          Equations
                                                                                            Instances For
                                                                                              @[inline]
                                                                                              def Lean.RBTree.all {α : Type u} {cmp : ααOrdering} (t : RBTree α cmp) (p : αBool) :
                                                                                              Equations
                                                                                                Instances For
                                                                                                  @[inline]
                                                                                                  def Lean.RBTree.any {α : Type u} {cmp : ααOrdering} (t : RBTree α cmp) (p : αBool) :
                                                                                                  Equations
                                                                                                    Instances For
                                                                                                      def Lean.RBTree.subset {α : Type u} {cmp : ααOrdering} (t₁ t₂ : RBTree α cmp) :
                                                                                                      Equations
                                                                                                        Instances For
                                                                                                          def Lean.RBTree.seteq {α : Type u} {cmp : ααOrdering} (t₁ t₂ : RBTree α cmp) :
                                                                                                          Equations
                                                                                                            Instances For
                                                                                                              def Lean.RBTree.union {α : Type u} {cmp : ααOrdering} (t₁ t₂ : RBTree α cmp) :
                                                                                                              RBTree α cmp
                                                                                                              Equations
                                                                                                                Instances For
                                                                                                                  def Lean.RBTree.diff {α : Type u} {cmp : ααOrdering} (t₁ t₂ : RBTree α cmp) :
                                                                                                                  RBTree α cmp
                                                                                                                  Equations
                                                                                                                    Instances For
                                                                                                                      def Lean.RBTree.filter {α : Type u} {cmp : ααOrdering} (f : αBool) (m : RBTree α cmp) :
                                                                                                                      RBTree α cmp

                                                                                                                      filter f m returns the RBTree consisting of all x in m where f x returns true.

                                                                                                                      Equations
                                                                                                                        Instances For
                                                                                                                          def Lean.rbtreeOf {α : Type u} (l : List α) (cmp : ααOrdering) :
                                                                                                                          RBTree α cmp
                                                                                                                          Equations
                                                                                                                            Instances For