        {"id":1747,"date":"2023-11-02T06:00:57","date_gmt":"2023-11-02T04:00:57","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/?p=1747"},"modified":"2023-10-26T12:15:31","modified_gmt":"2023-10-26T10:15:31","slug":"02-nov-23","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/02-nov-23\/","title":{"rendered":"Si c \u2265 0 y f est\u00e1 acotada superiormente, entonces c\u00b7f tambi\u00e9n lo est\u00e1"},"content":{"rendered":"<p>Demostrar con Lean4 que si &#92;(c \u2265 0&#92;) y &#92;(f&#92;) est\u00e1 acotada superiormente, entonces &#92;(c\u00b7f&#92;) tambi\u00e9n lo est\u00e1.<\/p>\n<p>Para ello, completar la siguiente teor\u00eda de Lean4:<\/p>\n<pre lang=\"lean\">\nimport src.Cota_superior_de_producto_por_escalar\n\nvariable {f : \u211d \u2192 \u211d}\nvariable {c : \u211d}\n\n-- (acotadaSup f) afirma que f tiene cota superior.\ndef acotadaSup (f : \u211d \u2192 \u211d) :=\n  \u2203 a, CotaSuperior f a\n\nexample\n  (hf : acotadaSup f)\n  (hc : c \u2265 0)\n  : acotadaSup (fun x \u21a6 c * f x) :=\nby sorry\n<\/pre>\n<p><!--more--><\/p>\n<p><b>Demostraci\u00f3n en lenguaje natural<\/b><\/p>\n<p><br \/>\nUsaremos el siguiente lema:<br \/>\n&#92;begin{align}<br \/>\n\u00ab&#92;text{Si } a &#92;text{ es cota superior de } f &#92;text{ y } c \u2265 0&#92;text{, entonces } c\u00b7a &#92;text{ es cota superior de } c\u00b7f\u00bb<br \/>\n&#92;end{align}<\/p>\n<p>Puesto que &#92;(f&#92;) est\u00e1 acotada superiormente, tiene una cota superior. Sea &#92;(a&#92;) una de dichas cotas. Entonces, por el lema, &#92;(c\u00b7a&#92;) es una cota superior de &#92;(c\u00b7f&#92;). Por consiguiente, &#92;(c\u00b7f&#92;) est\u00e1 acotada superiormente.<\/p>\n<p><b>Demostraciones con Lean4<\/b><\/p>\n<pre lang=\"lean\">\nimport src.Cota_superior_de_producto_por_escalar\n\nvariable {f : \u211d \u2192 \u211d}\nvariable {c : \u211d}\n\n-- (acotadaSup f) afirma que f tiene cota superior.\ndef acotadaSup (f : \u211d \u2192 \u211d) :=\n  \u2203 a, CotaSuperior f a\n\n-- 1\u00aa demostraci\u00f3n\nexample\n  (hf : acotadaSup f)\n  (hc : c \u2265 0)\n  : acotadaSup (fun x \u21a6 c * f x) :=\nby\n  cases' hf with a ha\n  -- a : \u211d\n  -- ha : CotaSuperior f a\n  have h1 : CotaSuperior (fun x \u21a6 c * f x) (c * a) :=\n    CotaSuperior_mul ha hc\n  have h2 : \u2203 z, \u2200 x, (fun x \u21a6 c * f x) x \u2264 z :=\n    Exists.intro (c * a) h1\n  show acotadaSup (fun x \u21a6 c * f x)\n  exact h2\n\n-- 2\u00aa demostraci\u00f3n\nexample\n  (hf : acotadaSup f)\n  (hc : c \u2265 0)\n  : acotadaSup (fun x \u21a6 c * f x) :=\nby\n  cases' hf with a ha\n  -- a : \u211d\n  -- ha : CotaSuperior f a\n  use c * a\n  -- \u22a2 CotaSuperior (fun x => c * f x) (c * a)\n  apply CotaSuperior_mul ha hc\n\n-- 3\u00aa demostraci\u00f3n\nexample\n  (hf : acotadaSup f)\n  (hc : c \u2265 0)\n  : acotadaSup (fun x \u21a6 c * f x) :=\nby\n  rcases hf with \u27e8a, ha\u27e9\n  -- a : \u211d\n  -- ha : CotaSuperior f a\n  exact \u27e8c * a, CotaSuperior_mul ha hc\u27e9\n\n-- 4\u00aa demostraci\u00f3n\nexample\n  (hc : c \u2265 0)\n  : acotadaSup f \u2192 acotadaSup (fun x \u21a6 c * f x) :=\nby\n  rintro \u27e8a, ha\u27e9\n  -- a : \u211d\n  -- ha : CotaSuperior f a\n  exact \u27e8c * a, CotaSuperior_mul ha hc\u27e9\n\n-- 5\u00aa demostraci\u00f3n\nexample\n  (hc : c \u2265 0)\n  : acotadaSup f \u2192 acotadaSup (fun x \u21a6 c * f x) :=\nfun \u27e8a, ha\u27e9 \u21a6 \u27e8c * a, CotaSuperior_mul ha hc\u27e9\n\n-- Lemas usados\n-- ============\n\n-- #check (CotaSuperior_mul : CotaSuperior f a \u2192 c \u2265 0 \u2192 CotaSuperior (fun x \u21a6 c * f x) (c * a))\n<\/pre>\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. 29.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Demostrar con Lean4 que si &#92;(c \u2265 0&#92;) y &#92;(f&#92;) est\u00e1 acotada superiormente, entonces &#92;(c\u00b7f&#92;) tambi\u00e9n lo est\u00e1. Para ello, completar la siguiente teor\u00eda de Lean4: import src.Cota_superior_de_producto_por_escalar variable {f : \u211d \u2192 \u211d} variable {c : \u211d} &#8212; (acotadaSup f) afirma que f tiene cota superior. def acotadaSup (f : \u211d \u2192 \u211d) := \u2203 a, CotaSuperior f a example (hf : acotadaSup f) (hc : c \u2265 0) : acotadaSup (fun x \u21a6 c * f 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\/1747"}],"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=1747"}],"version-history":[{"count":6,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1747\/revisions"}],"predecessor-version":[{"id":1754,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1747\/revisions\/1754"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/media?parent=1747"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/categories?post=1747"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/tags?post=1747"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}