Metamath Proof Explorer


Theorem caonncan

Description: Transfer nncan -shaped laws to vectors of numbers. (Contributed by Stefan O'Rear, 27-Mar-2015)

Ref Expression
Hypotheses caonncan.i ( 𝜑𝐼𝑉 )
caonncan.a ( 𝜑𝐴 : 𝐼𝑆 )
caonncan.b ( 𝜑𝐵 : 𝐼𝑆 )
caonncan.z ( ( 𝜑 ∧ ( 𝑥𝑆𝑦𝑆 ) ) → ( 𝑥 𝑀 ( 𝑥 𝑀 𝑦 ) ) = 𝑦 )
Assertion caonncan ( 𝜑 → ( 𝐴f 𝑀 ( 𝐴f 𝑀 𝐵 ) ) = 𝐵 )

Proof

Step Hyp Ref Expression
1 caonncan.i ( 𝜑𝐼𝑉 )
2 caonncan.a ( 𝜑𝐴 : 𝐼𝑆 )
3 caonncan.b ( 𝜑𝐵 : 𝐼𝑆 )
4 caonncan.z ( ( 𝜑 ∧ ( 𝑥𝑆𝑦𝑆 ) ) → ( 𝑥 𝑀 ( 𝑥 𝑀 𝑦 ) ) = 𝑦 )
5 2 ffvelrnda ( ( 𝜑𝑧𝐼 ) → ( 𝐴𝑧 ) ∈ 𝑆 )
6 3 ffvelrnda ( ( 𝜑𝑧𝐼 ) → ( 𝐵𝑧 ) ∈ 𝑆 )
7 4 ralrimivva ( 𝜑 → ∀ 𝑥𝑆𝑦𝑆 ( 𝑥 𝑀 ( 𝑥 𝑀 𝑦 ) ) = 𝑦 )
8 7 adantr ( ( 𝜑𝑧𝐼 ) → ∀ 𝑥𝑆𝑦𝑆 ( 𝑥 𝑀 ( 𝑥 𝑀 𝑦 ) ) = 𝑦 )
9 id ( 𝑥 = ( 𝐴𝑧 ) → 𝑥 = ( 𝐴𝑧 ) )
10 oveq1 ( 𝑥 = ( 𝐴𝑧 ) → ( 𝑥 𝑀 𝑦 ) = ( ( 𝐴𝑧 ) 𝑀 𝑦 ) )
11 9 10 oveq12d ( 𝑥 = ( 𝐴𝑧 ) → ( 𝑥 𝑀 ( 𝑥 𝑀 𝑦 ) ) = ( ( 𝐴𝑧 ) 𝑀 ( ( 𝐴𝑧 ) 𝑀 𝑦 ) ) )
12 11 eqeq1d ( 𝑥 = ( 𝐴𝑧 ) → ( ( 𝑥 𝑀 ( 𝑥 𝑀 𝑦 ) ) = 𝑦 ↔ ( ( 𝐴𝑧 ) 𝑀 ( ( 𝐴𝑧 ) 𝑀 𝑦 ) ) = 𝑦 ) )
13 oveq2 ( 𝑦 = ( 𝐵𝑧 ) → ( ( 𝐴𝑧 ) 𝑀 𝑦 ) = ( ( 𝐴𝑧 ) 𝑀 ( 𝐵𝑧 ) ) )
14 13 oveq2d ( 𝑦 = ( 𝐵𝑧 ) → ( ( 𝐴𝑧 ) 𝑀 ( ( 𝐴𝑧 ) 𝑀 𝑦 ) ) = ( ( 𝐴𝑧 ) 𝑀 ( ( 𝐴𝑧 ) 𝑀 ( 𝐵𝑧 ) ) ) )
15 id ( 𝑦 = ( 𝐵𝑧 ) → 𝑦 = ( 𝐵𝑧 ) )
16 14 15 eqeq12d ( 𝑦 = ( 𝐵𝑧 ) → ( ( ( 𝐴𝑧 ) 𝑀 ( ( 𝐴𝑧 ) 𝑀 𝑦 ) ) = 𝑦 ↔ ( ( 𝐴𝑧 ) 𝑀 ( ( 𝐴𝑧 ) 𝑀 ( 𝐵𝑧 ) ) ) = ( 𝐵𝑧 ) ) )
17 12 16 rspc2va ( ( ( ( 𝐴𝑧 ) ∈ 𝑆 ∧ ( 𝐵𝑧 ) ∈ 𝑆 ) ∧ ∀ 𝑥𝑆𝑦𝑆 ( 𝑥 𝑀 ( 𝑥 𝑀 𝑦 ) ) = 𝑦 ) → ( ( 𝐴𝑧 ) 𝑀 ( ( 𝐴𝑧 ) 𝑀 ( 𝐵𝑧 ) ) ) = ( 𝐵𝑧 ) )
18 5 6 8 17 syl21anc ( ( 𝜑𝑧𝐼 ) → ( ( 𝐴𝑧 ) 𝑀 ( ( 𝐴𝑧 ) 𝑀 ( 𝐵𝑧 ) ) ) = ( 𝐵𝑧 ) )
19 18 mpteq2dva ( 𝜑 → ( 𝑧𝐼 ↦ ( ( 𝐴𝑧 ) 𝑀 ( ( 𝐴𝑧 ) 𝑀 ( 𝐵𝑧 ) ) ) ) = ( 𝑧𝐼 ↦ ( 𝐵𝑧 ) ) )
20 fvexd ( ( 𝜑𝑧𝐼 ) → ( 𝐴𝑧 ) ∈ V )
21 ovexd ( ( 𝜑𝑧𝐼 ) → ( ( 𝐴𝑧 ) 𝑀 ( 𝐵𝑧 ) ) ∈ V )
22 2 feqmptd ( 𝜑𝐴 = ( 𝑧𝐼 ↦ ( 𝐴𝑧 ) ) )
23 fvexd ( ( 𝜑𝑧𝐼 ) → ( 𝐵𝑧 ) ∈ V )
24 3 feqmptd ( 𝜑𝐵 = ( 𝑧𝐼 ↦ ( 𝐵𝑧 ) ) )
25 1 20 23 22 24 offval2 ( 𝜑 → ( 𝐴f 𝑀 𝐵 ) = ( 𝑧𝐼 ↦ ( ( 𝐴𝑧 ) 𝑀 ( 𝐵𝑧 ) ) ) )
26 1 20 21 22 25 offval2 ( 𝜑 → ( 𝐴f 𝑀 ( 𝐴f 𝑀 𝐵 ) ) = ( 𝑧𝐼 ↦ ( ( 𝐴𝑧 ) 𝑀 ( ( 𝐴𝑧 ) 𝑀 ( 𝐵𝑧 ) ) ) ) )
27 19 26 24 3eqtr4d ( 𝜑 → ( 𝐴f 𝑀 ( 𝐴f 𝑀 𝐵 ) ) = 𝐵 )