--- /dev/null
+(*
+ ||M|| This file is part of HELM, an Hypertextual, Electronic
+ ||A|| Library of Mathematics, developed at the Computer Science
+ ||T|| Department of the University of Bologna, Italy.
+ ||I||
+ ||T||
+ ||A||
+ \ / This file is distributed under the terms of the
+ \ / GNU General Public License Version 2
+ V_____________________________________________________________*)
+
+
+(* COMPARE BIT
+
+*)
+
+include "turing/universal/copy.ma".
+
+(*
+
+step :
+
+if is_true(current) (* current state is final *)
+ then nop
+ else
+ (* init_match *)
+ mark;
+ adv_to_grid_r;
+ move_r;
+ mark;
+ move_l;
+ adv_to_mark_l
+ (* /init_match *)
+ match_tuple;
+ if is_marked(current) = false (* match ok *)
+ then
+ (* init_copy *)
+ move_l;
+ init_current;
+ move_r;
+ adv_to_mark_r;
+ adv_mark_r;
+ (* /init_copy *)
+ copy;
+ move_r;
+ (* move_tape *)
+ by cases on current:
+ case bit false: move_tape_l
+ case bit true: move_tape_r
+ case null: adv_to_grid_l; move_l; adv_to_grid_l;
+ move_r;
+ (* /move_tape *)
+ else sink;
+
+*)
\ No newline at end of file