Skip to content

Commit 168786b

Browse files
Merge pull request #63 from CoqHott/onlytermrel
Replace term reducibility in the logical relation by the diagonal of reducible term conversion
2 parents 810f09c + 5688e4a commit 168786b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+4003
-6066
lines changed

_CoqProject

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ theories/LogicalRelation/Weakening.v
3131
theories/LogicalRelation/Universe.v
3232
theories/LogicalRelation/Neutral.v
3333
theories/LogicalRelation/Transitivity.v
34+
theories/LogicalRelation/InstKripke.v
35+
theories/LogicalRelation/EqRedRight.v
3436
theories/LogicalRelation/Reduction.v
3537
theories/LogicalRelation/NormalRed.v
3638
theories/LogicalRelation/Application.v

theories/Consequences.v

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,20 @@ Section NatCanonicityInduction.
5656
Qed.
5757

5858
Lemma nat_red_empty_ind :
59-
(forall t, [ε ||-Nat t : tNat | red_nat_empty] ->
59+
(forall t u, [ε ||-Nat t ≅ u : tNat | red_nat_empty] ->
6060
∑ n : nat, [ε |- t ≅ n : tNat]) ×
61-
(forall t, NatProp red_nat_empty t -> ∑ n : nat, [ε |- t ≅ n : tNat]).
61+
(forall t u, NatPropEq red_nat_empty t u -> ∑ n : nat, [ε |- t ≅ n : tNat]).
6262
Proof.
63-
apply NatRedInduction.
64-
- intros * [? []] ? _ [n] ; refold.
63+
apply NatRedEqInduction.
64+
- intros * [? []] ? ? _ [n] ; refold.
6565
exists n.
6666
now etransitivity.
6767
- exists 0 ; cbn.
6868
now repeat constructor.
69-
- intros ? _ [n].
69+
- intros ? ? _ [n].
7070
exists (S n) ; simpl.
7171
now econstructor.
72-
- intros ? [? [? _ _]].
72+
- intros ? ? [? ? []].
7373
exfalso.
7474
now eapply no_neutral_empty_ctx.
7575
Qed.
@@ -80,7 +80,7 @@ Section NatCanonicityInduction.
8080
intros Ht.
8181
assert [LRNat_ one red_nat_empty | ε ||- t : tNat] as ?%nat_red_empty_ind.
8282
{
83-
apply Fundamental in Ht as [?? Vt%reducibleTm].
83+
apply Fundamental in Ht as [?? Vt%reducibleTmEq].
8484
irrelevance.
8585
}
8686
now assumption.

theories/DeclarativeSubst.v

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ From LogRel Require Import LogicalRelation Validity Fundamental.
77
From LogRel.LogicalRelation Require Import Induction Escape Irrelevance Transitivity.
88
From LogRel.Substitution Require Import Properties Irrelevance.
99

10-
(** Currently, this is obtained as a consequence of the fundamental lemma.
10+
(** Currently, this is obtained as a consequence of the fundamental lemma.
1111
However, it could be alternatively proven much earlier, by a direct induction. *)
1212

1313
Set Printing Primitive Projection Parameters.
@@ -44,20 +44,14 @@ Proof.
4444
unshelve eapply transEq.
4545
4: now apply Vconv.
4646
2-3: unshelve eapply VB ; tea.
47-
all: irrValid.
47+
eapply urefl; now eapply irrelevanceSubstEq.
4848
- intros * Ht * HΔ Hσ.
4949
unshelve eapply Fundamental_subst_conv in Hσ as [].
5050
1,3: boundary.
51-
apply Fundamental in Ht as [VΓ VA Vt Vu Vtu] ; cbn in *.
51+
apply Fundamental in Ht as [VΓ VA Vtu] ; cbn in *.
5252
unshelve eapply escapeEqTerm.
5353
2: now unshelve eapply VA ; tea ; irrValid.
54-
cbn.
55-
eapply transEqTerm.
56-
+ cbn.
57-
unshelve eapply Vtu.
58-
+ cbn.
59-
eapply Vu.
60-
all: irrValid.
54+
cbn. unshelve eapply Vtu.
6155
Qed.
6256

6357

@@ -149,16 +143,16 @@ Section MoreSubst.
149143

150144
Theorem typing_substmap1 Γ T :
151145
(forall (t : term), [Γ ,, T |- t : T⟨↑⟩] ->
152-
forall (A : term), [Γ,, T |- A] ->
146+
forall (A : term), [Γ,, T |- A] ->
153147
[Γ,, T |- A[t]⇑]) ×
154148
(forall (t : term), [Γ ,, T |- t : T⟨↑⟩] ->
155-
forall (A u : term), [Γ,, T |- u : A] ->
149+
forall (A u : term), [Γ,, T |- u : A] ->
156150
[Γ,, T |- u[t]⇑ : A[t]⇑]) ×
157151
(forall (t t' : term), [Γ ,, T |- t ≅ t' : T⟨↑⟩] ->
158152
forall (A B : term), [Γ,, T |- A ≅ B] ->
159153
[Γ,, T |- A[t]⇑ ≅ B[t']⇑]) ×
160154
(forall (t t' : term), [Γ ,, T |- t ≅ t' : T⟨↑⟩] ->
161-
forall (A u v : term), [Γ,, T |- u ≅ v : A] ->
155+
forall (A u v : term), [Γ,, T |- u ≅ v : A] ->
162156
[Γ,, T |- u[t]⇑ ≅ v[t']⇑ : A[t]⇑]).
163157
Proof.
164158
repeat match goal with |- _ × _ => split end.

0 commit comments

Comments
 (0)