        {"id":1016,"date":"2022-09-06T06:00:13","date_gmt":"2022-09-06T04:00:13","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/?p=1016"},"modified":"2022-09-11T13:57:05","modified_gmt":"2022-09-11T11:57:05","slug":"si-r-es-un-anillo-y-ab%e2%88%88r-tales-que-ab0-entonces-ab","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/si-r-es-un-anillo-y-ab%e2%88%88r-tales-que-ab0-entonces-ab\/","title":{"rendered":"Si R es un anillo y a,b\u2208R tales que a+b=0, entonces -a=b"},"content":{"rendered":"<p>Demostrar que Si R es un anillo y a, b \u2208 R tales que<\/p>\n<pre lang=\"text\">\na + b = 0\n<\/pre>\n<p>entonces<\/p>\n<pre lang=\"text\">\n-a = b\n<\/pre>\n<p>Para ello, completar la siguiente teor\u00eda de Lean:<\/p>\n<pre lang=\"lean\">\nimport algebra.ring\n\nvariables {R : Type*} [ring R]\nvariables {a b : R}\n\nexample\n  (h : a + b = 0)\n  : -a = b :=\nsorry\n<\/pre>\n<p><!--more--><\/p>\n<p><b>Soluciones con Lean<\/b><\/p>\n<pre lang=\"lean\">\nimport algebra.ring\n\nvariables {R : Type*} [ring R]\nvariables {a b : R}\n\n-- 1\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : a + b = 0)\n  : -a = b :=\ncalc\n  -a  = -a + 0       : (add_zero (-a)).symm\n  ... = -a + (a + b) : congr_arg (\u03bb x, -a +x) h.symm\n  ... = b            : neg_add_cancel_left a b\n\n-- 2\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : a + b = 0)\n  : -a = b :=\ncalc\n  -a  = -a + 0       : by rw add_zero\n  ... = -a + (a + b) : by rw h\n  ... = b            : by rw neg_add_cancel_left\n\n-- 3\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : a + b = 0)\n  : -a = b :=\ncalc\n  -a  = -a + 0       : by simp\n  ... = -a + (a + b) : by simp [h]\n  ... = b            : by simp\n\n-- 4\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : a + b = 0)\n  : -a = b :=\n-- by library_search\nadd_eq_zero_iff_neg_eq.mp h\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_cero_implica_opuestos.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. 12.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Demostrar que Si R es un anillo y a, b \u2208 R tales que a + b = 0 entonces -a = b Para ello, completar la siguiente teor\u00eda de Lean: import algebra.ring variables {R : Type*} [ring R] variables {a b : R} example (h : a + b = 0) : -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":[284],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1016"}],"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=1016"}],"version-history":[{"count":4,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1016\/revisions"}],"predecessor-version":[{"id":1086,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1016\/revisions\/1086"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/media?parent=1016"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/categories?post=1016"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/tags?post=1016"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}