        {"id":1795,"date":"2023-11-10T06:00:23","date_gmt":"2023-11-10T04:00:23","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/?p=1795"},"modified":"2023-11-11T14:03:34","modified_gmt":"2023-11-11T12:03:34","slug":"10-nov-23","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/10-nov-23\/","title":{"rendered":"Si c \u2260 0, entonces la funci\u00f3n (x \u21a6 cx + d) es suprayectiva"},"content":{"rendered":"\n<p>Demostrar con Lean4 que si &#92;(c \u2260 0&#92;), entonces la funci\u00f3n &#92;(x \u21a6 cx + d&#92;) es suprayectiva.<\/p>\n<p>Para ello, completar la siguiente teor\u00eda de Lean4:<\/p>\n<pre lang=\"lean\">\nimport Mathlib.Data.Real.Basic\nvariable {c d : \u211d}\nopen Function\n\nexample\n  (h : c \u2260 0)\n  : Surjective (fun x \u21a6 c * x + d) :=\nby sorry\n<\/pre>\n<p><!--more--><\/p>\n<p><b>Demostraci\u00f3n en lenguaje natural<\/b><\/p>\n<p>Hay que demostrar que<br \/>\n&#92;[ (\u2200x \u2208 \u211d)(\u2203y \u2208 \u211d)[cy+d = x] &#92;]<br \/>\nPara &#92;(x \u2208 \u211d&#92;), sea &#92;(y = &#92;dfrac{x-d}{c}&#92;). Entonces,<br \/>\n&#92;begin{align}<br \/>\n   cy &amp;= c&#92;left(&#92;frac{x-d}{c}&#92;right)+d &#92;&#92;<br \/>\n      &amp;= (x-d)+d      &#92;&#92;<br \/>\n      &amp;= x<br \/>\n&#92;end{align}<\/p>\n<p><b>Demostraciones con Lean4<\/b><\/p>\n<pre lang=\"lean\">\nimport Mathlib.Data.Real.Basic\nvariable {c d : \u211d}\nopen Function\n\n-- 1\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : c \u2260 0)\n  : Surjective (fun x \u21a6 c * x + d) :=\nby\n  intro x\n  -- x : \u211d\n  -- \u22a2 \u2203 a, (fun x => c * x + d) a = x\n  use ((x - d) \/ c)\n  -- \u22a2 (fun x => c * x + d) ((x - d) \/ c) = x\n  dsimp\n  -- \u22a2 c * ((x - d) \/ c) + d = x\n  show c * ((x - d) \/ c) + d = x\n  calc c * ((x - d) \/ c) + d\n         = (x - d) + d := congrArg (. + d) (mul_div_cancel' (x - d) h)\n       _ = x           := sub_add_cancel x d\n\n-- 2\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : c \u2260 0)\n  : Surjective (fun x \u21a6 c * x + d) :=\nby\n  intro x\n  -- x : \u211d\n  -- \u22a2 \u2203 a, (fun x => c * x + d) a = x\n  use ((x - d) \/ c)\n  -- \u22a2 (fun x => c * x + d) ((x - d) \/ c) = x\n  dsimp\n  -- \u22a2 c * ((x - d) \/ c) + d = x\n  simp [mul_div_cancel', h]\n\n-- 3\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : c \u2260 0)\n  : Surjective (fun x \u21a6 c * x + d) :=\nby\n  intro x\n  -- x : \u211d\n  -- \u22a2 \u2203 a, (fun x => c * x + d) a = x\n  use ((x - d) \/ c)\n  -- \u22a2 (fun x => c * x + d) ((x - d) \/ c) = x\n  simp [mul_div_cancel', h]\n\n-- 4\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : c \u2260 0)\n  : Surjective (fun x \u21a6 c * x + d) :=\nfun x \u21a6 \u27e8(x - d) \/ c, by simp [mul_div_cancel', h]\u27e9\n\n-- Lemas usados\n-- ============\n\n-- variable (a b : \u211d)\n-- #check (mul_div_cancel' a : b \u2260 0 \u2192 b * (a \/ b) = a)\n-- #check (sub_add_cancel a b : a - b + b = a)\n<\/pre>\n<p><b>Demostraciones interactivas<\/b><\/p>\n<p>Se puede interactuar con las demostraciones anteriores en <a href=\"https:\/\/live.lean-lang.org\/#url=https:\/\/raw.githubusercontent.com\/jaalonso\/Calculemus2\/main\/src\/Producto_por_no_nula_y_suma_es_suprayectiva.lean\" rel=\"noopener noreferrer\" target=\"_blank\">Lean 4 Web<\/a>.<\/p>\n<p><b>Referencias<\/b><\/p>\n<ul>\n<li> J. Avigad y P. Massot. <a href=\"https:\/\/bit.ly\/3U4UjBk\">Mathematics in Lean<\/a>, p. 32.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Demostrar con Lean4 que si &#92;(c \u2260 0&#92;), entonces la funci\u00f3n &#92;(x \u21a6 cx + d&#92;) es suprayectiva. Para ello, completar la siguiente teor\u00eda de Lean4: import Mathlib.Data.Real.Basic variable {c d : \u211d} open Function example (h : c \u2260 0) : Surjective (fun x \u21a6 c * x + d) := by 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\/1795"}],"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=1795"}],"version-history":[{"count":5,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1795\/revisions"}],"predecessor-version":[{"id":1800,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1795\/revisions\/1800"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/media?parent=1795"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/categories?post=1795"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/tags?post=1795"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}