Metamath Proof Explorer


Theorem sbievg

Description: Substitution applied to expressions linked by implicit substitution. The proof was part of a former cbvabw version. (Contributed by GG and WL, 26-Oct-2024)

Ref Expression
Hypotheses sbievg.1 𝑦 𝜑
sbievg.2 𝑥 𝜓
sbievg.3 ( 𝑥 = 𝑦 → ( 𝜑𝜓 ) )
Assertion sbievg ( [ 𝑧 / 𝑥 ] 𝜑 ↔ [ 𝑧 / 𝑦 ] 𝜓 )

Proof

Step Hyp Ref Expression
1 sbievg.1 𝑦 𝜑
2 sbievg.2 𝑥 𝜓
3 sbievg.3 ( 𝑥 = 𝑦 → ( 𝜑𝜓 ) )
4 nfv 𝑦 𝑥 = 𝑤
5 4 1 nfim 𝑦 ( 𝑥 = 𝑤𝜑 )
6 nfv 𝑥 𝑦 = 𝑤
7 6 2 nfim 𝑥 ( 𝑦 = 𝑤𝜓 )
8 equequ1 ( 𝑥 = 𝑦 → ( 𝑥 = 𝑤𝑦 = 𝑤 ) )
9 8 3 imbi12d ( 𝑥 = 𝑦 → ( ( 𝑥 = 𝑤𝜑 ) ↔ ( 𝑦 = 𝑤𝜓 ) ) )
10 5 7 9 cbvalv1 ( ∀ 𝑥 ( 𝑥 = 𝑤𝜑 ) ↔ ∀ 𝑦 ( 𝑦 = 𝑤𝜓 ) )
11 10 imbi2i ( ( 𝑤 = 𝑧 → ∀ 𝑥 ( 𝑥 = 𝑤𝜑 ) ) ↔ ( 𝑤 = 𝑧 → ∀ 𝑦 ( 𝑦 = 𝑤𝜓 ) ) )
12 11 albii ( ∀ 𝑤 ( 𝑤 = 𝑧 → ∀ 𝑥 ( 𝑥 = 𝑤𝜑 ) ) ↔ ∀ 𝑤 ( 𝑤 = 𝑧 → ∀ 𝑦 ( 𝑦 = 𝑤𝜓 ) ) )
13 df-sb ( [ 𝑧 / 𝑥 ] 𝜑 ↔ ∀ 𝑤 ( 𝑤 = 𝑧 → ∀ 𝑥 ( 𝑥 = 𝑤𝜑 ) ) )
14 df-sb ( [ 𝑧 / 𝑦 ] 𝜓 ↔ ∀ 𝑤 ( 𝑤 = 𝑧 → ∀ 𝑦 ( 𝑦 = 𝑤𝜓 ) ) )
15 12 13 14 3bitr4i ( [ 𝑧 / 𝑥 ] 𝜑 ↔ [ 𝑧 / 𝑦 ] 𝜓 )