Metamath Proof Explorer


Theorem f1mpt

Description: Express injection for a mapping operation. (Contributed by Mario Carneiro, 2-Jan-2017)

Ref Expression
Hypotheses f1mpt.1 𝐹 = ( 𝑥𝐴𝐶 )
f1mpt.2 ( 𝑥 = 𝑦𝐶 = 𝐷 )
Assertion f1mpt ( 𝐹 : 𝐴1-1𝐵 ↔ ( ∀ 𝑥𝐴 𝐶𝐵 ∧ ∀ 𝑥𝐴𝑦𝐴 ( 𝐶 = 𝐷𝑥 = 𝑦 ) ) )

Proof

Step Hyp Ref Expression
1 f1mpt.1 𝐹 = ( 𝑥𝐴𝐶 )
2 f1mpt.2 ( 𝑥 = 𝑦𝐶 = 𝐷 )
3 nfmpt1 𝑥 ( 𝑥𝐴𝐶 )
4 1 3 nfcxfr 𝑥 𝐹
5 nfcv 𝑦 𝐹
6 4 5 dff13f ( 𝐹 : 𝐴1-1𝐵 ↔ ( 𝐹 : 𝐴𝐵 ∧ ∀ 𝑥𝐴𝑦𝐴 ( ( 𝐹𝑥 ) = ( 𝐹𝑦 ) → 𝑥 = 𝑦 ) ) )
7 1 fmpt ( ∀ 𝑥𝐴 𝐶𝐵𝐹 : 𝐴𝐵 )
8 7 anbi1i ( ( ∀ 𝑥𝐴 𝐶𝐵 ∧ ∀ 𝑥𝐴𝑦𝐴 ( ( 𝐹𝑥 ) = ( 𝐹𝑦 ) → 𝑥 = 𝑦 ) ) ↔ ( 𝐹 : 𝐴𝐵 ∧ ∀ 𝑥𝐴𝑦𝐴 ( ( 𝐹𝑥 ) = ( 𝐹𝑦 ) → 𝑥 = 𝑦 ) ) )
9 2 eleq1d ( 𝑥 = 𝑦 → ( 𝐶𝐵𝐷𝐵 ) )
10 9 cbvralvw ( ∀ 𝑥𝐴 𝐶𝐵 ↔ ∀ 𝑦𝐴 𝐷𝐵 )
11 raaanv ( ∀ 𝑥𝐴𝑦𝐴 ( 𝐶𝐵𝐷𝐵 ) ↔ ( ∀ 𝑥𝐴 𝐶𝐵 ∧ ∀ 𝑦𝐴 𝐷𝐵 ) )
12 1 fvmpt2 ( ( 𝑥𝐴𝐶𝐵 ) → ( 𝐹𝑥 ) = 𝐶 )
13 2 1 fvmptg ( ( 𝑦𝐴𝐷𝐵 ) → ( 𝐹𝑦 ) = 𝐷 )
14 12 13 eqeqan12d ( ( ( 𝑥𝐴𝐶𝐵 ) ∧ ( 𝑦𝐴𝐷𝐵 ) ) → ( ( 𝐹𝑥 ) = ( 𝐹𝑦 ) ↔ 𝐶 = 𝐷 ) )
15 14 an4s ( ( ( 𝑥𝐴𝑦𝐴 ) ∧ ( 𝐶𝐵𝐷𝐵 ) ) → ( ( 𝐹𝑥 ) = ( 𝐹𝑦 ) ↔ 𝐶 = 𝐷 ) )
16 15 imbi1d ( ( ( 𝑥𝐴𝑦𝐴 ) ∧ ( 𝐶𝐵𝐷𝐵 ) ) → ( ( ( 𝐹𝑥 ) = ( 𝐹𝑦 ) → 𝑥 = 𝑦 ) ↔ ( 𝐶 = 𝐷𝑥 = 𝑦 ) ) )
17 16 ex ( ( 𝑥𝐴𝑦𝐴 ) → ( ( 𝐶𝐵𝐷𝐵 ) → ( ( ( 𝐹𝑥 ) = ( 𝐹𝑦 ) → 𝑥 = 𝑦 ) ↔ ( 𝐶 = 𝐷𝑥 = 𝑦 ) ) ) )
18 17 ralimdva ( 𝑥𝐴 → ( ∀ 𝑦𝐴 ( 𝐶𝐵𝐷𝐵 ) → ∀ 𝑦𝐴 ( ( ( 𝐹𝑥 ) = ( 𝐹𝑦 ) → 𝑥 = 𝑦 ) ↔ ( 𝐶 = 𝐷𝑥 = 𝑦 ) ) ) )
19 ralbi ( ∀ 𝑦𝐴 ( ( ( 𝐹𝑥 ) = ( 𝐹𝑦 ) → 𝑥 = 𝑦 ) ↔ ( 𝐶 = 𝐷𝑥 = 𝑦 ) ) → ( ∀ 𝑦𝐴 ( ( 𝐹𝑥 ) = ( 𝐹𝑦 ) → 𝑥 = 𝑦 ) ↔ ∀ 𝑦𝐴 ( 𝐶 = 𝐷𝑥 = 𝑦 ) ) )
20 18 19 syl6 ( 𝑥𝐴 → ( ∀ 𝑦𝐴 ( 𝐶𝐵𝐷𝐵 ) → ( ∀ 𝑦𝐴 ( ( 𝐹𝑥 ) = ( 𝐹𝑦 ) → 𝑥 = 𝑦 ) ↔ ∀ 𝑦𝐴 ( 𝐶 = 𝐷𝑥 = 𝑦 ) ) ) )
21 20 ralimia ( ∀ 𝑥𝐴𝑦𝐴 ( 𝐶𝐵𝐷𝐵 ) → ∀ 𝑥𝐴 ( ∀ 𝑦𝐴 ( ( 𝐹𝑥 ) = ( 𝐹𝑦 ) → 𝑥 = 𝑦 ) ↔ ∀ 𝑦𝐴 ( 𝐶 = 𝐷𝑥 = 𝑦 ) ) )
22 ralbi ( ∀ 𝑥𝐴 ( ∀ 𝑦𝐴 ( ( 𝐹𝑥 ) = ( 𝐹𝑦 ) → 𝑥 = 𝑦 ) ↔ ∀ 𝑦𝐴 ( 𝐶 = 𝐷𝑥 = 𝑦 ) ) → ( ∀ 𝑥𝐴𝑦𝐴 ( ( 𝐹𝑥 ) = ( 𝐹𝑦 ) → 𝑥 = 𝑦 ) ↔ ∀ 𝑥𝐴𝑦𝐴 ( 𝐶 = 𝐷𝑥 = 𝑦 ) ) )
23 21 22 syl ( ∀ 𝑥𝐴𝑦𝐴 ( 𝐶𝐵𝐷𝐵 ) → ( ∀ 𝑥𝐴𝑦𝐴 ( ( 𝐹𝑥 ) = ( 𝐹𝑦 ) → 𝑥 = 𝑦 ) ↔ ∀ 𝑥𝐴𝑦𝐴 ( 𝐶 = 𝐷𝑥 = 𝑦 ) ) )
24 11 23 sylbir ( ( ∀ 𝑥𝐴 𝐶𝐵 ∧ ∀ 𝑦𝐴 𝐷𝐵 ) → ( ∀ 𝑥𝐴𝑦𝐴 ( ( 𝐹𝑥 ) = ( 𝐹𝑦 ) → 𝑥 = 𝑦 ) ↔ ∀ 𝑥𝐴𝑦𝐴 ( 𝐶 = 𝐷𝑥 = 𝑦 ) ) )
25 10 24 sylan2b ( ( ∀ 𝑥𝐴 𝐶𝐵 ∧ ∀ 𝑥𝐴 𝐶𝐵 ) → ( ∀ 𝑥𝐴𝑦𝐴 ( ( 𝐹𝑥 ) = ( 𝐹𝑦 ) → 𝑥 = 𝑦 ) ↔ ∀ 𝑥𝐴𝑦𝐴 ( 𝐶 = 𝐷𝑥 = 𝑦 ) ) )
26 25 anidms ( ∀ 𝑥𝐴 𝐶𝐵 → ( ∀ 𝑥𝐴𝑦𝐴 ( ( 𝐹𝑥 ) = ( 𝐹𝑦 ) → 𝑥 = 𝑦 ) ↔ ∀ 𝑥𝐴𝑦𝐴 ( 𝐶 = 𝐷𝑥 = 𝑦 ) ) )
27 26 pm5.32i ( ( ∀ 𝑥𝐴 𝐶𝐵 ∧ ∀ 𝑥𝐴𝑦𝐴 ( ( 𝐹𝑥 ) = ( 𝐹𝑦 ) → 𝑥 = 𝑦 ) ) ↔ ( ∀ 𝑥𝐴 𝐶𝐵 ∧ ∀ 𝑥𝐴𝑦𝐴 ( 𝐶 = 𝐷𝑥 = 𝑦 ) ) )
28 6 8 27 3bitr2i ( 𝐹 : 𝐴1-1𝐵 ↔ ( ∀ 𝑥𝐴 𝐶𝐵 ∧ ∀ 𝑥𝐴𝑦𝐴 ( 𝐶 = 𝐷𝑥 = 𝑦 ) ) )