:: ABSVALUE semantic presentation

definition
let x be real number ;
redefine func |.c1.| -> set equals :Def1: :: ABSVALUE:def 1
x if 0 <= x
otherwise - x;
correctness
compatibility
for b1 being set holds
( ( 0 <= x implies ( b1 = |.x.| iff b1 = x ) ) & ( not 0 <= x implies ( b1 = |.x.| iff b1 = - x ) ) )
;
consistency
for b1 being set holds verum
;
by COMPLEX1:129, COMPLEX1:156;
end;

:: deftheorem Def1 defines |. ABSVALUE:def 1 :
for x being real number holds
( ( 0 <= x implies |.x.| = x ) & ( not 0 <= x implies |.x.| = - x ) );

theorem Th1: :: ABSVALUE:1
for x being real number holds
( abs x = x or abs x = - x )
proof end;

Lemma14: for x being real number holds 0 <= abs x
by COMPLEX1:132;

Lemma15: for x being real number st x <> 0 holds
0 < abs x
by COMPLEX1:133;

theorem Th2: :: ABSVALUE:2
canceled;

theorem Th3: :: ABSVALUE:3
canceled;

theorem Th4: :: ABSVALUE:4
canceled;

theorem Th5: :: ABSVALUE:5
canceled;

theorem Th6: :: ABSVALUE:6
canceled;

theorem Th7: :: ABSVALUE:7
for x being real number holds
( x = 0 iff abs x = 0 ) by , COMPLEX1:133;

theorem Th8: :: ABSVALUE:8
canceled;

theorem Th9: :: ABSVALUE:9
for x being real number st abs x = - x & x <> 0 holds
x < 0
proof end;

Lemma19: for x, y being real number holds abs (x * y) = (abs x) * (abs y)
by COMPLEX1:151;

theorem Th10: :: ABSVALUE:10
canceled;

theorem Th11: :: ABSVALUE:11
for x being real number holds
( - (abs x) <= x & x <= abs x )
proof end;

theorem Th12: :: ABSVALUE:12
for y, x being real number holds
( ( - y <= x & x <= y ) iff abs x <= y )
proof end;

Lemma23: for x, y being real number holds abs (x + y) <= (abs x) + (abs y)
by COMPLEX1:142;

theorem Th13: :: ABSVALUE:13
canceled;

theorem Th14: :: ABSVALUE:14
for x being real number st x <> 0 holds
(abs x) * (abs (1 / x)) = 1
proof end;

theorem Th15: :: ABSVALUE:15
for x being real number holds abs (1 / x) = 1 / (abs x)
proof end;

Lemma25: for x, y being real number holds abs (x / y) = (abs x) / (abs y)
by COMPLEX1:153;

theorem Th16: :: ABSVALUE:16
canceled;

theorem Th17: :: ABSVALUE:17
canceled;

theorem Th18: :: ABSVALUE:18
canceled;

theorem Th19: :: ABSVALUE:19
canceled;

theorem Th20: :: ABSVALUE:20
for x, y being real number st 0 <= x * y holds
sqrt (x * y) = (sqrt (abs x)) * (sqrt (abs y))
proof end;

theorem Th21: :: ABSVALUE:21
for x, z, y, t being real number st abs x <= z & abs y <= t holds
abs (x + y) <= z + t
proof end;

theorem Th22: :: ABSVALUE:22
canceled;

theorem Th23: :: ABSVALUE:23
for x, y being real number st 0 < x / y holds
sqrt (x / y) = (sqrt (abs x)) / (sqrt (abs y))
proof end;

theorem Th24: :: ABSVALUE:24
for x, y being real number st 0 <= x * y holds
abs (x + y) = (abs x) + (abs y)
proof end;

theorem Th25: :: ABSVALUE:25
for x, y being real number st abs (x + y) = (abs x) + (abs y) holds
0 <= x * y
proof end;

theorem Th26: :: ABSVALUE:26
for x, y being real number holds (abs (x + y)) / (1 + (abs (x + y))) <= ((abs x) / (1 + (abs x))) + ((abs y) / (1 + (abs y)))
proof end;

definition
let x be real number ;
func sgn c1 -> set equals :Def2: :: ABSVALUE:def 2
1 if 0 < x
- 1 if x < 0
otherwise 0;
coherence
( ( 0 < x implies 1 is set ) & ( x < 0 implies - 1 is set ) & ( not 0 < x & not x < 0 implies 0 is set ) )
;
consistency
for b1 being set st 0 < x & x < 0 holds
( b1 = 1 iff b1 = - 1 )
;
end;

:: deftheorem Def2 defines sgn ABSVALUE:def 2 :
for x being real number holds
( ( 0 < x implies sgn x = 1 ) & ( x < 0 implies sgn x = - 1 ) & ( not 0 < x & not x < 0 implies sgn x = 0 ) );

registration
let x be real number ;
cluster sgn a1 -> real ;
coherence
sgn x is real
proof end;
end;

definition
let x be Real;
redefine func sgn as sgn c1 -> Real;
coherence
sgn x is Real
by XREAL_0:def 1;
end;

theorem Th27: :: ABSVALUE:27
canceled;

theorem Th28: :: ABSVALUE:28
canceled;

theorem Th29: :: ABSVALUE:29
canceled;

theorem Th30: :: ABSVALUE:30
canceled;

theorem Th31: :: ABSVALUE:31
for x being real number st sgn x = 1 holds
0 < x
proof end;

theorem Th32: :: ABSVALUE:32
for x being real number st sgn x = - 1 holds
x < 0
proof end;

theorem Th33: :: ABSVALUE:33
for x being real number st sgn x = 0 holds
x = 0
proof end;

theorem Th34: :: ABSVALUE:34
for x being real number holds x = (abs x) * (sgn x)
proof end;

theorem Th35: :: ABSVALUE:35
for x, y being real number holds sgn (x * y) = (sgn x) * (sgn y)
proof end;

theorem Th36: :: ABSVALUE:36
for x being real number holds sgn (sgn x) = sgn x
proof end;

theorem Th37: :: ABSVALUE:37
for x, y being real number holds sgn (x + y) <= ((sgn x) + (sgn y)) + 1
proof end;

theorem Th38: :: ABSVALUE:38
for x being real number st x <> 0 holds
(sgn x) * (sgn (1 / x)) = 1
proof end;

theorem Th39: :: ABSVALUE:39
for x being real number holds 1 / (sgn x) = sgn (1 / x)
proof end;

theorem Th40: :: ABSVALUE:40
for x, y being real number holds ((sgn x) + (sgn y)) - 1 <= sgn (x + y)
proof end;

theorem Th41: :: ABSVALUE:41
for x being real number holds sgn x = sgn (1 / x)
proof end;

theorem Th42: :: ABSVALUE:42
for x, y being real number holds sgn (x / y) = (sgn x) / (sgn y)
proof end;