Metamath Proof Explorer


Theorem ralcomf

Description: Commutation of restricted universal quantifiers. (Contributed by Mario Carneiro, 14-Oct-2016)

Ref Expression
Hypotheses ralcomf.1 𝑦 𝐴
ralcomf.2 𝑥 𝐵
Assertion ralcomf ( ∀ 𝑥𝐴𝑦𝐵 𝜑 ↔ ∀ 𝑦𝐵𝑥𝐴 𝜑 )

Proof

Step Hyp Ref Expression
1 ralcomf.1 𝑦 𝐴
2 ralcomf.2 𝑥 𝐵
3 ancomst ( ( ( 𝑥𝐴𝑦𝐵 ) → 𝜑 ) ↔ ( ( 𝑦𝐵𝑥𝐴 ) → 𝜑 ) )
4 3 2albii ( ∀ 𝑥𝑦 ( ( 𝑥𝐴𝑦𝐵 ) → 𝜑 ) ↔ ∀ 𝑥𝑦 ( ( 𝑦𝐵𝑥𝐴 ) → 𝜑 ) )
5 alcom ( ∀ 𝑥𝑦 ( ( 𝑦𝐵𝑥𝐴 ) → 𝜑 ) ↔ ∀ 𝑦𝑥 ( ( 𝑦𝐵𝑥𝐴 ) → 𝜑 ) )
6 4 5 bitri ( ∀ 𝑥𝑦 ( ( 𝑥𝐴𝑦𝐵 ) → 𝜑 ) ↔ ∀ 𝑦𝑥 ( ( 𝑦𝐵𝑥𝐴 ) → 𝜑 ) )
7 1 r2alf ( ∀ 𝑥𝐴𝑦𝐵 𝜑 ↔ ∀ 𝑥𝑦 ( ( 𝑥𝐴𝑦𝐵 ) → 𝜑 ) )
8 2 r2alf ( ∀ 𝑦𝐵𝑥𝐴 𝜑 ↔ ∀ 𝑦𝑥 ( ( 𝑦𝐵𝑥𝐴 ) → 𝜑 ) )
9 6 7 8 3bitr4i ( ∀ 𝑥𝐴𝑦𝐵 𝜑 ↔ ∀ 𝑦𝐵𝑥𝐴 𝜑 )