Metamath Proof Explorer


Theorem ralrnmpo

Description: A restricted quantifier over an image set. (Contributed by Mario Carneiro, 1-Sep-2015)

Ref Expression
Hypotheses rngop.1 𝐹 = ( 𝑥𝐴 , 𝑦𝐵𝐶 )
ralrnmpo.2 ( 𝑧 = 𝐶 → ( 𝜑𝜓 ) )
Assertion ralrnmpo ( ∀ 𝑥𝐴𝑦𝐵 𝐶𝑉 → ( ∀ 𝑧 ∈ ran 𝐹 𝜑 ↔ ∀ 𝑥𝐴𝑦𝐵 𝜓 ) )

Proof

Step Hyp Ref Expression
1 rngop.1 𝐹 = ( 𝑥𝐴 , 𝑦𝐵𝐶 )
2 ralrnmpo.2 ( 𝑧 = 𝐶 → ( 𝜑𝜓 ) )
3 1 rnmpo ran 𝐹 = { 𝑤 ∣ ∃ 𝑥𝐴𝑦𝐵 𝑤 = 𝐶 }
4 3 raleqi ( ∀ 𝑧 ∈ ran 𝐹 𝜑 ↔ ∀ 𝑧 ∈ { 𝑤 ∣ ∃ 𝑥𝐴𝑦𝐵 𝑤 = 𝐶 } 𝜑 )
5 eqeq1 ( 𝑤 = 𝑧 → ( 𝑤 = 𝐶𝑧 = 𝐶 ) )
6 5 2rexbidv ( 𝑤 = 𝑧 → ( ∃ 𝑥𝐴𝑦𝐵 𝑤 = 𝐶 ↔ ∃ 𝑥𝐴𝑦𝐵 𝑧 = 𝐶 ) )
7 6 ralab ( ∀ 𝑧 ∈ { 𝑤 ∣ ∃ 𝑥𝐴𝑦𝐵 𝑤 = 𝐶 } 𝜑 ↔ ∀ 𝑧 ( ∃ 𝑥𝐴𝑦𝐵 𝑧 = 𝐶𝜑 ) )
8 ralcom4 ( ∀ 𝑥𝐴𝑧 ( ∃ 𝑦𝐵 𝑧 = 𝐶𝜑 ) ↔ ∀ 𝑧𝑥𝐴 ( ∃ 𝑦𝐵 𝑧 = 𝐶𝜑 ) )
9 r19.23v ( ∀ 𝑥𝐴 ( ∃ 𝑦𝐵 𝑧 = 𝐶𝜑 ) ↔ ( ∃ 𝑥𝐴𝑦𝐵 𝑧 = 𝐶𝜑 ) )
10 9 albii ( ∀ 𝑧𝑥𝐴 ( ∃ 𝑦𝐵 𝑧 = 𝐶𝜑 ) ↔ ∀ 𝑧 ( ∃ 𝑥𝐴𝑦𝐵 𝑧 = 𝐶𝜑 ) )
11 8 10 bitr2i ( ∀ 𝑧 ( ∃ 𝑥𝐴𝑦𝐵 𝑧 = 𝐶𝜑 ) ↔ ∀ 𝑥𝐴𝑧 ( ∃ 𝑦𝐵 𝑧 = 𝐶𝜑 ) )
12 4 7 11 3bitri ( ∀ 𝑧 ∈ ran 𝐹 𝜑 ↔ ∀ 𝑥𝐴𝑧 ( ∃ 𝑦𝐵 𝑧 = 𝐶𝜑 ) )
13 ralcom4 ( ∀ 𝑦𝐵𝑧 ( 𝑧 = 𝐶𝜑 ) ↔ ∀ 𝑧𝑦𝐵 ( 𝑧 = 𝐶𝜑 ) )
14 r19.23v ( ∀ 𝑦𝐵 ( 𝑧 = 𝐶𝜑 ) ↔ ( ∃ 𝑦𝐵 𝑧 = 𝐶𝜑 ) )
15 14 albii ( ∀ 𝑧𝑦𝐵 ( 𝑧 = 𝐶𝜑 ) ↔ ∀ 𝑧 ( ∃ 𝑦𝐵 𝑧 = 𝐶𝜑 ) )
16 13 15 bitri ( ∀ 𝑦𝐵𝑧 ( 𝑧 = 𝐶𝜑 ) ↔ ∀ 𝑧 ( ∃ 𝑦𝐵 𝑧 = 𝐶𝜑 ) )
17 nfv 𝑧 𝜓
18 17 2 ceqsalg ( 𝐶𝑉 → ( ∀ 𝑧 ( 𝑧 = 𝐶𝜑 ) ↔ 𝜓 ) )
19 18 ralimi ( ∀ 𝑦𝐵 𝐶𝑉 → ∀ 𝑦𝐵 ( ∀ 𝑧 ( 𝑧 = 𝐶𝜑 ) ↔ 𝜓 ) )
20 ralbi ( ∀ 𝑦𝐵 ( ∀ 𝑧 ( 𝑧 = 𝐶𝜑 ) ↔ 𝜓 ) → ( ∀ 𝑦𝐵𝑧 ( 𝑧 = 𝐶𝜑 ) ↔ ∀ 𝑦𝐵 𝜓 ) )
21 19 20 syl ( ∀ 𝑦𝐵 𝐶𝑉 → ( ∀ 𝑦𝐵𝑧 ( 𝑧 = 𝐶𝜑 ) ↔ ∀ 𝑦𝐵 𝜓 ) )
22 16 21 bitr3id ( ∀ 𝑦𝐵 𝐶𝑉 → ( ∀ 𝑧 ( ∃ 𝑦𝐵 𝑧 = 𝐶𝜑 ) ↔ ∀ 𝑦𝐵 𝜓 ) )
23 22 ralimi ( ∀ 𝑥𝐴𝑦𝐵 𝐶𝑉 → ∀ 𝑥𝐴 ( ∀ 𝑧 ( ∃ 𝑦𝐵 𝑧 = 𝐶𝜑 ) ↔ ∀ 𝑦𝐵 𝜓 ) )
24 ralbi ( ∀ 𝑥𝐴 ( ∀ 𝑧 ( ∃ 𝑦𝐵 𝑧 = 𝐶𝜑 ) ↔ ∀ 𝑦𝐵 𝜓 ) → ( ∀ 𝑥𝐴𝑧 ( ∃ 𝑦𝐵 𝑧 = 𝐶𝜑 ) ↔ ∀ 𝑥𝐴𝑦𝐵 𝜓 ) )
25 23 24 syl ( ∀ 𝑥𝐴𝑦𝐵 𝐶𝑉 → ( ∀ 𝑥𝐴𝑧 ( ∃ 𝑦𝐵 𝑧 = 𝐶𝜑 ) ↔ ∀ 𝑥𝐴𝑦𝐵 𝜓 ) )
26 12 25 syl5bb ( ∀ 𝑥𝐴𝑦𝐵 𝐶𝑉 → ( ∀ 𝑧 ∈ ran 𝐹 𝜑 ↔ ∀ 𝑥𝐴𝑦𝐵 𝜓 ) )