MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  axrep2 Structured version   Visualization version   GIF version

Theorem axrep2 5157
Description: Axiom of Replacement expressed with the fewest number of different variables and without any restrictions on 𝜑. (Contributed by NM, 15-Aug-2003.) Remove dependency on ax-13 2379. (Revised by BJ, 31-May-2019.)
Assertion
Ref Expression
axrep2 𝑥(∃𝑦𝑧(𝜑𝑧 = 𝑦) → ∀𝑧(𝑧𝑥 ↔ ∃𝑥(𝑥𝑦 ∧ ∀𝑦𝜑)))
Distinct variable group:   𝑥,𝑦,𝑧
Allowed substitution hints:   𝜑(𝑥,𝑦,𝑧)

Proof of Theorem axrep2
Dummy variable 𝑤 is distinct from all other variables.
StepHypRef Expression
1 nfe1 2151 . . . . 5 𝑤𝑤𝑧(∀𝑦𝜑𝑧 = 𝑤)
2 nfv 1915 . . . . 5 𝑤𝑧(𝑧𝑥 ↔ ∃𝑥(𝑥𝑦 ∧ ∀𝑦𝜑))
31, 2nfim 1897 . . . 4 𝑤(∃𝑤𝑧(∀𝑦𝜑𝑧 = 𝑤) → ∀𝑧(𝑧𝑥 ↔ ∃𝑥(𝑥𝑦 ∧ ∀𝑦𝜑)))
43nfex 2332 . . 3 𝑤𝑥(∃𝑤𝑧(∀𝑦𝜑𝑧 = 𝑤) → ∀𝑧(𝑧𝑥 ↔ ∃𝑥(𝑥𝑦 ∧ ∀𝑦𝜑)))
5 axreplem 5156 . . 3 (𝑤 = 𝑦 → (∃𝑥(∃𝑤𝑧(∀𝑦𝜑𝑧 = 𝑤) → ∀𝑧(𝑧𝑥 ↔ ∃𝑥(𝑥𝑤 ∧ ∀𝑦𝜑))) ↔ ∃𝑥(∃𝑤𝑧(∀𝑦𝜑𝑧 = 𝑤) → ∀𝑧(𝑧𝑥 ↔ ∃𝑥(𝑥𝑦 ∧ ∀𝑦𝜑)))))
6 axrep1 5155 . . 3 𝑥(∃𝑤𝑧(∀𝑦𝜑𝑧 = 𝑤) → ∀𝑧(𝑧𝑥 ↔ ∃𝑥(𝑥𝑤 ∧ ∀𝑦𝜑)))
74, 5, 6chvarfv 2240 . 2 𝑥(∃𝑤𝑧(∀𝑦𝜑𝑧 = 𝑤) → ∀𝑧(𝑧𝑥 ↔ ∃𝑥(𝑥𝑦 ∧ ∀𝑦𝜑)))
8 sp 2180 . . . . . . 7 (∀𝑦𝜑𝜑)
98imim1i 63 . . . . . 6 ((𝜑𝑧 = 𝑦) → (∀𝑦𝜑𝑧 = 𝑦))
109alimi 1813 . . . . 5 (∀𝑧(𝜑𝑧 = 𝑦) → ∀𝑧(∀𝑦𝜑𝑧 = 𝑦))
1110eximi 1836 . . . 4 (∃𝑦𝑧(𝜑𝑧 = 𝑦) → ∃𝑦𝑧(∀𝑦𝜑𝑧 = 𝑦))
12 nfv 1915 . . . . 5 𝑤𝑧(∀𝑦𝜑𝑧 = 𝑦)
13 nfa1 2152 . . . . . . 7 𝑦𝑦𝜑
14 nfv 1915 . . . . . . 7 𝑦 𝑧 = 𝑤
1513, 14nfim 1897 . . . . . 6 𝑦(∀𝑦𝜑𝑧 = 𝑤)
1615nfal 2331 . . . . 5 𝑦𝑧(∀𝑦𝜑𝑧 = 𝑤)
17 equequ2 2033 . . . . . . 7 (𝑦 = 𝑤 → (𝑧 = 𝑦𝑧 = 𝑤))
1817imbi2d 344 . . . . . 6 (𝑦 = 𝑤 → ((∀𝑦𝜑𝑧 = 𝑦) ↔ (∀𝑦𝜑𝑧 = 𝑤)))
1918albidv 1921 . . . . 5 (𝑦 = 𝑤 → (∀𝑧(∀𝑦𝜑𝑧 = 𝑦) ↔ ∀𝑧(∀𝑦𝜑𝑧 = 𝑤)))
2012, 16, 19cbvexv1 2351 . . . 4 (∃𝑦𝑧(∀𝑦𝜑𝑧 = 𝑦) ↔ ∃𝑤𝑧(∀𝑦𝜑𝑧 = 𝑤))
2111, 20sylib 221 . . 3 (∃𝑦𝑧(𝜑𝑧 = 𝑦) → ∃𝑤𝑧(∀𝑦𝜑𝑧 = 𝑤))
2221imim1i 63 . 2 ((∃𝑤𝑧(∀𝑦𝜑𝑧 = 𝑤) → ∀𝑧(𝑧𝑥 ↔ ∃𝑥(𝑥𝑦 ∧ ∀𝑦𝜑))) → (∃𝑦𝑧(𝜑𝑧 = 𝑦) → ∀𝑧(𝑧𝑥 ↔ ∃𝑥(𝑥𝑦 ∧ ∀𝑦𝜑))))
237, 22eximii 1838 1 𝑥(∃𝑦𝑧(𝜑𝑧 = 𝑦) → ∀𝑧(𝑧𝑥 ↔ ∃𝑥(𝑥𝑦 ∧ ∀𝑦𝜑)))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 209  wa 399  wal 1536  wex 1781
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1797  ax-4 1811  ax-5 1911  ax-6 1970  ax-7 2015  ax-9 2121  ax-10 2142  ax-11 2158  ax-12 2175  ax-rep 5154
This theorem depends on definitions:  df-bi 210  df-an 400  df-or 845  df-tru 1541  df-ex 1782  df-nf 1786
This theorem is referenced by:  axrep3  5158  axrepndlem1  10003
  Copyright terms: Public domain W3C validator