Metamath Proof Explorer


Theorem tgjustf

Description: Given any function F , equality of the image by F is an equivalence relation. (Contributed by Thierry Arnoux, 25-Jan-2023)

Ref Expression
Assertion tgjustf ( 𝐴𝑉 → ∃ 𝑟 ( 𝑟 Er 𝐴 ∧ ∀ 𝑥𝐴𝑦𝐴 ( 𝑥 𝑟 𝑦 ↔ ( 𝐹𝑥 ) = ( 𝐹𝑦 ) ) ) )

Proof

Step Hyp Ref Expression
1 relopabv Rel { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) }
2 ancom ( ( 𝑥𝐴𝑦𝐴 ) ↔ ( 𝑦𝐴𝑥𝐴 ) )
3 eqcom ( ( 𝐹𝑥 ) = ( 𝐹𝑦 ) ↔ ( 𝐹𝑦 ) = ( 𝐹𝑥 ) )
4 2 3 anbi12i ( ( ( 𝑥𝐴𝑦𝐴 ) ∧ ( 𝐹𝑥 ) = ( 𝐹𝑦 ) ) ↔ ( ( 𝑦𝐴𝑥𝐴 ) ∧ ( 𝐹𝑦 ) = ( 𝐹𝑥 ) ) )
5 simpl ( ( 𝑢 = 𝑥𝑣 = 𝑦 ) → 𝑢 = 𝑥 )
6 5 fveq2d ( ( 𝑢 = 𝑥𝑣 = 𝑦 ) → ( 𝐹𝑢 ) = ( 𝐹𝑥 ) )
7 simpr ( ( 𝑢 = 𝑥𝑣 = 𝑦 ) → 𝑣 = 𝑦 )
8 7 fveq2d ( ( 𝑢 = 𝑥𝑣 = 𝑦 ) → ( 𝐹𝑣 ) = ( 𝐹𝑦 ) )
9 6 8 eqeq12d ( ( 𝑢 = 𝑥𝑣 = 𝑦 ) → ( ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ↔ ( 𝐹𝑥 ) = ( 𝐹𝑦 ) ) )
10 eqid { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } = { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) }
11 9 10 brab2a ( 𝑥 { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } 𝑦 ↔ ( ( 𝑥𝐴𝑦𝐴 ) ∧ ( 𝐹𝑥 ) = ( 𝐹𝑦 ) ) )
12 simpl ( ( 𝑢 = 𝑦𝑣 = 𝑥 ) → 𝑢 = 𝑦 )
13 12 fveq2d ( ( 𝑢 = 𝑦𝑣 = 𝑥 ) → ( 𝐹𝑢 ) = ( 𝐹𝑦 ) )
14 simpr ( ( 𝑢 = 𝑦𝑣 = 𝑥 ) → 𝑣 = 𝑥 )
15 14 fveq2d ( ( 𝑢 = 𝑦𝑣 = 𝑥 ) → ( 𝐹𝑣 ) = ( 𝐹𝑥 ) )
16 13 15 eqeq12d ( ( 𝑢 = 𝑦𝑣 = 𝑥 ) → ( ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ↔ ( 𝐹𝑦 ) = ( 𝐹𝑥 ) ) )
17 16 10 brab2a ( 𝑦 { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } 𝑥 ↔ ( ( 𝑦𝐴𝑥𝐴 ) ∧ ( 𝐹𝑦 ) = ( 𝐹𝑥 ) ) )
18 4 11 17 3bitr4i ( 𝑥 { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } 𝑦𝑦 { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } 𝑥 )
19 18 biimpi ( 𝑥 { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } 𝑦𝑦 { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } 𝑥 )
20 simplll ( ( ( ( 𝑥𝐴𝑦𝐴 ) ∧ ( 𝐹𝑥 ) = ( 𝐹𝑦 ) ) ∧ ( ( 𝑦𝐴𝑧𝐴 ) ∧ ( 𝐹𝑦 ) = ( 𝐹𝑧 ) ) ) → 𝑥𝐴 )
21 simprlr ( ( ( ( 𝑥𝐴𝑦𝐴 ) ∧ ( 𝐹𝑥 ) = ( 𝐹𝑦 ) ) ∧ ( ( 𝑦𝐴𝑧𝐴 ) ∧ ( 𝐹𝑦 ) = ( 𝐹𝑧 ) ) ) → 𝑧𝐴 )
22 simplr ( ( ( ( 𝑥𝐴𝑦𝐴 ) ∧ ( 𝐹𝑥 ) = ( 𝐹𝑦 ) ) ∧ ( ( 𝑦𝐴𝑧𝐴 ) ∧ ( 𝐹𝑦 ) = ( 𝐹𝑧 ) ) ) → ( 𝐹𝑥 ) = ( 𝐹𝑦 ) )
23 simprr ( ( ( ( 𝑥𝐴𝑦𝐴 ) ∧ ( 𝐹𝑥 ) = ( 𝐹𝑦 ) ) ∧ ( ( 𝑦𝐴𝑧𝐴 ) ∧ ( 𝐹𝑦 ) = ( 𝐹𝑧 ) ) ) → ( 𝐹𝑦 ) = ( 𝐹𝑧 ) )
24 22 23 eqtrd ( ( ( ( 𝑥𝐴𝑦𝐴 ) ∧ ( 𝐹𝑥 ) = ( 𝐹𝑦 ) ) ∧ ( ( 𝑦𝐴𝑧𝐴 ) ∧ ( 𝐹𝑦 ) = ( 𝐹𝑧 ) ) ) → ( 𝐹𝑥 ) = ( 𝐹𝑧 ) )
25 20 21 24 jca31 ( ( ( ( 𝑥𝐴𝑦𝐴 ) ∧ ( 𝐹𝑥 ) = ( 𝐹𝑦 ) ) ∧ ( ( 𝑦𝐴𝑧𝐴 ) ∧ ( 𝐹𝑦 ) = ( 𝐹𝑧 ) ) ) → ( ( 𝑥𝐴𝑧𝐴 ) ∧ ( 𝐹𝑥 ) = ( 𝐹𝑧 ) ) )
26 simpl ( ( 𝑢 = 𝑦𝑣 = 𝑧 ) → 𝑢 = 𝑦 )
27 26 fveq2d ( ( 𝑢 = 𝑦𝑣 = 𝑧 ) → ( 𝐹𝑢 ) = ( 𝐹𝑦 ) )
28 simpr ( ( 𝑢 = 𝑦𝑣 = 𝑧 ) → 𝑣 = 𝑧 )
29 28 fveq2d ( ( 𝑢 = 𝑦𝑣 = 𝑧 ) → ( 𝐹𝑣 ) = ( 𝐹𝑧 ) )
30 27 29 eqeq12d ( ( 𝑢 = 𝑦𝑣 = 𝑧 ) → ( ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ↔ ( 𝐹𝑦 ) = ( 𝐹𝑧 ) ) )
31 30 10 brab2a ( 𝑦 { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } 𝑧 ↔ ( ( 𝑦𝐴𝑧𝐴 ) ∧ ( 𝐹𝑦 ) = ( 𝐹𝑧 ) ) )
32 11 31 anbi12i ( ( 𝑥 { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } 𝑦𝑦 { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } 𝑧 ) ↔ ( ( ( 𝑥𝐴𝑦𝐴 ) ∧ ( 𝐹𝑥 ) = ( 𝐹𝑦 ) ) ∧ ( ( 𝑦𝐴𝑧𝐴 ) ∧ ( 𝐹𝑦 ) = ( 𝐹𝑧 ) ) ) )
33 simpl ( ( 𝑢 = 𝑥𝑣 = 𝑧 ) → 𝑢 = 𝑥 )
34 33 fveq2d ( ( 𝑢 = 𝑥𝑣 = 𝑧 ) → ( 𝐹𝑢 ) = ( 𝐹𝑥 ) )
35 simpr ( ( 𝑢 = 𝑥𝑣 = 𝑧 ) → 𝑣 = 𝑧 )
36 35 fveq2d ( ( 𝑢 = 𝑥𝑣 = 𝑧 ) → ( 𝐹𝑣 ) = ( 𝐹𝑧 ) )
37 34 36 eqeq12d ( ( 𝑢 = 𝑥𝑣 = 𝑧 ) → ( ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ↔ ( 𝐹𝑥 ) = ( 𝐹𝑧 ) ) )
38 37 10 brab2a ( 𝑥 { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } 𝑧 ↔ ( ( 𝑥𝐴𝑧𝐴 ) ∧ ( 𝐹𝑥 ) = ( 𝐹𝑧 ) ) )
39 25 32 38 3imtr4i ( ( 𝑥 { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } 𝑦𝑦 { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } 𝑧 ) → 𝑥 { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } 𝑧 )
40 eqid ( 𝐹𝑥 ) = ( 𝐹𝑥 )
41 40 biantru ( ( 𝑥𝐴𝑥𝐴 ) ↔ ( ( 𝑥𝐴𝑥𝐴 ) ∧ ( 𝐹𝑥 ) = ( 𝐹𝑥 ) ) )
42 pm4.24 ( 𝑥𝐴 ↔ ( 𝑥𝐴𝑥𝐴 ) )
43 simpl ( ( 𝑢 = 𝑥𝑣 = 𝑥 ) → 𝑢 = 𝑥 )
44 43 fveq2d ( ( 𝑢 = 𝑥𝑣 = 𝑥 ) → ( 𝐹𝑢 ) = ( 𝐹𝑥 ) )
45 simpr ( ( 𝑢 = 𝑥𝑣 = 𝑥 ) → 𝑣 = 𝑥 )
46 45 fveq2d ( ( 𝑢 = 𝑥𝑣 = 𝑥 ) → ( 𝐹𝑣 ) = ( 𝐹𝑥 ) )
47 44 46 eqeq12d ( ( 𝑢 = 𝑥𝑣 = 𝑥 ) → ( ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ↔ ( 𝐹𝑥 ) = ( 𝐹𝑥 ) ) )
48 47 10 brab2a ( 𝑥 { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } 𝑥 ↔ ( ( 𝑥𝐴𝑥𝐴 ) ∧ ( 𝐹𝑥 ) = ( 𝐹𝑥 ) ) )
49 41 42 48 3bitr4i ( 𝑥𝐴𝑥 { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } 𝑥 )
50 1 19 39 49 iseri { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } Er 𝐴
51 11 baib ( ( 𝑥𝐴𝑦𝐴 ) → ( 𝑥 { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } 𝑦 ↔ ( 𝐹𝑥 ) = ( 𝐹𝑦 ) ) )
52 51 rgen2 𝑥𝐴𝑦𝐴 ( 𝑥 { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } 𝑦 ↔ ( 𝐹𝑥 ) = ( 𝐹𝑦 ) )
53 id ( 𝐴𝑉𝐴𝑉 )
54 simprll ( ( 𝐴𝑉 ∧ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) ) → 𝑢𝐴 )
55 simprlr ( ( 𝐴𝑉 ∧ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) ) → 𝑣𝐴 )
56 53 53 54 55 opabex2 ( 𝐴𝑉 → { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } ∈ V )
57 ereq1 ( 𝑟 = { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } → ( 𝑟 Er 𝐴 ↔ { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } Er 𝐴 ) )
58 simpl ( ( 𝑟 = { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } ∧ ( 𝑥𝐴𝑦𝐴 ) ) → 𝑟 = { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } )
59 58 breqd ( ( 𝑟 = { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } ∧ ( 𝑥𝐴𝑦𝐴 ) ) → ( 𝑥 𝑟 𝑦𝑥 { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } 𝑦 ) )
60 59 bibi1d ( ( 𝑟 = { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } ∧ ( 𝑥𝐴𝑦𝐴 ) ) → ( ( 𝑥 𝑟 𝑦 ↔ ( 𝐹𝑥 ) = ( 𝐹𝑦 ) ) ↔ ( 𝑥 { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } 𝑦 ↔ ( 𝐹𝑥 ) = ( 𝐹𝑦 ) ) ) )
61 60 2ralbidva ( 𝑟 = { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } → ( ∀ 𝑥𝐴𝑦𝐴 ( 𝑥 𝑟 𝑦 ↔ ( 𝐹𝑥 ) = ( 𝐹𝑦 ) ) ↔ ∀ 𝑥𝐴𝑦𝐴 ( 𝑥 { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } 𝑦 ↔ ( 𝐹𝑥 ) = ( 𝐹𝑦 ) ) ) )
62 57 61 anbi12d ( 𝑟 = { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } → ( ( 𝑟 Er 𝐴 ∧ ∀ 𝑥𝐴𝑦𝐴 ( 𝑥 𝑟 𝑦 ↔ ( 𝐹𝑥 ) = ( 𝐹𝑦 ) ) ) ↔ ( { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } Er 𝐴 ∧ ∀ 𝑥𝐴𝑦𝐴 ( 𝑥 { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } 𝑦 ↔ ( 𝐹𝑥 ) = ( 𝐹𝑦 ) ) ) ) )
63 62 spcegv ( { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } ∈ V → ( ( { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } Er 𝐴 ∧ ∀ 𝑥𝐴𝑦𝐴 ( 𝑥 { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } 𝑦 ↔ ( 𝐹𝑥 ) = ( 𝐹𝑦 ) ) ) → ∃ 𝑟 ( 𝑟 Er 𝐴 ∧ ∀ 𝑥𝐴𝑦𝐴 ( 𝑥 𝑟 𝑦 ↔ ( 𝐹𝑥 ) = ( 𝐹𝑦 ) ) ) ) )
64 56 63 syl ( 𝐴𝑉 → ( ( { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } Er 𝐴 ∧ ∀ 𝑥𝐴𝑦𝐴 ( 𝑥 { ⟨ 𝑢 , 𝑣 ⟩ ∣ ( ( 𝑢𝐴𝑣𝐴 ) ∧ ( 𝐹𝑢 ) = ( 𝐹𝑣 ) ) } 𝑦 ↔ ( 𝐹𝑥 ) = ( 𝐹𝑦 ) ) ) → ∃ 𝑟 ( 𝑟 Er 𝐴 ∧ ∀ 𝑥𝐴𝑦𝐴 ( 𝑥 𝑟 𝑦 ↔ ( 𝐹𝑥 ) = ( 𝐹𝑦 ) ) ) ) )
65 50 52 64 mp2ani ( 𝐴𝑉 → ∃ 𝑟 ( 𝑟 Er 𝐴 ∧ ∀ 𝑥𝐴𝑦𝐴 ( 𝑥 𝑟 𝑦 ↔ ( 𝐹𝑥 ) = ( 𝐹𝑦 ) ) ) )