Metamath Proof Explorer


Theorem hdmap1cbv

Description: Frequently used lemma to change bound variables in L hypothesis. (Contributed by NM, 15-May-2015)

Ref Expression
Hypothesis hdmap1cbv.l 𝐿 = ( 𝑥 ∈ V ↦ if ( ( 2nd𝑥 ) = 0 , 𝑄 , ( 𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑥 ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑥 ) ) ( 2nd𝑥 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑥 ) ) 𝑅 ) } ) ) ) ) )
Assertion hdmap1cbv 𝐿 = ( 𝑦 ∈ V ↦ if ( ( 2nd𝑦 ) = 0 , 𝑄 , ( 𝑖𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑦 ) } ) ) = ( 𝐽 ‘ { 𝑖 } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑦 ) ) ( 2nd𝑦 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑦 ) ) 𝑅 𝑖 ) } ) ) ) ) )

Proof

Step Hyp Ref Expression
1 hdmap1cbv.l 𝐿 = ( 𝑥 ∈ V ↦ if ( ( 2nd𝑥 ) = 0 , 𝑄 , ( 𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑥 ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑥 ) ) ( 2nd𝑥 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑥 ) ) 𝑅 ) } ) ) ) ) )
2 fveq2 ( 𝑥 = 𝑦 → ( 2nd𝑥 ) = ( 2nd𝑦 ) )
3 2 eqeq1d ( 𝑥 = 𝑦 → ( ( 2nd𝑥 ) = 0 ↔ ( 2nd𝑦 ) = 0 ) )
4 2 sneqd ( 𝑥 = 𝑦 → { ( 2nd𝑥 ) } = { ( 2nd𝑦 ) } )
5 4 fveq2d ( 𝑥 = 𝑦 → ( 𝑁 ‘ { ( 2nd𝑥 ) } ) = ( 𝑁 ‘ { ( 2nd𝑦 ) } ) )
6 5 fveq2d ( 𝑥 = 𝑦 → ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑥 ) } ) ) = ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑦 ) } ) ) )
7 6 eqeq1d ( 𝑥 = 𝑦 → ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑥 ) } ) ) = ( 𝐽 ‘ { } ) ↔ ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑦 ) } ) ) = ( 𝐽 ‘ { } ) ) )
8 2fveq3 ( 𝑥 = 𝑦 → ( 1st ‘ ( 1st𝑥 ) ) = ( 1st ‘ ( 1st𝑦 ) ) )
9 8 2 oveq12d ( 𝑥 = 𝑦 → ( ( 1st ‘ ( 1st𝑥 ) ) ( 2nd𝑥 ) ) = ( ( 1st ‘ ( 1st𝑦 ) ) ( 2nd𝑦 ) ) )
10 9 sneqd ( 𝑥 = 𝑦 → { ( ( 1st ‘ ( 1st𝑥 ) ) ( 2nd𝑥 ) ) } = { ( ( 1st ‘ ( 1st𝑦 ) ) ( 2nd𝑦 ) ) } )
11 10 fveq2d ( 𝑥 = 𝑦 → ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑥 ) ) ( 2nd𝑥 ) ) } ) = ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑦 ) ) ( 2nd𝑦 ) ) } ) )
12 11 fveq2d ( 𝑥 = 𝑦 → ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑥 ) ) ( 2nd𝑥 ) ) } ) ) = ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑦 ) ) ( 2nd𝑦 ) ) } ) ) )
13 2fveq3 ( 𝑥 = 𝑦 → ( 2nd ‘ ( 1st𝑥 ) ) = ( 2nd ‘ ( 1st𝑦 ) ) )
14 13 oveq1d ( 𝑥 = 𝑦 → ( ( 2nd ‘ ( 1st𝑥 ) ) 𝑅 ) = ( ( 2nd ‘ ( 1st𝑦 ) ) 𝑅 ) )
15 14 sneqd ( 𝑥 = 𝑦 → { ( ( 2nd ‘ ( 1st𝑥 ) ) 𝑅 ) } = { ( ( 2nd ‘ ( 1st𝑦 ) ) 𝑅 ) } )
16 15 fveq2d ( 𝑥 = 𝑦 → ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑥 ) ) 𝑅 ) } ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑦 ) ) 𝑅 ) } ) )
17 12 16 eqeq12d ( 𝑥 = 𝑦 → ( ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑥 ) ) ( 2nd𝑥 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑥 ) ) 𝑅 ) } ) ↔ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑦 ) ) ( 2nd𝑦 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑦 ) ) 𝑅 ) } ) ) )
18 7 17 anbi12d ( 𝑥 = 𝑦 → ( ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑥 ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑥 ) ) ( 2nd𝑥 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑥 ) ) 𝑅 ) } ) ) ↔ ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑦 ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑦 ) ) ( 2nd𝑦 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑦 ) ) 𝑅 ) } ) ) ) )
19 18 riotabidv ( 𝑥 = 𝑦 → ( 𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑥 ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑥 ) ) ( 2nd𝑥 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑥 ) ) 𝑅 ) } ) ) ) = ( 𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑦 ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑦 ) ) ( 2nd𝑦 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑦 ) ) 𝑅 ) } ) ) ) )
20 3 19 ifbieq2d ( 𝑥 = 𝑦 → if ( ( 2nd𝑥 ) = 0 , 𝑄 , ( 𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑥 ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑥 ) ) ( 2nd𝑥 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑥 ) ) 𝑅 ) } ) ) ) ) = if ( ( 2nd𝑦 ) = 0 , 𝑄 , ( 𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑦 ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑦 ) ) ( 2nd𝑦 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑦 ) ) 𝑅 ) } ) ) ) ) )
21 20 cbvmptv ( 𝑥 ∈ V ↦ if ( ( 2nd𝑥 ) = 0 , 𝑄 , ( 𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑥 ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑥 ) ) ( 2nd𝑥 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑥 ) ) 𝑅 ) } ) ) ) ) ) = ( 𝑦 ∈ V ↦ if ( ( 2nd𝑦 ) = 0 , 𝑄 , ( 𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑦 ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑦 ) ) ( 2nd𝑦 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑦 ) ) 𝑅 ) } ) ) ) ) )
22 sneq ( = 𝑖 → { } = { 𝑖 } )
23 22 fveq2d ( = 𝑖 → ( 𝐽 ‘ { } ) = ( 𝐽 ‘ { 𝑖 } ) )
24 23 eqeq2d ( = 𝑖 → ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑦 ) } ) ) = ( 𝐽 ‘ { } ) ↔ ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑦 ) } ) ) = ( 𝐽 ‘ { 𝑖 } ) ) )
25 oveq2 ( = 𝑖 → ( ( 2nd ‘ ( 1st𝑦 ) ) 𝑅 ) = ( ( 2nd ‘ ( 1st𝑦 ) ) 𝑅 𝑖 ) )
26 25 sneqd ( = 𝑖 → { ( ( 2nd ‘ ( 1st𝑦 ) ) 𝑅 ) } = { ( ( 2nd ‘ ( 1st𝑦 ) ) 𝑅 𝑖 ) } )
27 26 fveq2d ( = 𝑖 → ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑦 ) ) 𝑅 ) } ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑦 ) ) 𝑅 𝑖 ) } ) )
28 27 eqeq2d ( = 𝑖 → ( ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑦 ) ) ( 2nd𝑦 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑦 ) ) 𝑅 ) } ) ↔ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑦 ) ) ( 2nd𝑦 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑦 ) ) 𝑅 𝑖 ) } ) ) )
29 24 28 anbi12d ( = 𝑖 → ( ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑦 ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑦 ) ) ( 2nd𝑦 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑦 ) ) 𝑅 ) } ) ) ↔ ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑦 ) } ) ) = ( 𝐽 ‘ { 𝑖 } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑦 ) ) ( 2nd𝑦 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑦 ) ) 𝑅 𝑖 ) } ) ) ) )
30 29 cbvriotavw ( 𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑦 ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑦 ) ) ( 2nd𝑦 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑦 ) ) 𝑅 ) } ) ) ) = ( 𝑖𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑦 ) } ) ) = ( 𝐽 ‘ { 𝑖 } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑦 ) ) ( 2nd𝑦 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑦 ) ) 𝑅 𝑖 ) } ) ) )
31 ifeq2 ( ( 𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑦 ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑦 ) ) ( 2nd𝑦 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑦 ) ) 𝑅 ) } ) ) ) = ( 𝑖𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑦 ) } ) ) = ( 𝐽 ‘ { 𝑖 } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑦 ) ) ( 2nd𝑦 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑦 ) ) 𝑅 𝑖 ) } ) ) ) → if ( ( 2nd𝑦 ) = 0 , 𝑄 , ( 𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑦 ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑦 ) ) ( 2nd𝑦 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑦 ) ) 𝑅 ) } ) ) ) ) = if ( ( 2nd𝑦 ) = 0 , 𝑄 , ( 𝑖𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑦 ) } ) ) = ( 𝐽 ‘ { 𝑖 } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑦 ) ) ( 2nd𝑦 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑦 ) ) 𝑅 𝑖 ) } ) ) ) ) )
32 30 31 ax-mp if ( ( 2nd𝑦 ) = 0 , 𝑄 , ( 𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑦 ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑦 ) ) ( 2nd𝑦 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑦 ) ) 𝑅 ) } ) ) ) ) = if ( ( 2nd𝑦 ) = 0 , 𝑄 , ( 𝑖𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑦 ) } ) ) = ( 𝐽 ‘ { 𝑖 } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑦 ) ) ( 2nd𝑦 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑦 ) ) 𝑅 𝑖 ) } ) ) ) )
33 32 mpteq2i ( 𝑦 ∈ V ↦ if ( ( 2nd𝑦 ) = 0 , 𝑄 , ( 𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑦 ) } ) ) = ( 𝐽 ‘ { } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑦 ) ) ( 2nd𝑦 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑦 ) ) 𝑅 ) } ) ) ) ) ) = ( 𝑦 ∈ V ↦ if ( ( 2nd𝑦 ) = 0 , 𝑄 , ( 𝑖𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑦 ) } ) ) = ( 𝐽 ‘ { 𝑖 } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑦 ) ) ( 2nd𝑦 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑦 ) ) 𝑅 𝑖 ) } ) ) ) ) )
34 1 21 33 3eqtri 𝐿 = ( 𝑦 ∈ V ↦ if ( ( 2nd𝑦 ) = 0 , 𝑄 , ( 𝑖𝐷 ( ( 𝑀 ‘ ( 𝑁 ‘ { ( 2nd𝑦 ) } ) ) = ( 𝐽 ‘ { 𝑖 } ) ∧ ( 𝑀 ‘ ( 𝑁 ‘ { ( ( 1st ‘ ( 1st𝑦 ) ) ( 2nd𝑦 ) ) } ) ) = ( 𝐽 ‘ { ( ( 2nd ‘ ( 1st𝑦 ) ) 𝑅 𝑖 ) } ) ) ) ) )