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

Theorem axrep2 5193
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 2390. (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 2154 . . . . 5 𝑤𝑤𝑧(∀𝑦𝜑𝑧 = 𝑤)
2 nfv 1915 . . . . 5 𝑤𝑧(𝑧𝑥 ↔ ∃𝑥(𝑥𝑦 ∧ ∀𝑦𝜑))
31, 2nfim 1897 . . . 4 𝑤(∃𝑤𝑧(∀𝑦𝜑𝑧 = 𝑤) → ∀𝑧(𝑧𝑥 ↔ ∃𝑥(𝑥𝑦 ∧ ∀𝑦𝜑)))
43nfex 2343 . . 3 𝑤𝑥(∃𝑤𝑧(∀𝑦𝜑𝑧 = 𝑤) → ∀𝑧(𝑧𝑥 ↔ ∃𝑥(𝑥𝑦 ∧ ∀𝑦𝜑)))
5 axreplem 5192 . . 3 (𝑤 = 𝑦 → (∃𝑥(∃𝑤𝑧(∀𝑦𝜑𝑧 = 𝑤) → ∀𝑧(𝑧𝑥 ↔ ∃𝑥(𝑥𝑤 ∧ ∀𝑦𝜑))) ↔ ∃𝑥(∃𝑤𝑧(∀𝑦𝜑𝑧 = 𝑤) → ∀𝑧(𝑧𝑥 ↔ ∃𝑥(𝑥𝑦 ∧ ∀𝑦𝜑)))))
6 axrep1 5191 . . 3 𝑥(∃𝑤𝑧(∀𝑦𝜑𝑧 = 𝑤) → ∀𝑧(𝑧𝑥 ↔ ∃𝑥(𝑥𝑤 ∧ ∀𝑦𝜑)))
74, 5, 6chvarfv 2242 . 2 𝑥(∃𝑤𝑧(∀𝑦𝜑𝑧 = 𝑤) → ∀𝑧(𝑧𝑥 ↔ ∃𝑥(𝑥𝑦 ∧ ∀𝑦𝜑)))
8 sp 2182 . . . . . . 7 (∀𝑦𝜑𝜑)
98imim1i 63 . . . . . 6 ((𝜑𝑧 = 𝑦) → (∀𝑦𝜑𝑧 = 𝑦))
109alimi 1812 . . . . 5 (∀𝑧(𝜑𝑧 = 𝑦) → ∀𝑧(∀𝑦𝜑𝑧 = 𝑦))
1110eximi 1835 . . . 4 (∃𝑦𝑧(𝜑𝑧 = 𝑦) → ∃𝑦𝑧(∀𝑦𝜑𝑧 = 𝑦))
12 nfv 1915 . . . . 5 𝑤𝑧(∀𝑦𝜑𝑧 = 𝑦)
13 nfa1 2155 . . . . . . 7 𝑦𝑦𝜑
14 nfv 1915 . . . . . . 7 𝑦 𝑧 = 𝑤
1513, 14nfim 1897 . . . . . 6 𝑦(∀𝑦𝜑𝑧 = 𝑤)
1615nfal 2342 . . . . 5 𝑦𝑧(∀𝑦𝜑𝑧 = 𝑤)
17 equequ2 2033 . . . . . . 7 (𝑦 = 𝑤 → (𝑧 = 𝑦𝑧 = 𝑤))
1817imbi2d 343 . . . . . 6 (𝑦 = 𝑤 → ((∀𝑦𝜑𝑧 = 𝑦) ↔ (∀𝑦𝜑𝑧 = 𝑤)))
1918albidv 1921 . . . . 5 (𝑦 = 𝑤 → (∀𝑧(∀𝑦𝜑𝑧 = 𝑦) ↔ ∀𝑧(∀𝑦𝜑𝑧 = 𝑤)))
2012, 16, 19cbvexv1 2362 . . . 4 (∃𝑦𝑧(∀𝑦𝜑𝑧 = 𝑦) ↔ ∃𝑤𝑧(∀𝑦𝜑𝑧 = 𝑤))
2111, 20sylib 220 . . 3 (∃𝑦𝑧(𝜑𝑧 = 𝑦) → ∃𝑤𝑧(∀𝑦𝜑𝑧 = 𝑤))
2221imim1i 63 . 2 ((∃𝑤𝑧(∀𝑦𝜑𝑧 = 𝑤) → ∀𝑧(𝑧𝑥 ↔ ∃𝑥(𝑥𝑦 ∧ ∀𝑦𝜑))) → (∃𝑦𝑧(𝜑𝑧 = 𝑦) → ∀𝑧(𝑧𝑥 ↔ ∃𝑥(𝑥𝑦 ∧ ∀𝑦𝜑))))
237, 22eximii 1837 1 𝑥(∃𝑦𝑧(𝜑𝑧 = 𝑦) → ∀𝑧(𝑧𝑥 ↔ ∃𝑥(𝑥𝑦 ∧ ∀𝑦𝜑)))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 208  wa 398  wal 1535  wex 1780
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1796  ax-4 1810  ax-5 1911  ax-6 1970  ax-7 2015  ax-9 2124  ax-10 2145  ax-11 2161  ax-12 2177  ax-rep 5190
This theorem depends on definitions:  df-bi 209  df-an 399  df-or 844  df-tru 1540  df-ex 1781  df-nf 1785
This theorem is referenced by:  axrep3  5194  axrepndlem1  10014
  Copyright terms: Public domain W3C validator