1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 (* This file was automatically generated: do not edit *********************)
19 (* $Id: CPoly_NthCoeff.v,v 1.6 2004/04/23 10:00:53 lcf Exp $ *)
21 include "algebra/CPolynomials.ma".
24 * Polynomials: Nth Coefficient
25 %\begin{convention}% Let [R] be a ring and write [RX] for the ring of
37 cic:/CoRN/algebra/CPoly_NthCoeff/NthCoeff_def/R.var
43 Notation RX := (cpoly_cring R).
49 The [n]-th coefficient of a polynomial. The default value is
50 [Zero:CR] e.g. if the [n] is higher than the length. For the
51 polynomial $a_0 +a_1 X +a_2 X^2 + \cdots + a_n X^n$ #a0 +a1 X +a2 X^2
52 + ... + an X^n#, the [Zero]-th coefficient is $a_0$#a0#, the first
53 is $a_1$#a1# etcetera. *)
55 inline procedural "cic:/CoRN/algebra/CPoly_NthCoeff/nth_coeff.con" as definition.
57 inline procedural "cic:/CoRN/algebra/CPoly_NthCoeff/nth_coeff_strext.con" as lemma.
59 inline procedural "cic:/CoRN/algebra/CPoly_NthCoeff/nth_coeff_wd.con" as lemma.
61 inline procedural "cic:/CoRN/algebra/CPoly_NthCoeff/nth_coeff_fun.con" as definition.
65 We would like to use [nth_coeff_fun n] all the time.
66 However, Coq's coercion mechanism doesn't support this properly:
68 [(nth_coeff_fun n p)] won't get parsed, and has to be written as
69 [((nth_coeff_fun n) p)] instead.
71 So, in the names of lemmas, we write [(nth_coeff n p)],
72 which always (e.g. in proofs) can be converted
73 to [((nth_coeff_fun n) p)].
77 inline procedural "cic:/CoRN/algebra/CPoly_NthCoeff/nonConst.con" as definition.
80 The following is probably NOT needed. These functions are
81 NOT extensional, that is, they are not CSetoid functions.
84 inline procedural "cic:/CoRN/algebra/CPoly_NthCoeff/nth_coeff_ok.con" as definition.
86 (* The in_coeff predicate*)
88 inline procedural "cic:/CoRN/algebra/CPoly_NthCoeff/in_coeff.con" as definition.
91 The [cpoly_zero] case should be [c [=] Zero] in order to be extensional.
94 inline procedural "cic:/CoRN/algebra/CPoly_NthCoeff/nth_coeff_S.con" as lemma.
101 Implicit Arguments nth_coeff [R].
105 Implicit Arguments nth_coeff_fun [R].
109 Hint Resolve nth_coeff_wd: algebra_c.
113 Section NthCoeff_props
116 (*#* ** Properties of [nth_coeff] *)
119 cic:/CoRN/algebra/CPoly_NthCoeff/NthCoeff_props/R.var
125 Notation RX := (cpoly_cring R).
130 inline procedural "cic:/CoRN/algebra/CPoly_NthCoeff/nth_coeff_zero.con" as lemma.
132 inline procedural "cic:/CoRN/algebra/CPoly_NthCoeff/coeff_O_lin.con" as lemma.
134 inline procedural "cic:/CoRN/algebra/CPoly_NthCoeff/coeff_Sm_lin.con" as lemma.
136 inline procedural "cic:/CoRN/algebra/CPoly_NthCoeff/coeff_O_c_.con" as lemma.
138 inline procedural "cic:/CoRN/algebra/CPoly_NthCoeff/coeff_O_x_mult.con" as lemma.
140 inline procedural "cic:/CoRN/algebra/CPoly_NthCoeff/coeff_Sm_x_mult.con" as lemma.
142 inline procedural "cic:/CoRN/algebra/CPoly_NthCoeff/coeff_Sm_mult_x_.con" as lemma.
145 Hint Resolve nth_coeff_zero coeff_O_lin coeff_Sm_lin coeff_O_c_
146 coeff_O_x_mult coeff_Sm_x_mult coeff_Sm_mult_x_: algebra.
149 inline procedural "cic:/CoRN/algebra/CPoly_NthCoeff/nth_coeff_ap_zero_imp.con" as lemma.
151 inline procedural "cic:/CoRN/algebra/CPoly_NthCoeff/nth_coeff_plus.con" as lemma.
153 inline procedural "cic:/CoRN/algebra/CPoly_NthCoeff/nth_coeff_inv.con" as lemma.
156 Hint Resolve nth_coeff_inv: algebra.
159 inline procedural "cic:/CoRN/algebra/CPoly_NthCoeff/nth_coeff_c_mult_p.con" as lemma.
161 inline procedural "cic:/CoRN/algebra/CPoly_NthCoeff/nth_coeff_p_mult_c_.con" as lemma.
164 Hint Resolve nth_coeff_c_mult_p nth_coeff_p_mult_c_ nth_coeff_plus: algebra.
167 inline procedural "cic:/CoRN/algebra/CPoly_NthCoeff/nth_coeff_complicated.con" as lemma.
169 inline procedural "cic:/CoRN/algebra/CPoly_NthCoeff/all_nth_coeff_eq_imp.con" as lemma.
171 inline procedural "cic:/CoRN/algebra/CPoly_NthCoeff/poly_at_zero.con" as lemma.
173 inline procedural "cic:/CoRN/algebra/CPoly_NthCoeff/nth_coeff_inv'.con" as lemma.
175 inline procedural "cic:/CoRN/algebra/CPoly_NthCoeff/nth_coeff_minus.con" as lemma.
178 Hint Resolve nth_coeff_minus: algebra.
181 inline procedural "cic:/CoRN/algebra/CPoly_NthCoeff/nth_coeff_sum0.con" as lemma.
183 inline procedural "cic:/CoRN/algebra/CPoly_NthCoeff/nth_coeff_sum.con" as lemma.
185 inline procedural "cic:/CoRN/algebra/CPoly_NthCoeff/nth_coeff_nexp_eq.con" as lemma.
187 inline procedural "cic:/CoRN/algebra/CPoly_NthCoeff/nth_coeff_nexp_neq.con" as lemma.
189 inline procedural "cic:/CoRN/algebra/CPoly_NthCoeff/nth_coeff_mult.con" as lemma.
196 Hint Resolve nth_coeff_wd: algebra_c.
200 Hint Resolve nth_coeff_complicated poly_at_zero nth_coeff_inv: algebra.
204 Hint Resolve nth_coeff_inv' nth_coeff_c_mult_p nth_coeff_mult: algebra.
208 Hint Resolve nth_coeff_zero nth_coeff_plus nth_coeff_minus: algebra.
212 Hint Resolve nth_coeff_nexp_eq nth_coeff_nexp_neq: algebra.