        {"id":1163,"date":"2022-11-01T06:00:40","date_gmt":"2022-11-01T04:00:40","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/?p=1163"},"modified":"2022-10-27T15:52:36","modified_gmt":"2022-10-27T13:52:36","slug":"si-xy%ce%b5-%e2%88%88-%e2%84%9d-tales-que-0-%ce%b5-%e2%89%a4-1-x-%ce%b5-y-y-%ce%b5-entonces-xy-%ce%b5","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/si-xy%ce%b5-%e2%88%88-%e2%84%9d-tales-que-0-%ce%b5-%e2%89%a4-1-x-%ce%b5-y-y-%ce%b5-entonces-xy-%ce%b5\/","title":{"rendered":"Si x,y,\u03b5 \u2208 \u211d tales que 0 < \u03b5 \u2264 1, |x| < \u03b5 y |y| < \u03b5, entonces |x*y| < \u03b5"},"content":{"rendered":"<p>Demostrar que si x,y,\u03b5 \u2208 \u211d tales que 0 &lt; \u03b5 \u2264 1, |x| &lt; \u03b5 y |y| &lt; \u03b5, entonces |x*y| &lt; \u03b5.<\/p>\n<p>Para ello, completar la siguiente teor\u00eda de Lean:<\/p>\n<pre lang=\"lean\">\nimport data.real.basic tactic\n\nexample :\n  \u2200 {x y \u03b5 : \u211d}, 0 < \u03b5 \u2192 \u03b5 \u2264 1 \u2192 |x| < \u03b5 \u2192 |y| < \u03b5 \u2192 |x * y| < \u03b5 :=\nsorry\n<\/pre>\n<p><!--more--><\/p>\n<p><b>Soluciones con Lean<\/b><\/p>\n<pre lang=\"lean\">\nimport data.real.basic tactic\n\n-- 1\u00aa demostraci\u00f3n\n-- ===============\n\nexample :\n  \u2200 {x y \u03b5 : \u211d}, 0 < \u03b5 \u2192 \u03b5 \u2264 1 \u2192 |x| < \u03b5 \u2192 |y| < \u03b5 \u2192 |x * y| < \u03b5 :=\nbegin\n  intros x y \u03b5 he1 he2 hx hy,\n  by_cases h : (|x| = 0),\n  { calc |x * y|\n         = |x| * |y| : abs_mul x y\n     ... = 0 * |y|   : by rw h\n     ... = 0         : zero_mul (abs y)\n     ... < \u03b5         : he1 },\n  { have h1 : 0 < |x|,\n    { have h2 : 0 \u2264 |x| := abs_nonneg x,\n      show 0 < |x|,\n        exact lt_of_le_of_ne h2 (ne.symm h) },\n    calc |x * y|\n         = |x| * |y| : abs_mul x y\n     ... < |x| * \u03b5   : (mul_lt_mul_left h1).mpr hy\n     ... < \u03b5 * \u03b5     : (mul_lt_mul_right he1).mpr hx\n     ... \u2264 1 * \u03b5     : (mul_le_mul_right he1).mpr he2\n     ... = \u03b5         : one_mul \u03b5 },\nend\n\n-- 2\u00aa demostraci\u00f3n\n-- ===============\n\nexample :\n  \u2200 {x y \u03b5 : \u211d}, 0 < \u03b5 \u2192 \u03b5 \u2264 1 \u2192 |x| < \u03b5 \u2192 |y| < \u03b5 \u2192 |x * y| < \u03b5 :=\nbegin\n  intros x y \u03b5 he1 he2 hx hy,\n  by_cases h : (|x| = 0),\n  { calc |x * y|\n         = |x| * |y| : by apply abs_mul\n     ... = 0 * |y|   : by rw h\n     ... = 0         : by apply zero_mul\n     ... < \u03b5         : by apply he1 },\n  { have h1 : 0 < |x|,\n      { have h2 : 0 \u2264 |x|,\n          apply abs_nonneg,\n        exact lt_of_le_of_ne h2 (ne.symm h) },\n    calc |x * y|\n         = |x| * |y| : by rw abs_mul\n     ... < |x| * \u03b5   : by apply (mul_lt_mul_left h1).mpr hy\n     ... < \u03b5 * \u03b5     : by apply (mul_lt_mul_right he1).mpr hx\n     ... \u2264 1 * \u03b5     : by apply (mul_le_mul_right he1).mpr he2\n     ... = \u03b5         : by rw [one_mul] },\nend\n\n-- 3\u00aa demostraci\u00f3n\n-- ===============\n\nexample :\n  \u2200 {x y \u03b5 : \u211d}, 0 < \u03b5 \u2192 \u03b5 \u2264 1 \u2192 |x| < \u03b5 \u2192 |y| < \u03b5 \u2192 |x * y| < \u03b5 :=\nbegin\n  intros x y \u03b5 he1 he2 hx hy,\n  by_cases (|x| = 0),\n  { by finish },\n  { have : 0 < |x|, by finish,\n    calc |x * y|\n         = |x| * |y| : by rw abs_mul\n     ... < |x| * \u03b5   : by finish\n     ... \u2264 1 * \u03b5     : by nlinarith\n     ... = \u03b5         : by finish },\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\/Cota_del_valor_absoluto_del_producto.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. 26.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Demostrar que si x,y,\u03b5 \u2208 \u211d tales que 0 &lt; \u03b5 \u2264 1, |x| &lt; \u03b5 y |y| &lt; \u03b5, entonces |x*y| &lt; \u03b5. Para ello, completar la siguiente teor\u00eda de Lean: import data.real.basic tactic example : \u2200 {x y \u03b5 : \u211d}, 0 < \u03b5 \u2192 \u03b5 \u2264 1 \u2192 |x| < \u03b5 \u2192 |y| < \u03b5 \u2192 |x * y| < \u03b5 := sorry\n<\/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\/1163"}],"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=1163"}],"version-history":[{"count":1,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1163\/revisions"}],"predecessor-version":[{"id":1164,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1163\/revisions\/1164"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/media?parent=1163"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/categories?post=1163"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/tags?post=1163"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}