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

Theorem reuprg0 4663
Description: Convert a restricted existential uniqueness over a pair to a disjunction of conjunctions. (Contributed by AV, 2-Apr-2023.)
Hypotheses
Ref Expression
reuprg.1 (𝑥 = 𝐴 → (𝜑 ↔ 𝜓))
reuprg.2 (𝑥 = 𝐵 → (𝜑 ↔ 𝜒))
Assertion
Ref Expression
reuprg0 ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → (∃!𝑥 ∈ {𝐴, 𝐵}𝜑 ↔ ((𝜓 ∧ (𝜒 → 𝐴 = 𝐵)) ∨ (𝜒 ∧ (𝜓 → 𝐴 = 𝐵)))))
Distinct variable groups:   𝑥,𝐴   𝑥,𝐵   𝜓,𝑥   𝜒,𝑥
Allowed substitution hints:   𝜑(𝑥)   𝑉(𝑥)   𝑊(𝑥)

Proof of Theorem reuprg0
Dummy variables 𝑤 𝑐 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 nfsbc1v 3759 . . 3 Ⅎ𝑥[𝑐 / 𝑥]𝜑
2 nfsbc1v 3759 . . 3 Ⅎ𝑥[𝑤 / 𝑥]𝜑
3 sbceq1a 3750 . . 3 (𝑥 = 𝑤 → (𝜑 ↔ [𝑤 / 𝑥]𝜑))
4 dfsbcq 3741 . . 3 (𝑤 = 𝑐 → ([𝑤 / 𝑥]𝜑 ↔ [𝑐 / 𝑥]𝜑))
51, 2, 3, 4reu8nf 3824 . 2 (∃!𝑥 ∈ {𝐴, 𝐵}𝜑 ↔ ∃𝑥 ∈ {𝐴, 𝐵} (𝜑 ∧ ∀𝑐 ∈ {𝐴, 𝐵} ([𝑐 / 𝑥]𝜑 → 𝑥 = 𝑐)))
6 nfv 1947 . . . . 5 Ⅎ𝑥𝜓
7 nfcv 2923 . . . . . 6 Ⅎ𝑥{𝐴, 𝐵}
8 nfv 1947 . . . . . . 7 Ⅎ𝑥 𝐴 = 𝑐
91, 8nfim 1929 . . . . . 6 Ⅎ𝑥([𝑐 / 𝑥]𝜑 → 𝐴 = 𝑐)
107, 9nfralw 3310 . . . . 5 Ⅎ𝑥∀𝑐 ∈ {𝐴, 𝐵} ([𝑐 / 𝑥]𝜑 → 𝐴 = 𝑐)
116, 10nfan 1932 . . . 4 Ⅎ𝑥(𝜓 ∧ ∀𝑐 ∈ {𝐴, 𝐵} ([𝑐 / 𝑥]𝜑 → 𝐴 = 𝑐))
12 nfv 1947 . . . . 5 Ⅎ𝑥𝜒
13 nfv 1947 . . . . . . 7 Ⅎ𝑥 𝐵 = 𝑐
141, 13nfim 1929 . . . . . 6 Ⅎ𝑥([𝑐 / 𝑥]𝜑 → 𝐵 = 𝑐)
157, 14nfralw 3310 . . . . 5 Ⅎ𝑥∀𝑐 ∈ {𝐴, 𝐵} ([𝑐 / 𝑥]𝜑 → 𝐵 = 𝑐)
1612, 15nfan 1932 . . . 4 Ⅎ𝑥(𝜒 ∧ ∀𝑐 ∈ {𝐴, 𝐵} ([𝑐 / 𝑥]𝜑 → 𝐵 = 𝑐))
17 reuprg.1 . . . . 5 (𝑥 = 𝐴 → (𝜑 ↔ 𝜓))
18 eqeq1 2765 . . . . . . 7 (𝑥 = 𝐴 → (𝑥 = 𝑐 ↔ 𝐴 = 𝑐))
1918imbi2d 343 . . . . . 6 (𝑥 = 𝐴 → (([𝑐 / 𝑥]𝜑 → 𝑥 = 𝑐) ↔ ([𝑐 / 𝑥]𝜑 → 𝐴 = 𝑐)))
2019ralbidv 3186 . . . . 5 (𝑥 = 𝐴 → (∀𝑐 ∈ {𝐴, 𝐵} ([𝑐 / 𝑥]𝜑 → 𝑥 = 𝑐) ↔ ∀𝑐 ∈ {𝐴, 𝐵} ([𝑐 / 𝑥]𝜑 → 𝐴 = 𝑐)))
2117, 20anbi12d 644 . . . 4 (𝑥 = 𝐴 → ((𝜑 ∧ ∀𝑐 ∈ {𝐴, 𝐵} ([𝑐 / 𝑥]𝜑 → 𝑥 = 𝑐)) ↔ (𝜓 ∧ ∀𝑐 ∈ {𝐴, 𝐵} ([𝑐 / 𝑥]𝜑 → 𝐴 = 𝑐))))
22 reuprg.2 . . . . 5 (𝑥 = 𝐵 → (𝜑 ↔ 𝜒))
23 eqeq1 2765 . . . . . . 7 (𝑥 = 𝐵 → (𝑥 = 𝑐 ↔ 𝐵 = 𝑐))
2423imbi2d 343 . . . . . 6 (𝑥 = 𝐵 → (([𝑐 / 𝑥]𝜑 → 𝑥 = 𝑐) ↔ ([𝑐 / 𝑥]𝜑 → 𝐵 = 𝑐)))
2524ralbidv 3186 . . . . 5 (𝑥 = 𝐵 → (∀𝑐 ∈ {𝐴, 𝐵} ([𝑐 / 𝑥]𝜑 → 𝑥 = 𝑐) ↔ ∀𝑐 ∈ {𝐴, 𝐵} ([𝑐 / 𝑥]𝜑 → 𝐵 = 𝑐)))
2622, 25anbi12d 644 . . . 4 (𝑥 = 𝐵 → ((𝜑 ∧ ∀𝑐 ∈ {𝐴, 𝐵} ([𝑐 / 𝑥]𝜑 → 𝑥 = 𝑐)) ↔ (𝜒 ∧ ∀𝑐 ∈ {𝐴, 𝐵} ([𝑐 / 𝑥]𝜑 → 𝐵 = 𝑐))))
2711, 16, 21, 26rexprgf 4656 . . 3 ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → (∃𝑥 ∈ {𝐴, 𝐵} (𝜑 ∧ ∀𝑐 ∈ {𝐴, 𝐵} ([𝑐 / 𝑥]𝜑 → 𝑥 = 𝑐)) ↔ ((𝜓 ∧ ∀𝑐 ∈ {𝐴, 𝐵} ([𝑐 / 𝑥]𝜑 → 𝐴 = 𝑐)) ∨ (𝜒 ∧ ∀𝑐 ∈ {𝐴, 𝐵} ([𝑐 / 𝑥]𝜑 → 𝐵 = 𝑐)))))
28 dfsbcq 3741 . . . . . . . 8 (𝑐 = 𝐴 → ([𝑐 / 𝑥]𝜑 ↔ [𝐴 / 𝑥]𝜑))
29 eqeq2 2773 . . . . . . . 8 (𝑐 = 𝐴 → (𝐴 = 𝑐 ↔ 𝐴 = 𝐴))
3028, 29imbi12d 347 . . . . . . 7 (𝑐 = 𝐴 → (([𝑐 / 𝑥]𝜑 → 𝐴 = 𝑐) ↔ ([𝐴 / 𝑥]𝜑 → 𝐴 = 𝐴)))
31 dfsbcq 3741 . . . . . . . 8 (𝑐 = 𝐵 → ([𝑐 / 𝑥]𝜑 ↔ [𝐵 / 𝑥]𝜑))
32 eqeq2 2773 . . . . . . . 8 (𝑐 = 𝐵 → (𝐴 = 𝑐 ↔ 𝐴 = 𝐵))
3331, 32imbi12d 347 . . . . . . 7 (𝑐 = 𝐵 → (([𝑐 / 𝑥]𝜑 → 𝐴 = 𝑐) ↔ ([𝐵 / 𝑥]𝜑 → 𝐴 = 𝐵)))
3430, 33ralprg 4657 . . . . . 6 ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → (∀𝑐 ∈ {𝐴, 𝐵} ([𝑐 / 𝑥]𝜑 → 𝐴 = 𝑐) ↔ (([𝐴 / 𝑥]𝜑 → 𝐴 = 𝐴) ∧ ([𝐵 / 𝑥]𝜑 → 𝐴 = 𝐵))))
35 eqidd 2762 . . . . . . . 8 ([𝐴 / 𝑥]𝜑 → 𝐴 = 𝐴)
3635biantrur 540 . . . . . . 7 (([𝐵 / 𝑥]𝜑 → 𝐴 = 𝐵) ↔ (([𝐴 / 𝑥]𝜑 → 𝐴 = 𝐴) ∧ ([𝐵 / 𝑥]𝜑 → 𝐴 = 𝐵)))
3722sbcieg 3778 . . . . . . . . 9 (𝐵 ∈ 𝑊 → ([𝐵 / 𝑥]𝜑 ↔ 𝜒))
3837adantl 487 . . . . . . . 8 ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → ([𝐵 / 𝑥]𝜑 ↔ 𝜒))
3938imbi1d 344 . . . . . . 7 ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → (([𝐵 / 𝑥]𝜑 → 𝐴 = 𝐵) ↔ (𝜒 → 𝐴 = 𝐵)))
4036, 39bitr3id 288 . . . . . 6 ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → ((([𝐴 / 𝑥]𝜑 → 𝐴 = 𝐴) ∧ ([𝐵 / 𝑥]𝜑 → 𝐴 = 𝐵)) ↔ (𝜒 → 𝐴 = 𝐵)))
4134, 40bitrd 282 . . . . 5 ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → (∀𝑐 ∈ {𝐴, 𝐵} ([𝑐 / 𝑥]𝜑 → 𝐴 = 𝑐) ↔ (𝜒 → 𝐴 = 𝐵)))
4241anbi2d 642 . . . 4 ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → ((𝜓 ∧ ∀𝑐 ∈ {𝐴, 𝐵} ([𝑐 / 𝑥]𝜑 → 𝐴 = 𝑐)) ↔ (𝜓 ∧ (𝜒 → 𝐴 = 𝐵))))
43 eqeq2 2773 . . . . . . . . 9 (𝑐 = 𝐴 → (𝐵 = 𝑐 ↔ 𝐵 = 𝐴))
4428, 43imbi12d 347 . . . . . . . 8 (𝑐 = 𝐴 → (([𝑐 / 𝑥]𝜑 → 𝐵 = 𝑐) ↔ ([𝐴 / 𝑥]𝜑 → 𝐵 = 𝐴)))
45 eqeq2 2773 . . . . . . . . 9 (𝑐 = 𝐵 → (𝐵 = 𝑐 ↔ 𝐵 = 𝐵))
4631, 45imbi12d 347 . . . . . . . 8 (𝑐 = 𝐵 → (([𝑐 / 𝑥]𝜑 → 𝐵 = 𝑐) ↔ ([𝐵 / 𝑥]𝜑 → 𝐵 = 𝐵)))
4744, 46ralprg 4657 . . . . . . 7 ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → (∀𝑐 ∈ {𝐴, 𝐵} ([𝑐 / 𝑥]𝜑 → 𝐵 = 𝑐) ↔ (([𝐴 / 𝑥]𝜑 → 𝐵 = 𝐴) ∧ ([𝐵 / 𝑥]𝜑 → 𝐵 = 𝐵))))
48 eqidd 2762 . . . . . . . . 9 ([𝐵 / 𝑥]𝜑 → 𝐵 = 𝐵)
4948biantru 539 . . . . . . . 8 (([𝐴 / 𝑥]𝜑 → 𝐵 = 𝐴) ↔ (([𝐴 / 𝑥]𝜑 → 𝐵 = 𝐴) ∧ ([𝐵 / 𝑥]𝜑 → 𝐵 = 𝐵)))
5017sbcieg 3778 . . . . . . . . . 10 (𝐴 ∈ 𝑉 → ([𝐴 / 𝑥]𝜑 ↔ 𝜓))
5150adantr 486 . . . . . . . . 9 ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → ([𝐴 / 𝑥]𝜑 ↔ 𝜓))
5251imbi1d 344 . . . . . . . 8 ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → (([𝐴 / 𝑥]𝜑 → 𝐵 = 𝐴) ↔ (𝜓 → 𝐵 = 𝐴)))
5349, 52bitr3id 288 . . . . . . 7 ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → ((([𝐴 / 𝑥]𝜑 → 𝐵 = 𝐴) ∧ ([𝐵 / 𝑥]𝜑 → 𝐵 = 𝐵)) ↔ (𝜓 → 𝐵 = 𝐴)))
5447, 53bitrd 282 . . . . . 6 ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → (∀𝑐 ∈ {𝐴, 𝐵} ([𝑐 / 𝑥]𝜑 → 𝐵 = 𝑐) ↔ (𝜓 → 𝐵 = 𝐴)))
5554anbi2d 642 . . . . 5 ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → ((𝜒 ∧ ∀𝑐 ∈ {𝐴, 𝐵} ([𝑐 / 𝑥]𝜑 → 𝐵 = 𝑐)) ↔ (𝜒 ∧ (𝜓 → 𝐵 = 𝐴))))
56 eqcom 2768 . . . . . . 7 (𝐵 = 𝐴 ↔ 𝐴 = 𝐵)
5756imbi2i 339 . . . . . 6 ((𝜓 → 𝐵 = 𝐴) ↔ (𝜓 → 𝐴 = 𝐵))
5857anbi2i 635 . . . . 5 ((𝜒 ∧ (𝜓 → 𝐵 = 𝐴)) ↔ (𝜒 ∧ (𝜓 → 𝐴 = 𝐵)))
5955, 58bitrdi 290 . . . 4 ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → ((𝜒 ∧ ∀𝑐 ∈ {𝐴, 𝐵} ([𝑐 / 𝑥]𝜑 → 𝐵 = 𝑐)) ↔ (𝜒 ∧ (𝜓 → 𝐴 = 𝐵))))
6042, 59orbi12d 932 . . 3 ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → (((𝜓 ∧ ∀𝑐 ∈ {𝐴, 𝐵} ([𝑐 / 𝑥]𝜑 → 𝐴 = 𝑐)) ∨ (𝜒 ∧ ∀𝑐 ∈ {𝐴, 𝐵} ([𝑐 / 𝑥]𝜑 → 𝐵 = 𝑐))) ↔ ((𝜓 ∧ (𝜒 → 𝐴 = 𝐵)) ∨ (𝜒 ∧ (𝜓 → 𝐴 = 𝐵)))))
6127, 60bitrd 282 . 2 ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → (∃𝑥 ∈ {𝐴, 𝐵} (𝜑 ∧ ∀𝑐 ∈ {𝐴, 𝐵} ([𝑐 / 𝑥]𝜑 → 𝑥 = 𝑐)) ↔ ((𝜓 ∧ (𝜒 → 𝐴 = 𝐵)) ∨ (𝜒 ∧ (𝜓 → 𝐴 = 𝐵)))))
625, 61bitrid 286 1 ((𝐴 ∈ 𝑉 ∧ 𝐵 ∈ 𝑊) → (∃!𝑥 ∈ {𝐴, 𝐵}𝜑 ↔ ((𝜓 ∧ (𝜒 → 𝐴 = 𝐵)) ∨ (𝜒 ∧ (𝜓 → 𝐴 = 𝐵)))))
Colors of variables:    wff setvar class
This proof depends on syntax axioms:   → wi 4   ↔ wb 209   ∧ wa 401   ∨ wo 861   = wceq 1570   ∈ wcel 2145  ∀wral 3077  ∃wrex 3087  ∃!wreu 3364  [wsbc 3739  {cpr 4586
This proof depends on axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1828  ax-4 1842  ax-5 1943  ax-6 2000  ax-7 2041  ax-8 2147  ax-9 2155  ax-10 2178  ax-11 2194  ax-12 2213  ax-ext 2733
This proof depends on definitions:  df-bi 210  df-an 402  df-or 862  df-3an 1105  df-tru 1573  df-ex 1813  df-nf 1817  df-sb 2100  df-mo 2565  df-eu 2595  df-clab 2740  df-cleq 2753  df-clel 2836  df-nfc 2910  df-ral 3078  df-rex 3088  df-rmo 3366  df-reu 3367  df-v 3453  df-sbc 3740  df-un 3904  df-sn 4585  df-pr 4587
This theorem is used by:  reuprg  4664
  Copyright terms: Public domain W3C validator