@ -49,6 +49,7 @@ let%test_module _ =
l
l
| > snd
| > snd
let implies_eq r a b = implies r ( Term . eq a b )
let and_eq a b r = and_eq wrt a b r | > snd
let and_eq a b r = and_eq wrt a b r | > snd
let and_ r s = and_ wrt r s | > snd
let and_ r s = and_ wrt r s | > snd
let or_ r s = or_ wrt r s | > snd
let or_ r s = or_ wrt r s | > snd
@ -122,7 +123,7 @@ let%test_module _ =
{ sat = true ; rep = [ [ % x_5 ↦ ] ; [ % y_6 ↦ % x_5 ] ; [ - 1 ↦ ] ; [ 0 ↦ ] ] } | } ]
{ sat = true ; rep = [ [ % x_5 ↦ ] ; [ % y_6 ↦ % x_5 ] ; [ - 1 ↦ ] ; [ 0 ↦ ] ] } | } ]
let % test _ = enta ils_eq r1 x y
let % test _ = imp lie s_eq r1 x y
let r2 = of_eqs [ ( x , y ) ; ( f x , y ) ; ( f y , z ) ]
let r2 = of_eqs [ ( x , y ) ; ( f x , y ) ; ( f y , z ) ]
@ -141,14 +142,14 @@ let%test_module _ =
[ - 1 ↦ ] ;
[ - 1 ↦ ] ;
[ 0 ↦ ] ] } | } ]
[ 0 ↦ ] ] } | } ]
let % test _ = enta ils_eq r2 x z
let % test _ = imp lie s_eq r2 x z
let % test _ = enta ils_eq ( or_ r1 r2 ) x y
let % test _ = imp lie s_eq ( or_ r1 r2 ) x y
let % test _ = not ( enta ils_eq ( or_ r1 r2 ) x z )
let % test _ = not ( imp lie s_eq ( or_ r1 r2 ) x z )
let % test _ = enta ils_eq ( or_ f1 r2 ) x z
let % test _ = imp lie s_eq ( or_ f1 r2 ) x z
let % test _ = enta ils_eq ( or_ r2 f3 ) x z
let % test _ = imp lie s_eq ( or_ r2 f3 ) x z
let % test _ = enta ils_eq r2 ( f y ) y
let % test _ = imp lie s_eq r2 ( f y ) y
let % test _ = enta ils_eq r2 ( f x ) ( f z )
let % test _ = imp lie s_eq r2 ( f x ) ( f z )
let % test _ = enta ils_eq r2 ( g x y ) ( g z y )
let % test _ = imp lie s_eq r2 ( g x y ) ( g z y )
let % expect_test _ =
let % expect_test _ =
let r = of_eqs [ ( w , y ) ; ( y , z ) ] in
let r = of_eqs [ ( w , y ) ; ( y , z ) ] in
@ -171,7 +172,7 @@ let%test_module _ =
let r = of_eqs [ ( w , y ) ; ( y , z ) ] in
let r = of_eqs [ ( w , y ) ; ( y , z ) ] in
let s = of_eqs [ ( x , y ) ; ( y , z ) ] in
let s = of_eqs [ ( x , y ) ; ( y , z ) ] in
let rs = or_ r s in
let rs = or_ r s in
enta ils_eq rs y z
imp lie s_eq rs y z
let r3 = of_eqs [ ( g y z , w ) ; ( v , w ) ; ( g y w , t ) ; ( x , v ) ; ( x , u ) ; ( u , z ) ]
let r3 = of_eqs [ ( g y z , w ) ; ( v , w ) ; ( g y w , t ) ; ( x , v ) ; ( x , u ) ; ( u , z ) ]
@ -196,9 +197,9 @@ let%test_module _ =
[ - 1 ↦ ] ;
[ - 1 ↦ ] ;
[ 0 ↦ ] ] } | } ]
[ 0 ↦ ] ] } | } ]
let % test _ = enta ils_eq r3 t z
let % test _ = imp lie s_eq r3 t z
let % test _ = enta ils_eq r3 x z
let % test _ = imp lie s_eq r3 x z
let % test _ = enta ils_eq ( and_ r2 r3 ) x z
let % test _ = imp lie s_eq ( and_ r2 r3 ) x z
let r4 = of_eqs [ ( w + ! 2 , x - ! 3 ) ; ( x - ! 5 , y + ! 7 ) ; ( y , z - ! 4 ) ]
let r4 = of_eqs [ ( w + ! 2 , x - ! 3 ) ; ( x - ! 5 , y + ! 7 ) ; ( y , z - ! 4 ) ]
@ -217,7 +218,7 @@ let%test_module _ =
[ - 1 ↦ ] ;
[ - 1 ↦ ] ;
[ 0 ↦ ] ] } | } ]
[ 0 ↦ ] ] } | } ]
let % test _ = enta ils_eq r4 x ( w + ! 5 )
let % test _ = imp lie s_eq r4 x ( w + ! 5 )
let r5 = of_eqs [ ( x , y ) ; ( g w x , y ) ; ( g w y , f z ) ]
let r5 = of_eqs [ ( x , y ) ; ( g w x , y ) ; ( g w y , f z ) ]
@ -234,7 +235,7 @@ let%test_module _ =
{ sat = true ; rep = [ [ % x_5 ↦ 1 ] ; [ % y_6 ↦ 1 ] ; [ - 1 ↦ ] ; [ 0 ↦ ] ] } | } ]
{ sat = true ; rep = [ [ % x_5 ↦ 1 ] ; [ % y_6 ↦ 1 ] ; [ - 1 ↦ ] ; [ 0 ↦ ] ] } | } ]
let % test _ = enta ils_eq r6 x y
let % test _ = imp lie s_eq r6 x y
let r7 = of_eqs [ ( v , x ) ; ( w , z ) ; ( y , z ) ]
let r7 = of_eqs [ ( v , x ) ; ( w , z ) ; ( y , z ) ]
@ -300,10 +301,10 @@ let%test_module _ =
let % test _ = normalize r7' w | > Term . equal v
let % test _ = normalize r7' w | > Term . equal v
let % test _ =
let % test _ =
enta ils_eq ( of_eqs [ ( g w x , g y z ) ; ( x , z ) ] ) ( g w x ) ( g w z )
imp lie s_eq ( of_eqs [ ( g w x , g y z ) ; ( x , z ) ] ) ( g w x ) ( g w z )
let % test _ =
let % test _ =
enta ils_eq ( of_eqs [ ( g w x , g y w ) ; ( x , z ) ] ) ( g w x ) ( g w z )
imp lie s_eq ( of_eqs [ ( g w x , g y w ) ; ( x , z ) ] ) ( g w x ) ( g w z )
let r8 = of_eqs [ ( x + ! 42 , ( 3 * y ) + ( 13 * z ) ) ; ( 13 * z , x ) ]
let r8 = of_eqs [ ( x + ! 42 , ( 3 * y ) + ( 13 * z ) ) ; ( 13 * z , x ) ]
@ -317,7 +318,7 @@ let%test_module _ =
{ sat = true ;
{ sat = true ;
rep = [ [ % x_5 ↦ ( 13 × % z_7 ) ] ; [ % y_6 ↦ 14 ] ; [ % z_7 ↦ ] ; [ - 1 ↦ ] ; [ 0 ↦ ] ] } | } ]
rep = [ [ % x_5 ↦ ( 13 × % z_7 ) ] ; [ % y_6 ↦ 14 ] ; [ % z_7 ↦ ] ; [ - 1 ↦ ] ; [ 0 ↦ ] ] } | } ]
let % test _ = enta ils_eq r8 y ! 14
let % test _ = imp lie s_eq r8 y ! 14
let r11 = of_eqs [ ( ! 16 , z - x ) ; ( x + ! 8 - z , z - ! 16 + ! 8 - z ) ]
let r11 = of_eqs [ ( ! 16 , z - x ) ; ( x + ! 8 - z , z - ! 16 + ! 8 - z ) ]
@ -357,7 +358,7 @@ let%test_module _ =
{ |
{ |
{ sat = true ; rep = [ [ % x_5 ↦ 1 ] ; [ ( % x_5 ≠ 0 ) ↦ - 1 ] ; [ - 1 ↦ ] ; [ 0 ↦ ] ] } | } ]
{ sat = true ; rep = [ [ % x_5 ↦ 1 ] ; [ ( % x_5 ≠ 0 ) ↦ - 1 ] ; [ - 1 ↦ ] ; [ 0 ↦ ] ] } | } ]
let % test _ = enta ils_eq r14 a Term . true_
let % test _ = imp lie s_eq r14 a Term . true_
let b = Term . dq y ! 0
let b = Term . dq y ! 0
let r14 = of_eqs [ ( a , b ) ; ( x , ! 1 ) ]
let r14 = of_eqs [ ( a , b ) ; ( x , ! 1 ) ]
@ -374,8 +375,8 @@ let%test_module _ =
[ - 1 ↦ ] ;
[ - 1 ↦ ] ;
[ 0 ↦ ] ] } | } ]
[ 0 ↦ ] ] } | } ]
let % test _ = enta ils_eq r14 a Term . true_
let % test _ = imp lie s_eq r14 a Term . true_
let % test _ = enta ils_eq r14 b Term . true_
let % test _ = imp lie s_eq r14 b Term . true_
let b = Term . dq x ! 0
let b = Term . dq x ! 0
let r15 = of_eqs [ ( b , b ) ; ( x , ! 1 ) ]
let r15 = of_eqs [ ( b , b ) ; ( x , ! 1 ) ]
@ -386,8 +387,8 @@ let%test_module _ =
{ |
{ |
{ sat = true ; rep = [ [ % x_5 ↦ 1 ] ; [ ( % x_5 ≠ 0 ) ↦ - 1 ] ; [ - 1 ↦ ] ; [ 0 ↦ ] ] } | } ]
{ sat = true ; rep = [ [ % x_5 ↦ 1 ] ; [ ( % x_5 ≠ 0 ) ↦ - 1 ] ; [ - 1 ↦ ] ; [ 0 ↦ ] ] } | } ]
let % test _ = enta ils_eq r15 b ( Term . signed 1 ! 1 )
let % test _ = imp lie s_eq r15 b ( Term . signed 1 ! 1 )
let % test _ = enta ils_eq r15 ( Term . unsigned 1 b ) ! 1
let % test _ = imp lie s_eq r15 ( Term . unsigned 1 b ) ! 1
(* f ( x− 1 ) − 1=x+1, f( y ) +1=y− 1, y+1=x ⊢ false *)
(* f ( x− 1 ) − 1=x+1, f( y ) +1=y− 1, y+1=x ⊢ false *)
let r16 =
let r16 =
@ -449,5 +450,5 @@ let%test_module _ =
{ sat = true ;
{ sat = true ;
rep = [ [ % x_5 ↦ 0 ] ; [ % y_6 ↦ 0 ] ; [ % z_7 ↦ 0 ] ; [ - 1 ↦ ] ; [ 0 ↦ ] ] } | } ]
rep = [ [ % x_5 ↦ 0 ] ; [ % y_6 ↦ 0 ] ; [ % z_7 ↦ 0 ] ; [ - 1 ↦ ] ; [ 0 ↦ ] ] } | } ]
let % test _ = enta ils_eq r19 z ! 0
let % test _ = imp lie s_eq r19 z ! 0
end )
end )