Metamath Proof Explorer


Theorem ffvresb

Description: A necessary and sufficient condition for a restricted function. (Contributed by Mario Carneiro, 14-Nov-2013)

Ref Expression
Assertion ffvresb Fun F F A : A B x A x dom F F x B

Proof

Step Hyp Ref Expression
1 fdm F A : A B dom F A = A
2 dmres dom F A = A dom F
3 inss2 A dom F dom F
4 2 3 eqsstri dom F A dom F
5 1 4 eqsstrrdi F A : A B A dom F
6 5 sselda F A : A B x A x dom F
7 fvres x A F A x = F x
8 7 adantl F A : A B x A F A x = F x
9 ffvelrn F A : A B x A F A x B
10 8 9 eqeltrrd F A : A B x A F x B
11 6 10 jca F A : A B x A x dom F F x B
12 11 ralrimiva F A : A B x A x dom F F x B
13 simpl x dom F F x B x dom F
14 13 ralimi x A x dom F F x B x A x dom F
15 dfss3 A dom F x A x dom F
16 14 15 sylibr x A x dom F F x B A dom F
17 funfn Fun F F Fn dom F
18 fnssres F Fn dom F A dom F F A Fn A
19 17 18 sylanb Fun F A dom F F A Fn A
20 16 19 sylan2 Fun F x A x dom F F x B F A Fn A
21 simpr x dom F F x B F x B
22 7 eleq1d x A F A x B F x B
23 21 22 syl5ibr x A x dom F F x B F A x B
24 23 ralimia x A x dom F F x B x A F A x B
25 24 adantl Fun F x A x dom F F x B x A F A x B
26 fnfvrnss F A Fn A x A F A x B ran F A B
27 20 25 26 syl2anc Fun F x A x dom F F x B ran F A B
28 df-f F A : A B F A Fn A ran F A B
29 20 27 28 sylanbrc Fun F x A x dom F F x B F A : A B
30 29 ex Fun F x A x dom F F x B F A : A B
31 12 30 impbid2 Fun F F A : A B x A x dom F F x B