Metamath Proof Explorer


Theorem 2gencl

Description: Implicit substitution for class with embedded variable. (Contributed by NM, 17-May-1996)

Ref Expression
Hypotheses 2gencl.1 ( 𝐶𝑆 ↔ ∃ 𝑥𝑅 𝐴 = 𝐶 )
2gencl.2 ( 𝐷𝑆 ↔ ∃ 𝑦𝑅 𝐵 = 𝐷 )
2gencl.3 ( 𝐴 = 𝐶 → ( 𝜑𝜓 ) )
2gencl.4 ( 𝐵 = 𝐷 → ( 𝜓𝜒 ) )
2gencl.5 ( ( 𝑥𝑅𝑦𝑅 ) → 𝜑 )
Assertion 2gencl ( ( 𝐶𝑆𝐷𝑆 ) → 𝜒 )

Proof

Step Hyp Ref Expression
1 2gencl.1 ( 𝐶𝑆 ↔ ∃ 𝑥𝑅 𝐴 = 𝐶 )
2 2gencl.2 ( 𝐷𝑆 ↔ ∃ 𝑦𝑅 𝐵 = 𝐷 )
3 2gencl.3 ( 𝐴 = 𝐶 → ( 𝜑𝜓 ) )
4 2gencl.4 ( 𝐵 = 𝐷 → ( 𝜓𝜒 ) )
5 2gencl.5 ( ( 𝑥𝑅𝑦𝑅 ) → 𝜑 )
6 df-rex ( ∃ 𝑦𝑅 𝐵 = 𝐷 ↔ ∃ 𝑦 ( 𝑦𝑅𝐵 = 𝐷 ) )
7 2 6 bitri ( 𝐷𝑆 ↔ ∃ 𝑦 ( 𝑦𝑅𝐵 = 𝐷 ) )
8 4 imbi2d ( 𝐵 = 𝐷 → ( ( 𝐶𝑆𝜓 ) ↔ ( 𝐶𝑆𝜒 ) ) )
9 df-rex ( ∃ 𝑥𝑅 𝐴 = 𝐶 ↔ ∃ 𝑥 ( 𝑥𝑅𝐴 = 𝐶 ) )
10 1 9 bitri ( 𝐶𝑆 ↔ ∃ 𝑥 ( 𝑥𝑅𝐴 = 𝐶 ) )
11 3 imbi2d ( 𝐴 = 𝐶 → ( ( 𝑦𝑅𝜑 ) ↔ ( 𝑦𝑅𝜓 ) ) )
12 5 ex ( 𝑥𝑅 → ( 𝑦𝑅𝜑 ) )
13 10 11 12 gencl ( 𝐶𝑆 → ( 𝑦𝑅𝜓 ) )
14 13 com12 ( 𝑦𝑅 → ( 𝐶𝑆𝜓 ) )
15 7 8 14 gencl ( 𝐷𝑆 → ( 𝐶𝑆𝜒 ) )
16 15 impcom ( ( 𝐶𝑆𝐷𝑆 ) → 𝜒 )