Metamath Proof Explorer


Theorem ichnfimlem

Description: Lemma for ichnfim : A substitution for a nonfree variable has no effect. (Contributed by Wolf Lammen, 6-Aug-2023) Avoid ax-13 . (Revised by Gino Giotto, 1-May-2024)

Ref Expression
Assertion ichnfimlem ( ∀ 𝑦𝑥 𝜑 → ( [ 𝑎 / 𝑥 ] [ 𝑏 / 𝑦 ] 𝜑 ↔ [ 𝑏 / 𝑦 ] 𝜑 ) )

Proof

Step Hyp Ref Expression
1 nfa1 𝑦𝑦𝑥 𝜑
2 sb6 ( [ 𝑏 / 𝑦 ] 𝜑 ↔ ∀ 𝑦 ( 𝑦 = 𝑏𝜑 ) )
3 2 a1i ( ∀ 𝑦𝑥 𝜑 → ( [ 𝑏 / 𝑦 ] 𝜑 ↔ ∀ 𝑦 ( 𝑦 = 𝑏𝜑 ) ) )
4 2 biimpri ( ∀ 𝑦 ( 𝑦 = 𝑏𝜑 ) → [ 𝑏 / 𝑦 ] 𝜑 )
5 4 axc4i ( ∀ 𝑦 ( 𝑦 = 𝑏𝜑 ) → ∀ 𝑦 [ 𝑏 / 𝑦 ] 𝜑 )
6 3 5 syl6bi ( ∀ 𝑦𝑥 𝜑 → ( [ 𝑏 / 𝑦 ] 𝜑 → ∀ 𝑦 [ 𝑏 / 𝑦 ] 𝜑 ) )
7 1 6 nf5d ( ∀ 𝑦𝑥 𝜑 → Ⅎ 𝑦 [ 𝑏 / 𝑦 ] 𝜑 )
8 1 7 nfim1 𝑦 ( ∀ 𝑦𝑥 𝜑 → [ 𝑏 / 𝑦 ] 𝜑 )
9 sbequ12 ( 𝑦 = 𝑏 → ( 𝜑 ↔ [ 𝑏 / 𝑦 ] 𝜑 ) )
10 9 imbi2d ( 𝑦 = 𝑏 → ( ( ∀ 𝑦𝑥 𝜑𝜑 ) ↔ ( ∀ 𝑦𝑥 𝜑 → [ 𝑏 / 𝑦 ] 𝜑 ) ) )
11 8 10 equsalv ( ∀ 𝑦 ( 𝑦 = 𝑏 → ( ∀ 𝑦𝑥 𝜑𝜑 ) ) ↔ ( ∀ 𝑦𝑥 𝜑 → [ 𝑏 / 𝑦 ] 𝜑 ) )
12 11 bicomi ( ( ∀ 𝑦𝑥 𝜑 → [ 𝑏 / 𝑦 ] 𝜑 ) ↔ ∀ 𝑦 ( 𝑦 = 𝑏 → ( ∀ 𝑦𝑥 𝜑𝜑 ) ) )
13 nfv 𝑥 𝑦 = 𝑏
14 nfnf1 𝑥𝑥 𝜑
15 14 nfal 𝑥𝑦𝑥 𝜑
16 sp ( ∀ 𝑦𝑥 𝜑 → Ⅎ 𝑥 𝜑 )
17 15 16 nfim1 𝑥 ( ∀ 𝑦𝑥 𝜑𝜑 )
18 13 17 nfim 𝑥 ( 𝑦 = 𝑏 → ( ∀ 𝑦𝑥 𝜑𝜑 ) )
19 18 nfal 𝑥𝑦 ( 𝑦 = 𝑏 → ( ∀ 𝑦𝑥 𝜑𝜑 ) )
20 12 19 nfxfr 𝑥 ( ∀ 𝑦𝑥 𝜑 → [ 𝑏 / 𝑦 ] 𝜑 )
21 pm5.5 ( ∀ 𝑦𝑥 𝜑 → ( ( ∀ 𝑦𝑥 𝜑 → [ 𝑏 / 𝑦 ] 𝜑 ) ↔ [ 𝑏 / 𝑦 ] 𝜑 ) )
22 15 21 nfbidf ( ∀ 𝑦𝑥 𝜑 → ( Ⅎ 𝑥 ( ∀ 𝑦𝑥 𝜑 → [ 𝑏 / 𝑦 ] 𝜑 ) ↔ Ⅎ 𝑥 [ 𝑏 / 𝑦 ] 𝜑 ) )
23 20 22 mpbii ( ∀ 𝑦𝑥 𝜑 → Ⅎ 𝑥 [ 𝑏 / 𝑦 ] 𝜑 )
24 sbft ( Ⅎ 𝑥 [ 𝑏 / 𝑦 ] 𝜑 → ( [ 𝑎 / 𝑥 ] [ 𝑏 / 𝑦 ] 𝜑 ↔ [ 𝑏 / 𝑦 ] 𝜑 ) )
25 23 24 syl ( ∀ 𝑦𝑥 𝜑 → ( [ 𝑎 / 𝑥 ] [ 𝑏 / 𝑦 ] 𝜑 ↔ [ 𝑏 / 𝑦 ] 𝜑 ) )