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

full_name: Lean.instBEqDataValue
code: /-- Value stored in a key-value map. -/
inductive DataValue where
  | ofString (v : String)
  | ofBool   (v : Bool)
  | ofName   (v : Name)
  | ofNat    (v : Nat)
  | ofInt    (v : Int)
  | ofSyntax (v : Syntax)
  deriving Inhabited, BEq, Repr
goal: BEq Lean.DataValue

full_name: Lean.DataValue.ofName
code: /-- Value stored in a key-value map. -/
inductive DataValue where
  | ofString (v : String)
  | ofBool   (v : Bool)
  | ofName   (v : Name)
  | ofNat    (v : Nat)
  | ofInt    (v : Int)
  | ofSyntax (v : Syntax)
  deriving Inhabited, BEq, Repr
goal: Lean.DataValue

full_name: Lean.DataValue.ofBool
code: /-- Value stored in a key-value map. -/
inductive DataValue where
  | ofString (v : String)
  | ofBool   (v : Bool)
  | ofName   (v : Name)
  | ofNat    (v : Nat)
  | ofInt    (v : Int)
  | ofSyntax (v : Syntax)
  deriving Inhabited, BEq, Repr
goal: Lean.DataValue

full_name: Lean.instInhabitedDataValue
code: /-- Value stored in a key-value map. -/
inductive DataValue where
  | ofString (v : String)
  | ofBool   (v : Bool)
  | ofName   (v : Name)
  | ofNat    (v : Nat)
  | ofInt    (v : Int)
  | ofSyntax (v : Syntax)
  deriving Inhabited, BEq, Repr
goal: Inhabited Lean.DataValue

full_name: Lean.DataValue.ofInt
code: /-- Value stored in a key-value map. -/
inductive DataValue where
  | ofString (v : String)
  | ofBool   (v : Bool)
  | ofName   (v : Name)
  | ofNat    (v : Nat)
  | ofInt    (v : Int)
  | ofSyntax (v : Syntax)
  deriving Inhabited, BEq, Repr
goal: Lean.DataValue

full_name: Lean.instReprDataValue
code: /-- Value stored in a key-value map. -/
inductive DataValue where
  | ofString (v : String)
  | ofBool   (v : Bool)
  | ofName   (v : Name)
  | ofNat    (v : Nat)
  | ofInt    (v : Int)
  | ofSyntax (v : Syntax)
  deriving Inhabited, BEq, Repr
goal: Repr Lean.DataValue

full_name: Lean.DataValue.ofString
code: /-- Value stored in a key-value map. -/
inductive DataValue where
  | ofString (v : String)
  | ofBool   (v : Bool)
  | ofName   (v : Name)
  | ofNat    (v : Nat)
  | ofInt    (v : Int)
  | ofSyntax (v : Syntax)
  deriving Inhabited, BEq, Repr
goal: Lean.DataValue

full_name: Lean.DataValue.ofNat
code: /-- Value stored in a key-value map. -/
inductive DataValue where
  | ofString (v : String)
  | ofBool   (v : Bool)
  | ofName   (v : Name)
  | ofNat    (v : Nat)
  | ofInt    (v : Int)
  | ofSyntax (v : Syntax)
  deriving Inhabited, BEq, Repr
goal: Lean.DataValue

full_name: Lean.DataValue.ofSyntax
code: /-- Value stored in a key-value map. -/
inductive DataValue where
  | ofString (v : String)
  | ofBool   (v : Bool)
  | ofName   (v : Name)
  | ofNat    (v : Nat)
  | ofInt    (v : Int)
  | ofSyntax (v : Syntax)
  deriving Inhabited, BEq, Repr
goal: Lean.DataValue

full_name: Lean.DataValue
code: /-- Value stored in a key-value map. -/
inductive DataValue where
  | ofString (v : String)
  | ofBool   (v : Bool)
  | ofName   (v : Name)
  | ofNat    (v : Nat)
  | ofInt    (v : Int)
  | ofSyntax (v : Syntax)
  deriving Inhabited, BEq, Repr
goal: Type

