diff --git a/theories/algorithmic.v b/theories/algorithmic.v index 787adb1..8a9146a 100644 --- a/theories/algorithmic.v +++ b/theories/algorithmic.v @@ -8,31 +8,6 @@ Require Import Coq.Logic.FunctionalExtensionality. Require Import Cdcl.Itauto. Module HRed. - Inductive R : PTm -> PTm -> Prop := - (****************** Beta ***********************) - | AppAbs a b : - R (PApp (PAbs a) b) (subst_PTm (scons b VarPTm) a) - - | ProjPair p a b : - R (PProj p (PPair a b)) (if p is PL then a else b) - - | IndZero P b c : - R (PInd P PZero b c) b - - | IndSuc P a b c : - R (PInd P (PSuc a) b c) (subst_PTm (scons (PInd P a b c) (scons a VarPTm)) c) - - (*************** Congruence ********************) - | AppCong a0 a1 b : - R a0 a1 -> - R (PApp a0 b) (PApp a1 b) - | ProjCong p a0 a1 : - R a0 a1 -> - R (PProj p a0) (PProj p a1) - | IndCong P a0 a1 b c : - R a0 a1 -> - R (PInd P a0 b c) (PInd P a1 b c). - Lemma ToRRed (a b : PTm) : HRed.R a b -> RRed.R a b. Proof. induction 1; hauto lq:on ctrs:RRed.R. Qed. diff --git a/theories/common.v b/theories/common.v index 5095fef..9c6b508 100644 --- a/theories/common.v +++ b/theories/common.v @@ -143,3 +143,30 @@ Proof. rewrite -{2}E. apply ext_PTm. case => //=. Qed. + +Module HRed. + Inductive R : PTm -> PTm -> Prop := + (****************** Beta ***********************) + | AppAbs a b : + R (PApp (PAbs a) b) (subst_PTm (scons b VarPTm) a) + + | ProjPair p a b : + R (PProj p (PPair a b)) (if p is PL then a else b) + + | IndZero P b c : + R (PInd P PZero b c) b + + | IndSuc P a b c : + R (PInd P (PSuc a) b c) (subst_PTm (scons (PInd P a b c) (scons a VarPTm)) c) + + (*************** Congruence ********************) + | AppCong a0 a1 b : + R a0 a1 -> + R (PApp a0 b) (PApp a1 b) + | ProjCong p a0 a1 : + R a0 a1 -> + R (PProj p a0) (PProj p a1) + | IndCong P a0 a1 b c : + R a0 a1 -> + R (PInd P a0 b c) (PInd P a1 b c). +End HRed.