        {"id":1171,"date":"2022-11-03T18:33:21","date_gmt":"2022-11-03T16:33:21","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/?p=1171"},"modified":"2022-11-03T18:33:21","modified_gmt":"2022-11-03T16:33:21","slug":"la-suma-de-una-cota-inferior-de-f-y-una-cota-inferior-de-g-es-una-cota-inferior-de-fg","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/la-suma-de-una-cota-inferior-de-f-y-una-cota-inferior-de-g-es-una-cota-inferior-de-fg\/","title":{"rendered":"La suma de una cota inferior de f y una cota inferior de g es una cota inferior de f+g"},"content":{"rendered":"<p>Demostrar que la suma de una cota inferior de f y una cota inferior de g es una cota inferior de f+g.<\/p>\n<p>Para ello, completar la siguiente teor\u00eda de Lean:<\/p>\n<pre lang=\"lean\">\nimport data.real.basic\n\n-- (cota_inferior f a) se verifica si a es una cota inferior de f.\ndef cota_inferior (f : \u211d \u2192 \u211d) (a : \u211d) : Prop :=\n\u2200 x, a \u2264 f x\n\nvariables (f g : \u211d \u2192 \u211d)\nvariables (a b : \u211d)\n\nexample\n  (hfa : cota_inferior f a)\n  (hgb : cota_inferior g b)\n  : cota_inferior (\u03bb x, f x + g x) (a + b) :=\nsorry\n<\/pre>\n<p><!--more--><\/p>\n<p><b>Soluciones con Lean<\/b><\/p>\n<pre lang=\"lean\">\nimport data.real.basic\n\n-- (cota_inferior f a) se verifica si a es una cota inferior de f.\ndef cota_inferior (f : \u211d \u2192 \u211d) (a : \u211d) : Prop :=\n\u2200 x, a \u2264 f x\n\nvariables (f g : \u211d \u2192 \u211d)\nvariables (a b : \u211d)\n\n-- 1\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (hfa : cota_inferior f a)\n  (hgb : cota_inferior g b)\n  : cota_inferior (\u03bb x, f x + g x) (a + b) :=\nbegin\n  have h1 : \u2200 x, a + b \u2264 f x + g x,\n  { intro x,\n    have h1a : a \u2264 f x := hfa x,\n    have h1b : b \u2264 g x := hgb x,\n    show a + b \u2264 f x + g x,\n      by exact add_le_add (hfa x) (hgb x), },\n  show cota_inferior (\u03bb x, f x + g x) (a + b),\n    by exact h1,\nend\n\n-- 2\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (hfa : cota_inferior f a)\n  (hgb : cota_inferior g b)\n  : cota_inferior (\u03bb x, f x + g x) (a + b) :=\nbegin\n  intro x,\n  dsimp,\n  change a + b \u2264 f x + g x,\n  apply add_le_add,\n  apply hfa,\n  apply hgb\nend\n\n-- 3\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (hfa : cota_inferior f a)\n  (hgb : cota_inferior g b)\n  : cota_inferior (\u03bb x, f x + g x) (a + b) :=\n\u03bb x, add_le_add (hfa x) (hgb x)\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\/Suma_de_cotas_inferiores.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. 27.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Demostrar que la suma de una cota inferior de f y una cota inferior de g es una cota inferior de f+g. Para ello, completar la siguiente teor\u00eda de Lean: import data.real.basic &#8212; (cota_inferior f a) se verifica si a es una cota inferior de f. def cota_inferior (f : \u211d \u2192 \u211d) (a : \u211d) : Prop := \u2200 x, a \u2264 f x variables (f g : \u211d \u2192 \u211d) variables (a b : \u211d) example (hfa : cota_inferior f a) (hgb : cota_inferior g b) : cota_inferior (\u03bb x, f x + g x) (a + 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":[286],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1171"}],"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=1171"}],"version-history":[{"count":1,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1171\/revisions"}],"predecessor-version":[{"id":1172,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1171\/revisions\/1172"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/media?parent=1171"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/categories?post=1171"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/tags?post=1171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}