full_name: Lean.DataValue.beqExp
code: @[export lean_data_value_beq]
def DataValue.beqExp (a b : DataValue) : Bool 
goal: Bool

full_name: Lean.mkBoolDataValueEx
code: @[export lean_mk_bool_data_value] def mkBoolDataValueEx (b : Bool) : DataValue 
goal: Lean.DataValue

full_name: Lean.DataValue.getBoolEx
code: @[export lean_data_value_bool] def DataValue.getBoolEx : DataValue → Bool
  
goal: Lean.DataValue → Bool

full_name: Lean.DataValue.sameCtor
code: def DataValue.sameCtor : DataValue → DataValue → Bool
  
goal: Lean.DataValue → Lean.DataValue → Bool

full_name: Lean.DataValue.str
code: @[export lean_data_value_to_string]
def DataValue.str : DataValue → String
  
goal: Lean.DataValue → String

full_name: Lean.instToStringDataValue
code: instance : ToString DataValue 
goal: ToString Lean.DataValue

full_name: Lean.instCoeStringDataValue
code: instance : Coe String DataValue 
goal: Coe String Lean.DataValue

full_name: Lean.instCoeBoolDataValue
code: instance : Coe Bool DataValue   
goal: Coe Bool Lean.DataValue

full_name: Lean.instCoeNameDataValue
code: instance : Coe Name DataValue   
goal: Coe Lean.Name Lean.DataValue

full_name: Lean.instCoeNatDataValue
code: instance : Coe Nat DataValue    
goal: Coe Nat Lean.DataValue

full_name: Lean.instCoeIntDataValue
code: instance : Coe Int DataValue    
goal: Coe Int Lean.DataValue

full_name: Lean.instCoeSyntaxDataValue
code: instance : Coe Syntax DataValue 
goal: Coe Lean.Syntax Lean.DataValue

full_name: Lean.KVMap.entries
code: /--
A key-value map. We use it to represent user-selected options and `Expr.mdata`.

Remark: we do not use `RBMap` here because we need to manipulate `KVMap` objects in
C++ and `RBMap` is implemented in Lean. So, we use just a `List` until we can
generate C++ code from Lean code.
-/
structure KVMap where
  entries : List (Name × DataValue) := []
  deriving Inhabited, Repr
goal: List (Lean.Name × Lean.DataValue)

full_name: Lean.instInhabitedKVMap
code: /--
A key-value map. We use it to represent user-selected options and `Expr.mdata`.

Remark: we do not use `RBMap` here because we need to manipulate `KVMap` objects in
C++ and `RBMap` is implemented in Lean. So, we use just a `List` until we can
generate C++ code from Lean code.
-/
structure KVMap where
  entries : List (Name × DataValue) := []
  deriving Inhabited, Repr
goal: Inhabited Lean.KVMap

full_name: Lean.instReprKVMap
code: /--
A key-value map. We use it to represent user-selected options and `Expr.mdata`.

Remark: we do not use `RBMap` here because we need to manipulate `KVMap` objects in
C++ and `RBMap` is implemented in Lean. So, we use just a `List` until we can
generate C++ code from Lean code.
-/
structure KVMap where
  entries : List (Name × DataValue) := []
  deriving Inhabited, Repr
goal: Repr Lean.KVMap

full_name: Lean.KVMap
code: /--
A key-value map. We use it to represent user-selected options and `Expr.mdata`.

Remark: we do not use `RBMap` here because we need to manipulate `KVMap` objects in
C++ and `RBMap` is implemented in Lean. So, we use just a `List` until we can
generate C++ code from Lean code.
-/
structure KVMap where
  entries : List (Name × DataValue) := []
  deriving Inhabited, Repr
goal: Type

full_name: Lean.KVMap.instToString
code: instance : ToString KVMap 
goal: ToString Lean.KVMap

full_name: Lean.KVMap.empty
code: def empty : KVMap 
goal: Lean.KVMap

full_name: Lean.KVMap.isEmpty
code: def isEmpty : KVMap → Bool
  
goal: Lean.KVMap → Bool

