blob: 6fb922b0f3c65977589c14b811f09f0ad852c863 (
plain)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
(************************************************************************)
(* v * The Coq Proof Assistant / The Coq Development Team *)
(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
(* \VV/ **************************************************************)
(* // * This file is distributed under the terms of the *)
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
(* $Id$ *)
(**** Tests of Field with real numbers ****)
Require Import Reals RealField.
Open Scope R_scope.
(* Example 1 *)
Goal
forall eps : R,
eps * (1 / (2 + 2)) + eps * (1 / (2 + 2)) = eps * (1 / 2).
Proof.
intros.
field.
Qed.
(* Example 2 *)
Goal
forall (f g : R -> R) (x0 x1 : R),
(f x1 - f x0) * (1 / (x1 - x0)) + (g x1 - g x0) * (1 / (x1 - x0)) =
(f x1 + g x1 - (f x0 + g x0)) * (1 / (x1 - x0)).
Proof.
intros.
field.
Abort.
(* Example 3 *)
Goal forall a b : R, 1 / (a * b) * (1 / (1 / b)) = 1 / a.
Proof.
intros.
field.
Abort.
Goal forall a b : R, 1 / (a * b) * (1 / 1 / b) = 1 / a.
Proof.
intros.
field_simplify_eq.
Abort.
Goal forall a b : R, 1 / (a * b) * (1 / 1 / b) = 1 / a.
Proof.
intros.
field_simplify (1 / (a * b) * (1 / 1 / b)).
Abort.
(* Example 4 *)
Goal
forall a b : R, a <> 0 -> b <> 0 -> 1 / (a * b) / (1 / b) = 1 / a.
Proof.
intros.
field; auto.
Qed.
(* Example 5 *)
Goal forall a : R, 1 = 1 * (1 / a) * a.
Proof.
intros.
field.
Abort.
(* Example 6 *)
Goal forall a b : R, b = b * / a * a.
Proof.
intros.
field.
Abort.
(* Example 7 *)
Goal forall a b : R, b = b * (1 / a) * a.
Proof.
intros.
field.
Abort.
(* Example 8 *)
Goal
forall x y : R,
x * (1 / x + x / (x + y)) =
- (1 / y) * y * (- (x * (x / (x + y))) - 1).
Proof.
intros.
field.
Abort.
|