Use hne and hf instead HRed.nf

This commit is contained in:
Yiyun Liu 2025-03-10 22:44:42 -04:00
parent 30caf75002
commit d1771adc48
4 changed files with 655 additions and 482 deletions

File diff suppressed because it is too large Load diff

View file

@ -284,8 +284,8 @@ Inductive algo_dom : PTm -> PTm -> Prop :=
algo_dom (PInd P0 u0 b0 c0) (PInd P1 u1 b1 c1) algo_dom (PInd P0 u0 b0 c0) (PInd P1 u1 b1 c1)
| A_Conf a b : | A_Conf a b :
HRed.nf a -> ishf a \/ ishne a ->
HRed.nf b -> ishf b \/ ishne b ->
tm_conf a b -> tm_conf a b ->
algo_dom a b algo_dom a b
@ -376,8 +376,8 @@ Inductive salgo_dom : PTm -> PTm -> Prop :=
salgo_dom a b salgo_dom a b
| S_Conf a b : | S_Conf a b :
HRed.nf a -> ishf a \/ ishne a ->
HRed.nf b -> ishf b \/ ishne b ->
stm_conf a b -> stm_conf a b ->
salgo_dom a b salgo_dom a b
@ -417,7 +417,7 @@ Proof. elim : a b => //=; hauto l:on inv:HRed.R. Qed.
Ltac2 destruct_salgo () := Ltac2 destruct_salgo () :=
lazy_match! goal with lazy_match! goal with
| [h : is_true (ishne ?a) |- is_true (stm_conf ?a _) ] => | [_ : is_true (ishne ?a) |- is_true (stm_conf ?a _) ] =>
if Constr.is_var a then destruct $a; ltac1:(done) else () if Constr.is_var a then destruct $a; ltac1:(done) else ()
| [|- is_true (stm_conf _ _)] => | [|- is_true (stm_conf _ _)] =>
unfold stm_conf; ltac1:(done) unfold stm_conf; ltac1:(done)

View file

@ -226,7 +226,7 @@ Ltac check_sub_triv :=
intros;subst; intros;subst;
lazymatch goal with lazymatch goal with
(* | [h : algo_dom (VarPTm _) (PAbs _) |- _] => idtac *) (* | [h : algo_dom (VarPTm _) (PAbs _) |- _] => idtac *)
| [h : salgo_dom _ _ |- _] => try (inversion h; subst => //=; ltac2:(Control.enter destruct_algo)) | [_ : salgo_dom _ _ |- _] => try (inversion h; subst => //=; ltac2:(Control.enter destruct_algo))
| _ => idtac | _ => idtac
end. end.

View file

@ -246,9 +246,6 @@ Proof.
move => /negP h0. move => /negP h0.
eapply check_equal_complete in h0. eapply check_equal_complete in h0.
apply h0. by constructor. apply h0. by constructor.
- move => a b i0 i1 j. simp ce_prop.
move => _ h. inversion h; subst => //=.
hauto lq:on inv:CoqEq_Neu unfold:stm_conf.
- move => a b s ihs. simp ce_prop. - move => a b s ihs. simp ce_prop.
move => h0 h1. apply ihs =>//. move => h0 h1. apply ihs =>//.
have [? ?] : HRed.nf a /\ HRed.nf b by hauto l:on use:salgo_dom_no_hred. have [? ?] : HRed.nf a /\ HRed.nf b by hauto l:on use:salgo_dom_no_hred.