Metamath Proof Explorer


Theorem qliftfun

Description: The function F is the unique function defined by F[ x ] = A , provided that the well-definedness condition holds. (Contributed by Mario Carneiro, 23-Dec-2016) (Revised by AV, 3-Aug-2024)

Ref Expression
Hypotheses qlift.1 𝐹 = ran ( 𝑥𝑋 ↦ ⟨ [ 𝑥 ] 𝑅 , 𝐴 ⟩ )
qlift.2 ( ( 𝜑𝑥𝑋 ) → 𝐴𝑌 )
qlift.3 ( 𝜑𝑅 Er 𝑋 )
qlift.4 ( 𝜑𝑋𝑉 )
qliftfun.4 ( 𝑥 = 𝑦𝐴 = 𝐵 )
Assertion qliftfun ( 𝜑 → ( Fun 𝐹 ↔ ∀ 𝑥𝑦 ( 𝑥 𝑅 𝑦𝐴 = 𝐵 ) ) )

Proof

Step Hyp Ref Expression
1 qlift.1 𝐹 = ran ( 𝑥𝑋 ↦ ⟨ [ 𝑥 ] 𝑅 , 𝐴 ⟩ )
2 qlift.2 ( ( 𝜑𝑥𝑋 ) → 𝐴𝑌 )
3 qlift.3 ( 𝜑𝑅 Er 𝑋 )
4 qlift.4 ( 𝜑𝑋𝑉 )
5 qliftfun.4 ( 𝑥 = 𝑦𝐴 = 𝐵 )
6 1 2 3 4 qliftlem ( ( 𝜑𝑥𝑋 ) → [ 𝑥 ] 𝑅 ∈ ( 𝑋 / 𝑅 ) )
7 eceq1 ( 𝑥 = 𝑦 → [ 𝑥 ] 𝑅 = [ 𝑦 ] 𝑅 )
8 1 6 2 7 5 fliftfun ( 𝜑 → ( Fun 𝐹 ↔ ∀ 𝑥𝑋𝑦𝑋 ( [ 𝑥 ] 𝑅 = [ 𝑦 ] 𝑅𝐴 = 𝐵 ) ) )
9 3 adantr ( ( 𝜑𝑥 𝑅 𝑦 ) → 𝑅 Er 𝑋 )
10 simpr ( ( 𝜑𝑥 𝑅 𝑦 ) → 𝑥 𝑅 𝑦 )
11 9 10 ercl ( ( 𝜑𝑥 𝑅 𝑦 ) → 𝑥𝑋 )
12 9 10 ercl2 ( ( 𝜑𝑥 𝑅 𝑦 ) → 𝑦𝑋 )
13 11 12 jca ( ( 𝜑𝑥 𝑅 𝑦 ) → ( 𝑥𝑋𝑦𝑋 ) )
14 13 ex ( 𝜑 → ( 𝑥 𝑅 𝑦 → ( 𝑥𝑋𝑦𝑋 ) ) )
15 14 pm4.71rd ( 𝜑 → ( 𝑥 𝑅 𝑦 ↔ ( ( 𝑥𝑋𝑦𝑋 ) ∧ 𝑥 𝑅 𝑦 ) ) )
16 3 adantr ( ( 𝜑 ∧ ( 𝑥𝑋𝑦𝑋 ) ) → 𝑅 Er 𝑋 )
17 simprl ( ( 𝜑 ∧ ( 𝑥𝑋𝑦𝑋 ) ) → 𝑥𝑋 )
18 16 17 erth ( ( 𝜑 ∧ ( 𝑥𝑋𝑦𝑋 ) ) → ( 𝑥 𝑅 𝑦 ↔ [ 𝑥 ] 𝑅 = [ 𝑦 ] 𝑅 ) )
19 18 pm5.32da ( 𝜑 → ( ( ( 𝑥𝑋𝑦𝑋 ) ∧ 𝑥 𝑅 𝑦 ) ↔ ( ( 𝑥𝑋𝑦𝑋 ) ∧ [ 𝑥 ] 𝑅 = [ 𝑦 ] 𝑅 ) ) )
20 15 19 bitrd ( 𝜑 → ( 𝑥 𝑅 𝑦 ↔ ( ( 𝑥𝑋𝑦𝑋 ) ∧ [ 𝑥 ] 𝑅 = [ 𝑦 ] 𝑅 ) ) )
21 20 imbi1d ( 𝜑 → ( ( 𝑥 𝑅 𝑦𝐴 = 𝐵 ) ↔ ( ( ( 𝑥𝑋𝑦𝑋 ) ∧ [ 𝑥 ] 𝑅 = [ 𝑦 ] 𝑅 ) → 𝐴 = 𝐵 ) ) )
22 impexp ( ( ( ( 𝑥𝑋𝑦𝑋 ) ∧ [ 𝑥 ] 𝑅 = [ 𝑦 ] 𝑅 ) → 𝐴 = 𝐵 ) ↔ ( ( 𝑥𝑋𝑦𝑋 ) → ( [ 𝑥 ] 𝑅 = [ 𝑦 ] 𝑅𝐴 = 𝐵 ) ) )
23 21 22 bitrdi ( 𝜑 → ( ( 𝑥 𝑅 𝑦𝐴 = 𝐵 ) ↔ ( ( 𝑥𝑋𝑦𝑋 ) → ( [ 𝑥 ] 𝑅 = [ 𝑦 ] 𝑅𝐴 = 𝐵 ) ) ) )
24 23 2albidv ( 𝜑 → ( ∀ 𝑥𝑦 ( 𝑥 𝑅 𝑦𝐴 = 𝐵 ) ↔ ∀ 𝑥𝑦 ( ( 𝑥𝑋𝑦𝑋 ) → ( [ 𝑥 ] 𝑅 = [ 𝑦 ] 𝑅𝐴 = 𝐵 ) ) ) )
25 r2al ( ∀ 𝑥𝑋𝑦𝑋 ( [ 𝑥 ] 𝑅 = [ 𝑦 ] 𝑅𝐴 = 𝐵 ) ↔ ∀ 𝑥𝑦 ( ( 𝑥𝑋𝑦𝑋 ) → ( [ 𝑥 ] 𝑅 = [ 𝑦 ] 𝑅𝐴 = 𝐵 ) ) )
26 24 25 bitr4di ( 𝜑 → ( ∀ 𝑥𝑦 ( 𝑥 𝑅 𝑦𝐴 = 𝐵 ) ↔ ∀ 𝑥𝑋𝑦𝑋 ( [ 𝑥 ] 𝑅 = [ 𝑦 ] 𝑅𝐴 = 𝐵 ) ) )
27 8 26 bitr4d ( 𝜑 → ( Fun 𝐹 ↔ ∀ 𝑥𝑦 ( 𝑥 𝑅 𝑦𝐴 = 𝐵 ) ) )