full_name: Lean.KVMap.size
code: def size (m : KVMap) : Nat 
goal: Nat

full_name: Lean.KVMap.findCore
code: def findCore : List (Name × DataValue) → Name → Option DataValue
  
goal: List (Lean.Name × Lean.DataValue) → Lean.Name → Option Lean.DataValue

full_name: Lean.KVMap.find
code: def find : KVMap → Name → Option DataValue
  
goal: Lean.KVMap → Lean.Name → Option Lean.DataValue

full_name: Lean.KVMap.findD
code: def findD (m : KVMap) (k : Name) (d₀ : DataValue) : DataValue 
goal: Lean.DataValue

full_name: Lean.KVMap.insertCore
code: def insertCore : List (Name × DataValue) → Name → DataValue → List (Name × DataValue)
  
goal: List (Lean.Name × Lean.DataValue) → Lean.Name → Lean.DataValue → List (Lean.Name × Lean.DataValue)

full_name: Lean.KVMap.insert
code: def insert : KVMap → Name → DataValue → KVMap
  
goal: Lean.KVMap → Lean.Name → Lean.DataValue → Lean.KVMap

full_name: Lean.KVMap.contains
code: def contains (m : KVMap) (n : Name) : Bool 
goal: Bool

full_name: Lean.KVMap.erase
code: /-- Erase an entry from the map -/
def erase : KVMap → Name → KVMap
  
goal: Lean.KVMap → Lean.Name → Lean.KVMap

full_name: Lean.KVMap.getString
code: def getString (m : KVMap) (k : Name) (defVal := "") : String 
goal: String

full_name: Lean.KVMap.getNat
code: def getNat (m : KVMap) (k : Name) (defVal := 0) : Nat 
goal: Nat

full_name: Lean.KVMap.getInt
code: def getInt (m : KVMap) (k : Name) (defVal : Int := 0) : Int 
goal: Int

full_name: Lean.KVMap.getBool
code: def getBool (m : KVMap) (k : Name) (defVal := false) : Bool 
goal: Bool

full_name: Lean.KVMap.getName
code: def getName (m : KVMap) (k : Name) (defVal := Name.anonymous) : Name 
goal: Lean.Name

full_name: Lean.KVMap.getSyntax
code: def getSyntax (m : KVMap) (k : Name) (defVal := Syntax.missing) : Syntax 
goal: Lean.Syntax

full_name: Lean.KVMap.setString
code: def setString (m : KVMap) (k : Name) (v : String) : KVMap 
goal: Lean.KVMap

full_name: Lean.KVMap.setNat
code: def setNat (m : KVMap) (k : Name) (v : Nat) : KVMap 
goal: Lean.KVMap

full_name: Lean.KVMap.setInt
code: def setInt (m : KVMap) (k : Name) (v : Int) : KVMap 
goal: Lean.KVMap

full_name: Lean.KVMap.setBool
code: def setBool (m : KVMap) (k : Name) (v : Bool) : KVMap 
goal: Lean.KVMap

full_name: Lean.KVMap.setName
code: def setName (m : KVMap) (k : Name) (v : Name) : KVMap 
goal: Lean.KVMap

full_name: Lean.KVMap.setSyntax
code: def setSyntax (m : KVMap) (k : Name) (v : Syntax) : KVMap 
goal: Lean.KVMap

full_name: Lean.KVMap.updateString
code: /-- Update a `String` entry based on its current value. -/
def updateString (m : KVMap) (k : Name) (f : String → String) : KVMap 
goal: Lean.KVMap

full_name: Lean.KVMap.updateNat
code: /-- Update a `Nat` entry based on its current value. -/
def updateNat (m : KVMap) (k : Name) (f : Nat → Nat) : KVMap 
goal: Lean.KVMap

full_name: Lean.KVMap.updateInt
code: /-- Update an `Int` entry based on its current value. -/
def updateInt (m : KVMap) (k : Name) (f : Int → Int) : KVMap 
goal: Lean.KVMap

full_name: Lean.KVMap.updateBool
code: /-- Update a `Bool` entry based on its current value. -/
def updateBool (m : KVMap) (k : Name) (f : Bool → Bool) : KVMap 
goal: Lean.KVMap

full_name: Lean.KVMap.updateName
code: /-- Update a `Name` entry based on its current value. -/
def updateName (m : KVMap) (k : Name) (f : Name → Name) : KVMap 
goal: Lean.KVMap

full_name: Lean.KVMap.updateSyntax
code: /-- Update a `Syntax` entry based on its current value. -/
def updateSyntax (m : KVMap) (k : Name) (f : Syntax → Syntax) : KVMap 
goal: Lean.KVMap

full_name: Lean.KVMap.forIn
code: @[inline] protected def forIn.{w, w'} {δ : Type w} {m : Type w → Type w'} [Monad m]
  (kv : KVMap) (init : δ) (f : Name × DataValue → δ → m (ForInStep δ)) : m δ 
goal: m δ

full_name: Lean.KVMap.instForInProdNameDataValue
code: instance : ForIn m KVMap (Name × DataValue) 
goal: ForIn m Lean.KVMap (Lean.Name × Lean.DataValue)

full_name: Lean.KVMap.subsetAux
code: def subsetAux : List (Name × DataValue) → KVMap → Bool
  
goal: List (Lean.Name × Lean.DataValue) → Lean.KVMap → Bool

full_name: Lean.KVMap.subset
code: def subset : KVMap → KVMap → Bool
  
goal: Lean.KVMap → Lean.KVMap → Bool

full_name: Lean.KVMap.mergeBy
code: def mergeBy (mergeFn : Name → DataValue → DataValue → DataValue) (l r : KVMap)
    : KVMap 
goal: Lean.KVMap

full_name: Lean.KVMap.eqv
code: def eqv (m₁ m₂ : KVMap) : Bool 
goal: Bool

full_name: Lean.KVMap.instBEq
code: instance : BEq KVMap 
goal: BEq Lean.KVMap

full_name: Lean.KVMap.Value.ofDataValue?
code: class Value (α : Type) where
  toDataValue  : α → DataValue
  ofDataValue? : DataValue → Option α
goal: Lean.DataValue → Option α

full_name: Lean.KVMap.Value
code: class Value (α : Type) where
  toDataValue  : α → DataValue
  ofDataValue? : DataValue → Option α
goal: Type

full_name: Lean.KVMap.Value.toDataValue
code: class Value (α : Type) where
  toDataValue  : α → DataValue
  ofDataValue? : DataValue → Option α
goal: α → Lean.DataValue

full_name: Lean.KVMap.get?
code: @[inline] def get? {α : Type} [Value α] (m : KVMap) (k : Name) : Option α 
goal: Option α

full_name: Lean.KVMap.get
code: @[inline] def get {α : Type} [Value α] (m : KVMap) (k : Name) (defVal : α) : α 
goal: α

full_name: Lean.KVMap.set
code: @[inline] def set {α : Type} [Value α] (m : KVMap) (k : Name) (v : α) : KVMap 
goal: Lean.KVMap

full_name: Lean.KVMap.update
code: @[inline] def update {α : Type} [Value α] (m : KVMap) (k : Name) (f : Option α → Option α) : KVMap 
goal: Lean.KVMap

full_name: Lean.KVMap.instValueDataValue
code: instance : Value DataValue 
goal: Lean.KVMap.Value Lean.DataValue

full_name: Lean.KVMap.instValueBool
code: instance : Value Bool 
goal: Lean.KVMap.Value Bool

full_name: Lean.KVMap.instValueNat
code: instance : Value Nat 
goal: Lean.KVMap.Value Nat

full_name: Lean.KVMap.instValueInt
code: instance : Value Int 
goal: Lean.KVMap.Value Int

full_name: Lean.KVMap.instValueName
code: instance : Value Name 
goal: Lean.KVMap.Value Lean.Name

full_name: Lean.KVMap.instValueString
code: instance : Value String 
goal: Lean.KVMap.Value String

full_name: Lean.KVMap.instValueSyntax
code: instance : Value Syntax 
goal: Lean.KVMap.Value Lean.Syntax