Move projection axioms to the subtyping relation
This commit is contained in:
parent
2e2e41cbe6
commit
0e5b82b162
4 changed files with 96 additions and 21 deletions
|
@ -2,6 +2,7 @@ Require Import Autosubst2.core Autosubst2.fintype Autosubst2.syntax.
|
|||
|
||||
Reserved Notation "Γ ⊢ a ∈ A" (at level 70).
|
||||
Reserved Notation "Γ ⊢ a ≡ b ∈ A" (at level 70).
|
||||
Reserved Notation "Γ ⊢ A ≲ B" (at level 70).
|
||||
Reserved Notation "⊢ Γ" (at level 70).
|
||||
Inductive Wt : forall {n}, (fin n -> PTm n) -> PTm n -> PTm n -> Prop :=
|
||||
| T_Var n Γ (i : fin n) :
|
||||
|
@ -37,13 +38,13 @@ Inductive Wt : forall {n}, (fin n -> PTm n) -> PTm n -> PTm n -> Prop :=
|
|||
Γ ⊢ a ∈ PBind PSig A B ->
|
||||
Γ ⊢ PProj PR a ∈ subst_PTm (scons (PProj PL a) VarPTm) B
|
||||
|
||||
| T_Univ n Γ i j :
|
||||
i < j ->
|
||||
Γ ⊢ PUniv i : PTm n ∈ PUniv j
|
||||
| T_Univ n Γ i :
|
||||
⊢ Γ ->
|
||||
Γ ⊢ PUniv i : PTm n ∈ PUniv (S i)
|
||||
|
||||
| T_Conv n Γ (a : PTm n) A B i :
|
||||
| T_Conv n Γ (a : PTm n) A B :
|
||||
Γ ⊢ a ∈ A ->
|
||||
Γ ⊢ A ≡ B ∈ PUniv i ->
|
||||
Γ ⊢ A ≲ B ->
|
||||
Γ ⊢ a ∈ B
|
||||
|
||||
with Eq : forall {n}, (fin n -> PTm n) -> PTm n -> PTm n -> PTm n -> Prop :=
|
||||
|
@ -92,20 +93,38 @@ with Eq : forall {n}, (fin n -> PTm n) -> PTm n -> PTm n -> PTm n -> Prop :=
|
|||
Γ ⊢ a ≡ b ∈ PBind PSig A B ->
|
||||
Γ ⊢ PProj PR a ≡ PProj PR b ∈ subst_PTm (scons (PProj PL a) VarPTm) B
|
||||
|
||||
| E_Conv n Γ (a b : PTm n) A B i :
|
||||
| E_Conv n Γ (a b : PTm n) A B :
|
||||
Γ ⊢ a ≡ b ∈ A ->
|
||||
Γ ⊢ B ∈ PUniv i ->
|
||||
Γ ⊢ A ≡ B ∈ PUniv i ->
|
||||
Γ ⊢ A ≲ B ->
|
||||
Γ ⊢ a ≡ b ∈ B
|
||||
|
||||
| E_Bind_Proj1 n Γ p (A0 A1 : PTm n) B0 B1 i :
|
||||
Γ ⊢ PBind p A0 B0 ≡ PBind p A1 B1 ∈ PUniv i ->
|
||||
Γ ⊢ A0 ≡ A1 ∈ PUniv i
|
||||
with LEq : forall {n}, (fin n -> PTm n) -> PTm n -> PTm n -> Prop :=
|
||||
| Su_Transitive n Γ (A B C : PTm n) :
|
||||
Γ ⊢ A ≲ B ->
|
||||
Γ ⊢ B ≲ C ->
|
||||
Γ ⊢ A ≲ C
|
||||
|
||||
| E_Bind_Proj2 n Γ p (a0 a1 A0 A1 : PTm n) B0 B1 i :
|
||||
Γ ⊢ PBind p A0 B0 ≡ PBind p A1 B1 ∈ PUniv i ->
|
||||
| Su_Univ n Γ i j :
|
||||
i <= j ->
|
||||
Γ ⊢ PUniv i : PTm n ≲ PUniv j
|
||||
|
||||
| Su_Bind n Γ p (A0 A1 : PTm n) B0 B1 :
|
||||
Γ ⊢ A1 ≲ A0 ->
|
||||
funcomp (ren_PTm shift) (scons A0 Γ) ⊢ B0 ≲ B1 ->
|
||||
Γ ⊢ PBind p A0 B0 ≲ PBind p A1 B1
|
||||
|
||||
| Su_Eq n Γ (A : PTm n) B i :
|
||||
Γ ⊢ A ≡ B ∈ PUniv i ->
|
||||
Γ ⊢ A ≲ B
|
||||
|
||||
| Su_Bind_Proj1 n Γ p (A0 A1 : PTm n) B0 B1 :
|
||||
Γ ⊢ PBind p A0 B0 ≲ PBind p A1 B1 ->
|
||||
Γ ⊢ A1 ≲ A0
|
||||
|
||||
| Su_Bind_Proj2 n Γ p (a0 a1 A0 A1 : PTm n) B0 B1 :
|
||||
Γ ⊢ PBind p A0 B0 ≲ PBind p A1 B1 ->
|
||||
Γ ⊢ a0 ≡ a1 ∈ A0 ->
|
||||
Γ ⊢ subst_PTm (scons a0 VarPTm) B0 ≡ subst_PTm (scons a1 VarPTm) B1 ∈ PUniv i
|
||||
Γ ⊢ subst_PTm (scons a0 VarPTm) B0 ≲ subst_PTm (scons a1 VarPTm) B1
|
||||
|
||||
with Wff : forall {n}, (fin n -> PTm n) -> Prop :=
|
||||
| Wff_Nil :
|
||||
|
@ -117,10 +136,17 @@ with Wff : forall {n}, (fin n -> PTm n) -> Prop :=
|
|||
⊢ funcomp (ren_PTm shift) (scons A Γ)
|
||||
|
||||
where
|
||||
"Γ ⊢ a ∈ A" := (Wt Γ a A) and "⊢ Γ" := (Wff Γ) and "Γ ⊢ a ≡ b ∈ A" := (Eq Γ a b A).
|
||||
"Γ ⊢ a ∈ A" := (Wt Γ a A) and "⊢ Γ" := (Wff Γ) and "Γ ⊢ a ≡ b ∈ A" := (Eq Γ a b A) and "Γ ⊢ A ≲ B" := (LEq Γ A B).
|
||||
|
||||
Scheme wf_ind := Induction for Wff Sort Prop
|
||||
with wt_ind := Induction for Wt Sort Prop
|
||||
with eq_ind := Induction for Eq Sort Prop.
|
||||
with eq_ind := Induction for Eq Sort Prop
|
||||
with le_ind := Induction for LEq Sort Prop.
|
||||
|
||||
Combined Scheme wt_mutual from wf_ind, wt_ind, eq_ind.
|
||||
Combined Scheme wt_mutual from wf_ind, wt_ind, eq_ind, le_ind.
|
||||
|
||||
(* Lemma lem : *)
|
||||
(* (forall n (Γ : fin n -> PTm n), ⊢ Γ -> ...) /\ *)
|
||||
(* (forall n Γ (a A : PTm n), Γ ⊢ a ∈ A -> ...) /\ *)
|
||||
(* (forall n Γ (a b A : PTm n), Γ ⊢ a ≡ b ∈ A -> ...). *)
|
||||
(* Proof. apply wt_mutual. ... *)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue