ForMatUS: Regla de introducción del cuantificador existencial en Lean
He añadido a la lista Lógica con Lean el vídeo en el que se comentan pruebas en Lean de a propiedad
1 |
∀x P(x) ⊢ ∃x P(x) |
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 63 64 65 66 67 68 69 70 71 72 73 |
-- Ej. 1. Demostrar -- ∀x P(x) ⊢ ∃x P(x) import tactic variable U : Type variable c : U variable P : U -> Prop -- 1ª demostración example (h1 : ∀x, P x) : ∃x, P x := have h2 : P c, from h1 c, show ∃x, P x, from exists.intro c h2 -- 2ª demostración example (h1 : ∀x, P x) : ∃x, P x := show ∃x, P x, from exists.intro c (h1 c) -- 3ª demostración example (h1 : ∀x, P x) : ∃x, P x := exists.intro c (h1 c) -- 4ª demostración example (h1 : ∀x, P x) : ∃x, P x := ⟨c, h1 c⟩ -- 5ª demostración example (a : U) (h1 : ∀x, P x) : ∃x, P x := begin use a, apply h1, end -- 6ª demostración example (a : U) (h1 : ∀x, P x) : ∃x, P x := begin constructor, apply h1 a, end -- 7ª demostración example [inhabited U] (h1 : ∀x, P x) : ∃x, P x := begin constructor, apply h1 (default U), end -- 8ª demostración example (h : nonempty U) (h1 : ∀x, P x) : ∃x, P x := begin use (classical.choice h), apply h1, end |