Recover the contra lemmas
This commit is contained in:
parent
d68df5d0bc
commit
9c9ce52b63
5 changed files with 110 additions and 28 deletions
|
@ -41,7 +41,8 @@ Inductive Tm (n_Tm : nat) : Type :=
|
|||
| Proj : PTag -> Tm n_Tm -> Tm n_Tm
|
||||
| TBind : TTag -> Tm n_Tm -> Tm (S n_Tm) -> Tm n_Tm
|
||||
| Const : TTag -> Tm n_Tm
|
||||
| Univ : nat -> Tm n_Tm.
|
||||
| Univ : nat -> Tm n_Tm
|
||||
| Bot : Tm n_Tm.
|
||||
|
||||
Lemma congr_Abs {m_Tm : nat} {s0 : Tm (S m_Tm)} {t0 : Tm (S m_Tm)}
|
||||
(H0 : s0 = t0) : Abs m_Tm s0 = Abs m_Tm t0.
|
||||
|
@ -95,6 +96,11 @@ Proof.
|
|||
exact (eq_trans eq_refl (ap (fun x => Univ m_Tm x) H0)).
|
||||
Qed.
|
||||
|
||||
Lemma congr_Bot {m_Tm : nat} : Bot m_Tm = Bot m_Tm.
|
||||
Proof.
|
||||
exact (eq_refl).
|
||||
Qed.
|
||||
|
||||
Lemma upRen_Tm_Tm {m : nat} {n : nat} (xi : fin m -> fin n) :
|
||||
fin (S m) -> fin (S n).
|
||||
Proof.
|
||||
|
@ -119,6 +125,7 @@ Fixpoint ren_Tm {m_Tm : nat} {n_Tm : nat} (xi_Tm : fin m_Tm -> fin n_Tm)
|
|||
TBind n_Tm s0 (ren_Tm xi_Tm s1) (ren_Tm (upRen_Tm_Tm xi_Tm) s2)
|
||||
| Const _ s0 => Const n_Tm s0
|
||||
| Univ _ s0 => Univ n_Tm s0
|
||||
| Bot _ => Bot n_Tm
|
||||
end.
|
||||
|
||||
Lemma up_Tm_Tm {m : nat} {n_Tm : nat} (sigma : fin m -> Tm n_Tm) :
|
||||
|
@ -146,6 +153,7 @@ Fixpoint subst_Tm {m_Tm : nat} {n_Tm : nat} (sigma_Tm : fin m_Tm -> Tm n_Tm)
|
|||
TBind n_Tm s0 (subst_Tm sigma_Tm s1) (subst_Tm (up_Tm_Tm sigma_Tm) s2)
|
||||
| Const _ s0 => Const n_Tm s0
|
||||
| Univ _ s0 => Univ n_Tm s0
|
||||
| Bot _ => Bot n_Tm
|
||||
end.
|
||||
|
||||
Lemma upId_Tm_Tm {m_Tm : nat} (sigma : fin m_Tm -> Tm m_Tm)
|
||||
|
@ -186,6 +194,7 @@ subst_Tm sigma_Tm s = s :=
|
|||
(idSubst_Tm (up_Tm_Tm sigma_Tm) (upId_Tm_Tm _ Eq_Tm) s2)
|
||||
| Const _ s0 => congr_Const (eq_refl s0)
|
||||
| Univ _ s0 => congr_Univ (eq_refl s0)
|
||||
| Bot _ => congr_Bot
|
||||
end.
|
||||
|
||||
Lemma upExtRen_Tm_Tm {m : nat} {n : nat} (xi : fin m -> fin n)
|
||||
|
@ -230,6 +239,7 @@ Fixpoint extRen_Tm {m_Tm : nat} {n_Tm : nat} (xi_Tm : fin m_Tm -> fin n_Tm)
|
|||
(upExtRen_Tm_Tm _ _ Eq_Tm) s2)
|
||||
| Const _ s0 => congr_Const (eq_refl s0)
|
||||
| Univ _ s0 => congr_Univ (eq_refl s0)
|
||||
| Bot _ => congr_Bot
|
||||
end.
|
||||
|
||||
Lemma upExt_Tm_Tm {m : nat} {n_Tm : nat} (sigma : fin m -> Tm n_Tm)
|
||||
|
@ -275,6 +285,7 @@ Fixpoint ext_Tm {m_Tm : nat} {n_Tm : nat} (sigma_Tm : fin m_Tm -> Tm n_Tm)
|
|||
s2)
|
||||
| Const _ s0 => congr_Const (eq_refl s0)
|
||||
| Univ _ s0 => congr_Univ (eq_refl s0)
|
||||
| Bot _ => congr_Bot
|
||||
end.
|
||||
|
||||
Lemma up_ren_ren_Tm_Tm {k : nat} {l : nat} {m : nat} (xi : fin k -> fin l)
|
||||
|
@ -320,6 +331,7 @@ Fixpoint compRenRen_Tm {k_Tm : nat} {l_Tm : nat} {m_Tm : nat}
|
|||
(upRen_Tm_Tm rho_Tm) (up_ren_ren _ _ _ Eq_Tm) s2)
|
||||
| Const _ s0 => congr_Const (eq_refl s0)
|
||||
| Univ _ s0 => congr_Univ (eq_refl s0)
|
||||
| Bot _ => congr_Bot
|
||||
end.
|
||||
|
||||
Lemma up_ren_subst_Tm_Tm {k : nat} {l : nat} {m_Tm : nat}
|
||||
|
@ -376,6 +388,7 @@ Fixpoint compRenSubst_Tm {k_Tm : nat} {l_Tm : nat} {m_Tm : nat}
|
|||
(up_Tm_Tm theta_Tm) (up_ren_subst_Tm_Tm _ _ _ Eq_Tm) s2)
|
||||
| Const _ s0 => congr_Const (eq_refl s0)
|
||||
| Univ _ s0 => congr_Univ (eq_refl s0)
|
||||
| Bot _ => congr_Bot
|
||||
end.
|
||||
|
||||
Lemma up_subst_ren_Tm_Tm {k : nat} {l_Tm : nat} {m_Tm : nat}
|
||||
|
@ -453,6 +466,7 @@ ren_Tm zeta_Tm (subst_Tm sigma_Tm s) = subst_Tm theta_Tm s :=
|
|||
(up_Tm_Tm theta_Tm) (up_subst_ren_Tm_Tm _ _ _ Eq_Tm) s2)
|
||||
| Const _ s0 => congr_Const (eq_refl s0)
|
||||
| Univ _ s0 => congr_Univ (eq_refl s0)
|
||||
| Bot _ => congr_Bot
|
||||
end.
|
||||
|
||||
Lemma up_subst_subst_Tm_Tm {k : nat} {l_Tm : nat} {m_Tm : nat}
|
||||
|
@ -531,6 +545,7 @@ subst_Tm tau_Tm (subst_Tm sigma_Tm s) = subst_Tm theta_Tm s :=
|
|||
(up_Tm_Tm theta_Tm) (up_subst_subst_Tm_Tm _ _ _ Eq_Tm) s2)
|
||||
| Const _ s0 => congr_Const (eq_refl s0)
|
||||
| Univ _ s0 => congr_Univ (eq_refl s0)
|
||||
| Bot _ => congr_Bot
|
||||
end.
|
||||
|
||||
Lemma renRen_Tm {k_Tm : nat} {l_Tm : nat} {m_Tm : nat}
|
||||
|
@ -647,6 +662,7 @@ Fixpoint rinst_inst_Tm {m_Tm : nat} {n_Tm : nat}
|
|||
(rinstInst_up_Tm_Tm _ _ Eq_Tm) s2)
|
||||
| Const _ s0 => congr_Const (eq_refl s0)
|
||||
| Univ _ s0 => congr_Univ (eq_refl s0)
|
||||
| Bot _ => congr_Bot
|
||||
end.
|
||||
|
||||
Lemma rinstInst'_Tm {m_Tm : nat} {n_Tm : nat} (xi_Tm : fin m_Tm -> fin n_Tm)
|
||||
|
@ -845,6 +861,8 @@ Core.
|
|||
|
||||
Arguments VarTm {n_Tm}.
|
||||
|
||||
Arguments Bot {n_Tm}.
|
||||
|
||||
Arguments Univ {n_Tm}.
|
||||
|
||||
Arguments Const {n_Tm}.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue