Metamath Proof Explorer


Theorem mapdhval

Description: Lemmma for ~? mapdh . (Contributed by NM, 3-Apr-2015) (Revised by Mario Carneiro, 6-May-2015)

Ref Expression
Hypotheses mapdh.q 𝑄 = ( 0g𝐶 )
mapdh.i 𝐼 = ( 𝑥 ∈ V ↦ if ( ( 2nd𝑥 ) = 0 , 𝑄 , ( 𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑥 ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑥 ) ) ( 2nd𝑥 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑥 ) ) 𝑅 ) } ) ) ) ) )
mapdh.x ( 𝜑𝑋𝐴 )
mapdh.f ( 𝜑𝐹𝐵 )
mapdh.y ( 𝜑𝑌𝐸 )
Assertion mapdhval ( 𝜑 → ( 𝐼 ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) = if ( 𝑌 = 0 , 𝑄 , ( 𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { 𝑌 } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( 𝑋 𝑌 ) } ) ) = ( 𝐽 ‘ { ( 𝐹 𝑅 ) } ) ) ) ) )

Proof

Step Hyp Ref Expression
1 mapdh.q 𝑄 = ( 0g𝐶 )
2 mapdh.i 𝐼 = ( 𝑥 ∈ V ↦ if ( ( 2nd𝑥 ) = 0 , 𝑄 , ( 𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑥 ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑥 ) ) ( 2nd𝑥 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑥 ) ) 𝑅 ) } ) ) ) ) )
3 mapdh.x ( 𝜑𝑋𝐴 )
4 mapdh.f ( 𝜑𝐹𝐵 )
5 mapdh.y ( 𝜑𝑌𝐸 )
6 otex 𝑋 , 𝐹 , 𝑌 ⟩ ∈ V
7 fveq2 ( 𝑥 = ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ → ( 2nd𝑥 ) = ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) )
8 7 eqeq1d ( 𝑥 = ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ → ( ( 2nd𝑥 ) = 0 ↔ ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) = 0 ) )
9 7 sneqd ( 𝑥 = ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ → { ( 2nd𝑥 ) } = { ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) } )
10 9 fveq2d ( 𝑥 = ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ → ( 𝑁 ‘ { ( 2nd𝑥 ) } ) = ( 𝑁 ‘ { ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) } ) )
11 10 fveqeq2d ( 𝑥 = ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ → ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑥 ) } ) ) = ( 𝐽 ‘ { } ) ↔ ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) } ) ) = ( 𝐽 ‘ { } ) ) )
12 fveq2 ( 𝑥 = ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ → ( 1st𝑥 ) = ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) )
13 12 fveq2d ( 𝑥 = ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ → ( 1st ‘ ( 1st𝑥 ) ) = ( 1st ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) )
14 13 7 oveq12d ( 𝑥 = ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ → ( ( 1st ‘ ( 1st𝑥 ) ) ( 2nd𝑥 ) ) = ( ( 1st ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) )
15 14 sneqd ( 𝑥 = ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ → { ( ( 1st ‘ ( 1st𝑥 ) ) ( 2nd𝑥 ) ) } = { ( ( 1st ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) } )
16 15 fveq2d ( 𝑥 = ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ → ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑥 ) ) ( 2nd𝑥 ) ) } ) = ( 𝑁 ‘ { ( ( 1st ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) } ) )
17 16 fveq2d ( 𝑥 = ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ → ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑥 ) ) ( 2nd𝑥 ) ) } ) ) = ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) } ) ) )
18 12 fveq2d ( 𝑥 = ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ → ( 2nd ‘ ( 1st𝑥 ) ) = ( 2nd ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) )
19 18 oveq1d ( 𝑥 = ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ → ( ( 2nd ‘ ( 1st𝑥 ) ) 𝑅 ) = ( ( 2nd ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) 𝑅 ) )
20 19 sneqd ( 𝑥 = ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ → { ( ( 2nd ‘ ( 1st𝑥 ) ) 𝑅 ) } = { ( ( 2nd ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) 𝑅 ) } )
21 20 fveq2d ( 𝑥 = ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ → ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑥 ) ) 𝑅 ) } ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) 𝑅 ) } ) )
22 17 21 eqeq12d ( 𝑥 = ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ → ( ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑥 ) ) ( 2nd𝑥 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑥 ) ) 𝑅 ) } ) ↔ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) 𝑅 ) } ) ) )
23 11 22 anbi12d ( 𝑥 = ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ → ( ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑥 ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑥 ) ) ( 2nd𝑥 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑥 ) ) 𝑅 ) } ) ) ↔ ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) 𝑅 ) } ) ) ) )
24 23 riotabidv ( 𝑥 = ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ → ( 𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑥 ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑥 ) ) ( 2nd𝑥 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑥 ) ) 𝑅 ) } ) ) ) = ( 𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) 𝑅 ) } ) ) ) )
25 8 24 ifbieq2d ( 𝑥 = ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ → if ( ( 2nd𝑥 ) = 0 , 𝑄 , ( 𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑥 ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑥 ) ) ( 2nd𝑥 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑥 ) ) 𝑅 ) } ) ) ) ) = if ( ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) = 0 , 𝑄 , ( 𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) 𝑅 ) } ) ) ) ) )
26 1 fvexi 𝑄 ∈ V
27 riotaex ( 𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) 𝑅 ) } ) ) ) ∈ V
28 26 27 ifex if ( ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) = 0 , 𝑄 , ( 𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) 𝑅 ) } ) ) ) ) ∈ V
29 25 2 28 fvmpt ( ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ∈ V → ( 𝐼 ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) = if ( ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) = 0 , 𝑄 , ( 𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) 𝑅 ) } ) ) ) ) )
30 6 29 mp1i ( 𝜑 → ( 𝐼 ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) = if ( ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) = 0 , 𝑄 , ( 𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) 𝑅 ) } ) ) ) ) )
31 ot3rdg ( 𝑌𝐸 → ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) = 𝑌 )
32 5 31 syl ( 𝜑 → ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) = 𝑌 )
33 32 eqeq1d ( 𝜑 → ( ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) = 0𝑌 = 0 ) )
34 32 sneqd ( 𝜑 → { ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) } = { 𝑌 } )
35 34 fveq2d ( 𝜑 → ( 𝑁 ‘ { ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) } ) = ( 𝑁 ‘ { 𝑌 } ) )
36 35 fveqeq2d ( 𝜑 → ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) } ) ) = ( 𝐽 ‘ { } ) ↔ ( 𝑀 ‘ ( 𝑁 ‘ { 𝑌 } ) ) = ( 𝐽 ‘ { } ) ) )
37 ot1stg ( ( 𝑋𝐴𝐹𝐵𝑌𝐸 ) → ( 1st ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) = 𝑋 )
38 3 4 5 37 syl3anc ( 𝜑 → ( 1st ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) = 𝑋 )
39 38 32 oveq12d ( 𝜑 → ( ( 1st ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) = ( 𝑋 𝑌 ) )
40 39 sneqd ( 𝜑 → { ( ( 1st ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) } = { ( 𝑋 𝑌 ) } )
41 40 fveq2d ( 𝜑 → ( 𝑁 ‘ { ( ( 1st ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) } ) = ( 𝑁 ‘ { ( 𝑋 𝑌 ) } ) )
42 41 fveq2d ( 𝜑 → ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) } ) ) = ( 𝑀 ‘ ( 𝑁 ‘ { ( 𝑋 𝑌 ) } ) ) )
43 ot2ndg ( ( 𝑋𝐴𝐹𝐵𝑌𝐸 ) → ( 2nd ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) = 𝐹 )
44 3 4 5 43 syl3anc ( 𝜑 → ( 2nd ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) = 𝐹 )
45 44 oveq1d ( 𝜑 → ( ( 2nd ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) 𝑅 ) = ( 𝐹 𝑅 ) )
46 45 sneqd ( 𝜑 → { ( ( 2nd ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) 𝑅 ) } = { ( 𝐹 𝑅 ) } )
47 46 fveq2d ( 𝜑 → ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) 𝑅 ) } ) = ( 𝐽 ‘ { ( 𝐹 𝑅 ) } ) )
48 42 47 eqeq12d ( 𝜑 → ( ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) 𝑅 ) } ) ↔ ( 𝑀 ‘ ( 𝑁 ‘ { ( 𝑋 𝑌 ) } ) ) = ( 𝐽 ‘ { ( 𝐹 𝑅 ) } ) ) )
49 36 48 anbi12d ( 𝜑 → ( ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) 𝑅 ) } ) ) ↔ ( ( 𝑀 ‘ ( 𝑁 ‘ { 𝑌 } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( 𝑋 𝑌 ) } ) ) = ( 𝐽 ‘ { ( 𝐹 𝑅 ) } ) ) ) )
50 49 riotabidv ( 𝜑 → ( 𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) 𝑅 ) } ) ) ) = ( 𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { 𝑌 } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( 𝑋 𝑌 ) } ) ) = ( 𝐽 ‘ { ( 𝐹 𝑅 ) } ) ) ) )
51 33 50 ifbieq2d ( 𝜑 → if ( ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) = 0 , 𝑄 , ( 𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) ( 2nd ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) ) 𝑅 ) } ) ) ) ) = if ( 𝑌 = 0 , 𝑄 , ( 𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { 𝑌 } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( 𝑋 𝑌 ) } ) ) = ( 𝐽 ‘ { ( 𝐹 𝑅 ) } ) ) ) ) )
52 30 51 eqtrd ( 𝜑 → ( 𝐼 ‘ ⟨ 𝑋 , 𝐹 , 𝑌 ⟩ ) = if ( 𝑌 = 0 , 𝑄 , ( 𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { 𝑌 } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( 𝑋 𝑌 ) } ) ) = ( 𝐽 ‘ { ( 𝐹 𝑅 ) } ) ) ) ) )