introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
1.03 kB
import Mathlib
namespace OAI
namespace SingleFold
/-- Evaluation over the integers of an integer polynomial at natural inputs. -/
noncomputable def evalNat {n m : β„•} (P : MvPolynomial (Fin n βŠ• Fin m) β„€)
(a : Fin n β†’ β„•) (w : Fin m β†’ β„•) : β„€ :=
MvPolynomial.eval (Sum.elim (fun i => (a i : β„€)) (fun j => (w j : β„€))) P
/-- Exact existence on members, no witness on nonmembers, and uniqueness of the
whole witness on every input. No coordinates are hidden outside `w`. -/
def Represents {n m : β„•} (P : MvPolynomial (Fin n βŠ• Fin m) β„€)
(S : Set (Fin n β†’ β„•)) : Prop :=
βˆ€ a, (a ∈ S ↔ βˆƒ w, evalNat P a w = 0) ∧
βˆ€ w v, evalNat P a w = 0 β†’ evalNat P a v = 0 β†’ w = v
/-- Single-fold representation with positive input and witness lengths. -/
def MainStatement : Prop :=
βˆ€ (n : β„•), 1 ≀ n β†’ βˆ€ (S : Set (Fin n β†’ β„•)), REPred (fun a => a ∈ S) β†’
βˆƒ (m : β„•), 1 ≀ m ∧ βˆƒ P : MvPolynomial (Fin n βŠ• Fin m) β„€, Represents P S
end SingleFold
end OAI