Metamath Proof Explorer


Theorem xrmaxeq

Description: The maximum of two extended reals is equal to the first if the first is bigger. (Contributed by Mario Carneiro, 25-Mar-2015)

Ref Expression
Assertion xrmaxeq ( ( 𝐴 ∈ ℝ*𝐵 ∈ ℝ*𝐵𝐴 ) → if ( 𝐴𝐵 , 𝐵 , 𝐴 ) = 𝐴 )

Proof

Step Hyp Ref Expression
1 xrletri3 ( ( 𝐵 ∈ ℝ*𝐴 ∈ ℝ* ) → ( 𝐵 = 𝐴 ↔ ( 𝐵𝐴𝐴𝐵 ) ) )
2 1 ancoms ( ( 𝐴 ∈ ℝ*𝐵 ∈ ℝ* ) → ( 𝐵 = 𝐴 ↔ ( 𝐵𝐴𝐴𝐵 ) ) )
3 2 biimpar ( ( ( 𝐴 ∈ ℝ*𝐵 ∈ ℝ* ) ∧ ( 𝐵𝐴𝐴𝐵 ) ) → 𝐵 = 𝐴 )
4 3 anassrs ( ( ( ( 𝐴 ∈ ℝ*𝐵 ∈ ℝ* ) ∧ 𝐵𝐴 ) ∧ 𝐴𝐵 ) → 𝐵 = 𝐴 )
5 4 ifeq1da ( ( ( 𝐴 ∈ ℝ*𝐵 ∈ ℝ* ) ∧ 𝐵𝐴 ) → if ( 𝐴𝐵 , 𝐵 , 𝐴 ) = if ( 𝐴𝐵 , 𝐴 , 𝐴 ) )
6 5 3impa ( ( 𝐴 ∈ ℝ*𝐵 ∈ ℝ*𝐵𝐴 ) → if ( 𝐴𝐵 , 𝐵 , 𝐴 ) = if ( 𝐴𝐵 , 𝐴 , 𝐴 ) )
7 ifid if ( 𝐴𝐵 , 𝐴 , 𝐴 ) = 𝐴
8 6 7 eqtrdi ( ( 𝐴 ∈ ℝ*𝐵 ∈ ℝ*𝐵𝐴 ) → if ( 𝐴𝐵 , 𝐵 , 𝐴 ) = 𝐴 )