Si R es un anillo, entonces -0 = 0
Demostrar que si R es un anillo, entonces
1 |
-0 = 0 |
Para ello, completar la siguiente teoría de Lean:
1 2 3 4 5 6 |
import algebra.ring variables {R : Type*} [ring R] example : (-0 : R) = 0 := 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 55 56 57 58 59 60 61 62 |
import algebra.ring variables {R : Type*} [ring R] -- 1ª demostración -- =============== example : (-0 : R) = 0 := begin have h : 0 - 0 = (-0 : R) := zero_sub 0, calc (-0 : R) = 0 - 0 : h.symm ... = -(0 - 0) : (neg_sub (0 : R) 0).symm ... = -(-0) : congr_arg (λ x, -x) h ... = 0 : neg_neg 0 end -- 2ª demostración -- =============== example : (-0 : R) = 0 := begin have h : 0 - 0 = (-0 : R) := by rw zero_sub, calc (-0 : R) = 0 - 0 : by rw h ... = -(0 - 0) : by rw neg_sub ... = -(-0) : by {congr; rw h} ... = 0 : by rw neg_neg end -- 3ª demostración -- =============== example : (-0 : R) = 0 := by simpa only [zero_sub, neg_neg] using (neg_sub (0 : R) 0).symm -- 4ª demostración -- =============== example : (-0 : R) = 0 := neg_zero -- 5ª demostración -- =============== example : (-0 : R) = 0 := by simp -- 6ª demostración -- =============== example : (-0 : R) = 0 := begin apply neg_eq_of_add_eq_zero_right, rw add_zero, end -- 7ª demostración -- =============== example : (-0 : R) = 0 := neg_eq_of_add_eq_zero_right (add_zero 0) |
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. 12.