        {"id":1187,"date":"2022-11-09T18:02:45","date_gmt":"2022-11-09T16:02:45","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/?p=1187"},"modified":"2022-11-09T18:05:06","modified_gmt":"2022-11-09T16:05:06","slug":"09-nov-22","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/09-nov-22\/","title":{"rendered":"Si f es mon\u00f3tona y c \u2265 0, entonces c\u00b7f es mon\u00f3tona"},"content":{"rendered":"<p>Demostrar que si f es mon\u00f3tona y c \u2265 0, entonces c\u00b7f es mon\u00f3tona.<\/p>\n<p>Para ello, completar la siguiente teor\u00eda de Lean:<\/p>\n<pre lang=\"lean\">\nimport data.real.basic\n\nvariables (f : \u211d \u2192 \u211d)\nvariable  {c : \u211d}\n\nexample\n  (mf : monotone f)\n  (nnc : 0 \u2264 c)\n  : monotone (\u03bb x, c * f x) :=\nsorry\n<\/pre>\n<p><!--more--><\/p>\n<p><b>Soluciones con Lean<\/b><\/p>\n<pre lang=\"lean\">\nimport data.real.basic\n\nvariables (f : \u211d \u2192 \u211d)\nvariable  {c : \u211d}\n\n-- 1\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (mf : monotone f)\n  (nnc : 0 \u2264 c)\n  : monotone (\u03bb x, c * f x) :=\nbegin\n  have h1 : \u2200 a b, a \u2264 b \u2192 (\u03bb x, c * f x) a \u2264 (\u03bb x, c * f x) b,\n    { intros a b hab,\n      have h2 : f a \u2264 f b := mf hab,\n      have h3 : c * f a \u2264 c * f b := mul_le_mul_of_nonneg_left h2 nnc,\n      show (\u03bb x, c * f x) a \u2264 (\u03bb x, c * f x) b,\n        by exact h3, },\n  show monotone (\u03bb x, c * f x),\n    by exact h1,\nend\n\n-- 2\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (mf : monotone f)\n  (nnc : 0 \u2264 c)\n  : monotone (\u03bb x, c * f x) :=\nbegin\n  intros a b hab,\n  apply mul_le_mul_of_nonneg_left,\n  apply mf hab,\n  apply nnc\nend\n\n-- 3\u00aa demostraci\u00f3n\n-- ===============\n\nexample (mf : monotone f) (nnc : 0 \u2264 c) :\n  monotone (\u03bb x, c * f x) :=\n\u03bb a b hab, mul_le_mul_of_nonneg_left (mf hab) nnc\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\/Producto_de_un_positivo_por_una_funcion_monotona.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. 28.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Demostrar que si f es mon\u00f3tona y c \u2265 0, entonces c\u00b7f es mon\u00f3tona. Para ello, completar la siguiente teor\u00eda de Lean: import data.real.basic variables (f : \u211d \u2192 \u211d) variable {c : \u211d} example (mf : monotone f) (nnc : 0 \u2264 c) : monotone (\u03bb x, c * f x) := 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\/1187"}],"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=1187"}],"version-history":[{"count":1,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1187\/revisions"}],"predecessor-version":[{"id":1188,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1187\/revisions\/1188"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/media?parent=1187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/categories?post=1187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/tags?post=1187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}