Dataset Viewer
Auto-converted to Parquet Duplicate
fact
stringlengths
6
103k
type
stringclasses
14 values
library
stringclasses
13 values
imports
listlengths
1
10
filename
stringclasses
157 values
symbolic_name
stringlengths
1
54
docstring
stringclasses
185 values
rev_tac_condFs_ok := match goal with | |- is_unary _ => is_unary Fs_ok | |- rules_preserve_vars _ => rules_preserve_vars | |- WF _ => idtac end.
Ltac
Conversion
[ "From CoLoR Require Import Srs ATrs SReverse ATerm_of_String String_of_ATerm", "From CoLoR Require Import AVariables" ]
Conversion/AReverse.v
rev_tac_cond
null
rev_tacFs_ok := (rewrite <- WF_red_rev_eq || rewrite <- WF_red_mod_rev_eq); rev_tac_cond Fs_ok.
Ltac
Conversion
[ "From CoLoR Require Import Srs ATrs SReverse ATerm_of_String String_of_ATerm", "From CoLoR Require Import AVariables" ]
Conversion/AReverse.v
rev_tac
null
ar(_ : letter) := 1. Import ATrs.
Definition
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
ar
corresponding algebraic signature
ASig_of_SSig:= mkSignature ar (@VSignature.beq_symb_ok SSig). Notation ASig := ASig_of_SSig. Notation term := (term ASig). Notation terms := (vector term). Notation context := (context ASig). Import AUnary.
Definition
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
ASig_of_SSig
null
is_unary_sig: is_unary ASig. Proof. intro. refl. Qed.
Lemma
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
is_unary_sig
null
arity:= arity1 is_unary_sig.
Ltac
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
arity
null
is_unary:= try (exact is_unary_sig). Notation Fun1 := (Fun1 is_unary_sig). Notation Cont1 := (Cont1 is_unary_sig). Notation cont := (cont is_unary_sig). Notation term_ind_forall := (term_ind_forall is_unary_sig).
Ltac
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
is_unary
null
term_of_string(s : string) : term := match s with | List.nil => Var 0 | a :: w => @Fun ASig a (Vcons (term_of_string w) Vnil) end.
Fixpoint
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
term_of_string
conversion string <-> term
var_term_of_string: forall s, var (term_of_string s) = 0. Proof. induction s; auto. Qed.
Lemma
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
var_term_of_string
null
reset_term_of_string: forall s, reset (term_of_string s) = term_of_string s. Proof. induction s. refl. unfold reset. simpl. apply args_eq. fold (reset (term_of_string s)). rewrite IHs. refl. Qed.
Lemma
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
reset_term_of_string
null
string_of_term(t : term) : string := match t with | Var _ => List.nil | Fun f ts => f :: Vmap_first List.nil string_of_term ts end.
Fixpoint
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
string_of_term
null
string_of_term_epi: forall s, string_of_term (term_of_string s) = s. Proof. induction s; simpl; intros. refl. rewrite IHs. refl. Qed.
Lemma
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
string_of_term_epi
null
term_of_string_epi: forall t, maxvar t = 0 -> term_of_string (string_of_term t) = t. Proof. intro t; pattern t; apply term_ind_forall; clear t. simpl in *. intros. subst. refl. intros f t IH. unfold AUnary.Fun1. simpl. rewrite (Vcast_cons (is_unary_sig f)), Vcast_refl. simpl. rewrite max_0_r. intro h. rewrite (IH h)...
Lemma
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
term_of_string_epi
null
string_of_term_sub: forall s l, string_of_term (sub s l) = string_of_term l ++ string_of_term (s (var l)). Proof. intro s. apply term_ind_forall. refl. intros f t IH. rewrite sub_fun1. simpl. rewrite !(Vcast_cons (is_unary_sig f)). simpl. rewrite IH. refl. Qed.
Lemma
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
string_of_term_sub
null
string_of_cont(c : context) : string := match c with | Hole => List.nil | @Cont _ f _ _ _ _ d _ => f :: string_of_cont d end.
Fixpoint
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
string_of_cont
conversion string <-> context
string_of_cont_cont: forall t, string_of_cont (cont t) = string_of_term t. Proof. apply term_ind_forall. refl. intros f t IH. simpl. rewrite !(Vcast_cons (is_unary_sig f)). simpl. rewrite IH. refl. Qed.
Lemma
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
string_of_cont_cont
null
string_of_term_fill: forall t c, string_of_term (fill c t) = string_of_cont c ++ string_of_term t. Proof. induction c. refl. simpl. rewrite Vmap_first_cast. arity. simpl. rewrite IHc. refl. Qed.
Lemma
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
string_of_term_fill
null
cont_of_string(s : string) : context := match s with | List.nil => Hole | a :: w => Cont1 a (cont_of_string w) end.
Fixpoint
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
cont_of_string
null
sub_of_strings := single 0 (term_of_string s).
Definition
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
sub_of_string
conversion string <-> substitution
term_of_string_fill: forall c s, term_of_string (SContext.fill c s) = fill (cont_of_string (lft c)) (sub (sub_of_string (rgt c)) (term_of_string s)). Proof. intros [l r] s. elim l; unfold SContext.fill; simpl. elim s. refl. intros. simpl. rewrite H. refl. intros. rewrite H, (Vcast_cons (cont_aux is_unary_sig a)), ...
Lemma
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
term_of_string_fill
null
term_of_string_app: forall s1 s2, term_of_string (s1 ++ s2) = sub (sub_of_string s2) (term_of_string s1). Proof. induction s1. refl. intro. simpl. apply args_eq. rewrite IHs1. refl. Qed.
Lemma
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
term_of_string_app
null
rule_of_srule(x : srule) := mkRule (term_of_string (Srs.lhs x)) (term_of_string (Srs.rhs x)).
Definition
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
rule_of_srule
rules
trs_of_srsR := List.map rule_of_srule R.
Definition
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
trs_of_srs
null
rules_preserve_vars_trs_of_srs: forall R, rules_preserve_vars (trs_of_srs R). Proof. unfold rules_preserve_vars. induction R; simpl; intuition. unfold rule_of_srule in H0. destruct a. simpl in H0. inversion H0. rewrite !vars_var; is_unary. rewrite !var_term_of_string. unfold incl; simpl; intuition. Qed.
Lemma
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
rules_preserve_vars_trs_of_srs
null
preserve_vars:= try (apply rules_preserve_vars_trs_of_srs).
Ltac
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
preserve_vars
null
red_of_sred: forall x y, Srs.red R x y -> red (trs_of_srs R) (term_of_string x) (term_of_string y). Proof. intros. do 3 destruct H. decomp H. subst x. subst y. rewrite !term_of_string_fill. apply red_rule. change (List.In (rule_of_srule (Srs.mkRule x0 x1)) (trs_of_srs R)). unfold trs_of_srs. apply in_map. exact H0. ...
Lemma
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
red_of_sred
null
rtc_red_of_sred: forall x y, Srs.red R # x y -> red (trs_of_srs R) # (term_of_string x) (term_of_string y). Proof. intros. elim H; intros. apply rt_step. apply red_of_sred. exact H0. apply rt_refl. eapply rt_trans. apply H1. exact H3. Qed.
Lemma
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
rtc_red_of_sred
null
sred_of_red: forall t u, red (trs_of_srs R) t u -> Srs.red R (string_of_term t) (string_of_term u). Proof. intros. redtac. subst. rewrite !string_of_term_fill, !string_of_term_sub, (rules_preserve_vars_var is_unary_sig (rules_preserve_vars_trs_of_srs R) lr). set (c' := mkContext (string_of_cont c) (string_of_term ...
Lemma
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
sred_of_red
null
rtc_sred_of_red: forall t u, red (trs_of_srs R) # t u -> Srs.red R # (string_of_term t) (string_of_term u). Proof. induction 1. apply rt_step. apply sred_of_red. hyp. apply rt_refl. apply rt_trans with (string_of_term y); hyp. Qed.
Lemma
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
rtc_sred_of_red
null
red_mod_of_sred_mod: forall x y, Srs.red_mod E R x y -> red_mod (trs_of_srs E) (trs_of_srs R) (term_of_string x) (term_of_string y). Proof. intros. do 2 destruct H. exists (term_of_string x0). split. apply rtc_red_of_sred. exact H. apply red_of_sred. exact H0. Qed.
Lemma
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
red_mod_of_sred_mod
null
WF_red_mod_of_WF_sred_mod: WF (red_mod (trs_of_srs E) (trs_of_srs R)) -> WF (Srs.red_mod E R). Proof. unfold WF. intro H. cut (forall t s, t = term_of_string s -> SN (Srs.red_mod E R) s). intros. apply H0 with (term_of_string x). refl. intro t. gen (H t). induction 1. intros. apply SN_intro. intros. apply H1 with (t...
Lemma
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
WF_red_mod_of_WF_sred_mod
null
sred_mod_of_red_mod: forall t u, red_mod (trs_of_srs E) (trs_of_srs R) t u -> Srs.red_mod E R (string_of_term t) (string_of_term u). Proof. intros. do 2 destruct H. exists (string_of_term x); split. apply rtc_sred_of_red. hyp. apply sred_of_red. hyp. Qed.
Lemma
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
sred_mod_of_red_mod
preservation of termination
WF_sred_mod_of_WF_red_mod: WF (Srs.red_mod E R) -> WF (red_mod (trs_of_srs E) (trs_of_srs R)). Proof. intro. rewrite WF_red_mod0; is_unary; preserve_vars. cut (forall s, SN (Srs.red_mod E R) s -> forall t, maxvar t = 0 -> t = term_of_string s -> SN (red_mod0 (trs_of_srs E) (trs_of_srs R)) t). intros. intro t. dest...
Lemma
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
WF_sred_mod_of_WF_red_mod
null
WF_red_mod: WF (Srs.red_mod E R) <-> WF (red_mod (trs_of_srs E) (trs_of_srs R)). Proof. split; intro. apply WF_sred_mod_of_WF_red_mod. hyp. apply WF_red_mod_of_WF_sred_mod. hyp. Qed.
Lemma
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
WF_red_mod
null
WF_red: WF (Srs.red R) <-> WF (red (trs_of_srs R)). Proof. rewrite <- Srs.red_mod_empty, <- red_mod_empty. apply WF_red_mod. Qed.
Lemma
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
WF_red
null
as_trs:= rewrite WF_red_mod || rewrite WF_red.
Ltac
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN VecUtil ListUtil NatUtil" ]
Conversion/ATerm_of_String.v
as_trs
tactics for Rainbow
beq_statuss1 s2 := match s1, s2 with | Lex, Lex | Mul, Mul => true | _, _ => false end.
Definition
Conversion
[ "From CoLoR Require Import LogicUtil ATerm VecUtil", "From CoLoR Require Import term_spec EqUtil", "From CoLoR Require Import NatUtil", "From Stdlib Require Import List Relations", "From CoLoR Require Import term SN ASubstitution", "From CoLoR Require Import rpo rpo_extension", "From CoLoR Require Impor...
Conversion/Coccinelle.v
beq_status
decide compatibility of statuses wrt precedences
beq_status_ok: forall s1 s2, beq_status s1 s2 = true <-> s1 = s2. Proof. beq_symb_ok. Qed.
Lemma
Conversion
[ "From CoLoR Require Import LogicUtil ATerm VecUtil", "From CoLoR Require Import term_spec EqUtil", "From CoLoR Require Import NatUtil", "From Stdlib Require Import List Relations", "From CoLoR Require Import term SN ASubstitution", "From CoLoR Require Import rpo rpo_extension", "From CoLoR Require Impor...
Conversion/Coccinelle.v
beq_status_ok
null
prec_eq_statuss p o := apply (bprec_eq_status_ok s p o); check_eq || fail 10 "statuses incompatible with precedences".
Ltac
Conversion
[ "From CoLoR Require Import LogicUtil ATerm VecUtil", "From CoLoR Require Import term_spec EqUtil", "From CoLoR Require Import NatUtil", "From Stdlib Require Import List Relations", "From CoLoR Require Import term SN ASubstitution", "From CoLoR Require Import rpo rpo_extension", "From CoLoR Require Impor...
Conversion/Coccinelle.v
prec_eq_status
null
as_srs_condFs_ok := match goal with | |- is_unary _ => is_unary Fs_ok | |- rules_preserve_vars _ => rules_preserve_vars | |- WF _ => idtac end.
Ltac
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN ListUtil Srs ATrs AUnary VecUtil", "From CoLoR Require Import AVariables" ]
Conversion/String_of_ATerm.v
as_srs_cond
null
as_srsFs_ok := (rewrite WF_red_mod || rewrite WF_red); as_srs_cond Fs_ok.
Ltac
Conversion
[ "From CoLoR Require Import LogicUtil RelUtil SN ListUtil Srs ATrs AUnary VecUtil", "From CoLoR Require Import AVariables" ]
Conversion/String_of_ATerm.v
as_srs
null
co_scc:= check_eq || fail 10 "not a co_scc". From CoLoR Require Import AVariables.
Ltac
DP
[ "From CoLoR Require Import AGraph Union ATrs RelUtil ListUtil LogicUtil SN", "From CoLoR Require Import AVariables" ]
DP/ADecomp.v
co_scc
tactics
graph_decompSig f d := apply WF_decomp_co_scc with (approx := f) (cs := d); [idtac | rules_preserve_vars | incl_rule Sig || fail 10 "the decomposition does not contain all DPs" | incl_rule Sig || fail 10 "the decomposition contains a rule that is not a DP" | check_eq || fail 10 "the decomposition is...
Ltac
DP
[ "From CoLoR Require Import AGraph Union ATrs RelUtil ListUtil LogicUtil SN", "From CoLoR Require Import AVariables" ]
DP/ADecomp.v
graph_decomp
null
negb_subterm(t u : term) := negb (bsubterm u t).
Definition
DP
[ "From CoLoR Require Import LogicUtil ATrs ACalls ACap ASN RelUtil ListUtil", "From CoLoR Require Import AVariables" ]
DP/ADP.v
negb_subterm
definition of dependancy pairs
mkdp(S : rules) : rules := match S with | nil => nil | a :: S' => let (l, r) := a in map (mkRule l) (filter (negb_subterm l) (calls R r)) ++ mkdp S' end.
Fixpoint
DP
[ "From CoLoR Require Import LogicUtil ATrs ACalls ACap ASN RelUtil ListUtil", "From CoLoR Require Import AVariables" ]
DP/ADP.v
mkdp
null
dp:= mkdp R.
Definition
DP
[ "From CoLoR Require Import LogicUtil ATrs ACalls ACap ASN RelUtil ListUtil", "From CoLoR Require Import AVariables" ]
DP/ADP.v
dp
null
mkdp_app: forall l1 l2, mkdp (l1 ++ l2) = mkdp l1 ++ mkdp l2. Proof. induction l1; simpl; intros. refl. destruct a as [l r]. rewrite app_ass, IHl1. refl. Qed.
Lemma
DP
[ "From CoLoR Require Import LogicUtil ATrs ACalls ACap ASN RelUtil ListUtil", "From CoLoR Require Import AVariables" ]
DP/ADP.v
mkdp_app
null
mkdp_elim: forall l t S, In (mkRule l t) (mkdp S) -> exists r, In (mkRule l r) S /\ In t (calls R r) /\ negb_subterm l t = true. Proof. induction S; simpl; intros. contr. destruct a. rewrite in_app in H. destruct H. destruct (in_map_elim H). destruct H0. injection H1. intros. subst x. subst lhs. clear H1. rewrite fi...
Lemma
DP
[ "From CoLoR Require Import LogicUtil ATrs ACalls ACap ASN RelUtil ListUtil", "From CoLoR Require Import AVariables" ]
DP/ADP.v
mkdp_elim
null
dp_intro: forall l r t, In (mkRule l r) R -> In t (calls R r) -> negb_subterm l t = true -> In (mkRule l t) dp. Proof. intros. ded (in_elim H). do 2 destruct H2. ded (in_elim H0). do 2 destruct H3. unfold dp. rewrite H2, mkdp_app. simpl. rewrite H3, filter_app, map_app. simpl. rewrite H1. apply in_appr. apply in_app...
Lemma
DP
[ "From CoLoR Require Import LogicUtil ATrs ACalls ACap ASN RelUtil ListUtil", "From CoLoR Require Import AVariables" ]
DP/ADP.v
dp_intro
basic properties
dp_elim: forall l t, In (mkRule l t) dp -> exists r, In (mkRule l r) R /\ In t (calls R r) /\ negb_subterm l t = true. Proof. intros. apply mkdp_elim. hyp. Qed. Arguments dp_elim [l t] _.
Lemma
DP
[ "From CoLoR Require Import LogicUtil ATrs ACalls ACap ASN RelUtil ListUtil", "From CoLoR Require Import AVariables" ]
DP/ADP.v
dp_elim
null
in_calls_hd_red_dp: forall l r t s, In (mkRule l r) R -> In t (calls R r) -> negb_subterm l t = true -> hd_red dp (sub s l) (sub s t). Proof. intros. exists l. exists t. exists s. intuition. eapply dp_intro. apply H. hyp. hyp. Qed.
Lemma
DP
[ "From CoLoR Require Import LogicUtil ATrs ACalls ACap ASN RelUtil ListUtil", "From CoLoR Require Import AVariables" ]
DP/ADP.v
in_calls_hd_red_dp
null
lhs_dp: incl (map lhs dp) (map lhs R). Proof. unfold incl. intros. ded (in_map_elim H). do 2 destruct H0. subst a. destruct x as [l r]. ded (dp_elim H0). do 2 destruct H1. change (In (lhs (mkRule l x)) (map lhs R)). apply in_map. exact H1. Qed. (*FIXME: to be finished
Lemma
DP
[ "From CoLoR Require Import LogicUtil ATrs ACalls ACap ASN RelUtil ListUtil", "From CoLoR Require Import AVariables" ]
DP/ADP.v
lhs_dp
null
is_notvar_lhs_dp_aux: forall S, forallb (@is_notvar_lhs Sig) (mkdp S) = true. Proof. induction S; simpl; intros. refl. destruct a. simpl. rewrite forallb_app. Qed.
Lemma
DP
[ "From CoLoR Require Import LogicUtil ATrs ACalls ACap ASN RelUtil ListUtil", "From CoLoR Require Import AVariables" ]
DP/ADP.v
is_notvar_lhs_dp_aux
null
is_notvar_lhs_dp: forallb (@is_notvar_lhs Sig) dp = true. Proof. unfold dp. Qed.*)
Lemma
DP
[ "From CoLoR Require Import LogicUtil ATrs ACalls ACap ASN RelUtil ListUtil", "From CoLoR Require Import AVariables" ]
DP/ADP.v
is_notvar_lhs_dp
null
chain:= int_red R # @ hd_red dp.
Definition
DP
[ "From CoLoR Require Import LogicUtil ATrs ACalls ACap ASN RelUtil ListUtil", "From CoLoR Require Import AVariables" ]
DP/ADP.v
chain
dependency chains
in_calls_chain: forall l r t s, In (mkRule l r) R -> In t (calls R r) -> negb_subterm l t = true -> chain (sub s l) (sub s t). Proof. intros. unfold chain, compose. exists (sub s l). split. apply rt_refl. eapply in_calls_hd_red_dp. apply H. hyp. hyp. Qed.
Lemma
DP
[ "From CoLoR Require Import LogicUtil ATrs ACalls ACap ASN RelUtil ListUtil", "From CoLoR Require Import AVariables" ]
DP/ADP.v
in_calls_chain
null
gt_chain: forall f ts us v, Vrel1 (red R) ts us -> chain (Fun f us) v -> chain (Fun f ts) v. Proof. unfold chain, compose. intros. do 2 destruct H0. exists x. split. apply rt_trans with (y := Fun f us). apply rt_step. apply Vgt_prod_fun. exact H. exact H0. exact H1. Qed.
Lemma
DP
[ "From CoLoR Require Import LogicUtil ATrs ACalls ACap ASN RelUtil ListUtil", "From CoLoR Require Import AVariables" ]
DP/ADP.v
gt_chain
null
chain_mins t := chain s t /\ lforall (SN (red R)) (direct_subterms s) /\ lforall (SN (red R)) (direct_subterms t).
Definition
DP
[ "From CoLoR Require Import LogicUtil ATrs ACalls ACap ASN RelUtil ListUtil", "From CoLoR Require Import AVariables" ]
DP/ADP.v
chain_min
minimal dependency chain (subterms are terminating)
chain_min_incl_chain: chain_min << chain. Proof. red. intros x y cmin. elim cmin. auto. Qed.
Lemma
DP
[ "From CoLoR Require Import LogicUtil ATrs ACalls ACap ASN RelUtil ListUtil", "From CoLoR Require Import AVariables" ]
DP/ADP.v
chain_min_incl_chain
null
gt_chain_min: forall f ts us v, Vrel1 (red R) ts us -> Vforall (SN (red R)) ts -> chain_min (Fun f us) v -> chain_min (Fun f ts) v. Proof. intros f ts us v gt_ts_us sn_ts chain_min_fus_v. unfold chain_min in chain_min_fus_v. destruct chain_min_fus_v as [chain_fus_v sn]. destruct sn as [esn_us esn_ts]. unfold chain_m...
Lemma
DP
[ "From CoLoR Require Import LogicUtil ATrs ACalls ACap ASN RelUtil ListUtil", "From CoLoR Require Import AVariables" ]
DP/ADP.v
gt_chain_min
null
dp_elim_vars: forall l t, In (mkRule l t) dp -> exists r, In (mkRule l r) R /\ In t (calls R r) /\ negb_subterm l t = true /\ incl (vars t) (vars l). Proof. intros. destruct (dp_elim H). decomp H0. exists x. intuition. trans (vars x). unfold incl. intros. eapply subterm_eq_vars. eapply in_calls_subterm. apply H3. ...
Lemma
DP
[ "From CoLoR Require Import LogicUtil ATrs ACalls ACap ASN RelUtil ListUtil", "From CoLoR Require Import AVariables" ]
DP/ADP.v
dp_elim_vars
dp preserves variables
dp_preserve_vars: rules_preserve_vars dp. Proof. unfold rules_preserve_vars. intros. destruct (dp_elim_vars H). intuition. Qed. Notation capa := (capa R). Notation cap := (cap R). Notation alien_sub := (alien_sub R). Notation SNR := (SN (red R)).
Lemma
DP
[ "From CoLoR Require Import LogicUtil ATrs ACalls ACap ASN RelUtil ListUtil", "From CoLoR Require Import AVariables" ]
DP/ADP.v
dp_preserve_vars
null
chain_min_fun: forall f, defined f R = true -> forall ts, SN chain_min (Fun f ts) -> Vforall SNR ts -> SNR (Fun f ts). Proof. cut (forall t, SN chain_min t -> forall f, defined f R = true -> forall ts, t = Fun f ts -> Vforall SNR ts -> SNR t). intros. apply H with (f := f) (ts := ts); (hyp || refl). intros t H. el...
Lemma
DP
[ "From CoLoR Require Import LogicUtil ATrs ACalls ACap ASN RelUtil ListUtil", "From CoLoR Require Import AVariables" ]
DP/ADP.v
chain_min_fun
null
chain_fun: forall f, defined f R = true -> forall ts, SN chain (Fun f ts) -> Vforall SNR ts -> SNR (Fun f ts). Proof. intros f defined_f ts sn_chain_f_ts sn_ts. apply chain_min_fun; auto. apply (SN_incl chain). apply chain_min_incl_chain. hyp. Qed.
Lemma
DP
[ "From CoLoR Require Import LogicUtil ATrs ACalls ACap ASN RelUtil ListUtil", "From CoLoR Require Import AVariables" ]
DP/ADP.v
chain_fun
null
WF_chain: WF chain -> WF (red R). Proof. intro Hwf. unfold WF. apply term_ind_forall. apply sn_var. apply hyp1. intro f. case_eq (defined f R); intros. apply chain_fun. hyp. apply Hwf. hyp. apply sn_args_sn_fun; auto. Qed.
Lemma
DP
[ "From CoLoR Require Import LogicUtil ATrs ACalls ACap ASN RelUtil ListUtil", "From CoLoR Require Import AVariables" ]
DP/ADP.v
WF_chain
null
chain_hd_red_mod: chain << hd_red_mod R dp. Proof. unfold chain, hd_red_mod. comp. apply rtc_incl. apply int_red_incl_red. Qed.
Lemma
DP
[ "From CoLoR Require Import LogicUtil ATrs ACalls ACap ASN RelUtil ListUtil", "From CoLoR Require Import AVariables" ]
DP/ADP.v
chain_hd_red_mod
null
chain:= no_relative_rules; apply WF_chain; [ check_eq || fail 10 "a LHS is a variable" | rules_preserve_vars | idtac].
Ltac
DP
[ "From CoLoR Require Import LogicUtil ATrs ACalls ACap ASN RelUtil ListUtil", "From CoLoR Require Import AVariables" ]
DP/ADP.v
chain
null
hyp': rules_preserve_vars DP. Proof. apply dp_preserve_vars. exact hyp. Qed.
Lemma
DP
[ "From Stdlib Require Import Lia", "From CoLoR Require Import LogicUtil ATrs ListUtil RelUtil RelSub Path ARelation", "From CoLoR Require Export ADP" ]
DP/ADPGraph.v
hyp'
null
dp_grapha1 a2 := In a1 DP /\ In a2 DP /\ exists p, exists s, int_red R # (sub s (rhs a1)) (sub s (shift p (lhs a2))).
Definition
DP
[ "From Stdlib Require Import Lia", "From CoLoR Require Import LogicUtil ATrs ListUtil RelUtil RelSub Path ARelation", "From CoLoR Require Export ADP" ]
DP/ADPGraph.v
dp_graph
dependancy pairs graph
restricted_dp_graph: is_restricted dp_graph DP. Proof. unfold is_restricted, dp_graph, inclusion. intros. intuition. Qed.
Lemma
DP
[ "From Stdlib Require Import Lia", "From CoLoR Require Import LogicUtil ATrs ListUtil RelUtil RelSub Path ARelation", "From CoLoR Require Export ADP" ]
DP/ADPGraph.v
restricted_dp_graph
null
chain_dpa t u := In a DP /\ exists s, int_red R # t (sub s (lhs a)) /\ u = sub s (rhs a).
Definition
DP
[ "From Stdlib Require Import Lia", "From CoLoR Require Import LogicUtil ATrs ListUtil RelUtil RelSub Path ARelation", "From CoLoR Require Export ADP" ]
DP/ADPGraph.v
chain_dp
chain relation for a given dependency pair
chain_dp_chain: forall a, chain_dp a << Chain. Proof. unfold inclusion. intros. destruct H. do 2 destruct H0. exists (sub x0 (lhs a)). intuition. subst y. destruct a. simpl. apply hd_red_rule. exact H. Qed.
Lemma
DP
[ "From Stdlib Require Import Lia", "From CoLoR Require Import LogicUtil ATrs ListUtil RelUtil RelSub Path ARelation", "From CoLoR Require Export ADP" ]
DP/ADPGraph.v
chain_dp_chain
null
chain_chain_dp: forall t u, Chain t u -> exists a, chain_dp a t u. Proof. intros. do 2 destruct H. redtac. subst x. subst u. exists (mkRule l r). unfold chain_dp. simpl. intuition. exists s. intuition. Qed.
Lemma
DP
[ "From Stdlib Require Import Lia", "From CoLoR Require Import LogicUtil ATrs ListUtil RelUtil RelSub Path ARelation", "From CoLoR Require Export ADP" ]
DP/ADPGraph.v
chain_chain_dp
null
chain_dps(a : rule) (l : rules) : relation term := match l with | nil => chain_dp a | b :: m => chain_dp a @ chain_dps b m end.
Fixpoint
DP
[ "From Stdlib Require Import Lia", "From CoLoR Require Import LogicUtil ATrs ListUtil RelUtil RelSub Path ARelation", "From CoLoR Require Export ADP" ]
DP/ADPGraph.v
chain_dps
iteration of chain steps given a list of dependency pairs
chain_dps_app: forall l a b m, chain_dps a (l ++ b :: m) << chain_dps a l @ chain_dps b m. Proof. induction l; simpl; intros. refl. assoc. comp. apply IHl. Qed. Arguments chain_dps_app [l a b m] _ _ _.
Lemma
DP
[ "From Stdlib Require Import Lia", "From CoLoR Require Import LogicUtil ATrs ListUtil RelUtil RelSub Path ARelation", "From CoLoR Require Export ADP" ]
DP/ADPGraph.v
chain_dps_app
null
chain_dps_app': forall a l m b p, a :: l = m ++ b :: p -> chain_dps a l << chain_dps a (tail m) % @ chain_dps b p. Proof. intros. destruct m; simpl in H; injection H; unfold inclusion; intros. subst p. subst b. exists x. unfold clos_refl. intuition auto with *. subst r. subst l. simpl. ded (chain_dps_app _ _ H2). do...
Lemma
DP
[ "From Stdlib Require Import Lia", "From CoLoR Require Import LogicUtil ATrs ListUtil RelUtil RelSub Path ARelation", "From CoLoR Require Export ADP" ]
DP/ADPGraph.v
chain_dps_app'
null
chain_dps_iter_chain: forall l a, chain_dps a l << iter Chain (length l). Proof. induction l; simpl; intros. apply chain_dp_chain. comp. apply chain_dp_chain. apply IHl. Qed.
Lemma
DP
[ "From Stdlib Require Import Lia", "From CoLoR Require Import LogicUtil ATrs ListUtil RelUtil RelSub Path ARelation", "From CoLoR Require Export ADP" ]
DP/ADPGraph.v
chain_dps_iter_chain
null
iter_chain_chain_dps: forall n t u, iter Chain n t u -> exists a, exists l, length l = n /\ chain_dps a l t u. Proof. induction n; simpl; intros. ded (chain_chain_dp H). destruct H0. exists x. exists nil. intuition. do 2 destruct H. ded (chain_chain_dp H). destruct H1. exists x0. ded (IHn _ _ H0). do 3 destruct H2. ...
Lemma
DP
[ "From Stdlib Require Import Lia", "From CoLoR Require Import LogicUtil ATrs ListUtil RelUtil RelSub Path ARelation", "From CoLoR Require Export ADP" ]
DP/ADPGraph.v
iter_chain_chain_dps
null
chain_dp2_dp_graph: forall a1 a2 t u v, chain_dp a1 t u -> chain_dp a2 u v -> dp_graph a1 a2. Proof. intros. destruct a1 as [l0 r0]. destruct a2 as [l1 r1]. destruct H. simpl in H1. do 2 destruct H1. subst u. rename x into s0. destruct H0. simpl in H2. do 2 destruct H2. subst v. rename x into s1. unfold dp_graph. in...
Lemma
DP
[ "From Stdlib Require Import Lia", "From CoLoR Require Import LogicUtil ATrs ListUtil RelUtil RelSub Path ARelation", "From CoLoR Require Export ADP" ]
DP/ADPGraph.v
chain_dp2_dp_graph
two consecutive chain steps provide a dp_graph step
chain_dps_path_dp_graph: forall l a b t u, chain_dps a (l ++ b :: nil) t u -> path dp_graph a b l. Proof. induction l; simpl; intros; do 2 destruct H. eapply chain_dp2_dp_graph. apply H. apply H0. ded (IHl _ _ _ _ H0). intuition. destruct l; simpl in H0; do 2 destruct H0. eapply chain_dp2_dp_graph. apply H. apply H0...
Lemma
DP
[ "From Stdlib Require Import Lia", "From CoLoR Require Import LogicUtil ATrs ListUtil RelUtil RelSub Path ARelation", "From CoLoR Require Export ADP" ]
DP/ADPGraph.v
chain_dps_path_dp_graph
null
chain_dp_hd_red_mod: forall a, chain_dp a << hd_red_mod R (a::nil). Proof. unfold inclusion. intros. destruct H. do 2 destruct H0. subst y. destruct a. simpl. simpl in H0. exists (sub x0 lhs). split. apply incl_elim with (R := int_red R #). apply rtc_incl. apply int_red_incl_red. exact H0. apply hd_red_rule. simpl. au...
Lemma
DP
[ "From Stdlib Require Import Lia", "From CoLoR Require Import LogicUtil ATrs ListUtil RelUtil RelSub Path ARelation", "From CoLoR Require Export ADP" ]
DP/ADPGraph.v
chain_dp_hd_red_mod
compatibility properties of chains
compat_chain_dp: forall a, chain_dp a << succ_eq#. Proof. intros. incl_trans (red_mod R DP). apply incl_trans with Chain; try incl_refl. apply chain_dp_chain. incl_trans (hd_red_mod R DP). apply chain_hd_red_mod. apply hd_red_mod_incl_red_mod. incl_trans (succ_eq!). apply compat_red_mod_tc; hyp. apply tc_incl_rtc. Qed...
Lemma
DP
[ "From Stdlib Require Import Lia", "From CoLoR Require Import LogicUtil ATrs ListUtil RelUtil RelSub Path ARelation", "From CoLoR Require Export ADP" ]
DP/ADPGraph.v
compat_chain_dp
null
compat_chain_dps: forall l a, chain_dps a l << succ_eq#. Proof. induction l; simpl; intros. apply compat_chain_dp. incl_trans (succ_eq# @ succ_eq#). comp. apply compat_chain_dp. apply IHl. apply comp_rtc_idem. Qed.
Lemma
DP
[ "From Stdlib Require Import Lia", "From CoLoR Require Import LogicUtil ATrs ListUtil RelUtil RelSub Path ARelation", "From CoLoR Require Export ADP" ]
DP/ADPGraph.v
compat_chain_dps
null
compat_chain_dp_strict: forall a, succ (lhs a) (rhs a) -> chain_dp a << succ. Proof. unfold inclusion. intros. destruct H0. do 2 destruct H1. subst y. apply (absorbs_left_rtc Habsorb). exists (sub x0 (lhs a)). split. apply incl_elim with (R := int_red R #). 2: exact H1. apply rtc_incl. incl_trans (red R). apply int_...
Lemma
DP
[ "From Stdlib Require Import Lia", "From CoLoR Require Import LogicUtil ATrs ListUtil RelUtil RelSub Path ARelation", "From CoLoR Require Export ADP" ]
DP/ADPGraph.v
compat_chain_dp_strict
null
WF_cycles: WF (chain R). Proof. set (n := length DP). apply WF_iter with (S n). intro. assert (Hwf' : WF (succ @ succ_eq#)). apply absorb_WF_modulo_r; hyp. gen (Hwf' x). induction 1. apply SN_intro; intros. apply H0. ded (iter_chain_chain_dps H1). do 3 destruct H2. assert (length x1 > 0). lia. ded (last_intro H4). do ...
Lemma
DP
[ "From Stdlib Require Import Lia", "From CoLoR Require Import LogicUtil ATrs ListUtil RelUtil RelSub Path ARelation", "From CoLoR Require Export ADP" ]
DP/ADPGraph.v
WF_cycles
proof of the criterion based on cycles
dpg_unif_N_correct:= (apply dpg_unif_N_mark_correct || apply dpg_unif_N_correct); (check_eq || fail 10 "a LHS is a variable").
Ltac
DP
[ "From Stdlib Require Import Lia Compare_dec", "From CoLoR Require Import ADecomp AUnif ARenCap ATrs ListUtil RelUtil AGraph" ]
DP/ADPUnif.v
dpg_unif_N_correct
tactics
dp_trans:= chain; eapply WF_incl; [apply hd_red_Mod_of_chain | idtac].
Ltac
DP
[ "From CoLoR Require Import LogicUtil ATrs RelUtil RelSub SN AShift ADPGraph", "From CoLoR Require Export ADP", "From Stdlib Require Import List Lia" ]
DP/AGraph.v
dp_trans
tactics
hder1 r2 := In r1 D /\ In r2 D /\ match rhs r1 with | Var _ => True | Fun f _ => match lhs r2 with | Var _ => True | Fun g _ => f=g end end.
Definition
DP
[ "From CoLoR Require Import ADecomp ADuplicateSymb ATrs ListUtil RelSub RelUtil" ]
DP/AHDE.v
hde
null
hde_restricted: is_restricted hde D. Proof. unfold is_restricted. intros. unfold hde in H; tauto. Qed. Notation eq_rule_dec := (@eq_rule_dec Sig). Notation eq_symb_dec := (@eq_symb_dec Sig).
Lemma
DP
[ "From CoLoR Require Import ADecomp ADuplicateSymb ATrs ListUtil RelSub RelUtil" ]
DP/AHDE.v
hde_restricted
null
hde_dec: forall r1 r2, {hde r1 r2} + {~hde r1 r2}. Proof. intros. unfold hde. destruct (In_dec eq_rule_dec r1 D); try tauto. destruct (In_dec eq_rule_dec r2 D); try tauto. destruct (rhs r1). left; auto. destruct (lhs r2); auto. destruct (eq_symb_dec f f0); try tauto. Defined.
Lemma
DP
[ "From CoLoR Require Import ADecomp ADuplicateSymb ATrs ListUtil RelSub RelUtil" ]
DP/AHDE.v
hde_dec
null
int_red_hd_rules_graph_incl_hde: hd_rules_graph (int_red R #) D << hde D. Proof. unfold inclusion. intros. destruct x. destruct y. destruct H. destruct H0. do 2 destruct H1. unfold hde. destruct lhs0; destruct rhs; simpl; auto. intuition; auto. ded (int_red_rtc_preserve_hd H1). destruct H2. simpl in H2. inversion H2...
Lemma
DP
[ "From CoLoR Require Import ADecomp ADuplicateSymb ATrs ListUtil RelSub RelUtil" ]
DP/AHDE.v
int_red_hd_rules_graph_incl_hde
null
dup_hd_rules_graph_incl_hde: hd_rules_graph (red R #) D << hde D. Proof. unfold inclusion. intros. apply (@int_red_hd_rules_graph_incl_hde _ R D x y). destruct H. decomp H0. rewrite forallb_forall in hd_hyp. ded (hd_hyp _ H). compute in H0. destruct x. destruct rhs. discr. destruct f. unfold hd_rules_graph. intuition....
Lemma
DP
[ "From CoLoR Require Import ADecomp ADuplicateSymb ATrs ListUtil RelSub RelUtil" ]
DP/AHDE.v
dup_hd_rules_graph_incl_hde
null
hd_eq(u v : term Sig) := match u with | Var _ => true | Fun f _ => match v with | Var _ => true | Fun g _ => beq_symb f g end end. Notation mem := (mem (@beq_rule Sig)). Notation mem_ok := (mem_ok (@beq_rule_ok Sig)).
Definition
DP
[ "From CoLoR Require Import ADecomp ADuplicateSymb ATrs ListUtil RelSub RelUtil" ]
DP/AHDE.v
hd_eq
null
hde_boolr1 r2 := mem r1 D && mem r2 D && hd_eq (rhs r1) (lhs r2).
Definition
DP
[ "From CoLoR Require Import ADecomp ADuplicateSymb ATrs ListUtil RelSub RelUtil" ]
DP/AHDE.v
hde_bool
null
hde_bool_correct_aux: forall x y, hde D x y <-> Graph hde_bool x y. Proof. intros x y. unfold hde, hde_bool, hd_eq, Graph; simpl. pose proof (fun s x y => proj1 (@beq_symb_ok s x y)). pose proof (fun s x y => proj2 (@beq_symb_ok s x y)). rewrite <- !mem_ok. destruct (rhs x); bool; intuition auto with core; repeat matc...
Lemma
DP
[ "From CoLoR Require Import ADecomp ADuplicateSymb ATrs ListUtil RelSub RelUtil" ]
DP/AHDE.v
hde_bool_correct_aux
null
hde_bool_correct: hd_rules_graph (int_red R #) D << Graph (hde_bool D). Proof. incl_trans (hde D). apply int_red_hd_rules_graph_incl_hde. intros x y. rewrite hde_bool_correct_aux. auto. Qed. Notation Sig' := (dup_sig Sig). Notation R' := (dup_int_rules R). Variable hyp : forallb (@is_notvar_lhs Sig') R' = true.
Lemma
DP
[ "From CoLoR Require Import ADecomp ADuplicateSymb ATrs ListUtil RelSub RelUtil" ]
DP/AHDE.v
hde_bool_correct
null
hde_bool_mark_correct: hd_rules_graph (red (dup_int_rules R) #) (dup_hd_rules D) << Graph (hde_bool (dup_hd_rules D)). Proof. incl_trans (hde (dup_hd_rules D)). 2:{ intros x y. rewrite hde_bool_correct_aux. auto. } intros x y h. destruct h. decomp H0. unfold hde. intuition. destruct (in_map_elim H). destruct H0. d...
Lemma
DP
[ "From CoLoR Require Import ADecomp ADuplicateSymb ATrs ListUtil RelSub RelUtil" ]
DP/AHDE.v
hde_bool_mark_correct
null
hde_bool_correct:= (apply hde_bool_mark_correct || apply hde_bool_correct); (check_eq || fail 10 "a LHS is a variable").
Ltac
DP
[ "From CoLoR Require Import ADecomp ADuplicateSymb ATrs ListUtil RelSub RelUtil" ]
DP/AHDE.v
hde_bool_correct
tactics
use_SCC_tagh M S R t := let x := fresh in (set (x := SCC_tag_fast h M t); norm_in x (SCC_tag_fast h M t); match eval compute in x with | Some ?X1 => let Hi := fresh in (assert (Hi : X1 < length R); [ norm (length R); lia | let L := fresh in ...
Ltac
DP
[ "From Stdlib Require Import Permutation Multiset Setoid PermutSetoid", "From CoLoR Require Import SCCTopoOrdering AGraph ATrs RelUtil RelSub BoundNat" ]
DP/ASCCUnion.v
use_SCC_tag
tactics
use_SCC_hypM l := let b := fresh "b" in (set (b := Vnth (Vnth M l) l); norm_in b (Vnth (Vnth M l) l); match eval compute in b with | false => apply WF_hd_red_Mod_SCC_fast_trivial with (Hi:=l); eauto | true => eapply WF_incl; [eapply hd_red_Mod_SCC'_hd_red_Mod_fast with (Hi:=...
Ltac
DP
[ "From Stdlib Require Import Permutation Multiset Setoid PermutSetoid", "From CoLoR Require Import SCCTopoOrdering AGraph ATrs RelUtil RelSub BoundNat" ]
DP/ASCCUnion.v
use_SCC_hyp
null
End of preview. Expand in Data Studio

Coq-CoLoR

A library on rewriting theory, lambda-calculus and termination.

Source

Statistics

Property Value
Total Entries 3,304
Files Processed 264

Type Distribution

Type Count
Lemma 2,015
Definition 540
Parameter 223
Fixpoint 172
Ltac 157
Inductive 101
Theorem 27
Program 25
Record 19
Let 11
Instance 7
Axiom 4
Coercion 2
Remark 1

Schema

Column Type Description
fact string Declaration body (name, signature, proof)
type string Declaration type
library string Library component
imports list[string] Import statements
filename string Source file path
symbolic_name string Declaration identifier
docstring string Documentation comment (if present)

Creator

Charles Norton (phanerozoic)

Downloads last month
6

Collection including phanerozoic/Coq-CoLoR