Metamath Proof Explorer


Theorem ssrel2

Description: A subclass relationship depends only on a relation's ordered pairs. This version of ssrel is restricted to the relation's domain. (Contributed by Thierry Arnoux, 25-Jan-2018)

Ref Expression
Assertion ssrel2 ( 𝑅 ⊆ ( 𝐴 × 𝐵 ) → ( 𝑅𝑆 ↔ ∀ 𝑥𝐴𝑦𝐵 ( ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑅 → ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑆 ) ) )

Proof

Step Hyp Ref Expression
1 ssel ( 𝑅𝑆 → ( ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑅 → ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑆 ) )
2 1 a1d ( 𝑅𝑆 → ( ( 𝑥𝐴𝑦𝐵 ) → ( ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑅 → ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑆 ) ) )
3 2 ralrimivv ( 𝑅𝑆 → ∀ 𝑥𝐴𝑦𝐵 ( ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑅 → ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑆 ) )
4 eleq1 ( 𝑧 = ⟨ 𝑥 , 𝑦 ⟩ → ( 𝑧𝑅 ↔ ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑅 ) )
5 eleq1 ( 𝑧 = ⟨ 𝑥 , 𝑦 ⟩ → ( 𝑧𝑆 ↔ ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑆 ) )
6 4 5 imbi12d ( 𝑧 = ⟨ 𝑥 , 𝑦 ⟩ → ( ( 𝑧𝑅𝑧𝑆 ) ↔ ( ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑅 → ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑆 ) ) )
7 6 biimprcd ( ( ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑅 → ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑆 ) → ( 𝑧 = ⟨ 𝑥 , 𝑦 ⟩ → ( 𝑧𝑅𝑧𝑆 ) ) )
8 7 2ralimi ( ∀ 𝑥𝐴𝑦𝐵 ( ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑅 → ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑆 ) → ∀ 𝑥𝐴𝑦𝐵 ( 𝑧 = ⟨ 𝑥 , 𝑦 ⟩ → ( 𝑧𝑅𝑧𝑆 ) ) )
9 r19.23v ( ∀ 𝑦𝐵 ( 𝑧 = ⟨ 𝑥 , 𝑦 ⟩ → ( 𝑧𝑅𝑧𝑆 ) ) ↔ ( ∃ 𝑦𝐵 𝑧 = ⟨ 𝑥 , 𝑦 ⟩ → ( 𝑧𝑅𝑧𝑆 ) ) )
10 9 ralbii ( ∀ 𝑥𝐴𝑦𝐵 ( 𝑧 = ⟨ 𝑥 , 𝑦 ⟩ → ( 𝑧𝑅𝑧𝑆 ) ) ↔ ∀ 𝑥𝐴 ( ∃ 𝑦𝐵 𝑧 = ⟨ 𝑥 , 𝑦 ⟩ → ( 𝑧𝑅𝑧𝑆 ) ) )
11 r19.23v ( ∀ 𝑥𝐴 ( ∃ 𝑦𝐵 𝑧 = ⟨ 𝑥 , 𝑦 ⟩ → ( 𝑧𝑅𝑧𝑆 ) ) ↔ ( ∃ 𝑥𝐴𝑦𝐵 𝑧 = ⟨ 𝑥 , 𝑦 ⟩ → ( 𝑧𝑅𝑧𝑆 ) ) )
12 10 11 bitri ( ∀ 𝑥𝐴𝑦𝐵 ( 𝑧 = ⟨ 𝑥 , 𝑦 ⟩ → ( 𝑧𝑅𝑧𝑆 ) ) ↔ ( ∃ 𝑥𝐴𝑦𝐵 𝑧 = ⟨ 𝑥 , 𝑦 ⟩ → ( 𝑧𝑅𝑧𝑆 ) ) )
13 8 12 sylib ( ∀ 𝑥𝐴𝑦𝐵 ( ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑅 → ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑆 ) → ( ∃ 𝑥𝐴𝑦𝐵 𝑧 = ⟨ 𝑥 , 𝑦 ⟩ → ( 𝑧𝑅𝑧𝑆 ) ) )
14 13 com23 ( ∀ 𝑥𝐴𝑦𝐵 ( ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑅 → ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑆 ) → ( 𝑧𝑅 → ( ∃ 𝑥𝐴𝑦𝐵 𝑧 = ⟨ 𝑥 , 𝑦 ⟩ → 𝑧𝑆 ) ) )
15 14 a2d ( ∀ 𝑥𝐴𝑦𝐵 ( ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑅 → ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑆 ) → ( ( 𝑧𝑅 → ∃ 𝑥𝐴𝑦𝐵 𝑧 = ⟨ 𝑥 , 𝑦 ⟩ ) → ( 𝑧𝑅𝑧𝑆 ) ) )
16 15 alimdv ( ∀ 𝑥𝐴𝑦𝐵 ( ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑅 → ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑆 ) → ( ∀ 𝑧 ( 𝑧𝑅 → ∃ 𝑥𝐴𝑦𝐵 𝑧 = ⟨ 𝑥 , 𝑦 ⟩ ) → ∀ 𝑧 ( 𝑧𝑅𝑧𝑆 ) ) )
17 dfss2 ( 𝑅 ⊆ ( 𝐴 × 𝐵 ) ↔ ∀ 𝑧 ( 𝑧𝑅𝑧 ∈ ( 𝐴 × 𝐵 ) ) )
18 elxp2 ( 𝑧 ∈ ( 𝐴 × 𝐵 ) ↔ ∃ 𝑥𝐴𝑦𝐵 𝑧 = ⟨ 𝑥 , 𝑦 ⟩ )
19 18 imbi2i ( ( 𝑧𝑅𝑧 ∈ ( 𝐴 × 𝐵 ) ) ↔ ( 𝑧𝑅 → ∃ 𝑥𝐴𝑦𝐵 𝑧 = ⟨ 𝑥 , 𝑦 ⟩ ) )
20 19 albii ( ∀ 𝑧 ( 𝑧𝑅𝑧 ∈ ( 𝐴 × 𝐵 ) ) ↔ ∀ 𝑧 ( 𝑧𝑅 → ∃ 𝑥𝐴𝑦𝐵 𝑧 = ⟨ 𝑥 , 𝑦 ⟩ ) )
21 17 20 bitri ( 𝑅 ⊆ ( 𝐴 × 𝐵 ) ↔ ∀ 𝑧 ( 𝑧𝑅 → ∃ 𝑥𝐴𝑦𝐵 𝑧 = ⟨ 𝑥 , 𝑦 ⟩ ) )
22 dfss2 ( 𝑅𝑆 ↔ ∀ 𝑧 ( 𝑧𝑅𝑧𝑆 ) )
23 16 21 22 3imtr4g ( ∀ 𝑥𝐴𝑦𝐵 ( ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑅 → ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑆 ) → ( 𝑅 ⊆ ( 𝐴 × 𝐵 ) → 𝑅𝑆 ) )
24 23 com12 ( 𝑅 ⊆ ( 𝐴 × 𝐵 ) → ( ∀ 𝑥𝐴𝑦𝐵 ( ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑅 → ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑆 ) → 𝑅𝑆 ) )
25 3 24 impbid2 ( 𝑅 ⊆ ( 𝐴 × 𝐵 ) → ( 𝑅𝑆 ↔ ∀ 𝑥𝐴𝑦𝐵 ( ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑅 → ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝑆 ) ) )