Multivariate polynomial recursive sequences
Lax619925.Polyrec · concepts/Lax619925/Polyrec.lean · lax-619925
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Theorem
A multivariate polynomial recursive sequence (polyrec sequence) in variables is a -tuple of sequences satisfying polynomial equations (paper §5.4), where is the shift in the -th coordinate and are polynomials evaluated pointwise in the sequences. The consistency problem asks whether, given the equations and an initial condition , a solution exists. This is decidable (paper §5.4, theorem ): the polyrec system is isomorphic to a Hadamard system over the -letter alphabet, so a solution exists exactly when the companion Hadamard series are commutative, which is decidable.
Concept map
Evidence
Each proof establishes this claim relative to its assumptions.
In the paper
- page 18 of this submission's paper
Lean source view on GitHub
| 1 | import Lax619925.Series |
| 2 | import Lax619925.Hadamard |
| 3 | import Mathlib.Data.Real.Basic |
| 4 | import Mathlib.Data.Fin.Basic |
| 5 | import Mathlib.Data.Fintype.Basic |
| 6 | import Mathlib.Data.Finset.Basic |
| 7 | import Mathlib.Algebra.MvPolynomial.Basic |
| 8 | |
| 9 | /-! |
| 10 | --- |
| 11 | title: Multivariate polynomial recursive sequences |
| 12 | type: theorem |
| 13 | --- |
| 14 | A *multivariate polynomial recursive sequence* (polyrec sequence) in `d` variables |
| 15 | is a `k`-tuple of sequences `f : ℕ^d → ℚ` satisfying polynomial equations |
| 16 | `shift_j f_i = p^{(j)}_i(f_1, …, f_k)` (paper §5.4), where `shift_j` is the shift |
| 17 | in the `j`-th coordinate and `p^{(j)}_i` are polynomials evaluated pointwise in the |
| 18 | sequences. The *consistency problem* asks whether, given the equations and an |
| 19 | initial condition `f_i(0) = c_i`, a solution exists. This is decidable (paper |
| 20 | §5.4, theorem `polyrec consistency`): the polyrec system is isomorphic to a |
| 21 | Hadamard system over the `d`-letter alphabet, so a solution exists exactly when |
| 22 | the companion Hadamard series are commutative, which is decidable. |
| 23 | -/ |
| 24 | |
| 25 | namespace Lax619925.Polyrec |
| 26 | |
| 27 | open Lax619925.Series Lax619925.Hadamard |
| 28 | |
| 29 | /-- A multivariate sequence in `d` variables: a function `ℕ^d → ℚ`, represented |
| 30 | as a function on the multi-index type `Fin d → ℕ`. -/ |
| 31 | abbrev Seq (d : ℕ) := (Fin d → ℕ) → ℚ |
| 32 | |
| 33 | /-- The shift of a multivariate sequence in the `j`-th coordinate: |
| 34 | `(shift d j f) n = f (n + e_j)`, where `e_j` is the `j`-th unit vector. |
| 35 | The shifts in different coordinates commute. -/ |
| 36 | def shift (d : ℕ) (j : Fin d) (f : Seq d) : Seq d := |
| 37 | fun n => f (fun i => n i + if i = j then 1 else 0) |
| 38 | |
| 39 | /-- The pointwise (Hadamard-algebra) evaluation of the polynomial `p` at the tuple |
| 40 | of sequences `fs`: `evalSeq d k fs p n = Σ_m p.coeff m · ∏_i (fs i n)^{m i}`, |
| 41 | the interpretation of `p` in the pointwise ring of sequences, where the |
| 42 | variable `X_i` is mapped to `fs i` and the multiplication is pointwise. -/ |
| 43 | def evalSeq (d k : ℕ) (fs : Fin k → Seq d) (p : MvPolynomial (Fin k) ℚ) : Seq d := |
| 44 | fun n => p.support.sum fun m => p.coeff m * ∏ i : Fin k, (fs i) n ^ (m i) |
| 45 | |
| 46 | /-- A `k`-tuple of multivariate sequences `f` *solves* the polyrec system |
| 47 | `(p, c)` if it satisfies the initial condition `f_i(0) = c_i` and the |
| 48 | polynomial equations `shift_j f_i = p^{(j)}_i(f_1, …, f_k)` for all `i, j`, |
| 49 | where `p^{(j)}_i` is evaluated pointwise in the sequences (the Hadamard |
| 50 | algebra). Here `0` is the zero multi-index, the origin of `ℕ^d`. -/ |
| 51 | def SolvesPolyrec (d k : ℕ) (f : Fin k → Seq d) |
| 52 | (p : Fin k → Fin d → MvPolynomial (Fin k) ℚ) (c : Fin k → ℚ) : Prop := |
| 53 | (∀ i, f i 0 = c i) ∧ ∀ i j, shift d j (f i) = evalSeq d k f (p i j) |
| 54 | |
| 55 | /-- The polyrec consistency problem is decidable (paper §5.4, theorem |
| 56 | `polyrec consistency`): there is a procedure that, given the polynomial |
| 57 | equations `p` and the initial condition `c`, decides whether a solution |
| 58 | exists. The decision reduces to the commutativity of the companion Hadamard |
| 59 | series, which is decidable. -/ |
| 60 | axiom PolyrecConsistency (d k : ℕ) (hd : 0 < d) (hk : 0 < k) : |
| 61 | ∃ dec : (Fin k → Fin d → MvPolynomial (Fin k) ℚ) → (Fin k → ℚ) → Bool, |
| 62 | ∀ p c, dec p c = true ↔ ∃ f : Fin k → Seq d, SolvesPolyrec d k f p c |
| 63 | |
| 64 | end Lax619925.Polyrec |
| 65 |
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments