Metamath Proof Explorer


Theorem ralxfrd

Description: Transfer universal quantification from a variable x to another variable y contained in expression A . (Contributed by NM, 15-Aug-2014) (Proof shortened by Mario Carneiro, 19-Nov-2016) (Proof shortened by JJ, 7-Aug-2021)

Ref Expression
Hypotheses ralxfrd.1 ( ( 𝜑𝑦𝐶 ) → 𝐴𝐵 )
ralxfrd.2 ( ( 𝜑𝑥𝐵 ) → ∃ 𝑦𝐶 𝑥 = 𝐴 )
ralxfrd.3 ( ( 𝜑𝑥 = 𝐴 ) → ( 𝜓𝜒 ) )
Assertion ralxfrd ( 𝜑 → ( ∀ 𝑥𝐵 𝜓 ↔ ∀ 𝑦𝐶 𝜒 ) )

Proof

Step Hyp Ref Expression
1 ralxfrd.1 ( ( 𝜑𝑦𝐶 ) → 𝐴𝐵 )
2 ralxfrd.2 ( ( 𝜑𝑥𝐵 ) → ∃ 𝑦𝐶 𝑥 = 𝐴 )
3 ralxfrd.3 ( ( 𝜑𝑥 = 𝐴 ) → ( 𝜓𝜒 ) )
4 3 adantlr ( ( ( 𝜑𝑦𝐶 ) ∧ 𝑥 = 𝐴 ) → ( 𝜓𝜒 ) )
5 1 4 rspcdv ( ( 𝜑𝑦𝐶 ) → ( ∀ 𝑥𝐵 𝜓𝜒 ) )
6 5 ralrimdva ( 𝜑 → ( ∀ 𝑥𝐵 𝜓 → ∀ 𝑦𝐶 𝜒 ) )
7 r19.29 ( ( ∀ 𝑦𝐶 𝜒 ∧ ∃ 𝑦𝐶 𝑥 = 𝐴 ) → ∃ 𝑦𝐶 ( 𝜒𝑥 = 𝐴 ) )
8 3 exbiri ( 𝜑 → ( 𝑥 = 𝐴 → ( 𝜒𝜓 ) ) )
9 8 impcomd ( 𝜑 → ( ( 𝜒𝑥 = 𝐴 ) → 𝜓 ) )
10 9 rexlimdvw ( 𝜑 → ( ∃ 𝑦𝐶 ( 𝜒𝑥 = 𝐴 ) → 𝜓 ) )
11 7 10 syl5 ( 𝜑 → ( ( ∀ 𝑦𝐶 𝜒 ∧ ∃ 𝑦𝐶 𝑥 = 𝐴 ) → 𝜓 ) )
12 11 adantr ( ( 𝜑𝑥𝐵 ) → ( ( ∀ 𝑦𝐶 𝜒 ∧ ∃ 𝑦𝐶 𝑥 = 𝐴 ) → 𝜓 ) )
13 2 12 mpan2d ( ( 𝜑𝑥𝐵 ) → ( ∀ 𝑦𝐶 𝜒𝜓 ) )
14 13 ralrimdva ( 𝜑 → ( ∀ 𝑦𝐶 𝜒 → ∀ 𝑥𝐵 𝜓 ) )
15 6 14 impbid ( 𝜑 → ( ∀ 𝑥𝐵 𝜓 ↔ ∀ 𝑦𝐶 𝜒 ) )