TP-modelisation/TP2-3/enigme/enigme-Predicats-Thm01_1.cvc
2023-06-10 20:56:24 +02:00

84 lines
1.3 KiB
Plaintext

%%% this is a prelude for CVC3
uni : TYPE;
ty : TYPE;
sort: (ty, uni) -> BOOLEAN;
witness: (ty) -> uni;
% witness_sort
ASSERT (FORALL (a : ty): (sort(a, witness(a))));
int: ty;
real: ty;
bool: ty;
match_bool: (ty, BITVECTOR(1), uni, uni) -> uni;
% match_bool_sort
ASSERT
(FORALL (a : ty):
(FORALL (x : BITVECTOR(1), x1 : uni, x2 : uni): (sort(a, match_bool(a, x,
x1, x2)))));
% match_bool_True
ASSERT
(FORALL (a : ty):
(FORALL (z : uni, z1 : uni):
((sort(a, z)) => (match_bool(a, 0bin1, z, z1) = z))));
% match_bool_False
ASSERT
(FORALL (a : ty):
(FORALL (z : uni, z1 : uni):
((sort(a, z1)) => (match_bool(a, 0bin0, z, z1) = z1))));
index_bool: (BITVECTOR(1)) -> INT;
% index_bool_True
ASSERT (index_bool(0bin1) = 0);
% index_bool_False
ASSERT (index_bool(0bin0) = 1);
% bool_inversion
ASSERT (FORALL (u : BITVECTOR(1)): ((u = 0bin1) OR (u = 0bin0)));
tuple0 : TYPE;
tuple01: ty;
Tuple0: tuple0;
% tuple0_inversion
ASSERT (FORALL (u : tuple0): (u = Tuple0));
a: BOOLEAN;
b: BOOLEAN;
c: BOOLEAN;
da: BOOLEAN;
% da_def
ASSERT (da <=> (b AND (NOT c)));
db: BOOLEAN;
% db_def
ASSERT (db <=> (a => c));
dc: BOOLEAN;
% dc_def
ASSERT (dc <=> ((NOT c) AND (a OR b)));
QUERY
% Thm01
% File "enigme.mlw", line 13, characters 7-12
(da AND (db AND dc));