Metamath Proof Explorer


Theorem ofpreima2

Description: Express the preimage of a function operation as a union of preimages. This version of ofpreima iterates the union over a smaller set. (Contributed by Thierry Arnoux, 8-Mar-2018)

Ref Expression
Hypotheses ofpreima.1 φ F : A B
ofpreima.2 φ G : A C
ofpreima.3 φ A V
ofpreima.4 φ R Fn B × C
Assertion ofpreima2 φ F R f G -1 D = p R -1 D ran F × ran G F -1 1 st p G -1 2 nd p

Proof

Step Hyp Ref Expression
1 ofpreima.1 φ F : A B
2 ofpreima.2 φ G : A C
3 ofpreima.3 φ A V
4 ofpreima.4 φ R Fn B × C
5 1 2 3 4 ofpreima φ F R f G -1 D = p R -1 D F -1 1 st p G -1 2 nd p
6 inundif R -1 D ran F × ran G R -1 D ran F × ran G = R -1 D
7 iuneq1 R -1 D ran F × ran G R -1 D ran F × ran G = R -1 D p R -1 D ran F × ran G R -1 D ran F × ran G F -1 1 st p G -1 2 nd p = p R -1 D F -1 1 st p G -1 2 nd p
8 6 7 ax-mp p R -1 D ran F × ran G R -1 D ran F × ran G F -1 1 st p G -1 2 nd p = p R -1 D F -1 1 st p G -1 2 nd p
9 iunxun p R -1 D ran F × ran G R -1 D ran F × ran G F -1 1 st p G -1 2 nd p = p R -1 D ran F × ran G F -1 1 st p G -1 2 nd p p R -1 D ran F × ran G F -1 1 st p G -1 2 nd p
10 8 9 eqtr3i p R -1 D F -1 1 st p G -1 2 nd p = p R -1 D ran F × ran G F -1 1 st p G -1 2 nd p p R -1 D ran F × ran G F -1 1 st p G -1 2 nd p
11 5 10 eqtrdi φ F R f G -1 D = p R -1 D ran F × ran G F -1 1 st p G -1 2 nd p p R -1 D ran F × ran G F -1 1 st p G -1 2 nd p
12 simpr φ p R -1 D ran F × ran G p R -1 D ran F × ran G
13 12 eldifbd φ p R -1 D ran F × ran G ¬ p ran F × ran G
14 cnvimass R -1 D dom R
15 4 fndmd φ dom R = B × C
16 14 15 sseqtrid φ R -1 D B × C
17 16 ssdifssd φ R -1 D ran F × ran G B × C
18 17 sselda φ p R -1 D ran F × ran G p B × C
19 1st2nd2 p B × C p = 1 st p 2 nd p
20 elxp6 p ran F × ran G p = 1 st p 2 nd p 1 st p ran F 2 nd p ran G
21 20 simplbi2 p = 1 st p 2 nd p 1 st p ran F 2 nd p ran G p ran F × ran G
22 18 19 21 3syl φ p R -1 D ran F × ran G 1 st p ran F 2 nd p ran G p ran F × ran G
23 13 22 mtod φ p R -1 D ran F × ran G ¬ 1 st p ran F 2 nd p ran G
24 ianor ¬ 1 st p ran F 2 nd p ran G ¬ 1 st p ran F ¬ 2 nd p ran G
25 23 24 sylib φ p R -1 D ran F × ran G ¬ 1 st p ran F ¬ 2 nd p ran G
26 disjsn ran F 1 st p = ¬ 1 st p ran F
27 disjsn ran G 2 nd p = ¬ 2 nd p ran G
28 26 27 orbi12i ran F 1 st p = ran G 2 nd p = ¬ 1 st p ran F ¬ 2 nd p ran G
29 25 28 sylibr φ p R -1 D ran F × ran G ran F 1 st p = ran G 2 nd p =
30 1 ffnd φ F Fn A
31 dffn3 F Fn A F : A ran F
32 30 31 sylib φ F : A ran F
33 2 ffnd φ G Fn A
34 dffn3 G Fn A G : A ran G
35 33 34 sylib φ G : A ran G
36 35 adantr φ p R -1 D ran F × ran G G : A ran G
37 fimacnvdisj F : A ran F ran F 1 st p = F -1 1 st p =
38 ineq1 F -1 1 st p = F -1 1 st p G -1 2 nd p = G -1 2 nd p
39 0in G -1 2 nd p =
40 38 39 eqtrdi F -1 1 st p = F -1 1 st p G -1 2 nd p =
41 37 40 syl F : A ran F ran F 1 st p = F -1 1 st p G -1 2 nd p =
42 41 ex F : A ran F ran F 1 st p = F -1 1 st p G -1 2 nd p =
43 fimacnvdisj G : A ran G ran G 2 nd p = G -1 2 nd p =
44 ineq2 G -1 2 nd p = F -1 1 st p G -1 2 nd p = F -1 1 st p
45 in0 F -1 1 st p =
46 44 45 eqtrdi G -1 2 nd p = F -1 1 st p G -1 2 nd p =
47 43 46 syl G : A ran G ran G 2 nd p = F -1 1 st p G -1 2 nd p =
48 47 ex G : A ran G ran G 2 nd p = F -1 1 st p G -1 2 nd p =
49 42 48 jaao F : A ran F G : A ran G ran F 1 st p = ran G 2 nd p = F -1 1 st p G -1 2 nd p =
50 32 36 49 syl2an2r φ p R -1 D ran F × ran G ran F 1 st p = ran G 2 nd p = F -1 1 st p G -1 2 nd p =
51 29 50 mpd φ p R -1 D ran F × ran G F -1 1 st p G -1 2 nd p =
52 51 iuneq2dv φ p R -1 D ran F × ran G F -1 1 st p G -1 2 nd p = p R -1 D ran F × ran G
53 iun0 p R -1 D ran F × ran G =
54 52 53 eqtrdi φ p R -1 D ran F × ran G F -1 1 st p G -1 2 nd p =
55 54 uneq2d φ p R -1 D ran F × ran G F -1 1 st p G -1 2 nd p p R -1 D ran F × ran G F -1 1 st p G -1 2 nd p = p R -1 D ran F × ran G F -1 1 st p G -1 2 nd p
56 un0 p R -1 D ran F × ran G F -1 1 st p G -1 2 nd p = p R -1 D ran F × ran G F -1 1 st p G -1 2 nd p
57 55 56 eqtrdi φ p R -1 D ran F × ran G F -1 1 st p G -1 2 nd p p R -1 D ran F × ran G F -1 1 st p G -1 2 nd p = p R -1 D ran F × ran G F -1 1 st p G -1 2 nd p
58 11 57 eqtrd φ F R f G -1 D = p R -1 D ran F × ran G F -1 1 st p G -1 2 nd p