Require Import ADPUnif. Require Import ADecomp. Require Import ADuplicateSymb. Require Import AGraph. Require Import APolyInt_MA. Require Import ATrs. Require Import List. Require Import LogicUtil. Require Import MonotonePolynom. Require Import Polynom. Require Import SN. Require Import VecUtil. Open Scope nat_scope. (* termination problem *) Module M. Inductive symb : Type := | active : symb | c : symb | d : symb | f : symb | g : symb | h : symb | mark : symb | ok : symb | proper : symb | top : symb. End M. Lemma eq_symb_dec : forall f g : M.symb, {f=g}+{~f=g}. Proof. decide equality. Defined. Open Scope nat_scope. Definition ar (s : M.symb) : nat := match s with | M.active => 1 | M.c => 1 | M.d => 1 | M.f => 1 | M.g => 1 | M.h => 1 | M.mark => 1 | M.ok => 1 | M.proper => 1 | M.top => 1 end. Definition s0 := ASignature.mkSignature ar eq_symb_dec. Definition s0_p := s0. Definition V0 := @ATerm.Var s0. Definition F0 := @ATerm.Fun s0. Definition R0 := @ATrs.mkRule s0. Module S0. Definition active x1 := F0 M.active (Vcons x1 Vnil). Definition c x1 := F0 M.c (Vcons x1 Vnil). Definition d x1 := F0 M.d (Vcons x1 Vnil). Definition f x1 := F0 M.f (Vcons x1 Vnil). Definition g x1 := F0 M.g (Vcons x1 Vnil). Definition h x1 := F0 M.h (Vcons x1 Vnil). Definition mark x1 := F0 M.mark (Vcons x1 Vnil). Definition ok x1 := F0 M.ok (Vcons x1 Vnil). Definition proper x1 := F0 M.proper (Vcons x1 Vnil). Definition top x1 := F0 M.top (Vcons x1 Vnil). End S0. Definition E := @nil (@ATrs.rule s0). Definition R := R0 (S0.active (S0.f (S0.f (V0 0)))) (S0.mark (S0.c (S0.f (S0.g (S0.f (V0 0)))))) :: R0 (S0.active (S0.c (V0 0))) (S0.mark (S0.d (V0 0))) :: R0 (S0.active (S0.h (V0 0))) (S0.mark (S0.c (S0.d (V0 0)))) :: R0 (S0.active (S0.f (V0 0))) (S0.f (S0.active (V0 0))) :: R0 (S0.active (S0.h (V0 0))) (S0.h (S0.active (V0 0))) :: R0 (S0.f (S0.mark (V0 0))) (S0.mark (S0.f (V0 0))) :: R0 (S0.h (S0.mark (V0 0))) (S0.mark (S0.h (V0 0))) :: R0 (S0.proper (S0.f (V0 0))) (S0.f (S0.proper (V0 0))) :: R0 (S0.proper (S0.c (V0 0))) (S0.c (S0.proper (V0 0))) :: R0 (S0.proper (S0.g (V0 0))) (S0.g (S0.proper (V0 0))) :: R0 (S0.proper (S0.d (V0 0))) (S0.d (S0.proper (V0 0))) :: R0 (S0.proper (S0.h (V0 0))) (S0.h (S0.proper (V0 0))) :: R0 (S0.f (S0.ok (V0 0))) (S0.ok (S0.f (V0 0))) :: R0 (S0.c (S0.ok (V0 0))) (S0.ok (S0.c (V0 0))) :: R0 (S0.g (S0.ok (V0 0))) (S0.ok (S0.g (V0 0))) :: R0 (S0.d (S0.ok (V0 0))) (S0.ok (S0.d (V0 0))) :: R0 (S0.h (S0.ok (V0 0))) (S0.ok (S0.h (V0 0))) :: R0 (S0.top (S0.mark (V0 0))) (S0.top (S0.proper (V0 0))) :: R0 (S0.top (S0.ok (V0 0))) (S0.top (S0.active (V0 0))) :: @nil (@ATrs.rule s0). Definition rel := ATrs.red_mod E R. (* symbol marking *) Definition s1 := dup_sig s0. Definition s1_p := s0. Definition V1 := @ATerm.Var s1. Definition F1 := @ATerm.Fun s1. Definition R1 := @ATrs.mkRule s1. Module S1. Definition hactive x1 := F1 (hd_symb s1_p M.active) (Vcons x1 Vnil). Definition active x1 := F1 (int_symb s1_p M.active) (Vcons x1 Vnil). Definition hc x1 := F1 (hd_symb s1_p M.c) (Vcons x1 Vnil). Definition c x1 := F1 (int_symb s1_p M.c) (Vcons x1 Vnil). Definition hd x1 := F1 (hd_symb s1_p M.d) (Vcons x1 Vnil). Definition d x1 := F1 (int_symb s1_p M.d) (Vcons x1 Vnil). Definition hf x1 := F1 (hd_symb s1_p M.f) (Vcons x1 Vnil). Definition f x1 := F1 (int_symb s1_p M.f) (Vcons x1 Vnil). Definition hg x1 := F1 (hd_symb s1_p M.g) (Vcons x1 Vnil). Definition g x1 := F1 (int_symb s1_p M.g) (Vcons x1 Vnil). Definition hh x1 := F1 (hd_symb s1_p M.h) (Vcons x1 Vnil). Definition h x1 := F1 (int_symb s1_p M.h) (Vcons x1 Vnil). Definition hmark x1 := F1 (hd_symb s1_p M.mark) (Vcons x1 Vnil). Definition mark x1 := F1 (int_symb s1_p M.mark) (Vcons x1 Vnil). Definition hok x1 := F1 (hd_symb s1_p M.ok) (Vcons x1 Vnil). Definition ok x1 := F1 (int_symb s1_p M.ok) (Vcons x1 Vnil). Definition hproper x1 := F1 (hd_symb s1_p M.proper) (Vcons x1 Vnil). Definition proper x1 := F1 (int_symb s1_p M.proper) (Vcons x1 Vnil). Definition htop x1 := F1 (hd_symb s1_p M.top) (Vcons x1 Vnil). Definition top x1 := F1 (int_symb s1_p M.top) (Vcons x1 Vnil). End S1. (* graph decomposition 1 *) Definition cs1 : list (list (@ATrs.rule s1)) := ( R1 (S1.hd (S1.ok (V1 0))) (S1.hd (V1 0)) :: nil) :: ( R1 (S1.hg (S1.ok (V1 0))) (S1.hg (V1 0)) :: nil) :: ( R1 (S1.hc (S1.ok (V1 0))) (S1.hc (V1 0)) :: nil) :: ( R1 (S1.hproper (S1.d (V1 0))) (S1.hd (S1.proper (V1 0))) :: nil) :: ( R1 (S1.hproper (S1.g (V1 0))) (S1.hg (S1.proper (V1 0))) :: nil) :: ( R1 (S1.hproper (S1.c (V1 0))) (S1.hc (S1.proper (V1 0))) :: nil) :: ( R1 (S1.hh (S1.ok (V1 0))) (S1.hh (V1 0)) :: R1 (S1.hh (S1.mark (V1 0))) (S1.hh (V1 0)) :: nil) :: ( R1 (S1.hproper (S1.h (V1 0))) (S1.hh (S1.proper (V1 0))) :: nil) :: ( R1 (S1.hf (S1.ok (V1 0))) (S1.hf (V1 0)) :: R1 (S1.hf (S1.mark (V1 0))) (S1.hf (V1 0)) :: nil) :: ( R1 (S1.hproper (S1.f (V1 0))) (S1.hf (S1.proper (V1 0))) :: nil) :: ( R1 (S1.hproper (S1.c (V1 0))) (S1.hproper (V1 0)) :: R1 (S1.hproper (S1.f (V1 0))) (S1.hproper (V1 0)) :: R1 (S1.hproper (S1.g (V1 0))) (S1.hproper (V1 0)) :: R1 (S1.hproper (S1.d (V1 0))) (S1.hproper (V1 0)) :: R1 (S1.hproper (S1.h (V1 0))) (S1.hproper (V1 0)) :: nil) :: ( R1 (S1.htop (S1.mark (V1 0))) (S1.hproper (V1 0)) :: nil) :: ( R1 (S1.hactive (S1.h (V1 0))) (S1.hh (S1.active (V1 0))) :: nil) :: ( R1 (S1.hactive (S1.f (V1 0))) (S1.hf (S1.active (V1 0))) :: nil) :: ( R1 (S1.hactive (S1.h (V1 0))) (S1.hd (V1 0)) :: nil) :: ( R1 (S1.hactive (S1.h (V1 0))) (S1.hc (S1.d (V1 0))) :: nil) :: ( R1 (S1.hactive (S1.c (V1 0))) (S1.hd (V1 0)) :: nil) :: ( R1 (S1.hactive (S1.f (S1.f (V1 0)))) (S1.hf (V1 0)) :: nil) :: ( R1 (S1.hactive (S1.f (S1.f (V1 0)))) (S1.hg (S1.f (V1 0))) :: nil) :: ( R1 (S1.hactive (S1.f (S1.f (V1 0)))) (S1.hf (S1.g (S1.f (V1 0)))) :: nil) :: ( R1 (S1.hactive (S1.f (S1.f (V1 0)))) (S1.hc (S1.f (S1.g (S1.f (V1 0))))) :: nil) :: ( R1 (S1.hactive (S1.h (V1 0))) (S1.hactive (V1 0)) :: R1 (S1.hactive (S1.f (V1 0))) (S1.hactive (V1 0)) :: nil) :: ( R1 (S1.htop (S1.ok (V1 0))) (S1.hactive (V1 0)) :: nil) :: ( R1 (S1.htop (S1.ok (V1 0))) (S1.htop (S1.active (V1 0))) :: R1 (S1.htop (S1.mark (V1 0))) (S1.htop (S1.proper (V1 0))) :: nil) :: nil. (* polynomial interpretation 1 *) Module PIS1 (*<: TPolyInt*). Definition sig := s1. Definition trsInt f := match f as f return poly (@ASignature.arity s1 f) with | (hd_symb M.active) => nil | (int_symb M.active) => (1%Z, (Vcons 0 Vnil)) :: (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.f) => nil | (int_symb M.f) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.mark) => nil | (int_symb M.mark) => (1%Z, (Vcons 0 Vnil)) :: (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.c) => nil | (int_symb M.c) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.g) => nil | (int_symb M.g) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.d) => (3%Z, (Vcons 1 Vnil)) :: nil | (int_symb M.d) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.h) => nil | (int_symb M.h) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.proper) => nil | (int_symb M.proper) => (1%Z, (Vcons 0 Vnil)) :: nil | (hd_symb M.ok) => nil | (int_symb M.ok) => (1%Z, (Vcons 0 Vnil)) :: (2%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.top) => nil | (int_symb M.top) => (3%Z, (Vcons 1 Vnil)) :: nil end. Lemma trsInt_wm : forall f, pweak_monotone (trsInt f). Proof. pmonotone. Qed. End PIS1. Module PI1 := PolyInt PIS1. (* polynomial interpretation 2 *) Module PIS2 (*<: TPolyInt*). Definition sig := s1. Definition trsInt f := match f as f return poly (@ASignature.arity s1 f) with | (hd_symb M.active) => nil | (int_symb M.active) => (1%Z, (Vcons 0 Vnil)) :: (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.f) => nil | (int_symb M.f) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.mark) => nil | (int_symb M.mark) => (1%Z, (Vcons 0 Vnil)) :: (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.c) => nil | (int_symb M.c) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.g) => (3%Z, (Vcons 1 Vnil)) :: nil | (int_symb M.g) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.d) => nil | (int_symb M.d) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.h) => nil | (int_symb M.h) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.proper) => nil | (int_symb M.proper) => (1%Z, (Vcons 0 Vnil)) :: nil | (hd_symb M.ok) => nil | (int_symb M.ok) => (1%Z, (Vcons 0 Vnil)) :: (2%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.top) => nil | (int_symb M.top) => (3%Z, (Vcons 1 Vnil)) :: nil end. Lemma trsInt_wm : forall f, pweak_monotone (trsInt f). Proof. pmonotone. Qed. End PIS2. Module PI2 := PolyInt PIS2. (* polynomial interpretation 3 *) Module PIS3 (*<: TPolyInt*). Definition sig := s1. Definition trsInt f := match f as f return poly (@ASignature.arity s1 f) with | (hd_symb M.active) => nil | (int_symb M.active) => (1%Z, (Vcons 0 Vnil)) :: (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.f) => nil | (int_symb M.f) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.mark) => nil | (int_symb M.mark) => (1%Z, (Vcons 0 Vnil)) :: (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.c) => (3%Z, (Vcons 1 Vnil)) :: nil | (int_symb M.c) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.g) => nil | (int_symb M.g) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.d) => nil | (int_symb M.d) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.h) => nil | (int_symb M.h) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.proper) => nil | (int_symb M.proper) => (1%Z, (Vcons 0 Vnil)) :: nil | (hd_symb M.ok) => nil | (int_symb M.ok) => (1%Z, (Vcons 0 Vnil)) :: (2%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.top) => nil | (int_symb M.top) => (3%Z, (Vcons 1 Vnil)) :: nil end. Lemma trsInt_wm : forall f, pweak_monotone (trsInt f). Proof. pmonotone. Qed. End PIS3. Module PI3 := PolyInt PIS3. (* polynomial interpretation 4 *) Module PIS4 (*<: TPolyInt*). Definition sig := s1. Definition trsInt f := match f as f return poly (@ASignature.arity s1 f) with | (hd_symb M.active) => nil | (int_symb M.active) => (3%Z, (Vcons 0 Vnil)) :: (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.f) => nil | (int_symb M.f) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.mark) => nil | (int_symb M.mark) => (3%Z, (Vcons 0 Vnil)) :: (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.c) => nil | (int_symb M.c) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.g) => nil | (int_symb M.g) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.d) => nil | (int_symb M.d) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.h) => (1%Z, (Vcons 1 Vnil)) :: nil | (int_symb M.h) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.proper) => nil | (int_symb M.proper) => nil | (hd_symb M.ok) => nil | (int_symb M.ok) => (3%Z, (Vcons 0 Vnil)) :: (2%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.top) => nil | (int_symb M.top) => (3%Z, (Vcons 1 Vnil)) :: nil end. Lemma trsInt_wm : forall f, pweak_monotone (trsInt f). Proof. pmonotone. Qed. End PIS4. Module PI4 := PolyInt PIS4. (* polynomial interpretation 5 *) Module PIS5 (*<: TPolyInt*). Definition sig := s1. Definition trsInt f := match f as f return poly (@ASignature.arity s1 f) with | (hd_symb M.active) => nil | (int_symb M.active) => (3%Z, (Vcons 0 Vnil)) :: (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.f) => (1%Z, (Vcons 1 Vnil)) :: nil | (int_symb M.f) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.mark) => nil | (int_symb M.mark) => (3%Z, (Vcons 0 Vnil)) :: (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.c) => nil | (int_symb M.c) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.g) => nil | (int_symb M.g) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.d) => nil | (int_symb M.d) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.h) => nil | (int_symb M.h) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.proper) => nil | (int_symb M.proper) => nil | (hd_symb M.ok) => nil | (int_symb M.ok) => (3%Z, (Vcons 0 Vnil)) :: (2%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.top) => nil | (int_symb M.top) => (3%Z, (Vcons 1 Vnil)) :: nil end. Lemma trsInt_wm : forall f, pweak_monotone (trsInt f). Proof. pmonotone. Qed. End PIS5. Module PI5 := PolyInt PIS5. (* polynomial interpretation 6 *) Module PIS6 (*<: TPolyInt*). Definition sig := s1. Definition trsInt f := match f as f return poly (@ASignature.arity s1 f) with | (hd_symb M.active) => nil | (int_symb M.active) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.f) => nil | (int_symb M.f) => (2%Z, (Vcons 0 Vnil)) :: (2%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.mark) => nil | (int_symb M.mark) => nil | (hd_symb M.c) => nil | (int_symb M.c) => (2%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.g) => nil | (int_symb M.g) => (2%Z, (Vcons 0 Vnil)) :: (2%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.d) => nil | (int_symb M.d) => (1%Z, (Vcons 0 Vnil)) :: (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.h) => nil | (int_symb M.h) => (1%Z, (Vcons 0 Vnil)) :: (2%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.proper) => (2%Z, (Vcons 1 Vnil)) :: nil | (int_symb M.proper) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.ok) => nil | (int_symb M.ok) => nil | (hd_symb M.top) => nil | (int_symb M.top) => nil end. Lemma trsInt_wm : forall f, pweak_monotone (trsInt f). Proof. pmonotone. Qed. End PIS6. Module PI6 := PolyInt PIS6. (* polynomial interpretation 7 *) Module PIS7 (*<: TPolyInt*). Definition sig := s1. Definition trsInt f := match f as f return poly (@ASignature.arity s1 f) with | (hd_symb M.active) => nil | (int_symb M.active) => nil | (hd_symb M.f) => nil | (int_symb M.f) => nil | (hd_symb M.mark) => nil | (int_symb M.mark) => nil | (hd_symb M.c) => nil | (int_symb M.c) => (1%Z, (Vcons 0 Vnil)) :: (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.g) => nil | (int_symb M.g) => nil | (hd_symb M.d) => nil | (int_symb M.d) => (2%Z, (Vcons 0 Vnil)) :: nil | (hd_symb M.h) => nil | (int_symb M.h) => nil | (hd_symb M.proper) => (2%Z, (Vcons 1 Vnil)) :: nil | (int_symb M.proper) => (2%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.ok) => nil | (int_symb M.ok) => nil | (hd_symb M.top) => nil | (int_symb M.top) => nil end. Lemma trsInt_wm : forall f, pweak_monotone (trsInt f). Proof. pmonotone. Qed. End PIS7. Module PI7 := PolyInt PIS7. (* polynomial interpretation 8 *) Module PIS8 (*<: TPolyInt*). Definition sig := s1. Definition trsInt f := match f as f return poly (@ASignature.arity s1 f) with | (hd_symb M.active) => (3%Z, (Vcons 1 Vnil)) :: nil | (int_symb M.active) => (2%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.f) => nil | (int_symb M.f) => (2%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.mark) => nil | (int_symb M.mark) => nil | (hd_symb M.c) => nil | (int_symb M.c) => nil | (hd_symb M.g) => nil | (int_symb M.g) => nil | (hd_symb M.d) => nil | (int_symb M.d) => (1%Z, (Vcons 0 Vnil)) :: nil | (hd_symb M.h) => nil | (int_symb M.h) => (1%Z, (Vcons 0 Vnil)) :: (2%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.proper) => nil | (int_symb M.proper) => (2%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.ok) => nil | (int_symb M.ok) => nil | (hd_symb M.top) => nil | (int_symb M.top) => nil end. Lemma trsInt_wm : forall f, pweak_monotone (trsInt f). Proof. pmonotone. Qed. End PIS8. Module PI8 := PolyInt PIS8. (* polynomial interpretation 9 *) Module PIS9 (*<: TPolyInt*). Definition sig := s1. Definition trsInt f := match f as f return poly (@ASignature.arity s1 f) with | (hd_symb M.active) => (1%Z, (Vcons 1 Vnil)) :: nil | (int_symb M.active) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.f) => nil | (int_symb M.f) => (1%Z, (Vcons 0 Vnil)) :: (2%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.mark) => nil | (int_symb M.mark) => nil | (hd_symb M.c) => nil | (int_symb M.c) => (1%Z, (Vcons 0 Vnil)) :: nil | (hd_symb M.g) => nil | (int_symb M.g) => (3%Z, (Vcons 0 Vnil)) :: (3%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.d) => nil | (int_symb M.d) => nil | (hd_symb M.h) => nil | (int_symb M.h) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.proper) => nil | (int_symb M.proper) => (2%Z, (Vcons 0 Vnil)) :: (3%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.ok) => nil | (int_symb M.ok) => nil | (hd_symb M.top) => nil | (int_symb M.top) => nil end. Lemma trsInt_wm : forall f, pweak_monotone (trsInt f). Proof. pmonotone. Qed. End PIS9. Module PI9 := PolyInt PIS9. (* polynomial interpretation 10 *) Module PIS10 (*<: TPolyInt*). Definition sig := s1. Definition trsInt f := match f as f return poly (@ASignature.arity s1 f) with | (hd_symb M.active) => nil | (int_symb M.active) => nil | (hd_symb M.f) => nil | (int_symb M.f) => (2%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.mark) => nil | (int_symb M.mark) => nil | (hd_symb M.c) => nil | (int_symb M.c) => (2%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.g) => nil | (int_symb M.g) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.d) => nil | (int_symb M.d) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.h) => nil | (int_symb M.h) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.proper) => nil | (int_symb M.proper) => nil | (hd_symb M.ok) => nil | (int_symb M.ok) => (1%Z, (Vcons 0 Vnil)) :: nil | (hd_symb M.top) => (1%Z, (Vcons 1 Vnil)) :: nil | (int_symb M.top) => nil end. Lemma trsInt_wm : forall f, pweak_monotone (trsInt f). Proof. pmonotone. Qed. End PIS10. Module PI10 := PolyInt PIS10. (* polynomial interpretation 11 *) Module PIS11 (*<: TPolyInt*). Definition sig := s1. Definition trsInt f := match f as f return poly (@ASignature.arity s1 f) with | (hd_symb M.active) => nil | (int_symb M.active) => (2%Z, (Vcons 0 Vnil)) :: nil | (hd_symb M.f) => nil | (int_symb M.f) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.mark) => nil | (int_symb M.mark) => (1%Z, (Vcons 0 Vnil)) :: (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.c) => nil | (int_symb M.c) => nil | (hd_symb M.g) => nil | (int_symb M.g) => nil | (hd_symb M.d) => nil | (int_symb M.d) => nil | (hd_symb M.h) => nil | (int_symb M.h) => (1%Z, (Vcons 1 Vnil)) :: nil | (hd_symb M.proper) => nil | (int_symb M.proper) => nil | (hd_symb M.ok) => nil | (int_symb M.ok) => nil | (hd_symb M.top) => (1%Z, (Vcons 1 Vnil)) :: nil | (int_symb M.top) => nil end. Lemma trsInt_wm : forall f, pweak_monotone (trsInt f). Proof. pmonotone. Qed. End PIS11. Module PI11 := PolyInt PIS11. (* termination proof *) Lemma termination : WF rel. Proof. unfold rel. dp_trans. mark. let D := fresh "D" in let R := fresh "R" in set_rules_to D; set_mod_rules_to R; graph_decomp (dpg_unif_N 100 R D) cs1; subst D; subst R. dpg_unif_N_correct. right. PI1.prove_termination. termination_trivial. right. PI2.prove_termination. termination_trivial. right. PI3.prove_termination. termination_trivial. left. co_scc. left. co_scc. left. co_scc. right. PI4.prove_termination. termination_trivial. left. co_scc. right. PI5.prove_termination. termination_trivial. left. co_scc. right. PI6.prove_termination. PI7.prove_termination. termination_trivial. left. co_scc. left. co_scc. left. co_scc. left. co_scc. left. co_scc. left. co_scc. left. co_scc. left. co_scc. left. co_scc. left. co_scc. right. PI8.prove_termination. PI9.prove_termination. termination_trivial. left. co_scc. right. PI10.prove_termination. PI11.prove_termination. termination_trivial. Qed.