Metamath Proof Explorer


Theorem stdbdmetval

Description: Value of the standard bounded metric. (Contributed by Mario Carneiro, 26-Aug-2015)

Ref Expression
Hypothesis stdbdmet.1 𝐷 = ( 𝑥𝑋 , 𝑦𝑋 ↦ if ( ( 𝑥 𝐶 𝑦 ) ≤ 𝑅 , ( 𝑥 𝐶 𝑦 ) , 𝑅 ) )
Assertion stdbdmetval ( ( 𝑅𝑉𝐴𝑋𝐵𝑋 ) → ( 𝐴 𝐷 𝐵 ) = if ( ( 𝐴 𝐶 𝐵 ) ≤ 𝑅 , ( 𝐴 𝐶 𝐵 ) , 𝑅 ) )

Proof

Step Hyp Ref Expression
1 stdbdmet.1 𝐷 = ( 𝑥𝑋 , 𝑦𝑋 ↦ if ( ( 𝑥 𝐶 𝑦 ) ≤ 𝑅 , ( 𝑥 𝐶 𝑦 ) , 𝑅 ) )
2 ovex ( 𝐴 𝐶 𝐵 ) ∈ V
3 ifexg ( ( ( 𝐴 𝐶 𝐵 ) ∈ V ∧ 𝑅𝑉 ) → if ( ( 𝐴 𝐶 𝐵 ) ≤ 𝑅 , ( 𝐴 𝐶 𝐵 ) , 𝑅 ) ∈ V )
4 2 3 mpan ( 𝑅𝑉 → if ( ( 𝐴 𝐶 𝐵 ) ≤ 𝑅 , ( 𝐴 𝐶 𝐵 ) , 𝑅 ) ∈ V )
5 oveq12 ( ( 𝑥 = 𝐴𝑦 = 𝐵 ) → ( 𝑥 𝐶 𝑦 ) = ( 𝐴 𝐶 𝐵 ) )
6 5 breq1d ( ( 𝑥 = 𝐴𝑦 = 𝐵 ) → ( ( 𝑥 𝐶 𝑦 ) ≤ 𝑅 ↔ ( 𝐴 𝐶 𝐵 ) ≤ 𝑅 ) )
7 6 5 ifbieq1d ( ( 𝑥 = 𝐴𝑦 = 𝐵 ) → if ( ( 𝑥 𝐶 𝑦 ) ≤ 𝑅 , ( 𝑥 𝐶 𝑦 ) , 𝑅 ) = if ( ( 𝐴 𝐶 𝐵 ) ≤ 𝑅 , ( 𝐴 𝐶 𝐵 ) , 𝑅 ) )
8 7 1 ovmpoga ( ( 𝐴𝑋𝐵𝑋 ∧ if ( ( 𝐴 𝐶 𝐵 ) ≤ 𝑅 , ( 𝐴 𝐶 𝐵 ) , 𝑅 ) ∈ V ) → ( 𝐴 𝐷 𝐵 ) = if ( ( 𝐴 𝐶 𝐵 ) ≤ 𝑅 , ( 𝐴 𝐶 𝐵 ) , 𝑅 ) )
9 4 8 syl3an3 ( ( 𝐴𝑋𝐵𝑋𝑅𝑉 ) → ( 𝐴 𝐷 𝐵 ) = if ( ( 𝐴 𝐶 𝐵 ) ≤ 𝑅 , ( 𝐴 𝐶 𝐵 ) , 𝑅 ) )
10 9 3comr ( ( 𝑅𝑉𝐴𝑋𝐵𝑋 ) → ( 𝐴 𝐷 𝐵 ) = if ( ( 𝐴 𝐶 𝐵 ) ≤ 𝑅 , ( 𝐴 𝐶 𝐵 ) , 𝑅 ) )