Metamath Proof Explorer


Theorem prodindf

Description: The product of indicators is one if and only if all values are in the set. (Contributed by Thierry Arnoux, 11-Dec-2021)

Ref Expression
Hypotheses prodindf.1 φ O V
prodindf.2 φ A Fin
prodindf.3 φ B O
prodindf.4 φ F : A O
Assertion prodindf φ k A 𝟙 O B F k = if ran F B 1 0

Proof

Step Hyp Ref Expression
1 prodindf.1 φ O V
2 prodindf.2 φ A Fin
3 prodindf.3 φ B O
4 prodindf.4 φ F : A O
5 2fveq3 k = l 𝟙 O B F k = 𝟙 O B F l
6 indf O V B O 𝟙 O B : O 0 1
7 1 3 6 syl2anc φ 𝟙 O B : O 0 1
8 7 adantr φ k A 𝟙 O B : O 0 1
9 4 ffvelrnda φ k A F k O
10 8 9 ffvelrnd φ k A 𝟙 O B F k 0 1
11 5 2 10 fprodex01 φ k A 𝟙 O B F k = if l A 𝟙 O B F l = 1 1 0
12 2fveq3 l = k 𝟙 O B F l = 𝟙 O B F k
13 12 eqeq1d l = k 𝟙 O B F l = 1 𝟙 O B F k = 1
14 13 cbvralvw l A 𝟙 O B F l = 1 k A 𝟙 O B F k = 1
15 14 a1i φ l A 𝟙 O B F l = 1 k A 𝟙 O B F k = 1
16 15 ifbid φ if l A 𝟙 O B F l = 1 1 0 = if k A 𝟙 O B F k = 1 1 0
17 eqid k A F k = k A F k
18 17 rnmptss k A F k B ran k A F k B
19 nfv k φ
20 nfmpt1 _ k k A F k
21 20 nfrn _ k ran k A F k
22 nfcv _ k B
23 21 22 nfss k ran k A F k B
24 19 23 nfan k φ ran k A F k B
25 simplr φ ran k A F k B k A ran k A F k B
26 4 feqmptd φ F = k A F k
27 eqidd φ k = k
28 26 27 fveq12d φ F k = k A F k k
29 28 ralrimivw φ k A F k = k A F k k
30 29 r19.21bi φ k A F k = k A F k k
31 4 ffnd φ F Fn A
32 26 fneq1d φ F Fn A k A F k Fn A
33 31 32 mpbid φ k A F k Fn A
34 33 adantr φ k A k A F k Fn A
35 simpr φ k A k A
36 fnfvelrn k A F k Fn A k A k A F k k ran k A F k
37 34 35 36 syl2anc φ k A k A F k k ran k A F k
38 30 37 eqeltrd φ k A F k ran k A F k
39 38 adantlr φ ran k A F k B k A F k ran k A F k
40 25 39 sseldd φ ran k A F k B k A F k B
41 40 ex φ ran k A F k B k A F k B
42 24 41 ralrimi φ ran k A F k B k A F k B
43 42 ex φ ran k A F k B k A F k B
44 18 43 impbid2 φ k A F k B ran k A F k B
45 1 adantr φ k A O V
46 3 adantr φ k A B O
47 ind1a O V B O F k O 𝟙 O B F k = 1 F k B
48 45 46 9 47 syl3anc φ k A 𝟙 O B F k = 1 F k B
49 48 ralbidva φ k A 𝟙 O B F k = 1 k A F k B
50 26 rneqd φ ran F = ran k A F k
51 50 sseq1d φ ran F B ran k A F k B
52 44 49 51 3bitr4d φ k A 𝟙 O B F k = 1 ran F B
53 52 ifbid φ if k A 𝟙 O B F k = 1 1 0 = if ran F B 1 0
54 11 16 53 3eqtrd φ k A 𝟙 O B F k = if ran F B 1 0