Documentation

Lean.Data.Json.Basic

A decimal number represented as mantissa * 10^-exponent.

Instances For
    def Lean.instDecidableEqJsonNumber.decEq (x✝ x✝¹ : JsonNumber) :
    Decidable (x✝ = x✝¹)
    Instances For
      @[instance_reducible]
      @[instance_reducible]
      @[instance_reducible]

      Represents n = mantissa * 10^-exponent as (sign, mantissa', exponent'), where sign ∈ {-1,0,1} and n = sign * 0.mantissa' * 10^exponent'.

      This is a normal form: if m1 * 10^-e1 = m2 * 10^-e2, then normalize ⟨m1, e1⟩ == normalize ⟨m2, e2⟩.

      Instances For
        Instances For
          @[instance_reducible]
          @[instance_reducible]
          @[instance_reducible]

          shiftl n s shifts n by s places to the left, i.e., multiplies it by 10^s.

          Instances For

            shiftr n s shifts n by s places to the right, i.e., divides it by 10^s.

            Instances For
              @[instance_reducible]
              @[instance_reducible]

              Attempts to convert a float to a JsonNumber, if the number isn't finite returns the appropriate string from "NaN", "Infinity", "-Infinity".

              Instances For
                def Lean.strLt (a b : String) :
                Instances For
                  inductive Lean.Json :

                  A JSON value.

                  Instances For
                    @[instance_reducible]
                    @[instance_reducible]
                    @[instance_reducible]
                    Instances For
                      @[instance_reducible]
                      @[instance_reducible]
                      @[instance_reducible]
                      @[instance_reducible]
                      @[instance_reducible]
                      instance Lean.Json.instOfNat {n : Nat} :
                      Instances For
                        Instances For
                          Instances For

                            Assuming both inputs o₁, o₂ are json objects, will compute {...o₁, ...o₂}. If o₁ is not a json object, o₂ will be returned.

                            Instances For
                              Instances For