(* CS_de_y_le_x.thy -- Si (∀ ε > 0, y ≤ x + ε), entonces y ≤ x -- José A. Alonso Jiménez -- Sevilla, 2-septiembre-2024 -- ------------------------------------------------------------------ *) (* --------------------------------------------------------------------- -- Demostrar que -- (\\>0. y \ x + \) \ y \ x -- ------------------------------------------------------------------- *) theory CS_de_y_le_x imports Main HOL.Real begin (* 1\ demostración *) lemma fixes x y :: real shows "(\\>0. y \ x + \) \ y \ x" proof (rule impI) assume h1 : "(\\>0. y \ x + \)" show "y \ x" proof (rule ccontr) assume "\ (y \ x)" then have "x < y" by simp then have "(y - x) / 2 > 0" by simp then have "y \ x + (y - x) / 2" using h1 by blast then have "2 * y \ 2 * x + (y - x)" by argo then have "y \ x" by simp then show False using \\ (y \ x)\ by simp qed qed (* 2\ demostración *) lemma fixes x y :: real shows "(\\>0. y \ x + \) \ y \ x" proof (rule impI) assume h1 : "(\\>0. y \ x + \)" show "y \ x" proof (rule ccontr) assume "\ (y \ x)" then have "x < y" by simp then obtain z where hz : "x < z \ z < y" using Rats_dense_in_real by blast then have "0 < z -x" by simp then have "y \ x + (z - x)" using h1 by blast then have "y \ z" by simp then show False using hz by simp qed qed (* 3\ demostración *) lemma fixes x y :: real shows "(\\>0. y \ x + \) \ y \ x" proof (rule impI) assume h1 : "(\\>0. y \ x + \)" show "y \ x" proof (rule dense_le) fix z assume "z < y" then have "0 < y - z" by simp then have "y \ x + (y - z)" using h1 by simp then have "0 \ x - z" by simp then show "z \ x" by simp qed qed (* 4\ demostración *) lemma fixes x y :: real shows "(\\>0. y \ x + \) \ y \ x" by (simp add: field_le_epsilon) end