        {"id":1820,"date":"2023-11-30T06:00:03","date_gmt":"2023-11-30T04:00:03","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/?p=1820"},"modified":"2023-11-15T12:47:01","modified_gmt":"2023-11-15T10:47:01","slug":"30-nov-23","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/30-nov-23\/","title":{"rendered":"Si (\u2203x)\u00acP(x), entonces \u00ac(\u2200x)P(x)"},"content":{"rendered":"\n<p>Demostrar con Lean4 que si &#92;((\u2203x)\u00acP(x)&#92;), entonces &#92;(\u00ac(\u2200x)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 : \u2203 x, \u00ac P x)\n  : \u00ac \u2200 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;((\u2200x)P(x)&#92;) y tenemos que demostrar  contradicci\u00f3n. Por hip\u00f3tesis, &#92;((\u2203x)\u00acP(x)&#92;). Sea &#92;(y&#92;) tal que &#92;(\u00acP(y)&#92;). Entonces, como &#92;((\u2200x)P(x)&#92;), se tiene &#92;(P(y)&#92;) que es una contradicci\u00f3n con &#92;(\u00acP(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 : \u2203 x, \u00ac P x)\n  : \u00ac \u2200 x, P x :=\nby\n  intro h1\n  -- h1 : \u2200 (x : \u03b1), P x\n  -- \u22a2 False\n  cases' h with y hy\n  -- y : \u03b1\n  -- hy : \u00acP y\n  apply hy\n  -- \u22a2 P y\n  exact (h1 y)\n\n-- 2\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : \u2203 x, \u00ac P x)\n  : \u00ac \u2200 x, P x :=\nby\n  intro h1\n  -- h1 : \u2200 (x : \u03b1), P x\n  -- \u22a2 False\n  rcases h with \u27e8y, hy : \u00acP y\u27e9\n  apply hy\n  -- \u22a2 P y\n  exact (h1 y)\n\n-- 3\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : \u2203 x, \u00ac P x)\n  : \u00ac \u2200 x, P x :=\nby\n  intro h1\n  -- h1 : \u2200 (x : \u03b1), P x\n  -- \u22a2 False\n  rcases h with \u27e8y, hy : \u00acP y\u27e9\n  exact hy (h1 y)\n\n-- 4\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : \u2203 x, \u00ac P x)\n  : \u00ac \u2200 x, P x :=\nnot_forall.mpr h\n\n-- 5\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : \u2203 x, \u00ac P x)\n  : \u00ac \u2200 x, P x :=\nnot_forall_of_exists_not h\n\n-- 6\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : \u2203 x, \u00ac P x)\n  : \u00ac \u2200 x, P x :=\nby aesop\n\n-- Lemas usados\n-- ============\n\n-- #check (not_forall : (\u00ac\u2200 x, P x) \u2194 \u2203 x, \u00acP x)\n-- #check (not_forall_of_exists_not : (\u2203 x, \u00acP x) \u2192 \u00ac\u2200 x, P x)\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_para_todo_de_existe_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;((\u2203x)\u00acP(x)&#92;), entonces &#92;(\u00ac(\u2200x)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 : \u2203 x, \u00ac P x) : \u00ac \u2200 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\/1820"}],"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=1820"}],"version-history":[{"count":1,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1820\/revisions"}],"predecessor-version":[{"id":1821,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1820\/revisions\/1821"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/media?parent=1820"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/categories?post=1820"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/tags?post=1820"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}