Metamath Proof Explorer


Theorem axprlem4

Description: Lemma for axpr . The first element of the pair is included in any superset of the set whose existence is asserted by the axiom of replacement. (Contributed by Rohan Ridenour, 10-Aug-2023) (Revised by BJ, 13-Aug-2023)

Ref Expression
Assertion axprlem4 ( ( ∀ 𝑠 ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 ) ∧ 𝑤 = 𝑥 ) → ∃ 𝑠 ( 𝑠𝑝 ∧ if- ( ∃ 𝑛 𝑛𝑠 , 𝑤 = 𝑥 , 𝑤 = 𝑦 ) ) )

Proof

Step Hyp Ref Expression
1 axprlem1 𝑠𝑛 ( ∀ 𝑡 ¬ 𝑡𝑛𝑛𝑠 )
2 1 bm1.3ii 𝑠𝑛 ( 𝑛𝑠 ↔ ∀ 𝑡 ¬ 𝑡𝑛 )
3 nfa1 𝑠𝑠 ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 )
4 nfv 𝑠 𝑤 = 𝑥
5 3 4 nfan 𝑠 ( ∀ 𝑠 ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 ) ∧ 𝑤 = 𝑥 )
6 biimp ( ( 𝑛𝑠 ↔ ∀ 𝑡 ¬ 𝑡𝑛 ) → ( 𝑛𝑠 → ∀ 𝑡 ¬ 𝑡𝑛 ) )
7 6 alimi ( ∀ 𝑛 ( 𝑛𝑠 ↔ ∀ 𝑡 ¬ 𝑡𝑛 ) → ∀ 𝑛 ( 𝑛𝑠 → ∀ 𝑡 ¬ 𝑡𝑛 ) )
8 df-ral ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛 ↔ ∀ 𝑛 ( 𝑛𝑠 → ∀ 𝑡 ¬ 𝑡𝑛 ) )
9 7 8 sylibr ( ∀ 𝑛 ( 𝑛𝑠 ↔ ∀ 𝑡 ¬ 𝑡𝑛 ) → ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛 )
10 sp ( ∀ 𝑠 ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 ) → ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 ) )
11 9 10 mpan9 ( ( ∀ 𝑛 ( 𝑛𝑠 ↔ ∀ 𝑡 ¬ 𝑡𝑛 ) ∧ ∀ 𝑠 ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 ) ) → 𝑠𝑝 )
12 11 adantrr ( ( ∀ 𝑛 ( 𝑛𝑠 ↔ ∀ 𝑡 ¬ 𝑡𝑛 ) ∧ ( ∀ 𝑠 ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 ) ∧ 𝑤 = 𝑥 ) ) → 𝑠𝑝 )
13 ax-nul 𝑛𝑡 ¬ 𝑡𝑛
14 nfa1 𝑛𝑛 ( 𝑛𝑠 ↔ ∀ 𝑡 ¬ 𝑡𝑛 )
15 sp ( ∀ 𝑛 ( 𝑛𝑠 ↔ ∀ 𝑡 ¬ 𝑡𝑛 ) → ( 𝑛𝑠 ↔ ∀ 𝑡 ¬ 𝑡𝑛 ) )
16 15 biimprd ( ∀ 𝑛 ( 𝑛𝑠 ↔ ∀ 𝑡 ¬ 𝑡𝑛 ) → ( ∀ 𝑡 ¬ 𝑡𝑛𝑛𝑠 ) )
17 14 16 eximd ( ∀ 𝑛 ( 𝑛𝑠 ↔ ∀ 𝑡 ¬ 𝑡𝑛 ) → ( ∃ 𝑛𝑡 ¬ 𝑡𝑛 → ∃ 𝑛 𝑛𝑠 ) )
18 13 17 mpi ( ∀ 𝑛 ( 𝑛𝑠 ↔ ∀ 𝑡 ¬ 𝑡𝑛 ) → ∃ 𝑛 𝑛𝑠 )
19 simprr ( ( ∀ 𝑛 ( 𝑛𝑠 ↔ ∀ 𝑡 ¬ 𝑡𝑛 ) ∧ ( ∀ 𝑠 ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 ) ∧ 𝑤 = 𝑥 ) ) → 𝑤 = 𝑥 )
20 ifptru ( ∃ 𝑛 𝑛𝑠 → ( if- ( ∃ 𝑛 𝑛𝑠 , 𝑤 = 𝑥 , 𝑤 = 𝑦 ) ↔ 𝑤 = 𝑥 ) )
21 20 biimpar ( ( ∃ 𝑛 𝑛𝑠𝑤 = 𝑥 ) → if- ( ∃ 𝑛 𝑛𝑠 , 𝑤 = 𝑥 , 𝑤 = 𝑦 ) )
22 18 19 21 syl2an2r ( ( ∀ 𝑛 ( 𝑛𝑠 ↔ ∀ 𝑡 ¬ 𝑡𝑛 ) ∧ ( ∀ 𝑠 ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 ) ∧ 𝑤 = 𝑥 ) ) → if- ( ∃ 𝑛 𝑛𝑠 , 𝑤 = 𝑥 , 𝑤 = 𝑦 ) )
23 12 22 jca ( ( ∀ 𝑛 ( 𝑛𝑠 ↔ ∀ 𝑡 ¬ 𝑡𝑛 ) ∧ ( ∀ 𝑠 ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 ) ∧ 𝑤 = 𝑥 ) ) → ( 𝑠𝑝 ∧ if- ( ∃ 𝑛 𝑛𝑠 , 𝑤 = 𝑥 , 𝑤 = 𝑦 ) ) )
24 23 expcom ( ( ∀ 𝑠 ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 ) ∧ 𝑤 = 𝑥 ) → ( ∀ 𝑛 ( 𝑛𝑠 ↔ ∀ 𝑡 ¬ 𝑡𝑛 ) → ( 𝑠𝑝 ∧ if- ( ∃ 𝑛 𝑛𝑠 , 𝑤 = 𝑥 , 𝑤 = 𝑦 ) ) ) )
25 5 24 eximd ( ( ∀ 𝑠 ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 ) ∧ 𝑤 = 𝑥 ) → ( ∃ 𝑠𝑛 ( 𝑛𝑠 ↔ ∀ 𝑡 ¬ 𝑡𝑛 ) → ∃ 𝑠 ( 𝑠𝑝 ∧ if- ( ∃ 𝑛 𝑛𝑠 , 𝑤 = 𝑥 , 𝑤 = 𝑦 ) ) ) )
26 2 25 mpi ( ( ∀ 𝑠 ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 ) ∧ 𝑤 = 𝑥 ) → ∃ 𝑠 ( 𝑠𝑝 ∧ if- ( ∃ 𝑛 𝑛𝑠 , 𝑤 = 𝑥 , 𝑤 = 𝑦 ) ) )