HepLean Documentation

Lean.Data.RBTree

def Lean.RBTree (α : Type u) (cmp : ααOrdering) :
Equations
Instances For
    instance Lean.instInhabitedRBTree {α : Type u_1} {p : ααOrdering} :
    Equations
    • Lean.instInhabitedRBTree = { default := Lean.RBMap.empty }
    @[inline]
    def Lean.mkRBTree (α : Type u) (cmp : ααOrdering) :
    Equations
    Instances For
      instance Lean.instEmptyCollectionRBTree (α : Type u) (cmp : ααOrdering) :
      Equations
      @[inline]
      def Lean.RBTree.empty {α : Type u} {cmp : ααOrdering} :
      Equations
      • Lean.RBTree.empty = Lean.RBMap.empty
      Instances For
        @[inline]
        def Lean.RBTree.depth {α : Type u} {cmp : ααOrdering} (f : NatNatNat) (t : Lean.RBTree α cmp) :
        Equations
        Instances For
          @[inline]
          def Lean.RBTree.fold {α : Type u} {β : Type v} {cmp : ααOrdering} (f : βαβ) (init : β) (t : Lean.RBTree α cmp) :
          β
          Equations
          Instances For
            @[inline]
            def Lean.RBTree.revFold {α : Type u} {β : Type v} {cmp : ααOrdering} (f : βαβ) (init : β) (t : Lean.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 : Lean.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 : Lean.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 : Lean.RBTree α cmp) (init : σ) (f : ασm (ForInStep σ)) :
                  m σ
                  Equations
                  • t.forIn init f = t.val.forIn init fun (a : α) (x : Unit) (acc : σ) => f a acc
                  Instances For
                    instance Lean.RBTree.instForIn {α : Type u} {cmp : ααOrdering} {m : Type u_1 → Type u_2} :
                    ForIn m (Lean.RBTree α cmp) α
                    Equations
                    • Lean.RBTree.instForIn = { forIn := fun {β : Type ?u.29} [Monad m] => Lean.RBTree.forIn }
                    @[inline]
                    def Lean.RBTree.isEmpty {α : Type u} {cmp : ααOrdering} (t : Lean.RBTree α cmp) :
                    Equations
                    Instances For
                      @[specialize #[]]
                      def Lean.RBTree.toList {α : Type u} {cmp : ααOrdering} (t : Lean.RBTree α cmp) :
                      List α
                      Equations
                      Instances For
                        @[specialize #[]]
                        def Lean.RBTree.toArray {α : Type u} {cmp : ααOrdering} (t : Lean.RBTree α cmp) :
                        Equations
                        Instances For
                          @[inline]
                          def Lean.RBTree.min {α : Type u} {cmp : ααOrdering} (t : Lean.RBTree α cmp) :
                          Equations
                          Instances For
                            @[inline]
                            def Lean.RBTree.max {α : Type u} {cmp : ααOrdering} (t : Lean.RBTree α cmp) :
                            Equations
                            Instances For
                              instance Lean.RBTree.instRepr {α : Type u} {cmp : ααOrdering} [Repr α] :
                              Repr (Lean.RBTree α cmp)
                              Equations
                              @[inline]
                              def Lean.RBTree.insert {α : Type u} {cmp : ααOrdering} (t : Lean.RBTree α cmp) (a : α) :
                              Equations
                              Instances For
                                @[inline]
                                def Lean.RBTree.erase {α : Type u} {cmp : ααOrdering} (t : Lean.RBTree α cmp) (a : α) :
                                Equations
                                Instances For
                                  @[specialize #[]]
                                  def Lean.RBTree.ofList {α : Type u} {cmp : ααOrdering} :
                                  List αLean.RBTree α cmp
                                  Equations
                                  Instances For
                                    @[inline]
                                    def Lean.RBTree.find? {α : Type u} {cmp : ααOrdering} (t : Lean.RBTree α cmp) (a : α) :
                                    Equations
                                    Instances For
                                      @[inline]
                                      def Lean.RBTree.contains {α : Type u} {cmp : ααOrdering} (t : Lean.RBTree α cmp) (a : α) :
                                      Equations
                                      • t.contains a = (t.find? a).isSome
                                      Instances For
                                        def Lean.RBTree.fromList {α : Type u} (l : List α) (cmp : ααOrdering) :
                                        Equations
                                        Instances For
                                          def Lean.RBTree.fromArray {α : Type u} (l : Array α) (cmp : ααOrdering) :
                                          Equations
                                          Instances For
                                            @[inline]
                                            def Lean.RBTree.all {α : Type u} {cmp : ααOrdering} (t : Lean.RBTree α cmp) (p : αBool) :
                                            Equations
                                            Instances For
                                              @[inline]
                                              def Lean.RBTree.any {α : Type u} {cmp : ααOrdering} (t : Lean.RBTree α cmp) (p : αBool) :
                                              Equations
                                              Instances For
                                                def Lean.RBTree.subset {α : Type u} {cmp : ααOrdering} (t₁ t₂ : Lean.RBTree α cmp) :
                                                Equations
                                                • t₁.subset t₂ = t₁.all fun (a : α) => (t₂.find? a).isSome
                                                Instances For
                                                  def Lean.RBTree.seteq {α : Type u} {cmp : ααOrdering} (t₁ t₂ : Lean.RBTree α cmp) :
                                                  Equations
                                                  • t₁.seteq t₂ = (t₁.subset t₂ && t₂.subset t₁)
                                                  Instances For
                                                    def Lean.RBTree.union {α : Type u} {cmp : ααOrdering} (t₁ t₂ : Lean.RBTree α cmp) :
                                                    Equations
                                                    Instances For
                                                      def Lean.RBTree.diff {α : Type u} {cmp : ααOrdering} (t₁ t₂ : Lean.RBTree α cmp) :
                                                      Equations
                                                      Instances For
                                                        def Lean.rbtreeOf {α : Type u} (l : List α) (cmp : ααOrdering) :
                                                        Equations
                                                        Instances For