File: .lake/packages/lean4/src/lean/Lean/Data/Trie.lean

full_name: Lean.Data.Trie.node1
code: /-- A Trie is a key-value store where the keys are of type `String`,
and the internal structure is a tree that branches on the bytes of the string.  -/
inductive Trie (α : Type) where
  | leaf : Option α → Trie α
  | node1 : Option α → UInt8 → Trie α → Trie α
  | node : Option α → ByteArray → Array (Trie α) → Trie α
goal: Option α → UInt8 → Lean.Data.Trie α → Lean.Data.Trie α

full_name: Lean.Data.Trie
code: /-- A Trie is a key-value store where the keys are of type `String`,
and the internal structure is a tree that branches on the bytes of the string.  -/
inductive Trie (α : Type) where
  | leaf : Option α → Trie α
  | node1 : Option α → UInt8 → Trie α → Trie α
  | node : Option α → ByteArray → Array (Trie α) → Trie α
goal: Type

full_name: Lean.Data.Trie.node
code: /-- A Trie is a key-value store where the keys are of type `String`,
and the internal structure is a tree that branches on the bytes of the string.  -/
inductive Trie (α : Type) where
  | leaf : Option α → Trie α
  | node1 : Option α → UInt8 → Trie α → Trie α
  | node : Option α → ByteArray → Array (Trie α) → Trie α
goal: Option α → ByteArray → Array (Lean.Data.Trie α) → Lean.Data.Trie α

full_name: Lean.Data.Trie.leaf
code: /-- A Trie is a key-value store where the keys are of type `String`,
and the internal structure is a tree that branches on the bytes of the string.  -/
inductive Trie (α : Type) where
  | leaf : Option α → Trie α
  | node1 : Option α → UInt8 → Trie α → Trie α
  | node : Option α → ByteArray → Array (Trie α) → Trie α
goal: Option α → Lean.Data.Trie α

full_name: Lean.Data.Trie.empty
code: /-- The empty `Trie` -/
def empty : Trie α 
goal: Lean.Data.Trie α

full_name: Lean.Data.Trie.instEmptyCollection
code: instance : EmptyCollection (Trie α) 
goal: EmptyCollection (Lean.Data.Trie α)

full_name: Lean.Data.Trie.instInhabited
code: instance : Inhabited (Trie α) 
goal: Inhabited (Lean.Data.Trie α)

full_name: Lean.Data.Trie.upsert.insertEmpty
code: /-- Insert or update the value at a the given key `s`.  -/
partial def upsert (t : Trie α) (s : String) (f : Option α → α) : Trie α 
goal: Lean.Data.Trie α

full_name: Lean.Data.Trie.upsert
code: /-- Insert or update the value at a the given key `s`.  -/
partial def upsert (t : Trie α) (s : String) (f : Option α → α) : Trie α 
goal: Lean.Data.Trie α

full_name: Lean.Data.Trie.upsert.loop
code: /-- Insert or update the value at a the given key `s`.  -/
partial def upsert (t : Trie α) (s : String) (f : Option α → α) : Trie α 
goal: Nat → Lean.Data.Trie α → Lean.Data.Trie α

full_name: Lean.Data.Trie.insert
code: /-- Inserts a value at a the given key `s`, overriding an existing value if present. -/
partial def insert (t : Trie α) (s : String) (val : α) : Trie α 
goal: Lean.Data.Trie α

full_name: Lean.Data.Trie.find?.loop
code: /-- Looks up a value at the given key `s`.  -/
partial def find? (t : Trie α) (s : String) : Option α 
goal: Nat → Lean.Data.Trie α → Option α

full_name: Lean.Data.Trie.find?
code: /-- Looks up a value at the given key `s`.  -/
partial def find? (t : Trie α) (s : String) : Option α 
goal: Option α

full_name: Lean.Data.Trie.values.go
code: /-- Returns an `Array` of all values in the trie, in no particular order. -/
partial def values (t : Trie α) : Array α 
goal: Lean.Data.Trie α → StateM (Array α) Unit

full_name: Lean.Data.Trie.values
code: /-- Returns an `Array` of all values in the trie, in no particular order. -/
partial def values (t : Trie α) : Array α 
goal: Array α

full_name: Lean.Data.Trie.findPrefix.go
code: /-- Returns all values whose key have the given string `pre` as a prefix, in no particular order. -/
partial def findPrefix (t : Trie α) (pre : String) : Array α 
goal: Array α

full_name: Lean.Data.Trie.findPrefix
code: /-- Returns all values whose key have the given string `pre` as a prefix, in no particular order. -/
partial def findPrefix (t : Trie α) (pre : String) : Array α 
goal: Array α

full_name: Lean.Data.Trie.matchPrefix.loop
code: /-- Find the longest _key_ in the trie that is contained in the given string `s` at position `i`,
and return the associated value. -/
partial def matchPrefix (s : String) (t : Trie α) (i : String.Pos) : Option α 
goal: Lean.Data.Trie α → Nat → Option α → Option α

full_name: Lean.Data.Trie.matchPrefix
code: /-- Find the longest _key_ in the trie that is contained in the given string `s` at position `i`,
and return the associated value. -/
partial def matchPrefix (s : String) (t : Trie α) (i : String.Pos) : Option α 
goal: Option α

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Data.Trie.0.Lean.Data.Trie.toStringAux
code: private partial def toStringAux {α : Type} : Trie α → List Format
  
goal: Lean.Data.Trie α → List Lean.Format

full_name: Lean.Data.Trie.instToString
code: instance {α : Type} : ToString (Trie α) 
goal: ToString (Lean.Data.Trie α)