        {"id":1210,"date":"2022-11-21T06:00:38","date_gmt":"2022-11-21T04:00:38","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/?p=1210"},"modified":"2022-11-18T18:15:56","modified_gmt":"2022-11-18T16:15:56","slug":"21-nov-22","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/21-nov-22\/","title":{"rendered":"Si a es una cota superior de s y a \u2264 b, entonces b es una cota superior de s"},"content":{"rendered":"<p>Demostrar que si a es una cota superior de s y a \u2264 b, entonces b es una cota superior de s<\/p>\n<p>Para ello, completar la siguiente teor\u00eda de Lean:<\/p>\n<pre lang=\"lean\">\nimport tactic\n\nvariables {\u03b1 : Type*} [partial_order \u03b1]\nvariables s : set \u03b1\nvariables a b : \u03b1\n\n-- (cota_superior s a) expresa que a es una cota superior de s.\ndef cota_superior (s : set \u03b1) (a : \u03b1) := \u2200 {x}, x \u2208 s \u2192 x \u2264 a\n\nexample\n  (h1 : cota_superior s a)\n  (h2 : a \u2264 b)\n  : cota_superior s b :=\nsorry\n<\/pre>\n<p><!--more--><\/p>\n<p><b>Soluciones con Lean<\/b><\/p>\n<pre lang=\"lean\">\nimport tactic\n\nvariables {\u03b1 : Type*} [partial_order \u03b1]\nvariables s : set \u03b1\nvariables a b : \u03b1\n\n-- (cota_superior s a) expresa que a es una cota superior de s.\ndef cota_superior (s : set \u03b1) (a : \u03b1) := \u2200 {x}, x \u2208 s \u2192 x \u2264 a\n\n-- 1\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h1 : cota_superior s a)\n  (h2 : a \u2264 b)\n  : cota_superior s b :=\nbegin\n  intro x,\n  assume xs : x \u2208 s,\n  have h3 : x \u2264 a := h1 xs,\n  show x \u2264 b,\n    by exact le_trans h3 h2,\nend\n\n-- 2\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h1 : cota_superior s a)\n  (h2 : a \u2264 b)\n  : cota_superior s b :=\nbegin\n  intros x xs,\n  calc x \u2264 a : h1 xs\n     ... \u2264 b : h2\nend\n<\/pre>\n<p>Se puede interactuar con la prueba anterior en <a href=\"https:\/\/leanprover-community.github.io\/lean-web-editor\/#url=https:\/\/raw.githubusercontent.com\/jaalonso\/Calculemus\/main\/src\/Cotas_superiores_de_conjuntos.lean\" rel=\"noopener noreferrer\" target=\"_blank\">esta sesi\u00f3n con Lean<\/a>.<\/p>\n<p><b>Referencias<\/b><\/p>\n<ul>\n<li>J. Avigad, K. Buzzard, R.Y. Lewis y P. Massot. <a href=\"https:\/\/bit.ly\/3U4UjBk\">Mathematics in Lean<\/a>, p. 29.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Demostrar que si a es una cota superior de s y a \u2264 b, entonces b es una cota superior de s Para ello, completar la siguiente teor\u00eda de Lean: import tactic variables {\u03b1 : Type*} [partial_order \u03b1] variables s : set \u03b1 variables a b : \u03b1 &#8212; (cota_superior s a) expresa que a es una cota superior de s. def cota_superior (s : set \u03b1) (a : \u03b1) := \u2200 {x}, x \u2208 s \u2192 x \u2264 a example (h1 : cota_superior s a) (h2 : a \u2264 b) : cota_superior s b := 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\/1210"}],"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=1210"}],"version-history":[{"count":1,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1210\/revisions"}],"predecessor-version":[{"id":1211,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1210\/revisions\/1211"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/media?parent=1210"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/categories?post=1210"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/tags?post=1210"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}