Add termination
This commit is contained in:
parent
c4f01d7dfc
commit
b29d567ef0
1 changed files with 14 additions and 0 deletions
14
theories/termination.v
Normal file
14
theories/termination.v
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
Require Import common Autosubst2.core Autosubst2.unscoped Autosubst2.syntax algorithmic fp_red executable.
|
||||||
|
From Hammer Require Import Tactics.
|
||||||
|
Require Import ssreflect ssrbool.
|
||||||
|
From stdpp Require Import relations (nsteps (..)).
|
||||||
|
|
||||||
|
Definition term_metric k (a b : PTm) :=
|
||||||
|
exists i j va vb, nsteps LoRed.R i a va /\ nsteps LoRed.R j b vb /\ nf va /\ nf vb /\ size_PTm va + size_PTm vb + i + j <= k.
|
||||||
|
|
||||||
|
Lemma term_metric_algo_dom : forall k a b, term_metric k a b -> algo_dom_r a b.
|
||||||
|
Proof.
|
||||||
|
elim /Wf_nat.lt_wf_ind.
|
||||||
|
move => n ih a b h.
|
||||||
|
case : (fancy_hred a); cycle 1.
|
||||||
|
move => [a' ha']. apply : A_HRedL; eauto.
|
Loading…
Add table
Add a link
Reference in a new issue