Para todo c ∈ ℝ-{0}, la función f(x) = x * c es inyectiva
Demostrar que para todo c ∈ ℝ-{0}, la función f(x) = x * c es inyectiva
Para ello, completar la siguiente teoría de Lean:
1 2 3 4 5 6 7 8 9 10 |
import data.real.basic open function variable {c : ℝ} example (h : c ≠ 0) : injective (λ x, c * x) := sorry |
Soluciones con 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 |
import data.real.basic open function variable {c : ℝ} -- 1ª demostración -- =============== example (h : c ≠ 0) : injective (λ x, c * x) := begin assume x1 : ℝ, assume x2 : ℝ, assume h1 : (λ x, c * x) x1 = (λ x, c * x) x2, have h2 : c * x1 = c * x2 := h1, show x1 = x2, by exact (mul_right_inj' h).mp h1, end -- 2ª demostración -- =============== example (h : c ≠ 0) : injective (λ x, c * x) := begin intros x1 x2 h', dsimp at h', apply mul_left_cancel₀ h, exact h', end -- 3ª demostración -- =============== example (h : c ≠ 0) : injective (λ x, c * x) := begin intros x1 x2 h', dsimp at h', exact (mul_right_inj' h).mp h' end -- 3ª demostración -- =============== example {c : ℝ} (h : c ≠ 0) : injective (λ x, c * x) := λ x1 x2 h', mul_left_cancel₀ h h' |
Se puede interactuar con la prueba anterior en esta sesión con Lean.
Referencias
- J. Avigad, K. Buzzard, R.Y. Lewis y P. Massot. Mathematics in Lean, p. 29.