Documentation

LeanPool.PointwiseComposition.CategoricalRiceShapiro.ArithmeticCode.Arithmetic

Supporting results for pointwise provable equality.

Arithmetic operations obtained by minimization #

Truncated subtraction, integer square root, the two components of Cantor unpairing, divisibility, remainder, and the Gödel beta function, each defined by minimizing an arithmetic condition.

Each construction is accompanied by the theorem that it realizes the intended function over the natural numbers. Those Computes theorems are the input of the standard-model bridge, which turns a computation over ℕ into evaluation at standard numerals in an arbitrary model.

Truncated subtraction d₀ - d₁: the least x with x + d₁ = d₀, or 0 when d₀ < d₁.

Equations
  • One or more equations did not get rendered due to their size.
Instances For

    The integer square root of d: the least x with x * x ≤ d < (x+1) * (x+1).

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      The first component of Cantor unpairing.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        The second component of Cantor unpairing.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          The characteristic value of d₀ ∣ d₁, decided by minimizing a quotient bounded by d₁.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            The remainder of d₀ on division by d₁.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              The Gödel beta function: the di-th entry of the sequence coded by dn.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For

                Standard computations over the natural numbers #

                theorem PointwiseComposition.CategoricalRiceShapiro.ArithmeticCode.computes_codeSub {n : ℕ} {d₀ d₁ : Nat.ArithPart₁.Code n} {g₀ g₁ : List.Vector ℕ n → ℕ} (h₀ : Computes d₀ g₀) (h₁ : Computes d₁ g₁) :
                Computes (codeSub d₀ d₁) fun (v : List.Vector ℕ n) => g₀ v - g₁ v
                theorem PointwiseComposition.CategoricalRiceShapiro.ArithmeticCode.computes_codeDvd {n : ℕ} {d₀ d₁ : Nat.ArithPart₁.Code n} {g₀ g₁ : List.Vector ℕ n → ℕ} (h₀ : Computes d₀ g₀) (h₁ : Computes d₁ g₁) :
                Computes (codeDvd d₀ d₁) fun (v : List.Vector ℕ n) => Nat.isDvdNat (g₀ v) (g₁ v)
                theorem PointwiseComposition.CategoricalRiceShapiro.ArithmeticCode.computes_codeRem {n : ℕ} {d₀ d₁ : Nat.ArithPart₁.Code n} {g₀ g₁ : List.Vector ℕ n → ℕ} (h₀ : Computes d₀ g₀) (h₁ : Computes d₁ g₁) :
                Computes (codeRem d₀ d₁) fun (v : List.Vector ℕ n) => g₀ v % g₁ v
                theorem PointwiseComposition.CategoricalRiceShapiro.ArithmeticCode.eval_codeBeta {n : ℕ} {dn di : Nat.ArithPart₁.Code n} {gn gi : List.Vector ℕ n → ℕ} (hn : Computes dn gn) (hi : Computes di gi) :
                Computes (codeBeta dn di) fun (v : List.Vector ℕ n) => (gn v).beta (gi v)