File: .lake/packages/lean4/src/lean/Lean/Data/Json/Basic.lean

full_name: Lean.instHashableJsonNumber
code: structure JsonNumber where
  mantissa : Int
  exponent : Nat
  deriving DecidableEq, Hashable
goal: Hashable Lean.JsonNumber

full_name: Lean.JsonNumber
code: structure JsonNumber where
  mantissa : Int
  exponent : Nat
  deriving DecidableEq, Hashable
goal: Type

full_name: Lean.JsonNumber.exponent
code: structure JsonNumber where
  mantissa : Int
  exponent : Nat
  deriving DecidableEq, Hashable
goal: Nat

full_name: Lean.JsonNumber.mantissa
code: structure JsonNumber where
  mantissa : Int
  exponent : Nat
  deriving DecidableEq, Hashable
goal: Int

full_name: Lean.JsonNumber.fromNat
code: protected def fromNat (n : Nat) : JsonNumber 
goal: Lean.JsonNumber

full_name: Lean.JsonNumber.fromInt
code: protected def fromInt (n : Int) : JsonNumber 
goal: Lean.JsonNumber

full_name: Lean.JsonNumber.instCoeNat
code: instance : Coe Nat JsonNumber 
goal: Coe Nat Lean.JsonNumber

full_name: Lean.JsonNumber.instCoeInt
code: instance : Coe Int JsonNumber 
goal: Coe Int Lean.JsonNumber

full_name: Lean.JsonNumber.instOfNat
code: instance : OfNat JsonNumber n 
goal: OfNat Lean.JsonNumber n

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Data.Json.Basic.0.Lean.JsonNumber.countDigits
code: private partial def countDigits (n : Nat) : Nat 
goal: Nat

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Data.Json.Basic.0.Lean.JsonNumber.countDigits.loop
code: private partial def countDigits (n : Nat) : Nat 
goal: Nat

full_name: Lean.JsonNumber.normalize
code: protected def normalize : JsonNumber → Int × Nat × Int
  
goal: Lean.JsonNumber → Int × Nat × Int

full_name: Lean.JsonNumber.lt
code: def lt (a b : JsonNumber) : Bool 
goal: Bool

full_name: Lean.JsonNumber.ltProp
code: def ltProp : LT JsonNumber 
goal: LT Lean.JsonNumber

full_name: Lean.JsonNumber.instLT
code: instance : LT JsonNumber 
goal: LT Lean.JsonNumber

full_name: Lean.JsonNumber.instDecidableLt
code: instance (a b : JsonNumber) : Decidable (a < b) 
goal: Decidable (a < b)

full_name: Lean.JsonNumber.instOrd
code: instance : Ord JsonNumber 
goal: Ord Lean.JsonNumber

full_name: Lean.JsonNumber.toString
code: protected def toString : JsonNumber → String
  
goal: Lean.JsonNumber → String

full_name: Lean.JsonNumber.shiftl
code: protected def shiftl : JsonNumber → Nat → JsonNumber
  -- if s ≤ e, then 10 ^ (s - e) = 1, and hence the mantissa remains unchanged.
  -- otherwise, the expression pads the mantissa with zeroes
  -- to accommodate for the remaining places to shift.
  
goal: Lean.JsonNumber → Nat → Lean.JsonNumber

full_name: Lean.JsonNumber.shiftr
code: protected def shiftr : JsonNumber → Nat → JsonNumber
  
goal: Lean.JsonNumber → Nat → Lean.JsonNumber

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

full_name: Lean.JsonNumber.instRepr
code: instance : Repr JsonNumber 
goal: Repr Lean.JsonNumber

full_name: Lean.JsonNumber.instOfScientific
code: instance : OfScientific JsonNumber 
goal: OfScientific Lean.JsonNumber

full_name: Lean.JsonNumber.instNeg
code: instance : Neg JsonNumber 
goal: Neg Lean.JsonNumber

full_name: Lean.JsonNumber.instInhabited
code: instance : Inhabited JsonNumber 
goal: Inhabited Lean.JsonNumber

full_name: Lean.JsonNumber.toFloat
code: def toFloat : JsonNumber → Float
  
