Metamath Proof Explorer


Theorem erim2

Description: Equivalence relation on its natural domain implies that the class of coelements on the domain is equal to the relation (this is prter3 in a more convenient form , see also erim ). (Contributed by Rodolfo Medina, 19-Oct-2010) (Proof shortened by Mario Carneiro, 12-Aug-2015) (Revised by Peter Mazsa, 29-Dec-2021)

Ref Expression
Assertion erim2 ( 𝑅𝑉 → ( ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) → ∼ 𝐴 = 𝑅 ) )

Proof

Step Hyp Ref Expression
1 relcoels Rel ∼ 𝐴
2 1 a1i ( ( 𝑅𝑉 ∧ ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) ) → Rel ∼ 𝐴 )
3 eqvrelrel ( EqvRel 𝑅 → Rel 𝑅 )
4 3 ad2antrl ( ( 𝑅𝑉 ∧ ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) ) → Rel 𝑅 )
5 brcoels ( ( 𝑥 ∈ V ∧ 𝑦 ∈ V ) → ( 𝑥𝐴 𝑦 ↔ ∃ 𝑢𝐴 ( 𝑥𝑢𝑦𝑢 ) ) )
6 5 el2v ( 𝑥𝐴 𝑦 ↔ ∃ 𝑢𝐴 ( 𝑥𝑢𝑦𝑢 ) )
7 simpll ( ( ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) ∧ ( 𝑢𝐴𝑥𝑢 ) ) → EqvRel 𝑅 )
8 simprl ( ( ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) ∧ ( 𝑢𝐴𝑥𝑢 ) ) → 𝑢𝐴 )
9 simplr ( ( ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) ∧ ( 𝑢𝐴𝑥𝑢 ) ) → ( dom 𝑅 / 𝑅 ) = 𝐴 )
10 8 9 eleqtrrd ( ( ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) ∧ ( 𝑢𝐴𝑥𝑢 ) ) → 𝑢 ∈ ( dom 𝑅 / 𝑅 ) )
11 simprr ( ( ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) ∧ ( 𝑢𝐴𝑥𝑢 ) ) → 𝑥𝑢 )
12 eqvrelqsel ( ( EqvRel 𝑅𝑢 ∈ ( dom 𝑅 / 𝑅 ) ∧ 𝑥𝑢 ) → 𝑢 = [ 𝑥 ] 𝑅 )
13 7 10 11 12 syl3anc ( ( ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) ∧ ( 𝑢𝐴𝑥𝑢 ) ) → 𝑢 = [ 𝑥 ] 𝑅 )
14 13 eleq2d ( ( ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) ∧ ( 𝑢𝐴𝑥𝑢 ) ) → ( 𝑦𝑢𝑦 ∈ [ 𝑥 ] 𝑅 ) )
15 elecALTV ( ( 𝑥 ∈ V ∧ 𝑦 ∈ V ) → ( 𝑦 ∈ [ 𝑥 ] 𝑅𝑥 𝑅 𝑦 ) )
16 15 el2v ( 𝑦 ∈ [ 𝑥 ] 𝑅𝑥 𝑅 𝑦 )
17 14 16 bitrdi ( ( ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) ∧ ( 𝑢𝐴𝑥𝑢 ) ) → ( 𝑦𝑢𝑥 𝑅 𝑦 ) )
18 17 anassrs ( ( ( ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) ∧ 𝑢𝐴 ) ∧ 𝑥𝑢 ) → ( 𝑦𝑢𝑥 𝑅 𝑦 ) )
19 18 pm5.32da ( ( ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) ∧ 𝑢𝐴 ) → ( ( 𝑥𝑢𝑦𝑢 ) ↔ ( 𝑥𝑢𝑥 𝑅 𝑦 ) ) )
20 19 rexbidva ( ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) → ( ∃ 𝑢𝐴 ( 𝑥𝑢𝑦𝑢 ) ↔ ∃ 𝑢𝐴 ( 𝑥𝑢𝑥 𝑅 𝑦 ) ) )
21 20 adantl ( ( 𝑅𝑉 ∧ ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) ) → ( ∃ 𝑢𝐴 ( 𝑥𝑢𝑦𝑢 ) ↔ ∃ 𝑢𝐴 ( 𝑥𝑢𝑥 𝑅 𝑦 ) ) )
22 simpll ( ( ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) ∧ 𝑥 𝑅 𝑦 ) → EqvRel 𝑅 )
23 simpr ( ( ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) ∧ 𝑥 𝑅 𝑦 ) → 𝑥 𝑅 𝑦 )
24 22 23 eqvrelcl ( ( ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) ∧ 𝑥 𝑅 𝑦 ) → 𝑥 ∈ dom 𝑅 )
25 24 adantll ( ( ( 𝑅𝑉 ∧ ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) ) ∧ 𝑥 𝑅 𝑦 ) → 𝑥 ∈ dom 𝑅 )
26 eqvrelim ( EqvRel 𝑅 → dom 𝑅 = ran 𝑅 )
27 26 ad2antrl ( ( 𝑅𝑉 ∧ ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) ) → dom 𝑅 = ran 𝑅 )
28 27 eleq2d ( ( 𝑅𝑉 ∧ ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) ) → ( 𝑥 ∈ dom 𝑅𝑥 ∈ ran 𝑅 ) )
29 dmqseqim2 ( 𝑅𝑉 → ( Rel 𝑅 → ( ( dom 𝑅 / 𝑅 ) = 𝐴 → ( 𝑥 ∈ ran 𝑅𝑥 𝐴 ) ) ) )
30 3 29 syl5 ( 𝑅𝑉 → ( EqvRel 𝑅 → ( ( dom 𝑅 / 𝑅 ) = 𝐴 → ( 𝑥 ∈ ran 𝑅𝑥 𝐴 ) ) ) )
31 30 imp32 ( ( 𝑅𝑉 ∧ ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) ) → ( 𝑥 ∈ ran 𝑅𝑥 𝐴 ) )
32 28 31 bitrd ( ( 𝑅𝑉 ∧ ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) ) → ( 𝑥 ∈ dom 𝑅𝑥 𝐴 ) )
33 eluni2 ( 𝑥 𝐴 ↔ ∃ 𝑢𝐴 𝑥𝑢 )
34 32 33 bitrdi ( ( 𝑅𝑉 ∧ ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) ) → ( 𝑥 ∈ dom 𝑅 ↔ ∃ 𝑢𝐴 𝑥𝑢 ) )
35 34 adantr ( ( ( 𝑅𝑉 ∧ ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) ) ∧ 𝑥 𝑅 𝑦 ) → ( 𝑥 ∈ dom 𝑅 ↔ ∃ 𝑢𝐴 𝑥𝑢 ) )
36 25 35 mpbid ( ( ( 𝑅𝑉 ∧ ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) ) ∧ 𝑥 𝑅 𝑦 ) → ∃ 𝑢𝐴 𝑥𝑢 )
37 36 ex ( ( 𝑅𝑉 ∧ ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) ) → ( 𝑥 𝑅 𝑦 → ∃ 𝑢𝐴 𝑥𝑢 ) )
38 37 pm4.71rd ( ( 𝑅𝑉 ∧ ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) ) → ( 𝑥 𝑅 𝑦 ↔ ( ∃ 𝑢𝐴 𝑥𝑢𝑥 𝑅 𝑦 ) ) )
39 r19.41v ( ∃ 𝑢𝐴 ( 𝑥𝑢𝑥 𝑅 𝑦 ) ↔ ( ∃ 𝑢𝐴 𝑥𝑢𝑥 𝑅 𝑦 ) )
40 38 39 bitr4di ( ( 𝑅𝑉 ∧ ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) ) → ( 𝑥 𝑅 𝑦 ↔ ∃ 𝑢𝐴 ( 𝑥𝑢𝑥 𝑅 𝑦 ) ) )
41 21 40 bitr4d ( ( 𝑅𝑉 ∧ ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) ) → ( ∃ 𝑢𝐴 ( 𝑥𝑢𝑦𝑢 ) ↔ 𝑥 𝑅 𝑦 ) )
42 6 41 syl5bb ( ( 𝑅𝑉 ∧ ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) ) → ( 𝑥𝐴 𝑦𝑥 𝑅 𝑦 ) )
43 2 4 42 eqbrrdv ( ( 𝑅𝑉 ∧ ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) ) → ∼ 𝐴 = 𝑅 )
44 43 ex ( 𝑅𝑉 → ( ( EqvRel 𝑅 ∧ ( dom 𝑅 / 𝑅 ) = 𝐴 ) → ∼ 𝐴 = 𝑅 ) )