Documentation

Cedar.Data.Int64

This file defines a signed 64-bit integer datatype similar to Rust's i64 by adding checked arithmetic operations to Lean's Int64 datatype.

Equations
Instances For
    Equations
    Instances For
      Equations
      Instances For
        Equations
        Instances For

          We don't @[expose] the definition of ofInt?; but callers can use this theorem, which specifies its behavior

          Inverse of the above

          def Int64.add? (i₁ i₂ : Int64) :
          Equations
          Instances For
            def Int64.sub? (i₁ i₂ : Int64) :
            Equations
            Instances For
              def Int64.mul? (i₁ i₂ : Int64) :
              Equations
              Instances For
                Equations
                Instances For
                  def Int64.natAbs (i₁ : Int64) :
                  Equations
                  Instances For
                    def Int64.smod (a b : Int64) :

                    A version of Int64.mod with the property that b > 0 → ∀ a, 0 <= smod a b < b

                    Equations
                    Instances For
                      theorem Int64.smod_result_nonneg {a b : Int64} :
                      b > 0 → 0 ≤ a.smod b ∧ a.smod b < b
                      theorem Int64.toInt_smod (a b : Int64) :
                      theorem Int64.ofInt?_some_toInt {n : Int} {i : Int64} (h : ofInt? n = some i) :
                      i.toInt = n

                      ofInt? roundtrip: when it succeeds, coercing the result back to Int recovers the original value. This is the converse companion to ofInt?_toInt.

                      theorem Int64.lt_def_toInt {i₁ i₂ : Int64} :
                      i₁ < i₂ ↔ i₁.toInt < i₂.toInt
                      theorem Int64.le_def_toInt {i₁ i₂ : Int64} :
                      i₁ ≤ i₂ ↔ i₁.toInt ≤ i₂.toInt
                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        @[instance_reducible]
                        Equations
                        @[instance_reducible]
                        Equations