Need noconfusion?
This commit is contained in:
parent
875db75955
commit
6c11f5560d
1 changed files with 19 additions and 11 deletions
|
@ -93,7 +93,11 @@ with algo_dom_r {n} : PTm n -> PTm n -> Prop :=
|
||||||
algo_dom_r a b.
|
algo_dom_r a b.
|
||||||
|
|
||||||
Derive Signature for algo_dom algo_dom_r.
|
Derive Signature for algo_dom algo_dom_r.
|
||||||
|
Derive NoConfusion for PTm.
|
||||||
|
Next Obligation.
|
||||||
|
Admitted.
|
||||||
|
Next Obligation.
|
||||||
|
Admitted.
|
||||||
|
|
||||||
Derive Dependent Inversion adom_inv with (forall n (a b : PTm n), algo_dom a b) Sort Prop.
|
Derive Dependent Inversion adom_inv with (forall n (a b : PTm n), algo_dom a b) Sort Prop.
|
||||||
|
|
||||||
|
@ -230,22 +234,26 @@ Proof.
|
||||||
Defined.
|
Defined.
|
||||||
|
|
||||||
Ltac check_equal_triv :=
|
Ltac check_equal_triv :=
|
||||||
|
intros;subst;
|
||||||
lazymatch goal with
|
lazymatch goal with
|
||||||
(* | [h : algo_dom (VarPTm _) (PAbs _) |- _] => idtac *)
|
(* | [h : algo_dom (VarPTm _) (PAbs _) |- _] => idtac *)
|
||||||
| [h : algo_dom _ _ |- _] => try inversion h; by subst
|
| [h : algo_dom _ _ |- _] => try inversion h; by subst
|
||||||
| _ => idtac
|
| _ => idtac
|
||||||
end.
|
end.
|
||||||
|
|
||||||
Lemma algo_dom_hne_abs_inv n (a : PTm n) b :
|
(* Program Fixpoint check_equal {n} (a b : PTm n) (h : algo_dom a b) {struct h} : bool := *)
|
||||||
ishne a ->
|
(* match a, b with *)
|
||||||
algo_dom a (PAbs b) ->
|
(* | VarPTm i, VarPTm j => fin_beq i j *)
|
||||||
algo_dom_r (PApp (ren_PTm shift a) (VarPTm var_zero)) b.
|
(* | PAbs a, PAbs b => check_equal_r a b ltac:(check_equal_triv) *)
|
||||||
Proof.
|
(* | _, _ => false *)
|
||||||
remember (PAbs b) as u.
|
(* end *)
|
||||||
destruct 2; try (exfalso; simpl in *; congruence).
|
(* with check_equal_r {n} (a b : PTm n) (h : algo_dom_r a b) {struct h} : bool := *)
|
||||||
injection Hequ. move => <-.
|
(* match hred_fancy _ a with *)
|
||||||
apply H1.
|
(* | inr a' => check_equal_r (proj1_sig a') b _ *)
|
||||||
Defined.
|
(* | _ => false *)
|
||||||
|
(* end. *)
|
||||||
|
(* Next Obligation. *)
|
||||||
|
(* simpl. *)
|
||||||
|
|
||||||
Equations check_equal {n} (a b : PTm n) (h : algo_dom a b) :
|
Equations check_equal {n} (a b : PTm n) (h : algo_dom a b) :
|
||||||
bool by struct h :=
|
bool by struct h :=
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue