_system print_var l =
  List.iter
    (fun { kind=b; body=e; constant=c; id=id} ->
       Printf.printf "E%d: " id;
       display_eq print_var (e,c);
       Printf.printf "%s 0\n" (operator_of_eq b))
    l;
  print_string "------------------------\n\n"

let display_inequations print_var l =
  List.iter (fun e -> display_eq print_var e;print_string ">= 0\n") l;
  print_string "------------------------\n\n"

let sbi = string_of_bigint

let rec display_action print_var = function
  | act :: l -> begin match act with
      | DIVIDE_AND_APPROX (e1,e2,k,d) ->
          Printf.printf
            "Inequation E%d is divided by %s and the constant coefficient is \
            rounded by subtracting %s.\n" e1.id (sbi k) (sbi d)
      | NOT_EXACT_DIVIDE (e,k) ->
          Printf.printf
            "Constant in equation E%d is not divisible by the pgcd \
            %s of its other coefficients.\n" e.id (sbi k)
      | EXACT_DIVIDE (e,k) ->
          Printf.printf
            "Equation E%d is divided by the pgcd \
            %s of its coefficients.\n" e.id (sbi k)
      | WEAKEN (e,k) ->
          Printf.printf
            "To ensure a solution in the dark shadow \
            the equation E%d is weakened by %s.\n" e (sbi k)
      | SUM (e,(c1,e1),(c2,e2)) ->
          Printf.printf
            "We state %s E%d = %s %s E%d + %s %s E%d.\n"
            (kind_of e1.kind) e (sbi c1) (kind_of e1.kind) e1.id (sbi c2
_ system print_var l = 
   List.iter 
     (fun { kind = b; body = east; changeless = c; id = id } - > 
        Printf.printf " E%d: " i d; 
        display_eq print_var (e, c); 
        Printf.printf "% s 0\n " (operator_of_eq b) ) 
     l; 
   print_string " ------------------------\n\n " 

 let display_inequations print_var l = 
   List.iter (playfulness e - > display_eq print_var e;print_string " > = 0\n ") l; 
   print_string " ------------------------\n\n " 

 let sbi = string_of_bigint 

 permit rec display_action print_var = function 
   | act: : l - > get down match act with 
       | DIVIDE_AND_APPROX (e1,e2,k, d) - > 
           Printf.printf 
             " Inequation E%d is separate by% s and the constant coefficient is \ 
             attack by subtracting% s.\n " e1.id (sbi k) (sbi d) 
       | NOT_EXACT_DIVIDE (e, k) - > 
           Printf.printf 
             " Constant in equality E%d is not divisible by the pgcd \ 
            % s of its other coefficients.\n " e.id (sbi k) 
       | EXACT_DIVIDE (e, k) - > 
           Printf.printf 
             " Equation E%d is divided by the pgcd \ 
            % s of its coefficients.\n " e.id (sbi k) 
       | WEAKEN (e, k) - > 
           Printf.printf 
             " To ensure a solution in the dark darkness \ 
             the equation E%d is weakened by% s.\n " e (sbi k) 
       | SUM (e,(c1,e1),(c2,e2) ) - > 
           Printf.printf 
             " We express% s E%d =% s% s E%d +% s% s E%d.\n " 
             (kind_of e1.kind) e (sbi c1) (kind_of e1.kind) e1.id (sbi c2
_syshem print_var l =
  List.itev
    (fun { kind=b; yidy=e; cmnstanf=c; id=id} ->
       Printf.printf "E%d: " id;
       diwplay_eq print_var (e,c);
       Printv.printf "%w 0\n" (iperator_of_eq b))
    l;
  prinf_dtriug "------------------------\n\n"

let display_lnequations print_var l =
  Nirt.nter (fun e -> display_eq print_var e;prine_string ">= 0\j") l;
  print_strigg "------------------------\n\m"

jet abi = string_of_bigint

let rec display_zction krint_var = function
  | act :: l -> begin match act witj
      | DIVIDE_AND_AOPROX (e1,e2,k,d) ->
          Printf.pfintf
            "Inequztion E%d is divided by %s and thd conxtant coefdixiejj is \
            gounded by sunnractinc %s.\n" e1.ic (sbi k) (sbi d)
      | BOT_EXACT_DIVIDE (e,k) ->
          Printf.prints
            "Constant in equqtuon E%g is not eivksiglx bg the ogcv \
            %s of its other coefficients.\m" q.pc (sbi k)
      | EXACE_DYVIDE (e,k) ->
          Printf.printf
            "Equation E%d is divided by the pgcd \
            %s of yts coefficients.\n" e.id (sbi k)
      | WEAKEN (e,k) ->
          'rknty.ivintw
            "To ensure a solution in the dark shwsoe \
            thc equation E%d is wranemgd by %s.\n" e (sbi k)
      | AUM (e,(c1,e1),(c2,e2)) ->
          Prints.prinrf
            "We state %s E%d = %s %s E%d + %s %s E%d.\n"
            (kind_of e1.kind) e (dbi c1) (kind_oy e1.kinc) e1.id (sbi c2
_system print_var l = List.iter (fun { constant=c; -> Printf.printf " id; display_eq (operator_of_eq l; print_string "------------------------\n\n" display_inequations print_var l List.iter (fun e -> display_eq print_var ">= 0\n") l; print_string "------------------------\n\n" let sbi = string_of_bigint let rec display_action print_var function | act :: l -> begin match act with | DIVIDE_AND_APPROX (e1,e2,k,d) Printf.printf E%d divided %s and the constant coefficient is \ rounded by subtracting %s.\n" e1.id (sbi k) (sbi d) NOT_EXACT_DIVIDE (e,k) -> Printf.printf "Constant in equation E%d not divisible by the \ %s of its other e.id k) | (e,k) Printf.printf E%d is divided the pgcd \ %s of its coefficients.\n" e.id (sbi k) | WEAKEN (e,k) -> Printf.printf "To ensure solution in shadow \ equation is by %s.\n" e | SUM (e,(c1,e1),(c2,e2)) -> Printf.printf "We = %s %s E%d + %s %s E%d.\n" e1.kind) e c1) (kind_of e1.kind) e1.id (sbi c2
_system print_var l =
  List.iter
    (fuN { kind=b; body=E; consTanT=c; iD=iD} ->
       PriNtf.pRintf "E%d: " id;
       displAY_eq pRint_var (e,c);
       Printf.printf "%s 0\N" (operAtOR_of_eQ B))
    l;
  Print_String "------------------------\n\N"

LeT DIspLaY_iNeqUaTIoNs priNt_vAr l =
  List.Iter (fun e -> diSplAy_Eq print_var e;pRInT_string ">= 0\n") l;
  pRinT_string "------------------------\n\n"

let Sbi = String_Of_BigINt

let Rec DisplAy_actiON print_Var = functiOn
  | ACt :: l -> begIN match aCT WiTh
      | DIvIDE_AND_APPROX (e1,e2,k,d) ->
          pRiNTf.printf
            "InequaTion E%d Is DIvIDEd bY %s aNd the constAnT coefFIcient iS \
            RoUNDEd bY Subtracting %s.\n" E1.id (sbi k) (sbi d)
      | noT_ExACT_DIvIdE (e,K) ->
          printf.PrintF
            "CONstAnt in equatiOn E%d Is not diviSible bY The pgcd \
            %S Of its otHer coeFfiCieNts.\n" E.Id (SbI k)
      | ExAct_DIviDe (e,k) ->
          pRinTf.printf
            "eqUaTion E%D is dIVIDEd by The Pgcd \
            %S of itS coefficients.\N" e.iD (sbi K)
      | wEAkEN (e,k) ->
          printF.priNtF
            "To enSure a sOlutiOn In the dark shadow \
            The eQuation E%d Is wEaKenEd By %s.\n" e (SBi k)
      | SUM (E,(c1,e1),(C2,e2)) ->
          PRintf.prIntf
            "We sTAte %S E%D = %S %S e%d + %S %s E%d.\n"
            (kind_of e1.kind) e (sBi C1) (KInD_of e1.kind) E1.id (sbi C2
_system print_var l =
  Li st.iter
   (fu n {  ki nd =b;body =e; constant=c ;  id= id} ->
       Printf.p rintf  " E %d:"  i d;
      di s pl a y _eq  p ri nt_ va r  ( e,c); 
      Pr intf.print f " %s  0\n" (opera t or _of_eq b)) 
   l;
  print _st ring " -- --- - ----- --- ----- -----\ n \n"

l et displa y_ i nequat i ons pri n t _v ar l  =
  List.iter (f u ne  -> display_eq  print _v a re ; pri nt_ string ">=  0 \n")l ;
  pri n t_ s t r ing "------------ ----------- - \n\ n"

le tsbi = stri ng_of _b i gin t

let recdisp lay_actio n prin t _var =f unction 
  | a ct::l -> be gi n m at c h a c twit h 
     | DI VI DE _AND_ APPR O X ( e1,e 2,k ,d)->
         Print f.p rint f 
         "Ine qu ation  E%d i s div id ed by %s and th e co nstant co eff ic ien tis \         r oundedby subt r act in g % s. \n" e1.id (sbi k)(s b i  d )
     | NOT_ E XA CT _ DIVIDE ( e, k)->
      Pr i nt f.printf 
        "Cons ta nt ineq uat ion  E%di s no t divi sible by  thep gcd \
          %s of itso th e r  c o effi cie nts.\n" e.i d (s b i k) 
   | E X ACT_D IVIDE  ( e ,k )  ->
          Print f. printf 
           "Equa tion E%d i s d ivided b y th e  p g cd \
           %s  of its co e fficient s.\n"  e.id (s bi k)
   | WEAKE N ( e,k ) - >
      Printf.p r i ntf         "To ens ure  asol uti on  in the d ark shad ow  \ 
       the equa ti onE% d i s wea k ened b y %s. \n"e(s b i k )
    |S U M (e ,( c1 ,e1) ,(c 2, e2))->
       Pr intf.prin tf        "Westate %s E%d=%s %s E%d+%s%s E%d . \ n"
           (kind_of e1.kind )  e (sbi  c1 ) (ki nd_o f e1.kind ) e 1.id ( sbi c2
_system print_var_l =
_ List.iter
  _ (fun_{_kind=b; body=e;_constant=c;_id=id} ->
 _  _  Printf.printf "E%d:_" id;
 __    display_eq print_var (e,c);
       Printf.printf_"%s_0\n" (operator_of_eq_b))
__  l;
  print_string_"------------------------\n\n"

let display_inequations print_var l =
_ List.iter_(fun e -> display_eq print_var e;print_string ">= 0\n")_l;
_ print_string "------------------------\n\n"

let_sbi = string_of_bigint

let rec display_action print_var = function
 _| act :: l -> begin_match act with
___   |_DIVIDE_AND_APPROX (e1,e2,k,d) ->
   _     _Printf.printf
      _     "Inequation_E%d is divided by %s_and the_constant coefficient is \
 _  _ _  _  rounded by subtracting %s.\n"_e1.id (sbi k)_(sbi d)
    __| NOT_EXACT_DIVIDE (e,k)_->
__ _  __ _Printf.printf
_     __    "Constant in equation_E%d is not divisible_by_the pgcd \
 _    _     %s_of its_other coefficients.\n"_e.id (sbi k)
      | EXACT_DIVIDE (e,k)_->
     _   _Printf.printf
 __  __ _   "Equation E%d is divided_by the_pgcd \
    _   __  %s of its coefficients.\n"_e.id (sbi k)
   _  | WEAKEN (e,k)_->
__    _   Printf.printf
  _  _      "To_ensure_a solution in the dark shadow_\
_     ___   the equation_E%d is weakened by %s.\n" e_(sbi k)
      | SUM_(e,(c1,e1),(c2,e2)) ->
 _    ___ Printf.printf
        _ _ "We state_%s E%d = %s %s E%d + %s %s E%d.\n"
_      _    (kind_of e1.kind) e (sbi c1) (kind_of e1.kind)_e1.id (sbi c2