Ratrecon - Maple Programming Help

Ratrecon

inert rational function reconstruction

 Calling Sequence Ratrecon(u, m, x, N, D) mod p Ratrecon(u, m, x, N, D, 'n', 'd') mod p

Parameters

 u, m - polynomials in x x - name N, D - (optional) non-negative integers n, d - (optional) variables p - integer > 1

Description

 • This routine reconstructs a rational function $\frac{n}{d}$ from its image $u\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}m$ where u and m are polynomials in ${F}_{x}$, and $F$ is a field of characteristic p.
 • Given $u\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}m$ and non-negative integers N and D, if the call Ratrecon(u,m,x,N,D) mod p succeeds then the output is a rational function n/d in x such that

$\frac{n}{d}==u\mathrm{mod}m,\mathrm{gcd}\left(n,d\right)=1,\mathrm{degree}\left(n,x\right)\le N\mathrm{and degree}\left(d,x\right)\le \mathrm{D}.$

 Otherwise Ratrecon returns FAIL indicating that no such polynomials n and d exist.  The reconstruction is unique up to multiplication by a constant in $F$ if the following condition holds.
 N + D < degree(m,x)
 • If the optional parameters N and D are not specified then they are determined by the degree of m. They are assigned the largest possible values satisfying the above constraint such that N=D or N-D=1.
 • If the optional parameters n and d are specified then Ratrecon returns either true or false.  If rational reconstruction succeeds then true is returned and these parameters are assigned the numerator and denominator separately, otherwise false is returned and these parameters are not changed.
 • The special case of $m={x}^{k}$ corresponds to computing the (N, D) Pade approximate to the series u of order $\mathrm{O}\left({x}^{k}\right)$ .
 • If the first input u is a polynomial in variables other than x then Ratrecon is applied to the coefficients of the polynomial in those variables.  See the last example in the Examples section.
 • For the special case of $N=0$, the polynomial $\frac{d}{n}$ is the inverse of u in $\frac{{F}_{x}}{m}$ provided u and m are relatively prime.

Examples

 > $u≔3+5x+7{x}^{2}+11{x}^{3}+13{x}^{4}$
 ${u}{≔}{13}{}{{x}}^{{4}}{+}{11}{}{{x}}^{{3}}{+}{7}{}{{x}}^{{2}}{+}{5}{}{x}{+}{3}$ (1)
 > $m≔{x}^{5}$
 ${m}{≔}{{x}}^{{5}}$ (2)
 > $p≔97$
 ${p}{≔}{97}$ (3)
 > $r≔\mathrm{Ratrecon}\left(u,m,x\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}p$
 ${r}{≔}\frac{{19}{}{{x}}^{{2}}{+}{56}{}{x}{+}{77}}{{{x}}^{{2}}{+}{19}{}{x}{+}{58}}$ (4)
 > $\mathrm{Ratrecon}\left(u,m,x,2,2\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}p$
 $\frac{{19}{}{{x}}^{{2}}{+}{56}{}{x}{+}{77}}{{{x}}^{{2}}{+}{19}{}{x}{+}{58}}$ (5)
 > $\mathrm{Ratrecon}\left(u,m,x,1,3\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}p$
 $\frac{{27}{}{x}{+}{52}}{{{x}}^{{3}}{+}{43}{}{{x}}^{{2}}{+}{34}{}{x}{+}{82}}$ (6)
 > $\mathrm{Ratrecon}\left(u,m,x,1,1\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}p$
 ${\mathrm{FAIL}}$ (7)
 > $\mathrm{Ratrecon}\left(u,m,x,2,2,'n','d'\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}p$
 ${\mathrm{true}}$ (8)
 > $n,d$
 ${19}{}{{x}}^{{2}}{+}{56}{}{x}{+}{77}{,}{{x}}^{{2}}{+}{19}{}{x}{+}{58}$ (9)
 > $\mathrm{alias}\left(\mathrm{α}=\mathrm{RootOf}\left({x}^{2}+5\right)\right)$
 ${\mathrm{α}}$ (10)
 > $u≔5+7\mathrm{α}+\left(11+13\mathrm{α}\right)x+\left(17+19\mathrm{α}\right){x}^{2}$
 ${u}{≔}{5}{+}{7}{}{\mathrm{α}}{+}\left({11}{+}{13}{}{\mathrm{α}}\right){}{x}{+}\left({17}{+}{19}{}{\mathrm{α}}\right){}{{x}}^{{2}}$ (11)
 > $r≔\mathrm{Ratrecon}\left(u,{x}^{3},x\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}97$
 ${r}{≔}\frac{{2}{}{x}{}{\mathrm{α}}{+}{3}{}{\mathrm{α}}{+}{71}{}{x}{+}{46}}{{x}{+}{10}{}{\mathrm{α}}{+}{21}}$ (12)
 > $\mathrm{evala}\left(\mathrm{series}\left(r,x,3\right)\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}97$
 ${5}{+}{7}{}{\mathrm{α}}{+}\left({11}{+}{13}{}{\mathrm{α}}\right){}{x}{+}\left({17}{+}{19}{}{\mathrm{α}}\right){}{{x}}^{{2}}{+}{\mathrm{O}}\left({{x}}^{{3}}\right)$ (13)
 > $\mathrm{mod}≔\mathrm{mods}:$
 > $u≔{x}^{3}+\left(6{t}^{3}-3t-5\right){x}^{2}+\left(4{t}^{3}+6{t}^{2}+5t-4\right)x+t-1$
 ${u}{≔}{{x}}^{{3}}{+}\left({6}{}{{t}}^{{3}}{-}{3}{}{t}{-}{5}\right){}{{x}}^{{2}}{+}\left({4}{}{{t}}^{{3}}{+}{6}{}{{t}}^{{2}}{+}{5}{}{t}{-}{4}\right){}{x}{+}{t}{-}{1}$ (14)
 > $m≔\left(t-2\right)\left(t-3\right)\left(t-4\right)\left(t-5\right)$
 ${m}{≔}\left({t}{-}{2}\right){}\left({t}{-}{3}\right){}\left({t}{-}{4}\right){}\left({t}{-}{5}\right)$ (15)
 > $p≔13$
 ${p}{≔}{13}$ (16)
 > $\mathrm{Ratrecon}\left(u,m,t,1,2\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}p$
 ${t}{-}{1}{+}\frac{{2}{}{t}{}{x}}{{{t}}^{{2}}{-}{1}}{-}\frac{{t}{}{{x}}^{{2}}}{{t}{-}{1}}{+}{{x}}^{{3}}$ (17)
 >