goal: Lean.JsonNumber → Float

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Data.Json.Basic.0.Lean.JsonNumber.fromPositiveFloat!
code: /-- Creates a json number from a positive float, panicking if it isn't.
[todo]EdAyers: Currently goes via a string representation, when more float primitives are available
should switch to using those. -/
private def fromPositiveFloat! (x : Float) : JsonNumber 
goal: Lean.JsonNumber

full_name: Lean.JsonNumber.fromFloat?
code: /-- Attempts to convert a float to a JsonNumber, if the number isn't finite returns
the appropriate string from "NaN", "Infinity", "-Infinity". -/
def fromFloat? (x : Float): Sum String JsonNumber 
goal: String ⊕ Lean.JsonNumber

full_name: Lean.strLt
code: def strLt (a b : String) 
goal: Bool

full_name: Lean.instInhabitedJson
code: inductive Json where
  | null
  | bool (b : Bool)
  | num (n : JsonNumber)
  | str (s : String)
  | arr (elems : Array Json)
  -- uses RBNode instead of RBMap because RBMap is a def
  -- and thus currently cannot be used to define a type that
  -- is recursive in one of its parameters
  | obj (kvPairs : RBNode String (fun _ => Json))
  deriving Inhabited
goal: Inhabited Lean.Json

full_name: Lean.Json
code: inductive Json where
  | null
  | bool (b : Bool)
  | num (n : JsonNumber)
  | str (s : String)
  | arr (elems : Array Json)
  -- uses RBNode instead of RBMap because RBMap is a def
  -- and thus currently cannot be used to define a type that
  -- is recursive in one of its parameters
  | obj (kvPairs : RBNode String (fun _ => Json))
  deriving Inhabited
goal: Type

full_name: Lean.Json.bool
code: inductive Json where
  | null
  | bool (b : Bool)
  | num (n : JsonNumber)
  | str (s : String)
  | arr (elems : Array Json)
  -- uses RBNode instead of RBMap because RBMap is a def
  -- and thus currently cannot be used to define a type that
  -- is recursive in one of its parameters
  | obj (kvPairs : RBNode String (fun _ => Json))
  deriving Inhabited
goal: Lean.Json

full_name: Lean.Json.str
code: inductive Json where
  | null
  | bool (b : Bool)
  | num (n : JsonNumber)
  | str (s : String)
  | arr (elems : Array Json)
  -- uses RBNode instead of RBMap because RBMap is a def
  -- and thus currently cannot be used to define a type that
  -- is recursive in one of its parameters
  | obj (kvPairs : RBNode String (fun _ => Json))
  deriving Inhabited
goal: Lean.Json

full_name: Lean.Json.num
code: inductive Json where
  | null
  | bool (b : Bool)
  | num (n : JsonNumber)
  | str (s : String)
  | arr (elems : Array Json)
  -- uses RBNode instead of RBMap because RBMap is a def
  -- and thus currently cannot be used to define a type that
  -- is recursive in one of its parameters
  | obj (kvPairs : RBNode String (fun _ => Json))
  deriving Inhabited
goal: Lean.Json

full_name: Lean.Json.obj
code: inductive Json where
  | null
  | bool (b : Bool)
  | num (n : JsonNumber)
  | str (s : String)
  | arr (elems : Array Json)
  -- uses RBNode instead of RBMap because RBMap is a def
  -- and thus currently cannot be used to define a type that
  -- is recursive in one of its parameters
  | obj (kvPairs : RBNode String (fun _ => Json))
  deriving Inhabited
goal: Lean.Json

full_name: Lean.Json.arr
code: inductive Json where
  | null
  | bool (b : Bool)
  | num (n : JsonNumber)
  | str (s : String)
  | arr (elems : Array Json)
  -- uses RBNode instead of RBMap because RBMap is a def
  -- and thus currently cannot be used to define a type that
  -- is recursive in one of its parameters
  | obj (kvPairs : RBNode String (fun _ => Json))
  deriving Inhabited
goal: Lean.Json

full_name: Lean.Json.null
code: inductive Json where
  | null
  | bool (b : Bool)
  | num (n : JsonNumber)
  | str (s : String)
  | arr (elems : Array Json)
  -- uses RBNode instead of RBMap because RBMap is a def
  -- and thus currently cannot be used to define a type that
  -- is recursive in one of its parameters
  | obj (kvPairs : RBNode String (fun _ => Json))
  deriving Inhabited
