Documentation

Projects.Util.Data.Trie.Trie

structure Trie (α : Type u_3) (β : Type u_4) [DecidableEq α] [Hashable α] :
Type (max u_3 u_4)
Instances For
    def Trie.ofRaw {α : Type u_3} {β : Type u_4} [ha₁ : DecidableEq α] [ha₂ : Hashable α] (t : Raw α β) :
    Trie α β
    Equations
    Instances For
      def Trie.empty {α : Type u_3} {β : Type u_4} [ha₁ : DecidableEq α] [ha₂ : Hashable α] :
      Trie α β
      Equations
      Instances For
        @[instance_reducible]
        instance Trie.instEmptyCollection {α : Type u_3} {β : Type u_4} [ha₁ : DecidableEq α] [ha₂ : Hashable α] :
        Equations
        theorem Trie.empty_def {α : Type u_3} {β : Type u_4} [ha₁ : DecidableEq α] [ha₂ : Hashable α] :
        def Trie.depth {α : Type u_3} {β : Type u_4} [ha₁ : DecidableEq α] [ha₂ : Hashable α] (t : Trie α β) :
        Equations
        Instances For
          @[simp]
          theorem Trie.depth_empty {α : Type u_3} {β : Type u_4} [ha₁ : DecidableEq α] [ha₂ : Hashable α] :
          theorem Trie.option_map_ofRaw_get1?_eq_of_equiv {α : Type u_3} {β : Type u_4} [ha₁ : DecidableEq α] [ha₂ : Hashable α] {a b : Raw α β} {k : α} (h₁ : a.Equiv b) :
          def Trie.get1? {α : Type u_3} {β : Type u_4} [ha₁ : DecidableEq α] [ha₂ : Hashable α] (t : Trie α β) (k : α) :
          Option (Trie α β)
          Equations
          Instances For
            theorem Trie.depth_lt {α : Type u_3} {β : Type u_4} [ha₁ : DecidableEq α] [ha₂ : Hashable α] {t t' : Trie α β} {k : α} (h : t.get1? k = some t') :
            def Trie.eqComp {α : Type u_3} {β : Type u_4} [ha₁ : DecidableEq α] [ha₂ : Hashable α] [hb : DecidableEq β] (t₁ t₂ : Trie α β) :
            Equations
            Instances For
              theorem Trie.eq_iff_eqComp {α : Type u_3} {β : Type u_4} [ha₁ : DecidableEq α] [ha₂ : Hashable α] {t₁ t₂ : Trie α β} [hb : DecidableEq β] :
              t₁ = t₂ t₁.eqComp t₂ = true
              @[instance_reducible]
              instance Trie.instDecidableEq {α : Type u_3} {β : Type u_4} [ha₁ : DecidableEq α] [ha₂ : Hashable α] [hb : DecidableEq β] :
              Equations
              @[simp]
              theorem Trie.eqComp_iff_decide_eq {α : Type u_3} {β : Type u_4} [ha₁ : DecidableEq α] [ha₂ : Hashable α] {t₁ t₂ : Trie α β} [hb : DecidableEq β] :
              t₁.eqComp t₂ = true decide (t₁ = t₂) = true
              def Trie.val {α : Type u_3} {β : Type u_4} [ha₁ : DecidableEq α] [ha₂ : Hashable α] (t : Trie α β) :
              Equations
              Instances For
                def Trie.setVal {α : Type u_3} {β : Type u_4} [ha₁ : DecidableEq α] [ha₂ : Hashable α] (t : Trie α β) (val : Option β) :
                Trie α β
                Equations
                Instances For
                  @[simp]
                  theorem Trie.val_setVal {α : Type u_3} {β : Type u_4} [ha₁ : DecidableEq α] [ha₂ : Hashable α] {t : Trie α β} {val : Option β} :
                  (t.setVal val).val = val