        {"id":1156,"date":"2022-10-28T06:00:16","date_gmt":"2022-10-28T04:00:16","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/?p=1156"},"modified":"2022-10-25T16:18:49","modified_gmt":"2022-10-25T14:18:49","slug":"si-r-es-un-anillo-ordenado-y-a-b-c-%e2%88%88-r-tales-que-a-%e2%89%a4-b-y-0-%e2%89%a4-c-entonces-a-c-%e2%89%a4-b-c","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/si-r-es-un-anillo-ordenado-y-a-b-c-%e2%88%88-r-tales-que-a-%e2%89%a4-b-y-0-%e2%89%a4-c-entonces-a-c-%e2%89%a4-b-c\/","title":{"rendered":"Si R es un anillo ordenado y a, b, c \u2208 R tales que a \u2264 b y 0 \u2264 c, entonces ac \u2264 bc"},"content":{"rendered":"<p>Demostrar que si R es un anillo ordenado y a, b, c \u2208 R tales que<\/p>\n<pre lang=\"text\">\n   a \u2264 b \n   0 \u2264 c\n<\/pre>\n<p>entonces<\/p>\n<pre lang=\"text\">\n   a * c \u2264 b * c\n<\/pre>\n<p>Para ello, completar la siguiente teor\u00eda de Lean:<\/p>\n<pre lang=\"lean\">\nimport algebra.order.ring\nvariables {R : Type*} [ordered_ring R]\nvariables a b c: R\n\nexample\n  (h1 : a \u2264 b)\n  (h2 : 0 \u2264 c)\n  : a * c \u2264 b * c :=\nsorry\n<\/pre>\n<p><b>Soluciones con Lean<\/b><\/p>\n<pre lang=\"lean\">\nimport algebra.order.ring\nvariables {R : Type*} [ordered_ring R]\nvariables a b c: R\n\n-- 1\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h1 : a \u2264 b)\n  (h2 : 0 \u2264 c)\n  : a * c \u2264 b * c :=\nbegin\n  have h3 : 0 \u2264 b - a :=\n    sub_nonneg.mpr h1,\n  have h4 : 0 \u2264 (b - a) * c :=\n    mul_nonneg h3 h2,\n  have h5 : (b - a) * c = b * c - a * c :=\n    sub_mul b a c,\n  have h6 : 0 \u2264 b * c - a * c :=\n    eq.trans_ge h5 h4,\n  show a * c \u2264 b * c,\n    by exact sub_nonneg.mp h6,\nend\n\n-- 2\u00aa demostraci\u00f3n\n-- ===============\n\nopen_locale classical\n\nexample\n  (h1 : a \u2264 b)\n  (h2 : 0 \u2264 c)\n  : a * c \u2264 b * c :=\nbegin\n  by_cases h3 : b \u2264 a,\n  { have h3a : a = b :=\n      le_antisymm h1 h3,\n    show a * c \u2264 b * c,\n      by rw h3a },\n  { by_cases h4 : c = 0,\n    { calc a * c = a * 0 : by rw h4\n             ... = 0     : by rw mul_zero\n             ... \u2264 0     : le_refl 0\n             ... = b * 0 : by rw mul_zero\n             ... = b * c : by {congr ; rw h4}},\n    { apply le_of_lt,\n      apply mul_lt_mul_of_pos_right,\n      { show a < b,\n          by exact lt_of_le_not_le h1 h3 },\n      { show 0 < c,\n          by exact lt_of_le_of_ne h2 (ne.symm h4) }}},\nend\n\n-- 3\u00aa demostraci\u00f3n\nexample\n  (h1 : a \u2264 b)\n  (h2 : 0 \u2264 c)\n  : a * c \u2264 b * c :=\n-- by library_search\nmul_le_mul_of_nonneg_right h1 h2\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_desigualdad_por_no_negativo.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. 23.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Demostrar que si R es un anillo ordenado y a, b, c \u2208 R tales que a \u2264 b 0 \u2264 c entonces a * c \u2264 b * c Para ello, completar la siguiente teor\u00eda de Lean: import algebra.order.ring variables {R : Type*} [ordered_ring R] variables a b c: R example (h1 : a \u2264 b) (h2 : 0 \u2264 c) : a * c \u2264 b * c := sorry Soluciones con Lean import algebra.order.ring variables {R : Type*} [ordered_ring R] variables a b c: R &#8212; 1\u00aa demostraci\u00f3n &#8212; =============== example (h1 : a \u2264 b) (h2 : 0 \u2264 c) : a * c \u2264 b * c := begin have h3 : 0 \u2264 b &#8211; a := sub_nonneg.mpr h1,&#8230;<\/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":[294],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1156"}],"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=1156"}],"version-history":[{"count":4,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1156\/revisions"}],"predecessor-version":[{"id":1160,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1156\/revisions\/1160"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/media?parent=1156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/categories?post=1156"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/tags?post=1156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}