Metamath Proof Explorer


Theorem sgnsf

Description: The sign function. (Contributed by Thierry Arnoux, 9-Sep-2018)

Ref Expression
Hypotheses sgnsval.b B = Base R
sgnsval.0 0 ˙ = 0 R
sgnsval.l < ˙ = < R
sgnsval.s S = sgn s R
Assertion sgnsf R V S : B 1 0 1

Proof

Step Hyp Ref Expression
1 sgnsval.b B = Base R
2 sgnsval.0 0 ˙ = 0 R
3 sgnsval.l < ˙ = < R
4 sgnsval.s S = sgn s R
5 1 2 3 4 sgnsv R V S = x B if x = 0 ˙ 0 if 0 ˙ < ˙ x 1 1
6 c0ex 0 V
7 6 tpid2 0 1 0 1
8 1ex 1 V
9 8 tpid3 1 1 0 1
10 negex 1 V
11 10 tpid1 1 1 0 1
12 9 11 ifcli if 0 ˙ < ˙ x 1 1 1 0 1
13 7 12 ifcli if x = 0 ˙ 0 if 0 ˙ < ˙ x 1 1 1 0 1
14 13 a1i R V x B if x = 0 ˙ 0 if 0 ˙ < ˙ x 1 1 1 0 1
15 5 14 fmpt3d R V S : B 1 0 1