        {"id":1124,"date":"2022-10-10T06:00:07","date_gmt":"2022-10-10T04:00:07","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/?p=1124"},"modified":"2022-10-04T18:26:54","modified_gmt":"2022-10-04T16:26:54","slug":"si-w-x-y-z-%e2%88%88-%e2%84%95-tales-que-x-%e2%88%a3-w-entonces-x-%e2%88%a3-yxz-x%c2%b2-w%c2%b2","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/si-w-x-y-z-%e2%88%88-%e2%84%95-tales-que-x-%e2%88%a3-w-entonces-x-%e2%88%a3-yxz-x%c2%b2-w%c2%b2\/","title":{"rendered":"Si w, x, y, z \u2208 \u2115 tales que x \u2223 w, entonces x \u2223 yxz + x\u00b2 + w\u00b2"},"content":{"rendered":"<p>Demostrar que Si w, x, y, z \u2208 \u2115 tales que x \u2223 w, entonces x \u2223 yxz + x\u00b2 + w\u00b2<\/p>\n<p>Para ello, completar la siguiente teor\u00eda de Lean:<\/p>\n<pre lang=\"lean\">\nimport data.nat.gcd\n\nvariables w x y z : \u2115\n\nexample\n  (h : x \u2223 w)\n  : x \u2223 y * (x * z) + x^2 + w^2 :=\nsorry\n<\/pre>\n<p><!--more--><\/p>\n<p><b>Soluciones con Lean<\/b><\/p>\n<pre lang=\"lean\">\nimport data.nat.gcd\n\nvariables w x y z : \u2115\n\n-- 1\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : x \u2223 w)\n  : x \u2223 y * (x * z) + x^2 + w^2 :=\nbegin\n  have h1 : x \u2223 x * z,\n    by exact dvd.intro z rfl,\n  have h2 : x \u2223 y * (x * z),\n    by exact dvd_mul_of_dvd_right h1 y,\n  have h3 : x \u2223 x^2,\n    by apply dvd_mul_right,\n  have h4 : x \u2223 w * w,\n    by exact dvd_mul_of_dvd_left h w,\n  have h5 : x \u2223 w^2,\n    by rwa \u2190 pow_two w at h4,\n  have h6 : x \u2223 y * (x * z) + x^2,\n    by exact dvd_add h2 h3,\n  show x \u2223 y * (x * z) + x^2 + w^2,\n    by exact dvd_add h6 h5,\nend\n\n-- 2\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : x \u2223 w)\n  : x \u2223 y * (x * z) + x^2 + w^2 :=\nbegin\n  apply dvd_add,\n  { apply dvd_add,\n    { apply dvd_mul_of_dvd_right,\n      apply dvd_mul_right, },\n    { rw pow_two,\n      apply dvd_mul_right, }},\n  { rw pow_two,\n    apply dvd_mul_of_dvd_left h, },\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\/Expresion_divisible.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. 20.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Demostrar que Si w, x, y, z \u2208 \u2115 tales que x \u2223 w, entonces x \u2223 yxz + x\u00b2 + w\u00b2 Para ello, completar la siguiente teor\u00eda de Lean: import data.nat.gcd variables w x y z : \u2115 example (h : x \u2223 w) : x \u2223 y * (x * z) + x^2 + w^2 := 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":[291],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1124"}],"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=1124"}],"version-history":[{"count":1,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1124\/revisions"}],"predecessor-version":[{"id":1125,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1124\/revisions\/1125"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/media?parent=1124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/categories?post=1124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/tags?post=1124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}