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 set "baseuri" "cic:/matita/didactic/ex_deriv".
19 theorem p_plus_p_p: ∀f:F. ∀g:F. (fpari f ∧ fpari g) → fpari (f + g).
22 suppose (fpari f ∧ fpari g) (h).
23 by h we have (fpari f) (H) and (fpari g) (K).
24 we need to prove (fpari (f + g))
25 or equivalently ((f + g) = (f + g) ∘ ρ).
29 = ((f ∘ ρ) + (g ∘ ρ)) by _.
34 theorem p_mult_p_p: ∀f:F. ∀g:F. (fpari f ∧ fpari g) → fpari (f · g).
37 suppose (fpari f ∧ fpari g) (h).
38 by h we have (fpari f) (H) and (fpari g) (K).
39 we need to prove (fpari (f · g))
40 or equivalently ((f · g) = (f · g) ∘ ρ).
44 = ((f ∘ ρ) · (g ∘ ρ)) by _.
49 theorem d_plus_d_d: ∀f:F. ∀g:F. (fdispari f ∧ fdispari g) → fdispari (f + g).
52 suppose (fdispari f ∧ fdispari g) (h).
53 by h we have (fdispari f) (H) and (fdispari g) (K).
54 we need to prove (fdispari (f + g))
55 or equivalently ((f + g) = (ρ ∘ ((f + g) ∘ ρ))).
58 = (f + (ρ ∘ (g ∘ ρ))) by _.
59 = ((ρ ∘ (f ∘ ρ)) + (ρ ∘ (g ∘ ρ))) by _.
60 = (((-R1) · (f ∘ ρ)) + (ρ ∘ (g ∘ ρ))) by _.
61 = (((i (-R1)) · (f ∘ ρ)) + ((i (-R1)) · (g ∘ ρ))) by _.
62 = (((f ∘ ρ) · (i (-R1))) + ((g ∘ ρ) · (i (-R1)))) by _.
63 = (((f ∘ ρ) + (g ∘ ρ)) · (i (-R1))) by _.
64 = ((i (-R1)) · ((f + g) ∘ ρ)) by _.
65 = (ρ ∘ ((f + g) ∘ ρ)) by _
69 theorem d_mult_d_p: ∀f:F. ∀g:F. (fdispari f ∧ fdispari g) → fpari (f · g).
72 suppose (fdispari f ∧ fdispari g) (h).
73 by h we have (fdispari f) (h1) and (fdispari g) (h2).
74 we need to prove (fpari (f · g))
75 or equivalently ((f · g) = (f · g) ∘ ρ).
78 = (f · (ρ ∘ (g ∘ ρ))) by _.
79 = ((ρ ∘ (f ∘ ρ)) · (ρ ∘ (g ∘ ρ))) by _.
80 = (((-R1) · (f ∘ ρ)) · (ρ ∘ (g ∘ ρ))) by _.
81 = (((-R1) · (f ∘ ρ)) · ((-R1) · (g ∘ ρ))) by _.
82 = ((-R1) · (f ∘ ρ) · (-R1) · (g ∘ ρ)) by _.
83 = ((-R1) · ((f ∘ ρ) · (-R1)) · (g ∘ ρ)) by _.
84 = ((-R1) · (-R1) · (f ∘ ρ) · (g ∘ ρ)) by _.
85 = (R1 · ((f ∘ ρ) · (g ∘ ρ))) by _.
86 = (((f ∘ ρ) · (g ∘ ρ))) by _.
91 theorem p_mult_d_p: ∀f:F. ∀g:F. (fpari f ∧ fdispari g) → fdispari (f · g).
94 suppose (fpari f ∧ fdispari g) (h).
95 by h we have (fpari f) (h1) and (fdispari g) (h2).
96 we need to prove (fdispari (f · g))
97 or equivalently ((f · g) = ρ ∘ ((f · g) ∘ ρ)).
100 = (f · (ρ ∘ (g ∘ ρ))) by _.
101 = ((f ∘ ρ) · (ρ ∘ (g ∘ ρ))) by _.
102 = ((f ∘ ρ) · ((-R1) · (g ∘ ρ))) by _.
103 = ((-R1) · ((f ∘ ρ) · (g ∘ ρ))) by _.
104 = ((-R1) · ((f · g) ∘ ρ)) by _.
105 = (ρ ∘ ((f · g) ∘ ρ)) by _
109 theorem p_plus_c_p: ∀f:F. ∀x:R. fpari f → fpari (f + (i x)).
112 suppose (fpari f) (h).
113 we need to prove (fpari (f + (i x)))
114 or equivalently (f + (i x) = (f + (i x)) ∘ ρ).
118 theorem p_mult_c_p: ∀f:F. ∀x:R. fpari f → fpari (f · (i x)).
121 suppose (fpari f) (h).
122 we need to prove (fpari (f · (i x)))
123 or equivalently ((f · (i x)) = (f · (i x)) ∘ ρ).
127 theorem d_mult_c_d: ∀f:F. ∀x:R. fdispari f → fdispari (f · (i x)).
130 suppose (fdispari f) (h).
131 rewrite < fmult_commutative.
135 theorem d_comp_d_d: ∀f,g:F. fdispari f → fdispari g → fdispari (f ∘ g).
138 suppose (fdispari f) (h1).
139 suppose (fdispari g) (h2).
140 we need to prove (fdispari (f ∘ g))
141 or equivalently (f ∘ g = ρ ∘ ((f ∘ g) ∘ ρ)).
144 = (ρ ∘ (f ∘ ρ) ∘ g) by _.
145 = (ρ ∘ (f ∘ ρ) ∘ ρ ∘ (g ∘ ρ)) by _.
146 = (ρ ∘ f ∘ (ρ ∘ ρ) ∘ (g ∘ ρ)) by _.
147 = (ρ ∘ f ∘ id ∘ (g ∘ ρ)) by _.
148 = (ρ ∘ ((f ∘ g) ∘ ρ)) by _
152 theorem pari_in_dispari: ∀ f:F. fpari f → fdispari f '.
154 suppose (fpari f) (h1).
155 we need to prove (fdispari f ')
156 or equivalently (f ' = ρ ∘ (f ' ∘ ρ)).
159 = ((f ∘ ρ) ') by _. (*h1*)
160 = ((f ' ∘ ρ) · ρ ') by _. (*demult*)
161 = ((f ' ∘ ρ) · -R1) by _. (*deinv*)
162 = ((-R1) · (f ' ∘ ρ)) by _. (*fmult_commutative*)
163 = (ρ ∘ (f ' ∘ ρ)) (*reflex_ok*) by _
167 theorem dispari_in_pari: ∀ f:F. fdispari f → fpari f '.
169 suppose (fdispari f) (h1).
170 we need to prove (fpari f ')
171 or equivalently (f ' = f ' ∘ ρ).
174 = ((ρ ∘ (f ∘ ρ)) ') by _.
175 = ((ρ ' ∘ (f ∘ ρ)) · ((f ∘ ρ) ')) by _.
176 = (((-R1) ∘ (f ∘ ρ)) · ((f ∘ ρ) ')) by _.
177 = (((-R1) ∘ (f ∘ ρ)) · ((f ' ∘ ρ) · (-R1))) by _.
178 = ((-R1) · ((f ' ∘ ρ) · (-R1))) by _.
179 = (((f ' ∘ ρ) · (-R1)) · (-R1)) by _.
180 = ((f ' ∘ ρ) · ((-R1) · (-R1))) by _.
181 = ((f ' ∘ ρ) · R1) by _.
186 alias symbol "plus" = "natural plus".
187 alias num (instance 0) = "natural number".
188 theorem de_prodotto_funzioni:
189 ∀ n:nat. (id ^ (n + 1)) ' = ((n + 1)) · (id ^ n).
191 we proceed by induction on n to prove
192 ((id ^ (n + 1)) ' = (i (n + 1)) · (id ^ n)).
194 we need to prove ((id ^ (0 + 1)) ' = (i 1) · (id ^ 0)).
198 = ((id · (id ^ 0)) ') by _.
199 = ((id · R1) ') by _.
203 = (i (R0 + R1) · R1) by _.
204 = (1 · (id ^ 0)) by _
207 by induction hypothesis we know
208 ((id ^ (n + 1)) ' = ((n + 1)) · (id ^ n)) (H).
210 ((id ^ ((n + 1)+1)) '
211 = (i ((n + 1)+1)) · (id ^ (n+1))).
213 ((id ^ ((n + 1) + 1)) ')
214 = ((id ^ ((n + (S 1)))) ') by _.
215 = ((id ^ (S (n + 1))) ') by _.
216 = ((id · (id ^ (n + 1))) ') by _.
217 = ((id ' · (id ^ (n + 1))) + (id · (id ^ (n + 1)) ')) by _.
218 alias symbol "plus" (instance 1) = "function plus".
219 = ((R1 · (id ^ (n + 1))) + (id · (((n + 1)) · (id ^ n)))) by _.
220 = ((R1 · (id ^ (n + 1))) + (((n + 1) · id · (id ^ n)))) by _.
221 = ((R1 · (id ^ (n + 1))) + ((n + 1) · (id ^ (1 + n)))) by _.
222 = ((R1 · (id ^ (n + 1))) + ((n + 1) · (id ^ (n + 1)))) by _.
223 alias symbol "plus" (instance 2) = "function plus".
224 = (((R1 + (n + 1))) · (id ^ (n + 1))) by _.
225 = ((1 + (n + 1)) · (id ^ (n + 1))) by _;
226 = ((n + 1 + 1) · (id ^ (n + 1))) by _
230 let rec times (n:nat) (x:R) on n: R ≝
233 | S n ⇒ Rplus x (times n x)
237 axiom invS1: ∀n:nat. Rmult (invS n) (real_of_nat (n + 1)) = R1.
238 axiom invS2: invS 1 + invS 1 = R1. (*forse*)
241 axiom deriv_e: e ' = e.
242 axiom e1: e · (e ∘ ρ) = R1.
246 (invS 1 · (e + (e ∘ ρ)))' = (invS 1 · (e + (ρ ∘ (e ∘ ρ)))).