Metamath Proof Explorer


Theorem avgle

Description: The average of two numbers is less than or equal to at least one of them. (Contributed by NM, 9-Dec-2005) (Revised by Mario Carneiro, 28-May-2014)

Ref Expression
Assertion avgle ( ( 𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ ) → ( ( ( 𝐴 + 𝐵 ) / 2 ) ≤ 𝐴 ∨ ( ( 𝐴 + 𝐵 ) / 2 ) ≤ 𝐵 ) )

Proof

Step Hyp Ref Expression
1 letric ( ( 𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ ) → ( 𝐴𝐵𝐵𝐴 ) )
2 1 orcomd ( ( 𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ ) → ( 𝐵𝐴𝐴𝐵 ) )
3 avgle2 ( ( 𝐵 ∈ ℝ ∧ 𝐴 ∈ ℝ ) → ( 𝐵𝐴 ↔ ( ( 𝐵 + 𝐴 ) / 2 ) ≤ 𝐴 ) )
4 3 ancoms ( ( 𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ ) → ( 𝐵𝐴 ↔ ( ( 𝐵 + 𝐴 ) / 2 ) ≤ 𝐴 ) )
5 recn ( 𝐴 ∈ ℝ → 𝐴 ∈ ℂ )
6 recn ( 𝐵 ∈ ℝ → 𝐵 ∈ ℂ )
7 addcom ( ( 𝐴 ∈ ℂ ∧ 𝐵 ∈ ℂ ) → ( 𝐴 + 𝐵 ) = ( 𝐵 + 𝐴 ) )
8 5 6 7 syl2an ( ( 𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ ) → ( 𝐴 + 𝐵 ) = ( 𝐵 + 𝐴 ) )
9 8 oveq1d ( ( 𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ ) → ( ( 𝐴 + 𝐵 ) / 2 ) = ( ( 𝐵 + 𝐴 ) / 2 ) )
10 9 breq1d ( ( 𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ ) → ( ( ( 𝐴 + 𝐵 ) / 2 ) ≤ 𝐴 ↔ ( ( 𝐵 + 𝐴 ) / 2 ) ≤ 𝐴 ) )
11 4 10 bitr4d ( ( 𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ ) → ( 𝐵𝐴 ↔ ( ( 𝐴 + 𝐵 ) / 2 ) ≤ 𝐴 ) )
12 avgle2 ( ( 𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ ) → ( 𝐴𝐵 ↔ ( ( 𝐴 + 𝐵 ) / 2 ) ≤ 𝐵 ) )
13 11 12 orbi12d ( ( 𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ ) → ( ( 𝐵𝐴𝐴𝐵 ) ↔ ( ( ( 𝐴 + 𝐵 ) / 2 ) ≤ 𝐴 ∨ ( ( 𝐴 + 𝐵 ) / 2 ) ≤ 𝐵 ) ) )
14 2 13 mpbid ( ( 𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ ) → ( ( ( 𝐴 + 𝐵 ) / 2 ) ≤ 𝐴 ∨ ( ( 𝐴 + 𝐵 ) / 2 ) ≤ 𝐵 ) )