Metamath Proof Explorer


Theorem fprod

Description: The value of a product over a nonempty finite set. (Contributed by Scott Fenton, 6-Dec-2017)

Ref Expression
Hypotheses fprod.1 k = F n B = C
fprod.2 φ M
fprod.3 φ F : 1 M 1-1 onto A
fprod.4 φ k A B
fprod.5 φ n 1 M G n = C
Assertion fprod φ k A B = seq 1 × G M

Proof

Step Hyp Ref Expression
1 fprod.1 k = F n B = C
2 fprod.2 φ M
3 fprod.3 φ F : 1 M 1-1 onto A
4 fprod.4 φ k A B
5 fprod.5 φ n 1 M G n = C
6 df-prod k A B = ι x | m A m n m y y 0 seq n × k if k A B 1 y seq m × k if k A B 1 x m f f : 1 m 1-1 onto A x = seq 1 × n f n / k B m
7 fvex seq 1 × G M V
8 nfcv _ j if k A B 1
9 nfv k j A
10 nfcsb1v _ k j / k B
11 nfcv _ k 1
12 9 10 11 nfif _ k if j A j / k B 1
13 eleq1w k = j k A j A
14 csbeq1a k = j B = j / k B
15 13 14 ifbieq1d k = j if k A B 1 = if j A j / k B 1
16 8 12 15 cbvmpt k if k A B 1 = j if j A j / k B 1
17 4 ralrimiva φ k A B
18 10 nfel1 k j / k B
19 14 eleq1d k = j B j / k B
20 18 19 rspc j A k A B j / k B
21 17 20 mpan9 φ j A j / k B
22 fveq2 n = i f n = f i
23 22 csbeq1d n = i f n / k B = f i / k B
24 csbcow f i / j j / k B = f i / k B
25 23 24 eqtr4di n = i f n / k B = f i / j j / k B
26 25 cbvmptv n f n / k B = i f i / j j / k B
27 16 21 26 prodmo φ * x m A m n m y y 0 seq n × k if k A B 1 y seq m × k if k A B 1 x m f f : 1 m 1-1 onto A x = seq 1 × n f n / k B m
28 f1of F : 1 M 1-1 onto A F : 1 M A
29 3 28 syl φ F : 1 M A
30 ovex 1 M V
31 fex F : 1 M A 1 M V F V
32 29 30 31 sylancl φ F V
33 nnuz = 1
34 2 33 eleqtrdi φ M 1
35 elfznn n 1 M n
36 fvex G n V
37 5 36 eqeltrrdi φ n 1 M C V
38 eqid n C = n C
39 38 fvmpt2 n C V n C n = C
40 35 37 39 syl2an2 φ n 1 M n C n = C
41 5 40 eqtr4d φ n 1 M G n = n C n
42 41 ralrimiva φ n 1 M G n = n C n
43 nffvmpt1 _ n n C k
44 43 nfeq2 n G k = n C k
45 fveq2 n = k G n = G k
46 fveq2 n = k n C n = n C k
47 45 46 eqeq12d n = k G n = n C n G k = n C k
48 44 47 rspc k 1 M n 1 M G n = n C n G k = n C k
49 42 48 mpan9 φ k 1 M G k = n C k
50 34 49 seqfveq φ seq 1 × G M = seq 1 × n C M
51 3 50 jca φ F : 1 M 1-1 onto A seq 1 × G M = seq 1 × n C M
52 f1oeq1 f = F f : 1 M 1-1 onto A F : 1 M 1-1 onto A
53 fveq1 f = F f n = F n
54 53 csbeq1d f = F f n / k B = F n / k B
55 fvex F n V
56 55 1 csbie F n / k B = C
57 54 56 eqtrdi f = F f n / k B = C
58 57 mpteq2dv f = F n f n / k B = n C
59 58 seqeq3d f = F seq 1 × n f n / k B = seq 1 × n C
60 59 fveq1d f = F seq 1 × n f n / k B M = seq 1 × n C M
61 60 eqeq2d f = F seq 1 × G M = seq 1 × n f n / k B M seq 1 × G M = seq 1 × n C M
62 52 61 anbi12d f = F f : 1 M 1-1 onto A seq 1 × G M = seq 1 × n f n / k B M F : 1 M 1-1 onto A seq 1 × G M = seq 1 × n C M
63 32 51 62 spcedv φ f f : 1 M 1-1 onto A seq 1 × G M = seq 1 × n f n / k B M
64 oveq2 m = M 1 m = 1 M
65 64 f1oeq2d m = M f : 1 m 1-1 onto A f : 1 M 1-1 onto A
66 fveq2 m = M seq 1 × n f n / k B m = seq 1 × n f n / k B M
67 66 eqeq2d m = M seq 1 × G M = seq 1 × n f n / k B m seq 1 × G M = seq 1 × n f n / k B M
68 65 67 anbi12d m = M f : 1 m 1-1 onto A seq 1 × G M = seq 1 × n f n / k B m f : 1 M 1-1 onto A seq 1 × G M = seq 1 × n f n / k B M
69 68 exbidv m = M f f : 1 m 1-1 onto A seq 1 × G M = seq 1 × n f n / k B m f f : 1 M 1-1 onto A seq 1 × G M = seq 1 × n f n / k B M
70 69 rspcev M f f : 1 M 1-1 onto A seq 1 × G M = seq 1 × n f n / k B M m f f : 1 m 1-1 onto A seq 1 × G M = seq 1 × n f n / k B m
71 2 63 70 syl2anc φ m f f : 1 m 1-1 onto A seq 1 × G M = seq 1 × n f n / k B m
72 71 olcd φ m A m n m y y 0 seq n × k if k A B 1 y seq m × k if k A B 1 seq 1 × G M m f f : 1 m 1-1 onto A seq 1 × G M = seq 1 × n f n / k B m
73 breq2 x = seq 1 × G M seq m × k if k A B 1 x seq m × k if k A B 1 seq 1 × G M
74 73 3anbi3d x = seq 1 × G M A m n m y y 0 seq n × k if k A B 1 y seq m × k if k A B 1 x A m n m y y 0 seq n × k if k A B 1 y seq m × k if k A B 1 seq 1 × G M
75 74 rexbidv x = seq 1 × G M m A m n m y y 0 seq n × k if k A B 1 y seq m × k if k A B 1 x m A m n m y y 0 seq n × k if k A B 1 y seq m × k if k A B 1 seq 1 × G M
76 eqeq1 x = seq 1 × G M x = seq 1 × n f n / k B m seq 1 × G M = seq 1 × n f n / k B m
77 76 anbi2d x = seq 1 × G M f : 1 m 1-1 onto A x = seq 1 × n f n / k B m f : 1 m 1-1 onto A seq 1 × G M = seq 1 × n f n / k B m
78 77 exbidv x = seq 1 × G M f f : 1 m 1-1 onto A x = seq 1 × n f n / k B m f f : 1 m 1-1 onto A seq 1 × G M = seq 1 × n f n / k B m
79 78 rexbidv x = seq 1 × G M m f f : 1 m 1-1 onto A x = seq 1 × n f n / k B m m f f : 1 m 1-1 onto A seq 1 × G M = seq 1 × n f n / k B m
80 75 79 orbi12d x = seq 1 × G M m A m n m y y 0 seq n × k if k A B 1 y seq m × k if k A B 1 x m f f : 1 m 1-1 onto A x = seq 1 × n f n / k B m m A m n m y y 0 seq n × k if k A B 1 y seq m × k if k A B 1 seq 1 × G M m f f : 1 m 1-1 onto A seq 1 × G M = seq 1 × n f n / k B m
81 80 moi2 seq 1 × G M V * x m A m n m y y 0 seq n × k if k A B 1 y seq m × k if k A B 1 x m f f : 1 m 1-1 onto A x = seq 1 × n f n / k B m m A m n m y y 0 seq n × k if k A B 1 y seq m × k if k A B 1 x m f f : 1 m 1-1 onto A x = seq 1 × n f n / k B m m A m n m y y 0 seq n × k if k A B 1 y seq m × k if k A B 1 seq 1 × G M m f f : 1 m 1-1 onto A seq 1 × G M = seq 1 × n f n / k B m x = seq 1 × G M
82 7 81 mpanl1 * x m A m n m y y 0 seq n × k if k A B 1 y seq m × k if k A B 1 x m f f : 1 m 1-1 onto A x = seq 1 × n f n / k B m m A m n m y y 0 seq n × k if k A B 1 y seq m × k if k A B 1 x m f f : 1 m 1-1 onto A x = seq 1 × n f n / k B m m A m n m y y 0 seq n × k if k A B 1 y seq m × k if k A B 1 seq 1 × G M m f f : 1 m 1-1 onto A seq 1 × G M = seq 1 × n f n / k B m x = seq 1 × G M
83 82 ancom2s * x m A m n m y y 0 seq n × k if k A B 1 y seq m × k if k A B 1 x m f f : 1 m 1-1 onto A x = seq 1 × n f n / k B m m A m n m y y 0 seq n × k if k A B 1 y seq m × k if k A B 1 seq 1 × G M m f f : 1 m 1-1 onto A seq 1 × G M = seq 1 × n f n / k B m m A m n m y y 0 seq n × k if k A B 1 y seq m × k if k A B 1 x m f f : 1 m 1-1 onto A x = seq 1 × n f n / k B m x = seq 1 × G M
84 83 expr * x m A m n m y y 0 seq n × k if k A B 1 y seq m × k if k A B 1 x m f f : 1 m 1-1 onto A x = seq 1 × n f n / k B m m A m n m y y 0 seq n × k if k A B 1 y seq m × k if k A B 1 seq 1 × G M m f f : 1 m 1-1 onto A seq 1 × G M = seq 1 × n f n / k B m m A m n m y y 0 seq n × k if k A B 1 y seq m × k if k A B 1 x m f f : 1 m 1-1 onto A x = seq 1 × n f n / k B m x = seq 1 × G M
85 27 72 84 syl2anc φ m A m n m y y 0 seq n × k if k A B 1 y seq m × k if k A B 1 x m f f : 1 m 1-1 onto A x = seq 1 × n f n / k B m x = seq 1 × G M
86 72 80 syl5ibrcom φ x = seq 1 × G M m A m n m y y 0 seq n × k if k A B 1 y seq m × k if k A B 1 x m f f : 1 m 1-1 onto A x = seq 1 × n f n / k B m
87 85 86 impbid φ m A m n m y y 0 seq n × k if k A B 1 y seq m × k if k A B 1 x m f f : 1 m 1-1 onto A x = seq 1 × n f n / k B m x = seq 1 × G M
88 87 adantr φ seq 1 × G M V m A m n m y y 0 seq n × k if k A B 1 y seq m × k if k A B 1 x m f f : 1 m 1-1 onto A x = seq 1 × n f n / k B m x = seq 1 × G M
89 88 iota5 φ seq 1 × G M V ι x | m A m n m y y 0 seq n × k if k A B 1 y seq m × k if k A B 1 x m f f : 1 m 1-1 onto A x = seq 1 × n f n / k B m = seq 1 × G M
90 7 89 mpan2 φ ι x | m A m n m y y 0 seq n × k if k A B 1 y seq m × k if k A B 1 x m f f : 1 m 1-1 onto A x = seq 1 × n f n / k B m = seq 1 × G M
91 6 90 eqtrid φ k A B = seq 1 × G M