Metamath Proof Explorer


Theorem sgnsval

Description: The sign value. (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 sgnsval R V X B S X = if X = 0 ˙ 0 if 0 ˙ < ˙ X 1 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 5 adantr R V X B S = x B if x = 0 ˙ 0 if 0 ˙ < ˙ x 1 1
7 eqeq1 x = X x = 0 ˙ X = 0 ˙
8 breq2 x = X 0 ˙ < ˙ x 0 ˙ < ˙ X
9 8 ifbid x = X if 0 ˙ < ˙ x 1 1 = if 0 ˙ < ˙ X 1 1
10 7 9 ifbieq2d x = X if x = 0 ˙ 0 if 0 ˙ < ˙ x 1 1 = if X = 0 ˙ 0 if 0 ˙ < ˙ X 1 1
11 10 adantl R V X B x = X if x = 0 ˙ 0 if 0 ˙ < ˙ x 1 1 = if X = 0 ˙ 0 if 0 ˙ < ˙ X 1 1
12 simpr R V X B X B
13 c0ex 0 V
14 13 a1i R V X B X = 0 ˙ 0 V
15 1ex 1 V
16 15 a1i R V X B ¬ X = 0 ˙ 0 ˙ < ˙ X 1 V
17 negex 1 V
18 17 a1i R V X B ¬ X = 0 ˙ ¬ 0 ˙ < ˙ X 1 V
19 16 18 ifclda R V X B ¬ X = 0 ˙ if 0 ˙ < ˙ X 1 1 V
20 14 19 ifclda R V X B if X = 0 ˙ 0 if 0 ˙ < ˙ X 1 1 V
21 6 11 12 20 fvmptd R V X B S X = if X = 0 ˙ 0 if 0 ˙ < ˙ X 1 1