ForMatUS: Pruebas en Lean de la regla de reducción al absurdo
He añadido a la lista Lógica con Lean el vídeo en el que se comentan 6 pruebas en Lean de la regla de reducción al absurdo usando los estilos declarativos, aplicativos, funcional y automático.
A continuación, se muestra el vídeo
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 tactic variable (P : Prop) -- ---------------------------------------------------- -- Ej. 1 (p. 22) Demostrar que -- ¬P → false ⊢ P -- ---------------------------------------------------- -- 1ª demostración example (h1 : ¬P → false) : P := have h2 : ¬¬P, from assume h3 : ¬P, show false, from h1 h3, show P, from not_not.mp h2 -- 2ª demostración example (h1 : ¬P → false) : P := begin apply not_not.mp, intro h2, exact h1 h2, end -- 3ª demostración example (h1 : ¬P → false) : P := begin apply not_not.mp, exact λ h2, h1 h2, end -- 4ª demostración example (h1 : ¬P → false) : P := not_not.mp (λ h2, h1 h2) -- #print axioms not_not -- 5ª demostración example (h1 : ¬P → false) : P := -- by library_search by_contra h1 -- #print axioms by_contra -- 6ª demostración lemma RAA (h1 : ¬P → false) : P := -- by hint by finish -- #print axioms RAA |