Metamath Proof Explorer


Theorem bj-imdirval3

Description: Value of the functionalized direct image. (Contributed by BJ, 16-Dec-2023)

Ref Expression
Hypotheses bj-imdirval3.exa
|- ( ph -> A e. U )
bj-imdirval3.exb
|- ( ph -> B e. V )
bj-imdirval3.arg
|- ( ph -> R C_ ( A X. B ) )
Assertion bj-imdirval3
|- ( ph -> ( X ( ( A ~P_* B ) ` R ) Y <-> ( ( X C_ A /\ Y C_ B ) /\ ( R " X ) = Y ) ) )

Proof

Step Hyp Ref Expression
1 bj-imdirval3.exa
 |-  ( ph -> A e. U )
2 bj-imdirval3.exb
 |-  ( ph -> B e. V )
3 bj-imdirval3.arg
 |-  ( ph -> R C_ ( A X. B ) )
4 1 2 3 bj-imdirval2
 |-  ( ph -> ( ( A ~P_* B ) ` R ) = { <. x , y >. | ( ( x C_ A /\ y C_ B ) /\ ( R " x ) = y ) } )
5 4 breqd
 |-  ( ph -> ( X ( ( A ~P_* B ) ` R ) Y <-> X { <. x , y >. | ( ( x C_ A /\ y C_ B ) /\ ( R " x ) = y ) } Y ) )
6 brabv
 |-  ( X { <. x , y >. | ( ( x C_ A /\ y C_ B ) /\ ( R " x ) = y ) } Y -> ( X e. _V /\ Y e. _V ) )
7 5 6 syl6bi
 |-  ( ph -> ( X ( ( A ~P_* B ) ` R ) Y -> ( X e. _V /\ Y e. _V ) ) )
8 7 pm4.71rd
 |-  ( ph -> ( X ( ( A ~P_* B ) ` R ) Y <-> ( ( X e. _V /\ Y e. _V ) /\ X ( ( A ~P_* B ) ` R ) Y ) ) )
9 simpl
 |-  ( ( X e. _V /\ Y e. _V ) -> X e. _V )
10 9 adantl
 |-  ( ( ph /\ ( X e. _V /\ Y e. _V ) ) -> X e. _V )
11 simpr
 |-  ( ( X e. _V /\ Y e. _V ) -> Y e. _V )
12 11 adantl
 |-  ( ( ph /\ ( X e. _V /\ Y e. _V ) ) -> Y e. _V )
13 4 adantr
 |-  ( ( ph /\ ( X e. _V /\ Y e. _V ) ) -> ( ( A ~P_* B ) ` R ) = { <. x , y >. | ( ( x C_ A /\ y C_ B ) /\ ( R " x ) = y ) } )
14 simpl
 |-  ( ( x = X /\ y = Y ) -> x = X )
15 14 sseq1d
 |-  ( ( x = X /\ y = Y ) -> ( x C_ A <-> X C_ A ) )
16 simpr
 |-  ( ( x = X /\ y = Y ) -> y = Y )
17 16 sseq1d
 |-  ( ( x = X /\ y = Y ) -> ( y C_ B <-> Y C_ B ) )
18 15 17 anbi12d
 |-  ( ( x = X /\ y = Y ) -> ( ( x C_ A /\ y C_ B ) <-> ( X C_ A /\ Y C_ B ) ) )
19 imaeq2
 |-  ( x = X -> ( R " x ) = ( R " X ) )
20 id
 |-  ( y = Y -> y = Y )
21 19 20 eqeqan12d
 |-  ( ( x = X /\ y = Y ) -> ( ( R " x ) = y <-> ( R " X ) = Y ) )
22 18 21 anbi12d
 |-  ( ( x = X /\ y = Y ) -> ( ( ( x C_ A /\ y C_ B ) /\ ( R " x ) = y ) <-> ( ( X C_ A /\ Y C_ B ) /\ ( R " X ) = Y ) ) )
23 22 adantl
 |-  ( ( ( ph /\ ( X e. _V /\ Y e. _V ) ) /\ ( x = X /\ y = Y ) ) -> ( ( ( x C_ A /\ y C_ B ) /\ ( R " x ) = y ) <-> ( ( X C_ A /\ Y C_ B ) /\ ( R " X ) = Y ) ) )
24 10 12 13 23 brabd
 |-  ( ( ph /\ ( X e. _V /\ Y e. _V ) ) -> ( X ( ( A ~P_* B ) ` R ) Y <-> ( ( X C_ A /\ Y C_ B ) /\ ( R " X ) = Y ) ) )
25 24 pm5.32da
 |-  ( ph -> ( ( ( X e. _V /\ Y e. _V ) /\ X ( ( A ~P_* B ) ` R ) Y ) <-> ( ( X e. _V /\ Y e. _V ) /\ ( ( X C_ A /\ Y C_ B ) /\ ( R " X ) = Y ) ) ) )
26 simpr
 |-  ( ( ( X e. _V /\ Y e. _V ) /\ ( ( X C_ A /\ Y C_ B ) /\ ( R " X ) = Y ) ) -> ( ( X C_ A /\ Y C_ B ) /\ ( R " X ) = Y ) )
27 1 adantr
 |-  ( ( ph /\ X C_ A ) -> A e. U )
28 simpr
 |-  ( ( ph /\ X C_ A ) -> X C_ A )
29 27 28 ssexd
 |-  ( ( ph /\ X C_ A ) -> X e. _V )
30 29 ex
 |-  ( ph -> ( X C_ A -> X e. _V ) )
31 2 adantr
 |-  ( ( ph /\ Y C_ B ) -> B e. V )
32 simpr
 |-  ( ( ph /\ Y C_ B ) -> Y C_ B )
33 31 32 ssexd
 |-  ( ( ph /\ Y C_ B ) -> Y e. _V )
34 33 ex
 |-  ( ph -> ( Y C_ B -> Y e. _V ) )
35 30 34 anim12d
 |-  ( ph -> ( ( X C_ A /\ Y C_ B ) -> ( X e. _V /\ Y e. _V ) ) )
36 35 adantrd
 |-  ( ph -> ( ( ( X C_ A /\ Y C_ B ) /\ ( R " X ) = Y ) -> ( X e. _V /\ Y e. _V ) ) )
37 36 ancrd
 |-  ( ph -> ( ( ( X C_ A /\ Y C_ B ) /\ ( R " X ) = Y ) -> ( ( X e. _V /\ Y e. _V ) /\ ( ( X C_ A /\ Y C_ B ) /\ ( R " X ) = Y ) ) ) )
38 26 37 impbid2
 |-  ( ph -> ( ( ( X e. _V /\ Y e. _V ) /\ ( ( X C_ A /\ Y C_ B ) /\ ( R " X ) = Y ) ) <-> ( ( X C_ A /\ Y C_ B ) /\ ( R " X ) = Y ) ) )
39 8 25 38 3bitrd
 |-  ( ph -> ( X ( ( A ~P_* B ) ` R ) Y <-> ( ( X C_ A /\ Y C_ B ) /\ ( R " X ) = Y ) ) )