Metamath Proof Explorer


Theorem isdir

Description: A condition for a relation to be a direction. (Contributed by Jeff Hankins, 25-Nov-2009) (Revised by Mario Carneiro, 22-Nov-2013)

Ref Expression
Hypothesis isdir.1 A = R
Assertion isdir R V R DirRel Rel R I A R R R R A × A R -1 R

Proof

Step Hyp Ref Expression
1 isdir.1 A = R
2 releq r = R Rel r Rel R
3 unieq r = R r = R
4 3 unieqd r = R r = R
5 4 1 eqtr4di r = R r = A
6 5 reseq2d r = R I r = I A
7 id r = R r = R
8 6 7 sseq12d r = R I r r I A R
9 2 8 anbi12d r = R Rel r I r r Rel R I A R
10 7 7 coeq12d r = R r r = R R
11 10 7 sseq12d r = R r r r R R R
12 5 sqxpeqd r = R r × r = A × A
13 cnveq r = R r -1 = R -1
14 13 7 coeq12d r = R r -1 r = R -1 R
15 12 14 sseq12d r = R r × r r -1 r A × A R -1 R
16 11 15 anbi12d r = R r r r r × r r -1 r R R R A × A R -1 R
17 9 16 anbi12d r = R Rel r I r r r r r r × r r -1 r Rel R I A R R R R A × A R -1 R
18 df-dir DirRel = r | Rel r I r r r r r r × r r -1 r
19 17 18 elab2g R V R DirRel Rel R I A R R R R A × A R -1 R