-
Notifications
You must be signed in to change notification settings - Fork 1
/
Suma_constante_es_suprayectiva.lean
59 lines (50 loc) · 1.12 KB
/
Suma_constante_es_suprayectiva.lean
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
-- ---------------------------------------------------------------------
-- Ejercicio. Demostrar que para todo número real c, la función
-- f(x) x + c
-- es suprayectiva.
-- ----------------------------------------------------------------------
import data.real.basic
variable {c : ℝ}
open function
-- 1ª demostración
-- ===============
example : surjective (λ x, x + c) :=
begin
intro x,
use x - c,
dsimp,
ring,
end
-- Su desarrollo es
--
-- c : ℝ
-- ⊢ surjective (λ (x : ℝ), x + c)
-- >> intro x,
-- ⊢ ∃ (a : ℝ), (λ (x : ℝ), x + c) a = x
-- >> use x - c,
-- ⊢ (λ (x : ℝ), x + c) (x - c) = x
-- >> dsimp,
-- ⊢ x - c + c = x
-- >> ring,
-- no goals
-- 2ª demostración
-- ===============
example : surjective (λ x, x + c) :=
begin
intro x,
use x - c,
change (x - c) + c = x,
ring,
end
-- Su desarrollo es
--
-- c : ℝ
-- ⊢ surjective (λ (x : ℝ), x + c)
-- >> intro x,
-- ⊢ ∃ (a : ℝ), (λ (x : ℝ), x + c) a = x
-- >> use x - c,
-- ⊢ (λ (x : ℝ), x + c) (x - c) = x
-- >> change (x - c) + c = x,
-- ⊢ x - c + c = x
-- >> ring,
-- no goals