        {"id":1815,"date":"2023-11-28T06:00:06","date_gmt":"2023-11-28T04:00:06","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/?p=1815"},"modified":"2023-11-15T09:50:56","modified_gmt":"2023-11-15T07:50:56","slug":"28-nov-23","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/28-nov-23\/","title":{"rendered":"Si (\u2200x)\u00acP(x), entonces \u00ac(\u2203x)P(x)"},"content":{"rendered":"\n<p>Demostrar con Lean4 que si &#92;((\u2200x)\u00acP(x)&#92;), entonces &#92;(\u00ac(\u2203x)P(x)&#92;).<\/p>\n<p>Para ello, completar la siguiente teor\u00eda de Lean4:<\/p>\n<pre lang=\"lean\">\nimport Mathlib.Tactic\nvariable {\u03b1 : Type _}\nvariable (P : \u03b1 \u2192 Prop)\n\nexample\n  (h : \u2200 x, \u00ac P x)\n  : \u00ac \u2203 x, P x :=\nby sorry\n<\/pre>\n<p><!--more--><\/p>\n<p><b>Demostraci\u00f3n en lenguaje natural<\/b><\/p>\n<p>Supongamos que &#92;((\u2203x)P(x)&#92;). Sea &#92;(y&#92;) tal que &#92;(P(y)&#92;). Puesto que &#92;((\u2200x)\u00acP(x)&#92;), se tiene que &#92;(\u00acP(y)&#92;) que es una contradicci\u00f3n con &#92;(P(y)&#92;).<\/p>\n<p><b>Demostraciones con Lean4<\/b><\/p>\n<pre lang=\"lean\">\nimport Mathlib.Tactic\nvariable {\u03b1 : Type _}\nvariable (P : \u03b1 \u2192 Prop)\n\n-- 1\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : \u2200 x, \u00ac P x)\n  : \u00ac \u2203 x, P x :=\nby\n  intro h1\n  -- h1 : \u2203 x, P x\n  -- \u22a2 False\n  rcases h1 with \u27e8y, hy : P y\u27e9\n  have h2 : \u00acP y := h y\n  exact h2 hy\n\n-- 2\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : \u2200 x, \u00ac P x)\n  : \u00ac \u2203 x, P x :=\nby\n  intro h1\n  -- h1 : \u2203 x, P x\n  -- \u22a2 False\n  rcases h1 with \u27e8y, hy : P y\u27e9\n  exact (h y) hy\n\n-- 3\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : \u2200 x, \u00ac P x)\n  : \u00ac \u2203 x, P x :=\nby\n  rintro \u27e8y, hy : P y\u27e9\n  exact (h y) hy\n\n-- 4\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : \u2200 x, \u00ac P x)\n  : \u00ac \u2203 x, P x :=\nfun \u27e8y, hy\u27e9 \u21a6 (h y) hy\n\n-- 5\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : \u2200 x, \u00ac P x)\n  : \u00ac \u2203 x, P x :=\nnot_exists_of_forall_not h\n\n-- 6\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : \u2200 x, \u00ac P x)\n  : \u00ac \u2203 x, P x :=\nby aesop\n\n-- Lemas usados\n-- ============\n\n-- variable (q : Prop)\n-- #check (not_exists_of_forall_not : (\u2200 x, P x \u2192 q) \u2192 (\u2203 x, P x) \u2192 q)\n<\/pre>\n<p><b>Demostraciones interactivas<\/b><\/p>\n<p>Se puede interactuar con las demostraciones anteriores en <a href=\"https:\/\/live.lean-lang.org\/#url=https:\/\/raw.githubusercontent.com\/jaalonso\/Calculemus2\/main\/src\/No_existe_de_para_todo_no.lean\" rel=\"noopener noreferrer\" target=\"_blank\">Lean 4 Web<\/a>.<\/p>\n<p><b>Referencias<\/b><\/p>\n<ul>\n<li> J. Avigad y P. Massot. <a href=\"https:\/\/bit.ly\/3U4UjBk\">Mathematics in Lean<\/a>, p. 33.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Demostrar con Lean4 que si &#92;((\u2200x)\u00acP(x)&#92;), entonces &#92;(\u00ac(\u2203x)P(x)&#92;). Para ello, completar la siguiente teor\u00eda de Lean4: import Mathlib.Tactic variable {\u03b1 : Type _} variable (P : \u03b1 \u2192 Prop) example (h : \u2200 x, \u00ac P x) : \u00ac \u2203 x, P x := by sorry<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1815"}],"collection":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/comments?post=1815"}],"version-history":[{"count":2,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1815\/revisions"}],"predecessor-version":[{"id":1817,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1815\/revisions\/1817"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/media?parent=1815"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/categories?post=1815"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/tags?post=1815"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}