- Context (ndr:forall n, @ND_Relation _ (BoundedRule n)).
-
- (* for every n we have a category of n-bounded proofs *)
- Definition JudgmentsN n := @Judgments_Category_CartesianCat _ (BoundedRule n) (ndr n).
-
- Open Scope nd_scope.
- Open Scope pf_scope.
-
- Definition TypesNmor (n:nat) (t1 t2:Tree ??(LeveledHaskType Γ ★)) : JudgmentsN n := [Γ > Δ > t1 |- t2].
- Definition TypesN_id n (t:Tree ??(LeveledHaskType Γ ★)) : ND (BoundedRule n) [] [ Γ > Δ > t |- t ].
+ (* "RuleSystemFCa n" is the type of rules permitted in SystemFC^\alpha with n-level-deep nesting
+ * (so, "RuleSystemFCa 0" is damn close to System FC) *)
+ Inductive RuleSystemFCa : nat -> Tree ??Judg -> Tree ??Judg -> Type :=
+ | sfc_flat : forall n h c (r:Rule h c), Rule_Flat r -> RuleSystemFCa n h c
+ | sfc_nest : forall n h c Γ Δ, ND (@RulePCF Γ Δ n) h c -> RuleSystemFCa (S n) h c
+ .
+
+ Context (ndr_pcf :forall n Γ Δ, @ND_Relation _ (@RulePCF Γ Δ n)).
+ Context (ndr_systemfca:forall n, @ND_Relation _ (RuleSystemFCa n)).
+
+ (* 5.1.3 *)
+ Instance PCF n Γ Δ : @ProgrammingLanguage _ _ (mkJudg Γ Δ) (@RulePCF Γ Δ n) :=
+ { pl_eqv := _ (*@ND_Relation Judg Rule where "pf1 === pf2" := (@ndr_eqv _ _ pl_eqv _ _ pf1 pf2)*)
+ ; pl_tsr := _ (*@TreeStructuralRules Judg Rule T sequent*)
+ ; pl_sc := _ (*@SequentCalculus Judg Rule _ sequent*)
+ ; pl_subst := _ (*@CutRule Judg Rule _ sequent pl_eqv pl_sc*)
+ ; pl_sequent_join := _ (*@SequentExpansion Judg Rule T sequent pl_eqv pl_sc pl_subst*)
+ }.
+ Admitted.
+
+ (* 5.1.2 *)
+ Instance SystemFCa n Γ Δ : @ProgrammingLanguage _ _ (mkJudg Γ Δ) (RuleSystemFCa n) :=
+ { pl_eqv := _ (*@ND_Relation Judg Rule where "pf1 === pf2" := (@ndr_eqv _ _ pl_eqv _ _ pf1 pf2)*)
+ ; pl_tsr := _ (*@TreeStructuralRules Judg Rule T sequent*)
+ ; pl_sc := _ (*@SequentCalculus Judg Rule _ sequent*)
+ ; pl_subst := _ (*@CutRule Judg Rule _ sequent pl_eqv pl_sc*)
+ ; pl_sequent_join := _ (*@SequentExpansion Judg Rule T sequent pl_eqv pl_sc pl_subst*)
+ }.
+ Admitted.
+
+ Definition PCF_SMME (n:nat)(Γ:TypeEnv)(Δ:CoercionEnv Γ) : ProgrammingLanguageSMME.
+ refine {| plsmme_pl := PCF n Γ Δ |}.