Metamath Proof Explorer


Theorem lemaxle

Description: A real number which is less than or equal to a second real number is less than or equal to the maximum/supremum of the second real number and a third real number. (Contributed by AV, 8-Jun-2021)

Ref Expression
Assertion lemaxle ( ( ( 𝐵 ∈ ℝ ∧ 𝐶 ∈ ℝ ) ∧ 𝐴 ∈ ℝ ∧ 𝐴𝐵 ) → 𝐴 ≤ if ( 𝐶𝐵 , 𝐵 , 𝐶 ) )

Proof

Step Hyp Ref Expression
1 max2 ( ( 𝐶 ∈ ℝ ∧ 𝐵 ∈ ℝ ) → 𝐵 ≤ if ( 𝐶𝐵 , 𝐵 , 𝐶 ) )
2 1 ancoms ( ( 𝐵 ∈ ℝ ∧ 𝐶 ∈ ℝ ) → 𝐵 ≤ if ( 𝐶𝐵 , 𝐵 , 𝐶 ) )
3 2 adantr ( ( ( 𝐵 ∈ ℝ ∧ 𝐶 ∈ ℝ ) ∧ 𝐴 ∈ ℝ ) → 𝐵 ≤ if ( 𝐶𝐵 , 𝐵 , 𝐶 ) )
4 simpr ( ( ( 𝐵 ∈ ℝ ∧ 𝐶 ∈ ℝ ) ∧ 𝐴 ∈ ℝ ) → 𝐴 ∈ ℝ )
5 simpll ( ( ( 𝐵 ∈ ℝ ∧ 𝐶 ∈ ℝ ) ∧ 𝐴 ∈ ℝ ) → 𝐵 ∈ ℝ )
6 ifcl ( ( 𝐵 ∈ ℝ ∧ 𝐶 ∈ ℝ ) → if ( 𝐶𝐵 , 𝐵 , 𝐶 ) ∈ ℝ )
7 6 adantr ( ( ( 𝐵 ∈ ℝ ∧ 𝐶 ∈ ℝ ) ∧ 𝐴 ∈ ℝ ) → if ( 𝐶𝐵 , 𝐵 , 𝐶 ) ∈ ℝ )
8 letr ( ( 𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ ∧ if ( 𝐶𝐵 , 𝐵 , 𝐶 ) ∈ ℝ ) → ( ( 𝐴𝐵𝐵 ≤ if ( 𝐶𝐵 , 𝐵 , 𝐶 ) ) → 𝐴 ≤ if ( 𝐶𝐵 , 𝐵 , 𝐶 ) ) )
9 4 5 7 8 syl3anc ( ( ( 𝐵 ∈ ℝ ∧ 𝐶 ∈ ℝ ) ∧ 𝐴 ∈ ℝ ) → ( ( 𝐴𝐵𝐵 ≤ if ( 𝐶𝐵 , 𝐵 , 𝐶 ) ) → 𝐴 ≤ if ( 𝐶𝐵 , 𝐵 , 𝐶 ) ) )
10 3 9 mpan2d ( ( ( 𝐵 ∈ ℝ ∧ 𝐶 ∈ ℝ ) ∧ 𝐴 ∈ ℝ ) → ( 𝐴𝐵𝐴 ≤ if ( 𝐶𝐵 , 𝐵 , 𝐶 ) ) )
11 10 3impia ( ( ( 𝐵 ∈ ℝ ∧ 𝐶 ∈ ℝ ) ∧ 𝐴 ∈ ℝ ∧ 𝐴𝐵 ) → 𝐴 ≤ if ( 𝐶𝐵 , 𝐵 , 𝐶 ) )