-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPolynomial.v
64 lines (43 loc) · 1.42 KB
/
Polynomial.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
Require Import Psatz.
Require Import String.
Require Import Program.
Require Export Complex.
Require Export Matrix.
Require Import List.
(*
Require Export CoRN.fta.FTA.
Require Export CoRN.coq_reals.Rreals_iso.
*)
(* polynomial represented by a list of coeficients and a degree*)
Definition Polynomial (n : nat) := list (Complex.C).
Definition WF_Poly {n : nat} (p : Polynomial n) :=
length p = (S n).
Definition eval_P (n : nat) (p : Polynomial n) (x : Complex.C):=
Csum (fun i => (nth i p C0)* x^i) (S n).
(*****************************************************)
(* First, we show that our C is the same as ccorns C *)
(*****************************************************)
(*
Definition CtoCC (c : Complex.C) : CC_set := Build_CC_set (RasIR (fst c)) (RasIR (snd c)).
Definition CCtoC (c : CC_set) : Complex.C := (IRasR (Re c), IRasR (Im c)).
Lemma CasCCasC_id : forall (x : Complex.C), (CCtoC (CtoCC x) = x).
Proof. intros.
unfold CtoCC, CCtoC.
simpl.
do 2 rewrite RasIRasR_id.
rewrite surjective_pairing.
easy.
Qed.
(*
Lemma CCasCasCC_id : forall (x : CC_set), (CtoCC (CCtoC x) = x).
Proof. intros.
unfold CtoCC, CCtoC.
simpl.
do 2 rewrite RasIRasR_id.
rewrite surjective_pairing.
easy.
Qed. *)
*)
Theorem Fundamental_Theorem_Algebra : forall {n : nat} (p : Polynomial n),
(n > 0)%nat -> (exists c : (R * R), eval_P n p c = C0).
Proof. Admitted.