Metamath Proof Explorer


Theorem rightval

Description: The value of the right options function. (Contributed by Scott Fenton, 9-Oct-2024)

Ref Expression
Assertion rightval ( R ‘ 𝐴 ) = { 𝑥 ∈ ( O ‘ ( bday 𝐴 ) ) ∣ 𝐴 <s 𝑥 }

Proof

Step Hyp Ref Expression
1 2fveq3 ( 𝑦 = 𝐴 → ( O ‘ ( bday 𝑦 ) ) = ( O ‘ ( bday 𝐴 ) ) )
2 breq1 ( 𝑦 = 𝐴 → ( 𝑦 <s 𝑥𝐴 <s 𝑥 ) )
3 1 2 rabeqbidv ( 𝑦 = 𝐴 → { 𝑥 ∈ ( O ‘ ( bday 𝑦 ) ) ∣ 𝑦 <s 𝑥 } = { 𝑥 ∈ ( O ‘ ( bday 𝐴 ) ) ∣ 𝐴 <s 𝑥 } )
4 df-right R = ( 𝑦 No ↦ { 𝑥 ∈ ( O ‘ ( bday 𝑦 ) ) ∣ 𝑦 <s 𝑥 } )
5 fvex ( O ‘ ( bday 𝐴 ) ) ∈ V
6 5 rabex { 𝑥 ∈ ( O ‘ ( bday 𝐴 ) ) ∣ 𝐴 <s 𝑥 } ∈ V
7 3 4 6 fvmpt ( 𝐴 No → ( R ‘ 𝐴 ) = { 𝑥 ∈ ( O ‘ ( bday 𝐴 ) ) ∣ 𝐴 <s 𝑥 } )
8 4 fvmptndm ( ¬ 𝐴 No → ( R ‘ 𝐴 ) = ∅ )
9 bdaydm dom bday = No
10 9 eleq2i ( 𝐴 ∈ dom bday 𝐴 No )
11 ndmfv ( ¬ 𝐴 ∈ dom bday → ( bday 𝐴 ) = ∅ )
12 10 11 sylnbir ( ¬ 𝐴 No → ( bday 𝐴 ) = ∅ )
13 12 fveq2d ( ¬ 𝐴 No → ( O ‘ ( bday 𝐴 ) ) = ( O ‘ ∅ ) )
14 old0 ( O ‘ ∅ ) = ∅
15 13 14 eqtrdi ( ¬ 𝐴 No → ( O ‘ ( bday 𝐴 ) ) = ∅ )
16 15 rabeqdv ( ¬ 𝐴 No → { 𝑥 ∈ ( O ‘ ( bday 𝐴 ) ) ∣ 𝐴 <s 𝑥 } = { 𝑥 ∈ ∅ ∣ 𝐴 <s 𝑥 } )
17 rab0 { 𝑥 ∈ ∅ ∣ 𝐴 <s 𝑥 } = ∅
18 16 17 eqtrdi ( ¬ 𝐴 No → { 𝑥 ∈ ( O ‘ ( bday 𝐴 ) ) ∣ 𝐴 <s 𝑥 } = ∅ )
19 8 18 eqtr4d ( ¬ 𝐴 No → ( R ‘ 𝐴 ) = { 𝑥 ∈ ( O ‘ ( bday 𝐴 ) ) ∣ 𝐴 <s 𝑥 } )
20 7 19 pm2.61i ( R ‘ 𝐴 ) = { 𝑥 ∈ ( O ‘ ( bday 𝐴 ) ) ∣ 𝐴 <s 𝑥 }