Metamath Proof Explorer


Theorem reldisjun

Description: Split a relation into two disjoint parts based on its domain. (Contributed by Thierry Arnoux, 9-Oct-2023)

Ref Expression
Assertion reldisjun ( ( Rel 𝑅 ∧ dom 𝑅 = ( 𝐴𝐵 ) ∧ ( 𝐴𝐵 ) = ∅ ) → 𝑅 = ( ( 𝑅𝐴 ) ∪ ( 𝑅𝐵 ) ) )

Proof

Step Hyp Ref Expression
1 reseq2 ( dom 𝑅 = ( 𝐴𝐵 ) → ( 𝑅 ↾ dom 𝑅 ) = ( 𝑅 ↾ ( 𝐴𝐵 ) ) )
2 1 3ad2ant2 ( ( Rel 𝑅 ∧ dom 𝑅 = ( 𝐴𝐵 ) ∧ ( 𝐴𝐵 ) = ∅ ) → ( 𝑅 ↾ dom 𝑅 ) = ( 𝑅 ↾ ( 𝐴𝐵 ) ) )
3 resdm ( Rel 𝑅 → ( 𝑅 ↾ dom 𝑅 ) = 𝑅 )
4 3 3ad2ant1 ( ( Rel 𝑅 ∧ dom 𝑅 = ( 𝐴𝐵 ) ∧ ( 𝐴𝐵 ) = ∅ ) → ( 𝑅 ↾ dom 𝑅 ) = 𝑅 )
5 resundi ( 𝑅 ↾ ( 𝐴𝐵 ) ) = ( ( 𝑅𝐴 ) ∪ ( 𝑅𝐵 ) )
6 5 a1i ( ( Rel 𝑅 ∧ dom 𝑅 = ( 𝐴𝐵 ) ∧ ( 𝐴𝐵 ) = ∅ ) → ( 𝑅 ↾ ( 𝐴𝐵 ) ) = ( ( 𝑅𝐴 ) ∪ ( 𝑅𝐵 ) ) )
7 2 4 6 3eqtr3d ( ( Rel 𝑅 ∧ dom 𝑅 = ( 𝐴𝐵 ) ∧ ( 𝐴𝐵 ) = ∅ ) → 𝑅 = ( ( 𝑅𝐴 ) ∪ ( 𝑅𝐵 ) ) )