Metamath Proof Explorer


Theorem uvcfval

Description: Value of the unit-vector generator for a free module. (Contributed by Stefan O'Rear, 1-Feb-2015)

Ref Expression
Hypotheses uvcfval.u 𝑈 = ( 𝑅 unitVec 𝐼 )
uvcfval.o 1 = ( 1r𝑅 )
uvcfval.z 0 = ( 0g𝑅 )
Assertion uvcfval ( ( 𝑅𝑉𝐼𝑊 ) → 𝑈 = ( 𝑗𝐼 ↦ ( 𝑘𝐼 ↦ if ( 𝑘 = 𝑗 , 1 , 0 ) ) ) )

Proof

Step Hyp Ref Expression
1 uvcfval.u 𝑈 = ( 𝑅 unitVec 𝐼 )
2 uvcfval.o 1 = ( 1r𝑅 )
3 uvcfval.z 0 = ( 0g𝑅 )
4 elex ( 𝑅𝑉𝑅 ∈ V )
5 elex ( 𝐼𝑊𝐼 ∈ V )
6 df-uvc unitVec = ( 𝑟 ∈ V , 𝑖 ∈ V ↦ ( 𝑗𝑖 ↦ ( 𝑘𝑖 ↦ if ( 𝑘 = 𝑗 , ( 1r𝑟 ) , ( 0g𝑟 ) ) ) ) )
7 6 a1i ( ( 𝑅 ∈ V ∧ 𝐼 ∈ V ) → unitVec = ( 𝑟 ∈ V , 𝑖 ∈ V ↦ ( 𝑗𝑖 ↦ ( 𝑘𝑖 ↦ if ( 𝑘 = 𝑗 , ( 1r𝑟 ) , ( 0g𝑟 ) ) ) ) ) )
8 simpr ( ( 𝑟 = 𝑅𝑖 = 𝐼 ) → 𝑖 = 𝐼 )
9 fveq2 ( 𝑟 = 𝑅 → ( 1r𝑟 ) = ( 1r𝑅 ) )
10 9 2 eqtr4di ( 𝑟 = 𝑅 → ( 1r𝑟 ) = 1 )
11 fveq2 ( 𝑟 = 𝑅 → ( 0g𝑟 ) = ( 0g𝑅 ) )
12 11 3 eqtr4di ( 𝑟 = 𝑅 → ( 0g𝑟 ) = 0 )
13 10 12 ifeq12d ( 𝑟 = 𝑅 → if ( 𝑘 = 𝑗 , ( 1r𝑟 ) , ( 0g𝑟 ) ) = if ( 𝑘 = 𝑗 , 1 , 0 ) )
14 13 adantr ( ( 𝑟 = 𝑅𝑖 = 𝐼 ) → if ( 𝑘 = 𝑗 , ( 1r𝑟 ) , ( 0g𝑟 ) ) = if ( 𝑘 = 𝑗 , 1 , 0 ) )
15 8 14 mpteq12dv ( ( 𝑟 = 𝑅𝑖 = 𝐼 ) → ( 𝑘𝑖 ↦ if ( 𝑘 = 𝑗 , ( 1r𝑟 ) , ( 0g𝑟 ) ) ) = ( 𝑘𝐼 ↦ if ( 𝑘 = 𝑗 , 1 , 0 ) ) )
16 8 15 mpteq12dv ( ( 𝑟 = 𝑅𝑖 = 𝐼 ) → ( 𝑗𝑖 ↦ ( 𝑘𝑖 ↦ if ( 𝑘 = 𝑗 , ( 1r𝑟 ) , ( 0g𝑟 ) ) ) ) = ( 𝑗𝐼 ↦ ( 𝑘𝐼 ↦ if ( 𝑘 = 𝑗 , 1 , 0 ) ) ) )
17 16 adantl ( ( ( 𝑅 ∈ V ∧ 𝐼 ∈ V ) ∧ ( 𝑟 = 𝑅𝑖 = 𝐼 ) ) → ( 𝑗𝑖 ↦ ( 𝑘𝑖 ↦ if ( 𝑘 = 𝑗 , ( 1r𝑟 ) , ( 0g𝑟 ) ) ) ) = ( 𝑗𝐼 ↦ ( 𝑘𝐼 ↦ if ( 𝑘 = 𝑗 , 1 , 0 ) ) ) )
18 simpl ( ( 𝑅 ∈ V ∧ 𝐼 ∈ V ) → 𝑅 ∈ V )
19 simpr ( ( 𝑅 ∈ V ∧ 𝐼 ∈ V ) → 𝐼 ∈ V )
20 mptexg ( 𝐼 ∈ V → ( 𝑗𝐼 ↦ ( 𝑘𝐼 ↦ if ( 𝑘 = 𝑗 , 1 , 0 ) ) ) ∈ V )
21 20 adantl ( ( 𝑅 ∈ V ∧ 𝐼 ∈ V ) → ( 𝑗𝐼 ↦ ( 𝑘𝐼 ↦ if ( 𝑘 = 𝑗 , 1 , 0 ) ) ) ∈ V )
22 7 17 18 19 21 ovmpod ( ( 𝑅 ∈ V ∧ 𝐼 ∈ V ) → ( 𝑅 unitVec 𝐼 ) = ( 𝑗𝐼 ↦ ( 𝑘𝐼 ↦ if ( 𝑘 = 𝑗 , 1 , 0 ) ) ) )
23 4 5 22 syl2an ( ( 𝑅𝑉𝐼𝑊 ) → ( 𝑅 unitVec 𝐼 ) = ( 𝑗𝐼 ↦ ( 𝑘𝐼 ↦ if ( 𝑘 = 𝑗 , 1 , 0 ) ) ) )
24 1 23 eqtrid ( ( 𝑅𝑉𝐼𝑊 ) → 𝑈 = ( 𝑗𝐼 ↦ ( 𝑘𝐼 ↦ if ( 𝑘 = 𝑗 , 1 , 0 ) ) ) )