Metamath Proof Explorer


Theorem eltg2

Description: Membership in a topology generated by a basis. (Contributed by NM, 15-Jul-2006) (Revised by Mario Carneiro, 10-Jan-2015)

Ref Expression
Assertion eltg2 ( 𝐵𝑉 → ( 𝐴 ∈ ( topGen ‘ 𝐵 ) ↔ ( 𝐴 𝐵 ∧ ∀ 𝑥𝐴𝑦𝐵 ( 𝑥𝑦𝑦𝐴 ) ) ) )

Proof

Step Hyp Ref Expression
1 tgval2 ( 𝐵𝑉 → ( topGen ‘ 𝐵 ) = { 𝑧 ∣ ( 𝑧 𝐵 ∧ ∀ 𝑥𝑧𝑦𝐵 ( 𝑥𝑦𝑦𝑧 ) ) } )
2 1 eleq2d ( 𝐵𝑉 → ( 𝐴 ∈ ( topGen ‘ 𝐵 ) ↔ 𝐴 ∈ { 𝑧 ∣ ( 𝑧 𝐵 ∧ ∀ 𝑥𝑧𝑦𝐵 ( 𝑥𝑦𝑦𝑧 ) ) } ) )
3 elex ( 𝐴 ∈ { 𝑧 ∣ ( 𝑧 𝐵 ∧ ∀ 𝑥𝑧𝑦𝐵 ( 𝑥𝑦𝑦𝑧 ) ) } → 𝐴 ∈ V )
4 3 adantl ( ( 𝐵𝑉𝐴 ∈ { 𝑧 ∣ ( 𝑧 𝐵 ∧ ∀ 𝑥𝑧𝑦𝐵 ( 𝑥𝑦𝑦𝑧 ) ) } ) → 𝐴 ∈ V )
5 uniexg ( 𝐵𝑉 𝐵 ∈ V )
6 ssexg ( ( 𝐴 𝐵 𝐵 ∈ V ) → 𝐴 ∈ V )
7 5 6 sylan2 ( ( 𝐴 𝐵𝐵𝑉 ) → 𝐴 ∈ V )
8 7 ancoms ( ( 𝐵𝑉𝐴 𝐵 ) → 𝐴 ∈ V )
9 8 adantrr ( ( 𝐵𝑉 ∧ ( 𝐴 𝐵 ∧ ∀ 𝑥𝐴𝑦𝐵 ( 𝑥𝑦𝑦𝐴 ) ) ) → 𝐴 ∈ V )
10 sseq1 ( 𝑧 = 𝐴 → ( 𝑧 𝐵𝐴 𝐵 ) )
11 sseq2 ( 𝑧 = 𝐴 → ( 𝑦𝑧𝑦𝐴 ) )
12 11 anbi2d ( 𝑧 = 𝐴 → ( ( 𝑥𝑦𝑦𝑧 ) ↔ ( 𝑥𝑦𝑦𝐴 ) ) )
13 12 rexbidv ( 𝑧 = 𝐴 → ( ∃ 𝑦𝐵 ( 𝑥𝑦𝑦𝑧 ) ↔ ∃ 𝑦𝐵 ( 𝑥𝑦𝑦𝐴 ) ) )
14 13 raleqbi1dv ( 𝑧 = 𝐴 → ( ∀ 𝑥𝑧𝑦𝐵 ( 𝑥𝑦𝑦𝑧 ) ↔ ∀ 𝑥𝐴𝑦𝐵 ( 𝑥𝑦𝑦𝐴 ) ) )
15 10 14 anbi12d ( 𝑧 = 𝐴 → ( ( 𝑧 𝐵 ∧ ∀ 𝑥𝑧𝑦𝐵 ( 𝑥𝑦𝑦𝑧 ) ) ↔ ( 𝐴 𝐵 ∧ ∀ 𝑥𝐴𝑦𝐵 ( 𝑥𝑦𝑦𝐴 ) ) ) )
16 15 elabg ( 𝐴 ∈ V → ( 𝐴 ∈ { 𝑧 ∣ ( 𝑧 𝐵 ∧ ∀ 𝑥𝑧𝑦𝐵 ( 𝑥𝑦𝑦𝑧 ) ) } ↔ ( 𝐴 𝐵 ∧ ∀ 𝑥𝐴𝑦𝐵 ( 𝑥𝑦𝑦𝐴 ) ) ) )
17 4 9 16 pm5.21nd ( 𝐵𝑉 → ( 𝐴 ∈ { 𝑧 ∣ ( 𝑧 𝐵 ∧ ∀ 𝑥𝑧𝑦𝐵 ( 𝑥𝑦𝑦𝑧 ) ) } ↔ ( 𝐴 𝐵 ∧ ∀ 𝑥𝐴𝑦𝐵 ( 𝑥𝑦𝑦𝐴 ) ) ) )
18 2 17 bitrd ( 𝐵𝑉 → ( 𝐴 ∈ ( topGen ‘ 𝐵 ) ↔ ( 𝐴 𝐵 ∧ ∀ 𝑥𝐴𝑦𝐵 ( 𝑥𝑦𝑦𝐴 ) ) ) )