Documentation

MIPRE.Background.Tailored.AnswerReduction.ArLpArith

Field arithmetic, as programs #

Slice P4h of planning/aldous-lyons-track.md: combinators for programs computing elements of F_{2^t} in their Shoup bits, with the law that they compute a given field expression when their arguments do: sums (fAdd), products (fMul), 0 and 1, the assignment form g (1 - g) (fCert), indexed sums (fSum, by folding xorBits) and comparisons (fEq). The proof check of the answer-reduced game is written with them.

Summing bit strings #

The sum of field elements, in their bits.

Combinators #

The sum of f i over i < n.

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

    Whether two field elements are equal.

    Equations
    Instances For
      theorem MIPRE.Tailored.AnsRed.Typed.fAdd_eq {t : ℕ} {ht : 1 ≤ t} {I : Type} [Cost.SizedEncoding I] {inp : I} {a b : Cost.PolyTimeFun I Cost.BitStr} {x y : Fq t ht} (ha : a.toFun inp = (SAT.shoupBinField t ht).toBits x) (hb : b.toFun inp = (SAT.shoupBinField t ht).toBits y) :
      (fAdd a b).toFun inp = (SAT.shoupBinField t ht).toBits (x + y)
      theorem MIPRE.Tailored.AnsRed.Typed.fMul_eq {t : ℕ} {ht : 1 ≤ t} {I : Type} [Cost.SizedEncoding I] {uT : Cost.PolyTimeFun I Cost.Unary} {inp : I} (hT : uT.toFun inp = Cost.unary t) {a b : Cost.PolyTimeFun I Cost.BitStr} {x y : Fq t ht} (ha : a.toFun inp = (SAT.shoupBinField t ht).toBits x) (hb : b.toFun inp = (SAT.shoupBinField t ht).toBits y) :
      (fMul uT a b).toFun inp = (SAT.shoupBinField t ht).toBits (x * y)
      theorem MIPRE.Tailored.AnsRed.Typed.fZero_eq {t : ℕ} {ht : 1 ≤ t} {I : Type} [Cost.SizedEncoding I] {uT : Cost.PolyTimeFun I Cost.Unary} {inp : I} (hT : uT.toFun inp = Cost.unary t) :
      theorem MIPRE.Tailored.AnsRed.Typed.fOne_eq {t : ℕ} {ht : 1 ≤ t} {I : Type} [Cost.SizedEncoding I] {uT : Cost.PolyTimeFun I Cost.Unary} {inp : I} (hT : uT.toFun inp = Cost.unary t) :
      (fOne uT).toFun inp = (SAT.shoupBinField t ht).toBits 1
      theorem MIPRE.Tailored.AnsRed.Typed.fCert_eq {t : ℕ} {ht : 1 ≤ t} {I : Type} [Cost.SizedEncoding I] {uT : Cost.PolyTimeFun I Cost.Unary} {inp : I} (hT : uT.toFun inp = Cost.unary t) {a : Cost.PolyTimeFun I Cost.BitStr} {x : Fq t ht} (ha : a.toFun inp = (SAT.shoupBinField t ht).toBits x) :
      (fCert uT a).toFun inp = (SAT.shoupBinField t ht).toBits (x * (1 - x))
      theorem MIPRE.Tailored.AnsRed.Typed.fSum_eq {t : ℕ} {ht : 1 ≤ t} {I : Type} [Cost.SizedEncoding I] {uT : Cost.PolyTimeFun I Cost.Unary} {inp : I} (hT : uT.toFun inp = Cost.unary t) {f : Cost.PolyTimeFun (Cost.Unary × I) Cost.BitStr} {n : Cost.PolyTimeFun I Cost.Unary} {k : ℕ} (hn : n.toFun inp = Cost.unary k) (g : Fin k → Fq t ht) (hf : ∀ (i : Fin k), f.toFun (Cost.unary ↑i, inp) = (SAT.shoupBinField t ht).toBits (g i)) :
      (fSum uT f n).toFun inp = (SAT.shoupBinField t ht).toBits (∑ i : Fin k, g i)
      theorem MIPRE.Tailored.AnsRed.Typed.fEq_eq {t : ℕ} {ht : 1 ≤ t} {I : Type} [Cost.SizedEncoding I] {inp : I} {a b : Cost.PolyTimeFun I Cost.BitStr} {x y : Fq t ht} (ha : a.toFun inp = (SAT.shoupBinField t ht).toBits x) (hb : b.toFun inp = (SAT.shoupBinField t ht).toBits y) :
      (fEq a b).toFun inp = decide (x = y)