En ℝ, |x + y| ≤ |x| + |y|

Demostrar con Lean4 que en \(ℝ\),
\[ |x + y| ≤ |x| + |y| \]

Para ello, completar la siguiente teoría de Lean4:

Demostración en lenguaje natural

Se usarán los siguientes lemas
\begin{align}
&(∀ x ∈ ℝ)[0 ≤ x → |x| = x] \tag{L1} \\
&(∀ a, b, c, d ∈ ℝ)[a ≤ b ∧ c ≤ d → a + c ≤ b + d] \tag{L2} \\
&(∀ x ∈ ℝ)[x ≤ |x|] \tag{L3} \\
&(∀ x ∈ ℝ)[x < 0 → |x| = -x] \tag{L4} \\
&(∀ x, y ∈ ℝ)[-(x + y) = -x + -y] \tag{L5} \\
&(∀ x ∈ ℝ)[-x ≤ |x|] \tag{L6}
\end{align}

Se demostrará por casos según \(x + y ≥ 0\):

Primer caso: Supongamos que \(x + y ≥ 0\). Entonces,
\begin{align}
|x + y| &= x + y &&\text{[por L1]} \\
&≤ |x| + |y| &&\text{[por L2 y L3]}
\end{align}

Segundo caso: Supongamos que \(x + y < 0\). Entonces,
\begin{align}
|x + y| &= -(x + y) &&\text{[por L4]} \\
&= -x + -y &&\text{[por L5]} \\
&≤ |x| + |y| &&\text{[por L2 y L6]}
\end{align}

Demostraciones con Lean4

Demostraciones interactivas

Se puede interactuar con las demostraciones anteriores en Lean 4 Web.

Referencias

En Isabelle/HOL

Escribe un comentario