Metamath Proof Explorer


Theorem prter1

Description: Every partition generates an equivalence relation. (Contributed by Rodolfo Medina, 13-Oct-2010) (Revised by Mario Carneiro, 12-Aug-2015)

Ref Expression
Hypothesis prtlem18.1 = { ⟨ 𝑥 , 𝑦 ⟩ ∣ ∃ 𝑢𝐴 ( 𝑥𝑢𝑦𝑢 ) }
Assertion prter1 ( Prt 𝐴 Er 𝐴 )

Proof

Step Hyp Ref Expression
1 prtlem18.1 = { ⟨ 𝑥 , 𝑦 ⟩ ∣ ∃ 𝑢𝐴 ( 𝑥𝑢𝑦𝑢 ) }
2 1 relopabiv Rel
3 2 a1i ( Prt 𝐴 → Rel )
4 1 prtlem16 dom = 𝐴
5 4 a1i ( Prt 𝐴 → dom = 𝐴 )
6 prtlem15 ( Prt 𝐴 → ( ∃ 𝑣𝐴𝑞𝐴 ( ( 𝑧𝑣𝑤𝑣 ) ∧ ( 𝑤𝑞𝑝𝑞 ) ) → ∃ 𝑟𝐴 ( 𝑧𝑟𝑝𝑟 ) ) )
7 1 prtlem13 ( 𝑧 𝑤 ↔ ∃ 𝑣𝐴 ( 𝑧𝑣𝑤𝑣 ) )
8 1 prtlem13 ( 𝑤 𝑝 ↔ ∃ 𝑞𝐴 ( 𝑤𝑞𝑝𝑞 ) )
9 7 8 anbi12i ( ( 𝑧 𝑤𝑤 𝑝 ) ↔ ( ∃ 𝑣𝐴 ( 𝑧𝑣𝑤𝑣 ) ∧ ∃ 𝑞𝐴 ( 𝑤𝑞𝑝𝑞 ) ) )
10 reeanv ( ∃ 𝑣𝐴𝑞𝐴 ( ( 𝑧𝑣𝑤𝑣 ) ∧ ( 𝑤𝑞𝑝𝑞 ) ) ↔ ( ∃ 𝑣𝐴 ( 𝑧𝑣𝑤𝑣 ) ∧ ∃ 𝑞𝐴 ( 𝑤𝑞𝑝𝑞 ) ) )
11 9 10 bitr4i ( ( 𝑧 𝑤𝑤 𝑝 ) ↔ ∃ 𝑣𝐴𝑞𝐴 ( ( 𝑧𝑣𝑤𝑣 ) ∧ ( 𝑤𝑞𝑝𝑞 ) ) )
12 1 prtlem13 ( 𝑧 𝑝 ↔ ∃ 𝑟𝐴 ( 𝑧𝑟𝑝𝑟 ) )
13 6 11 12 3imtr4g ( Prt 𝐴 → ( ( 𝑧 𝑤𝑤 𝑝 ) → 𝑧 𝑝 ) )
14 pm3.22 ( ( 𝑧𝑣𝑤𝑣 ) → ( 𝑤𝑣𝑧𝑣 ) )
15 14 reximi ( ∃ 𝑣𝐴 ( 𝑧𝑣𝑤𝑣 ) → ∃ 𝑣𝐴 ( 𝑤𝑣𝑧𝑣 ) )
16 1 prtlem13 ( 𝑤 𝑧 ↔ ∃ 𝑣𝐴 ( 𝑤𝑣𝑧𝑣 ) )
17 15 7 16 3imtr4i ( 𝑧 𝑤𝑤 𝑧 )
18 13 17 jctil ( Prt 𝐴 → ( ( 𝑧 𝑤𝑤 𝑧 ) ∧ ( ( 𝑧 𝑤𝑤 𝑝 ) → 𝑧 𝑝 ) ) )
19 18 alrimivv ( Prt 𝐴 → ∀ 𝑤𝑝 ( ( 𝑧 𝑤𝑤 𝑧 ) ∧ ( ( 𝑧 𝑤𝑤 𝑝 ) → 𝑧 𝑝 ) ) )
20 19 alrimiv ( Prt 𝐴 → ∀ 𝑧𝑤𝑝 ( ( 𝑧 𝑤𝑤 𝑧 ) ∧ ( ( 𝑧 𝑤𝑤 𝑝 ) → 𝑧 𝑝 ) ) )
21 dfer2 ( Er 𝐴 ↔ ( Rel ∧ dom = 𝐴 ∧ ∀ 𝑧𝑤𝑝 ( ( 𝑧 𝑤𝑤 𝑧 ) ∧ ( ( 𝑧 𝑤𝑤 𝑝 ) → 𝑧 𝑝 ) ) ) )
22 3 5 20 21 syl3anbrc ( Prt 𝐴 Er 𝐴 )