goal: Lean.Json

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Data.Json.Basic.0.Lean.Json.beq'
code: private partial def beq' : Json → Json → Bool
  
goal: Lean.Json → Lean.Json → Bool

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

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Data.Json.Basic.0.Lean.Json.hash'
code: private partial def hash' : Json → UInt64
  
goal: Lean.Json → UInt64

full_name: Lean.Json.instHashable
code: instance : Hashable Json 
goal: Hashable Lean.Json

full_name: Lean.Json.mkObj
code: def mkObj (o : List (String × Json)) : Json 
goal: Lean.Json

full_name: Lean.Json.instCoeNat
code: instance : Coe Nat Json 
goal: Coe Nat Lean.Json

full_name: Lean.Json.instCoeInt
code: instance : Coe Int Json 
goal: Coe Int Lean.Json

full_name: Lean.Json.instCoeString
code: instance : Coe String Json 
goal: Coe String Lean.Json

full_name: Lean.Json.instCoeBool
code: instance : Coe Bool Json 
goal: Coe Bool Lean.Json

full_name: Lean.Json.instOfNat
code: instance : OfNat Json n 
goal: OfNat Lean.Json n

full_name: Lean.Json.isNull
code: def isNull : Json -> Bool
  
goal: Lean.Json → Bool

full_name: Lean.Json.getObj?
code: def getObj? : Json → Except String (RBNode String (fun _ => Json))
  
goal: Lean.Json → Except String (Lean.RBNode String fun x => Lean.Json)

full_name: Lean.Json.getArr?
code: def getArr? : Json → Except String (Array Json)
  
goal: Lean.Json → Except String (Array Lean.Json)

full_name: Lean.Json.getStr?
code: def getStr? : Json → Except String String
  
goal: Lean.Json → Except String String

full_name: Lean.Json.getNat?
code: def getNat? : Json → Except String Nat
  
goal: Lean.Json → Except String Nat

full_name: Lean.Json.getInt?
code: def getInt? : Json → Except String Int
  
goal: Lean.Json → Except String Int

full_name: Lean.Json.getBool?
code: def getBool? : Json → Except String Bool
  
goal: Lean.Json → Except String Bool

full_name: Lean.Json.getNum?
code: def getNum? : Json → Except String JsonNumber
  
goal: Lean.Json → Except String Lean.JsonNumber

full_name: Lean.Json.getObjVal?
code: def getObjVal? : Json → String → Except String Json
  
goal: Lean.Json → String → Except String Lean.Json

full_name: Lean.Json.getArrVal?
code: def getArrVal? : Json → Nat → Except String Json
  
goal: Lean.Json → Nat → Except String Lean.Json

full_name: Lean.Json.getObjValD
code: def getObjValD (j : Json) (k : String) : Json 
goal: Lean.Json

full_name: Lean.Json.setObjVal!
code: def setObjVal! : Json → String → Json → Json
  
goal: Lean.Json → String → Lean.Json → Lean.Json

full_name: Lean.Json.mergeObj
code: /-- Assuming both inputs `o₁, o₂` are json objects, will compute `{...o₁, ...o₂}`.
If `o₁` is not a json object, `o₂` will be returned.
-/
def mergeObj : Json → Json → Json
  
goal: Lean.Json → Lean.Json → Lean.Json

full_name: Lean.Json.Structured.obj
code: inductive Structured where
  | arr (elems : Array Json)
  | obj (kvPairs : RBNode String (fun _ => Json))
goal: Lean.Json.Structured

full_name: Lean.Json.Structured.arr
code: inductive Structured where
  | arr (elems : Array Json)
  | obj (kvPairs : RBNode String (fun _ => Json))
goal: Lean.Json.Structured

full_name: Lean.Json.Structured
code: inductive Structured where
  | arr (elems : Array Json)
  | obj (kvPairs : RBNode String (fun _ => Json))
goal: Type

full_name: Lean.Json.instCoeArrayStructured
code: instance : Coe (Array Json) Structured 
goal: Coe (Array Lean.Json) Lean.Json.Structured

full_name: Lean.Json.instCoeRBNodeStringStructured
code: instance : Coe (RBNode String (fun _ => Json)) Structured 
goal: Coe (Lean.RBNode String fun x => Lean.Json) Lean.Json.Structured