        {"id":1811,"date":"2023-11-27T06:00:04","date_gmt":"2023-11-27T04:00:04","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/?p=1811"},"modified":"2023-11-14T18:06:08","modified_gmt":"2023-11-14T16:06:08","slug":"27-nov-23","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/27-nov-23\/","title":{"rendered":"Si \u00ac(\u2203x)P(x), entonces (\u2200x)\u00acP(x)"},"content":{"rendered":"\n<p>Demostrar con Lean4 que si &#92;(\u00ac(\u2203x)P(x)&#92;), entonces &#92;((\u2200x)\u00acP(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 : \u00ac \u2203 x, P x)\n  : \u2200 x, \u00ac P x :=\nby sorry\n<\/pre>\n<p><!--more--><\/p>\n<p><b>Demostraci\u00f3n en lenguaje natural<\/b><\/p>\n<p>Sea &#92;(y&#92;) un elemento cualquiera. Tenemos que demostrar &#92;(\u00acP(y)&#92;). Para ello, supongamos que &#92;(P(y)&#92;). Entonces, &#92;((\u2203x)P(x)&#92;) que es una contradicci\u00f3n con la hip\u00f3tesis,<\/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 : \u00ac \u2203 x, P x)\n  : \u2200 x, \u00ac P x :=\nby\n  intros y h1\n  -- y : \u03b1\n  -- h1 : P x\n  -- \u22a2 False\n  apply h\n  -- \u22a2 \u2203 x, P x\n  existsi y\n  -- \u22a2 P y\n  exact h1\n\n-- 2\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : \u00ac \u2203 x, P x)\n  : \u2200 x, \u00ac P x :=\nby\n  intros y h1\n  -- y : \u03b1\n  -- h1 : P x\n  -- \u22a2 False\n  apply h\n  -- \u22a2 \u2203 x, P x\n  use y\n  -- \u22a2 P y\n  exact h1\n\n-- 3\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : \u00ac \u2203 x, P x)\n  : \u2200 x, \u00ac P x :=\nby\n  intros y h1\n  -- y : \u03b1\n  -- h1 : P x\n  -- \u22a2 False\n  apply h\n  -- \u22a2 \u2203 x, P x\n  exact \u27e8y, h1\u27e9\n\n-- 4\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : \u00ac \u2203 x, P x)\n  : \u2200 x, \u00ac P x :=\nby\n  intros y h1\n  -- y : \u03b1\n  -- h1 : P x\n  -- \u22a2 False\n  exact h \u27e8y, h1\u27e9\n\n-- 5\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : \u00ac \u2203 x, P x)\n  : \u2200 x, \u00ac P x :=\nfun y h1 \u21a6 h \u27e8y, h1\u27e9\n\n-- 6\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : \u00ac \u2203 x, P x)\n  : \u2200 x, \u00ac P x :=\nby\n  push_neg at h\n  exact h\n\n-- 7\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : \u00ac \u2203 x, P x)\n  : \u2200 x, \u00ac P x :=\nnot_exists.mp h\n\n-- 8\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : \u00ac \u2203 x, P x)\n  : \u2200 x, \u00ac P x :=\nby aesop\n\n-- Lemas usados\n-- ============\n\n-- #check (not_exists : (\u00ac\u2203 x, P x) \u2194 \u2200 (x : \u03b1), \u00acP 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\/Para_todo_no_de_no_existe.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;(\u00ac(\u2203x)P(x)&#92;), entonces &#92;((\u2200x)\u00acP(x)&#92;). Para ello, completar la siguiente teor\u00eda de Lean4: import Mathlib.Tactic variable {\u03b1 : Type _} variable (P : \u03b1 \u2192 Prop) example (h : \u00ac \u2203 x, P x) : \u2200 x, \u00ac 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\/1811"}],"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=1811"}],"version-history":[{"count":2,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1811\/revisions"}],"predecessor-version":[{"id":1814,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1811\/revisions\/1814"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/media?parent=1811"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/categories?post=1811"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/tags?post=1811"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}