(* large cardinals, solyga@gmx.de, 2022-11-17 *)
DEFINITION MODULE LC;

FROM SYSTEM IMPORT BYTE;

PROCEDURE Len0( x: ARRAY OF BYTE ): CARDINAL;  (* >= 0 *)
PROCEDURE Len( x: ARRAY OF BYTE ): CARDINAL;   (* >= 1 *)

PROCEDURE Cpy( VAR x: ARRAY OF BYTE; y: ARRAY OF BYTE ): BOOLEAN;
PROCEDURE Cmp( x, y: ARRAY OF BYTE ): INTEGER;

PROCEDURE Inc( VAR x: ARRAY OF BYTE; y: ARRAY OF BYTE ): BOOLEAN;
PROCEDURE Add( x, y: ARRAY OF BYTE; VAR z: ARRAY OF BYTE ): BOOLEAN;

PROCEDURE Dec( VAR x: ARRAY OF BYTE; y: ARRAY OF BYTE ): BOOLEAN;
PROCEDURE Sub( x, y: ARRAY OF BYTE; VAR z: ARRAY OF BYTE ): BOOLEAN;

PROCEDURE Mul( x, y: ARRAY OF BYTE; VAR z: ARRAY OF BYTE ): BOOLEAN;
PROCEDURE Mpl( VAR x: ARRAY OF BYTE; y: ARRAY OF BYTE ): BOOLEAN;
PROCEDURE Sqr( VAR x: ARRAY OF BYTE ): BOOLEAN;

PROCEDURE Div( x, y: ARRAY OF BYTE; VAR z, r: ARRAY OF BYTE ): BOOLEAN;
PROCEDURE Dvd( VAR x: ARRAY OF BYTE; y: ARRAY OF BYTE; VAR r: ARRAY OF BYTE ): BOOLEAN;

(*
PROCEDURE Inc0( VAR x: BYTE; y: BYTE; VAR c: BOOLEAN );
PROCEDURE Dec0( VAR x: BYTE; y: BYTE; VAR c: BOOLEAN );
PROCEDURE Cmp0( x, y: BYTE ): INTEGER;
PROCEDURE LenI( x: ARRAY OF BYTE; i: CARDINAL ): CARDINAL;
PROCEDURE Mul0( x, y: BYTE; VAR z, c: BYTE );
*)

END LC.
