(* Some invariants of the system TCG *)
Definition Inv1 (s : StGlobal) :=
match s with
| ((st, _), ((sc, _), (sg, _))) =>
st = Near \/ st = Inside -> sc = Sc3 -> sg = Closed \/ sg = Lowering
end.

(* Specifications: *)
Lemma lema_Inv1 : ForAll TrGlobal SiniTCG Inv1.
Definition Inv2 (s : StGlobal) :=
match s with
| ((st, _), ((sc, _), (sg, _))) =>
st = Far -> sg = Open \/ sg = Raising -> sc = Sc1
end.
Lemma lema_Inv2 : ForAll TrGlobal SiniTCG Inv2.
Definition Inv3 (s : StGlobal) :=
match s with
| ((st, x), ((_, y), _)) => st = Near \/ st = Inside -> eq_Ck x y
end.
Lemma lema_Inv3 : ForAll TrGlobal SiniTCG Inv3.
Definition Inv4 (s : StGlobal) :=
match s with
| ((st, _), ((sc, _), _)) => st = Near -> sc = Sc2 \/ sc = Sc3
end.
Lemma lema_Inv4 : ForAll TrGlobal SiniTCG Inv4.
Definition Inv5 (s : StGlobal) :=
match s with
| ((st, _), ((sc, y), (_, z))) =>
st = Near -> sc = Sc3 -> eq_Ck y (plus_Ck z kc1)
end.
Lemma lema_Inv5 : ForAll TrGlobal SiniTCG Inv5.
Definition Inv6 (s : StGlobal) :=
match s with
| ((st, x), ((sc, _), _)) =>
st = Near /\ gt_Ck x kc1 \/ st = Inside -> sc = Sc3
end.
Lemma lema_Inv6 : ForAll TrGlobal SiniTCG Inv6.
Definition Inv7 (s : StGlobal) :=
match s with
| ((st, _), ((sc, _), (sg, _))) =>
st = Near \/ st = Inside -> sc = Sc3 -> sg = Lowering \/ sg = Closed
end.
Lemma lema_Inv7 : ForAll TrGlobal SiniTCG Inv7.
Definition Inv8 (s : StGlobal) :=
match s with
| ((st, x), ((sc, _), (sg, _))) =>
st = Near /\ gt_Ck x kt1 \/ st = Inside -> sg = Closed
end.
Lemma lema_Inv8 : ForAll TrGlobal SiniTCG Inv8.
Definition safeTCG (s : StGlobal) :=
match s with
| ((st, _), (_, (sg, _))) => st = Inside -> sg = Closed
end.