(* *)
(**************************************************************************)
-set "baseuri" "cic:/matita/demo/power_derivative".
-
include "nat/plus.ma".
include "nat/orders.ma".
include "nat/compare.ma".
notation "0" with precedence 89
for @{ 'zero }.
-interpretation "Rzero" 'zero =
- (cic:/matita/demo/power_derivative/R0.con).
-interpretation "Nzero" 'zero =
- (cic:/matita/nat/nat/nat.ind#xpointer(1/1/1)).
+interpretation "Rzero" 'zero = (R0).
+interpretation "Nzero" 'zero = (O).
notation "1" with precedence 89
for @{ 'one }.
-interpretation "Rone" 'one =
- (cic:/matita/demo/power_derivative/R1.con).
-interpretation "None" 'one =
- (cic:/matita/nat/nat/nat.ind#xpointer(1/1/2)
- cic:/matita/nat/nat/nat.ind#xpointer(1/1/1)).
-
-interpretation "Rplus" 'plus x y =
- (cic:/matita/demo/power_derivative/Rplus.con x y).
+interpretation "Rone" 'one = (R1).
+interpretation "None" 'one = (S O).
-notation "hvbox(a break \middot b)"
- left associative with precedence 55
-for @{ 'times $a $b }.
+interpretation "Rplus" 'plus x y = (Rplus x y).
-interpretation "Rmult" 'times x y =
- (cic:/matita/demo/power_derivative/Rmult.con x y).
+interpretation "Rmult" 'middot x y = (Rmult x y).
definition Fplus ≝
λf,g:R→R.λx:R.f x + g x.
definition Fmult ≝
λf,g:R→R.λx:R.f x · g x.
-interpretation "Fplus" 'plus x y =
- (cic:/matita/demo/power_derivative/Fplus.con x y).
-interpretation "Fmult" 'times x y =
- (cic:/matita/demo/power_derivative/Fmult.con x y).
+interpretation "Fplus" 'plus x y = (Fplus x y).
+interpretation "Fmult" 'middot x y = (Fmult x y).
notation "2" with precedence 89
for @{ 'two }.
-interpretation "Rtwo" 'two =
- (cic:/matita/demo/power_derivative/Rplus.con
- cic:/matita/demo/power_derivative/R1.con
- cic:/matita/demo/power_derivative/R1.con).
-interpretation "Ntwo" 'two =
- (cic:/matita/nat/nat/nat.ind#xpointer(1/1/2)
- (cic:/matita/nat/nat/nat.ind#xpointer(1/1/2)
- (cic:/matita/nat/nat/nat.ind#xpointer(1/1/1)))).
+interpretation "Rtwo" 'two = (Rplus R1 R1).
+interpretation "Ntwo" 'two = (S (S O)).
let rec Rpower (x:R) (n:nat) on n ≝
match n with
| S n ⇒ x · (Rpower x n)
].
-interpretation "Rpower" 'exp x n =
- (cic:/matita/demo/power_derivative/Rpower.con x n).
+interpretation "Rpower" 'exp x n = (Rpower x n).
let rec inj (n:nat) on n : R ≝
match n with
]
].
-coercion cic:/matita/demo/power_derivative/inj.con.
+coercion inj.
axiom Rplus_Rzero_x: ∀x:R.0+x=x.
axiom Rplus_comm: symmetric ? Rplus.
axiom Rplus_assoc: associative ? Rplus.
-axiom Rmult_Rone_x: ∀x:R.1*x=x.
-axiom Rmult_Rzero_x: ∀x:R.0*x=0.
+axiom Rmult_Rone_x: ∀x:R.1 · x=x.
+axiom Rmult_Rzero_x: ∀x:R.0 · x=0.
axiom Rmult_assoc: associative ? Rmult.
axiom Rmult_comm: symmetric ? Rmult.
axiom Rmult_Rplus_distr: distributive ? Rmult Rplus.
-alias symbol "times" = "Rmult".
+alias symbol "middot" = "Rmult".
alias symbol "plus" = "natural plus".
definition monomio ≝
definition costante : nat → R → R ≝
λa:nat.λx:R.inj a.
-coercion cic:/matita/demo/power_derivative/costante.con 1.
+coercion costante with 1.
axiom f_eq_extensional:
∀f,g:R→R.(∀x:R.f x = g x) → f=g.
non associative with precedence 90
for @{ 'derivative $f }.
-interpretation "Rderivative" 'derivative f =
- (cic:/matita/demo/power_derivative/derivative.con f).
+interpretation "Rderivative" 'derivative f = (derivative f).
notation "hvbox('x' \sup n)"
non associative with precedence 60
non associative with precedence 60
for @{ 'monomio 1 }.
-interpretation "Rmonomio" 'monomio n =
- (cic:/matita/demo/power_derivative/monomio.con n).
+interpretation "Rmonomio" 'monomio n = (monomio n).
axiom derivative_x0: D[x \sup 0] = 0.
axiom derivative_x1: D[x] = 1.
axiom derivative_mult: ∀f,g:R→R. D[f·g] = D[f]·g + f·D[g].
-alias symbol "times" = "Fmult".
+alias symbol "middot" = "Fmult".
theorem derivative_power: ∀n:nat. D[x \sup n] = n·x \sup (pred n).
assume n:nat.
case left.
suppose (0 < m) (m_pos).
using (S_pred ? m_pos) we proved (m = 1 + pred m) (H1).
- done.
+ by H1 done.
case right.
suppose (0=m) (m_zero).
- done.
+ by m_zero, Fmult_zero_f done.
conclude
(D[x \sup (1+m)])
= (D[x · x \sup m]).
@{\lambda ${ident i} : $ty. $p)}
@{\lambda ${ident i} . $p}}}.
-interpretation "Rderivative" 'derivative \eta.f =
- (cic:/matita/demo/power_derivative/derivative.con f).
+interpretation "Rderivative" 'derivative \eta.f = (derivative f).
*)
-notation "hvbox(\frac 'd' ('d' 'x') break p)"
- right associative with precedence 90
+notation "hvbox(\frac 'd' ('d' 'x') break p)" with precedence 90
for @{ 'derivative $p}.
-interpretation "Rderivative" 'derivative f =
- (cic:/matita/demo/power_derivative/derivative.con f).
+interpretation "Rderivative" 'derivative f = (derivative f).
theorem derivative_power': ∀n:nat. D[x \sup (1+n)] = (1+n) · x \sup n.
assume n:nat.