polynomials: THEORY %------------------------------------------------------------------------------ % % Anthony Narkawicz NASA % % David Lester Manchester University % %------------------------------------------------------------------------------ BEGIN
nn_le_polynomial : LEMMA
(FORALL (i:nat): a(i) >= 0) AND (FORALL (i:nat): b(i) >= a(i)) AND
x >= 0 AND n <= m IMPLIES polynomial(a,n)(x) <= polynomial(b,m)(x)
power_fs(n:nat): [nat->nat] =
(LAMBDA (i:nat): IF i > n THEN 0 ELSE C(n,i) ENDIF)
% The next function gives the translation of a polynomial on x when x is translated % by the fractional linear transformation x -> (A*x + B)/(C*x + D)
poly_translate_rat(A,B,C,D:real)(a,n)(d:nat): real =
sigma(0,n,LAMBDA (i:nat): a(i)*sigma(0, n - i, LAMBDA (k: nat): IF (k < d - i OR k > d OR k > n - i) THEN 0 ELSE (C(n - i, k) * D ^ (-1 * k - i + n)) * C ^ k * ((C(i, d - k) * B ^ (k - d + i)) * A ^ (d - k)) ENDIF))
poly_translate_rat2(A,B,C,D,E,F:real)(a,n)(q:nat): real=
sigma(0,n,LAMBDA (k:nat): a(k)*sigma(0, n, LAMBDA (i: nat): sigma(0,k,LAMBDA (j: nat): IF (q > 2 * n-k OR i < n - q OR i > -1 * q - k + 2 * n OR j < i - n + k OR j > i OR j > k OR k>n) THEN 0 ELSE C(k,j)*B^j*A^(k-j)*C(n-k,i-j)*D^(i-j)*C^(j-i-k+n)*
C(n-k,-1*i-q-k+2*n)*F^(-1*i-q-k+2*n)*E^(i+q-n) ENDIF)))
poly_translate_rat2_def: LEMMAFORALL (A,B,C,D,E,F,x:real): (C*x+D)/=0 AND (E*x+F)/=0 IMPLIES
(C*x+D)^n*(E*x+F)^n*polynomial(a,n)((A*x+B)/((C*x+D)*(E*x+F))) =
polynomial(poly_translate_rat2(A,B,C,D,E,F)(a,n),2*n)(x)
poly_translate_inf_pos(a,n)(A:real) : sequence[real] =
(LAMBDA (j:nat): IF j>n THEN 0 ELSE sigma(n-j,n,LAMBDA (i:nat): IF (i<n-j OR i>n) THEN 0 ELSE
a(i)*C(i,i-n+j)*(A-1)^(i-n+j) ENDIF) ENDIF)
poly_translate_inf_neg(a,n)(A:real) : sequence[real] =
(LAMBDA (j:nat): IF j>n THEN 0 ELSE sigma(n-j,n,LAMBDA (i:nat): IF (i<n-j OR i>n) THEN 0 ELSE
(-1)^i*a(i)*C(i,i-n+j)*(-A-1)^(i-n+j) ENDIF) ENDIF)
poly_n_deriv(a,n)(i): real = C(n+i,n)*factorial(n)*a(n+i)
poly_n_deriv_def: LEMMA
poly_n_deriv(a,0) = a AND
poly_n_deriv(a,1) = poly_deriv(a) AND FORALL (n): poly_deriv(poly_n_deriv(a,n)) = poly_n_deriv(a,n+1)
poly_attains_maximum: LEMMA
x<=y IMPLIESEXISTS (c:real): x<=c AND c<=y AND FORALL (cc:real): x<=cc AND cc<=y IMPLIES polynomial(a,n)(cc)<=polynomial(a,n)(c)
poly_attains_minimum: LEMMA
x<=y IMPLIESEXISTS (c:real): x<=c AND c<=y AND FORALL (cc:real): x<=cc AND cc<=y IMPLIES polynomial(a,n)(cc)>=polynomial(a,n)(c)
%%% increasing from derivative
poly_strictly_increasing: LEMMA
n > 0 AND x < y AND
(FORALL (c): x <= c AND c <= y IMPLIES polynomial(poly_deriv(a),n-1)(c) > 0) IMPLIES
polynomial(a,n)(x) < polynomial(a,n)(y)
poly_increasing: LEMMA
x <= y AND n > 0 AND
(FORALL (c): x <= c AND c <= y IMPLIES polynomial(poly_deriv(a),n-1)(c) >= 0) IMPLIES
polynomial(a,n)(x) <= polynomial(a,n)(y)
poly_strictly_decreasing: LEMMA
n > 0 AND x < y AND
(FORALL (c): x <= c AND c <= y IMPLIES polynomial(poly_deriv(a),n-1)(c) < 0) IMPLIES
polynomial(a,n)(x) > polynomial(a,n)(y)
poly_decreasing: LEMMA
x <= y AND n > 0 AND
(FORALL (c): x <= c AND c <= y IMPLIES polynomial(poly_deriv(a),n-1)(c) <= 0) IMPLIES
polynomial(a,n)(x) >= polynomial(a,n)(y)
poly_intermediate_value_increasing_0: LEMMA
x<=y AND polynomial(a,n)(x) <= 0 AND polynomial(a,n)(y)>=0 IMPLIES EXISTS (cc:real): x<=cc AND cc<=y AND polynomial(a,n)(cc) = 0
poly_intermediate_value_inc: LEMMA
x<=y AND polynomial(a,n)(x) <= c AND polynomial(a,n)(y)>=c IMPLIES EXISTS (cc:real): x<=cc AND cc<=y AND polynomial(a,n)(cc) = c
poly_intermediate_value_dec: LEMMA
x<=y AND polynomial(a,n)(x) >=c AND polynomial(a,n)(y)<=c IMPLIES EXISTS (cc:real): x<=cc AND cc<=y AND polynomial(a,n)(cc) = c
%%% Polynomial mean value
poly_Rolle: LEMMA
x<y AND n>0 AND polynomial(a,n)(x) = polynomial(a,n)(y) IMPLIES EXISTS (c:real): x<c AND c<y AND polynomial(poly_deriv(a),n-1)(c)=0
poly_mean_value: LEMMA x < y AND n > 0 IMPLIES EXISTS (cc:real): x<=cc AND cc<=y AND
polynomial(poly_deriv(a),n-1)(cc) = (polynomial(a,n)(y)-polynomial(a,n)(x))/(y-x)
%%% Integration of polynomials
poly_integral(a,c)(n): real = IF n = 0 THEN c ELSE a(n-1)/n ENDIF
polynomial_int(a,n,x,y): real = polynomial(poly_integral(a,0),n+1)(y)-
polynomial(poly_integral(a,0),n+1)(x)
polynomial_integration_by_parts: LEMMA% int u*dv = u*v - int du*v
n>0 AND m>0 IMPLIES
polynomial_int(polynomial_prod(a,n,poly_deriv(b),m-1),n+m-1,x,y) =
(polynomial(a,n)(y)*polynomial(b,m)(y) - polynomial(a,n)(x)*polynomial(b,m)(x)) - polynomial_int(polynomial_prod(poly_deriv(a),n-1,b,m),n+m-1,x,y)
%%% Taylor Series
poly_maclaurin: LEMMAFORALL (k:nat,br:real): k>=n AND n>0 AND br>0 AND
(FORALL (ii:nat): ii>k IMPLIES a(ii) = 0) IMPLIES EXISTS (c:real): 0<=c AND c<=br AND LET fk = polynomial(a,k),
fn1 = polynomial(a,n-1) IN
fk(br) = fn1(br) + (1/factorial(n))*polynomial(poly_n_deriv(a,n),k-n)(c)*br^n
% Expansion point is y
% n is the power to go to in the expansion and k is the actual degree of the polynomial
taylor_poly(a,(k:nat),n,(rr:real))(i:nat): real =
sigma(i,n,LAMBDA (d:nat): IF i<=d AND d<=k THEN
(polynomial(poly_n_deriv(a,d),k-d)(rr)/factorial(d))*C(d,i)*(-rr)^(d-i) ELSE 0 ENDIF)
poly_taylor: LEMMAFORALL (k:nat): k>=n AND n>0 IMPLIES EXISTS (c:real): ((y<=c AND c<=x) OR (x<=c AND c<=y)) AND LET fk = polynomial(a,k),
fn1 = polynomial(taylor_poly(a,k,n-1,y),n-1) IN
fk(x) = fn1(x) + (1/factorial(n))*polynomial(poly_n_deriv(a,n),k-n)(c)*(x-y)^n
END polynomials
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.