Metamath Proof Explorer


Theorem lenegsq

Description: Comparison to a nonnegative number based on comparison to squares. (Contributed by NM, 16-Jan-2006)

Ref Expression
Assertion lenegsq ( ( 𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ ∧ 0 ≤ 𝐵 ) → ( ( 𝐴𝐵 ∧ - 𝐴𝐵 ) ↔ ( 𝐴 ↑ 2 ) ≤ ( 𝐵 ↑ 2 ) ) )

Proof

Step Hyp Ref Expression
1 recn ( 𝐴 ∈ ℝ → 𝐴 ∈ ℂ )
2 abscl ( 𝐴 ∈ ℂ → ( abs ‘ 𝐴 ) ∈ ℝ )
3 absge0 ( 𝐴 ∈ ℂ → 0 ≤ ( abs ‘ 𝐴 ) )
4 2 3 jca ( 𝐴 ∈ ℂ → ( ( abs ‘ 𝐴 ) ∈ ℝ ∧ 0 ≤ ( abs ‘ 𝐴 ) ) )
5 1 4 syl ( 𝐴 ∈ ℝ → ( ( abs ‘ 𝐴 ) ∈ ℝ ∧ 0 ≤ ( abs ‘ 𝐴 ) ) )
6 le2sq ( ( ( ( abs ‘ 𝐴 ) ∈ ℝ ∧ 0 ≤ ( abs ‘ 𝐴 ) ) ∧ ( 𝐵 ∈ ℝ ∧ 0 ≤ 𝐵 ) ) → ( ( abs ‘ 𝐴 ) ≤ 𝐵 ↔ ( ( abs ‘ 𝐴 ) ↑ 2 ) ≤ ( 𝐵 ↑ 2 ) ) )
7 5 6 sylan ( ( 𝐴 ∈ ℝ ∧ ( 𝐵 ∈ ℝ ∧ 0 ≤ 𝐵 ) ) → ( ( abs ‘ 𝐴 ) ≤ 𝐵 ↔ ( ( abs ‘ 𝐴 ) ↑ 2 ) ≤ ( 𝐵 ↑ 2 ) ) )
8 absle ( ( 𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ ) → ( ( abs ‘ 𝐴 ) ≤ 𝐵 ↔ ( - 𝐵𝐴𝐴𝐵 ) ) )
9 lenegcon1 ( ( 𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ ) → ( - 𝐴𝐵 ↔ - 𝐵𝐴 ) )
10 9 anbi1d ( ( 𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ ) → ( ( - 𝐴𝐵𝐴𝐵 ) ↔ ( - 𝐵𝐴𝐴𝐵 ) ) )
11 ancom ( ( - 𝐴𝐵𝐴𝐵 ) ↔ ( 𝐴𝐵 ∧ - 𝐴𝐵 ) )
12 10 11 bitr3di ( ( 𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ ) → ( ( - 𝐵𝐴𝐴𝐵 ) ↔ ( 𝐴𝐵 ∧ - 𝐴𝐵 ) ) )
13 8 12 bitrd ( ( 𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ ) → ( ( abs ‘ 𝐴 ) ≤ 𝐵 ↔ ( 𝐴𝐵 ∧ - 𝐴𝐵 ) ) )
14 13 adantrr ( ( 𝐴 ∈ ℝ ∧ ( 𝐵 ∈ ℝ ∧ 0 ≤ 𝐵 ) ) → ( ( abs ‘ 𝐴 ) ≤ 𝐵 ↔ ( 𝐴𝐵 ∧ - 𝐴𝐵 ) ) )
15 absresq ( 𝐴 ∈ ℝ → ( ( abs ‘ 𝐴 ) ↑ 2 ) = ( 𝐴 ↑ 2 ) )
16 15 breq1d ( 𝐴 ∈ ℝ → ( ( ( abs ‘ 𝐴 ) ↑ 2 ) ≤ ( 𝐵 ↑ 2 ) ↔ ( 𝐴 ↑ 2 ) ≤ ( 𝐵 ↑ 2 ) ) )
17 16 adantr ( ( 𝐴 ∈ ℝ ∧ ( 𝐵 ∈ ℝ ∧ 0 ≤ 𝐵 ) ) → ( ( ( abs ‘ 𝐴 ) ↑ 2 ) ≤ ( 𝐵 ↑ 2 ) ↔ ( 𝐴 ↑ 2 ) ≤ ( 𝐵 ↑ 2 ) ) )
18 7 14 17 3bitr3d ( ( 𝐴 ∈ ℝ ∧ ( 𝐵 ∈ ℝ ∧ 0 ≤ 𝐵 ) ) → ( ( 𝐴𝐵 ∧ - 𝐴𝐵 ) ↔ ( 𝐴 ↑ 2 ) ≤ ( 𝐵 ↑ 2 ) ) )
19 18 3impb ( ( 𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ ∧ 0 ≤ 𝐵 ) → ( ( 𝐴𝐵 ∧ - 𝐴𝐵 ) ↔ ( 𝐴 ↑ 2 ) ≤ ( 𝐵 ↑ 2 ) ) )