Metamath Proof Explorer


Theorem axprlem5

Description: Lemma for axpr . The second 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 axprlem5 ( ( ∀ 𝑠 ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 ) ∧ 𝑤 = 𝑦 ) → ∃ 𝑠 ( 𝑠𝑝 ∧ if- ( ∃ 𝑛 𝑛𝑠 , 𝑤 = 𝑥 , 𝑤 = 𝑦 ) ) )

Proof

Step Hyp Ref Expression
1 ax-nul 𝑠𝑛 ¬ 𝑛𝑠
2 nfa1 𝑠𝑠 ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 )
3 nfv 𝑠 𝑤 = 𝑦
4 2 3 nfan 𝑠 ( ∀ 𝑠 ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 ) ∧ 𝑤 = 𝑦 )
5 pm2.21 ( ¬ 𝑛𝑠 → ( 𝑛𝑠 → ∀ 𝑡 ¬ 𝑡𝑛 ) )
6 5 alimi ( ∀ 𝑛 ¬ 𝑛𝑠 → ∀ 𝑛 ( 𝑛𝑠 → ∀ 𝑡 ¬ 𝑡𝑛 ) )
7 6 adantr ( ( ∀ 𝑛 ¬ 𝑛𝑠 ∧ ( ∀ 𝑠 ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 ) ∧ 𝑤 = 𝑦 ) ) → ∀ 𝑛 ( 𝑛𝑠 → ∀ 𝑡 ¬ 𝑡𝑛 ) )
8 df-ral ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛 ↔ ∀ 𝑛 ( 𝑛𝑠 → ∀ 𝑡 ¬ 𝑡𝑛 ) )
9 7 8 sylibr ( ( ∀ 𝑛 ¬ 𝑛𝑠 ∧ ( ∀ 𝑠 ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 ) ∧ 𝑤 = 𝑦 ) ) → ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛 )
10 sp ( ∀ 𝑠 ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 ) → ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 ) )
11 10 ad2antrl ( ( ∀ 𝑛 ¬ 𝑛𝑠 ∧ ( ∀ 𝑠 ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 ) ∧ 𝑤 = 𝑦 ) ) → ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 ) )
12 9 11 mpd ( ( ∀ 𝑛 ¬ 𝑛𝑠 ∧ ( ∀ 𝑠 ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 ) ∧ 𝑤 = 𝑦 ) ) → 𝑠𝑝 )
13 simpl ( ( ∀ 𝑛 ¬ 𝑛𝑠 ∧ ( ∀ 𝑠 ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 ) ∧ 𝑤 = 𝑦 ) ) → ∀ 𝑛 ¬ 𝑛𝑠 )
14 alnex ( ∀ 𝑛 ¬ 𝑛𝑠 ↔ ¬ ∃ 𝑛 𝑛𝑠 )
15 13 14 sylib ( ( ∀ 𝑛 ¬ 𝑛𝑠 ∧ ( ∀ 𝑠 ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 ) ∧ 𝑤 = 𝑦 ) ) → ¬ ∃ 𝑛 𝑛𝑠 )
16 simprr ( ( ∀ 𝑛 ¬ 𝑛𝑠 ∧ ( ∀ 𝑠 ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 ) ∧ 𝑤 = 𝑦 ) ) → 𝑤 = 𝑦 )
17 ifpfal ( ¬ ∃ 𝑛 𝑛𝑠 → ( if- ( ∃ 𝑛 𝑛𝑠 , 𝑤 = 𝑥 , 𝑤 = 𝑦 ) ↔ 𝑤 = 𝑦 ) )
18 17 biimpar ( ( ¬ ∃ 𝑛 𝑛𝑠𝑤 = 𝑦 ) → if- ( ∃ 𝑛 𝑛𝑠 , 𝑤 = 𝑥 , 𝑤 = 𝑦 ) )
19 15 16 18 syl2anc ( ( ∀ 𝑛 ¬ 𝑛𝑠 ∧ ( ∀ 𝑠 ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 ) ∧ 𝑤 = 𝑦 ) ) → if- ( ∃ 𝑛 𝑛𝑠 , 𝑤 = 𝑥 , 𝑤 = 𝑦 ) )
20 12 19 jca ( ( ∀ 𝑛 ¬ 𝑛𝑠 ∧ ( ∀ 𝑠 ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 ) ∧ 𝑤 = 𝑦 ) ) → ( 𝑠𝑝 ∧ if- ( ∃ 𝑛 𝑛𝑠 , 𝑤 = 𝑥 , 𝑤 = 𝑦 ) ) )
21 20 expcom ( ( ∀ 𝑠 ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 ) ∧ 𝑤 = 𝑦 ) → ( ∀ 𝑛 ¬ 𝑛𝑠 → ( 𝑠𝑝 ∧ if- ( ∃ 𝑛 𝑛𝑠 , 𝑤 = 𝑥 , 𝑤 = 𝑦 ) ) ) )
22 4 21 eximd ( ( ∀ 𝑠 ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 ) ∧ 𝑤 = 𝑦 ) → ( ∃ 𝑠𝑛 ¬ 𝑛𝑠 → ∃ 𝑠 ( 𝑠𝑝 ∧ if- ( ∃ 𝑛 𝑛𝑠 , 𝑤 = 𝑥 , 𝑤 = 𝑦 ) ) ) )
23 1 22 mpi ( ( ∀ 𝑠 ( ∀ 𝑛𝑠𝑡 ¬ 𝑡𝑛𝑠𝑝 ) ∧ 𝑤 = 𝑦 ) → ∃ 𝑠 ( 𝑠𝑝 ∧ if- ( ∃ 𝑛 𝑛𝑠 , 𝑤 = 𝑥 , 𝑤 = 𝑦 ) ) )