- Notation "pf1 === pf2" := (@ndr_eqv _ _ al_eqv _ _ pf1 pf2) : temporary_scope3.
-
- Section LanguageCategory.
-
- Context (PL:ProgrammingLanguage).
-
- (* category of judgments in a fixed type/coercion context *)
- Definition Judgments_cartesian := @Judgments_Category_CartesianCat _ Rule al_eqv.
-
- Definition JudgmentsL := Judgments_cartesian.
-
- Definition identityProof t : [] ~~{JudgmentsL}~~> [t |= t].
- unfold hom; simpl.
- apply nd_rule.
- apply al_reflexive_seq.
- Defined.
-
- Definition cutProof a b c : [a |= b],,[b |= c] ~~{JudgmentsL}~~> [a |= c].
- unfold hom; simpl.
- apply al_subst.
- Defined.
-
- Definition TypesL : ECategory JudgmentsL (Tree ??T) (fun x y => [x|=y]).
- refine
- {| eid := identityProof
- ; ecomp := cutProof
- |}; intros.
- apply MonoidalCat_all_central.
- apply MonoidalCat_all_central.
- unfold identityProof; unfold cutProof; simpl.
- apply al_subst_left_identity.
- unfold identityProof; unfold cutProof; simpl.
- apply al_subst_right_identity.
- unfold identityProof; unfold cutProof; simpl.
- apply al_subst_associativity'.
- Defined.
-
- Definition Types_first c : EFunctor TypesL TypesL (fun x => x,,c ).
- (*
- eapply Build_EFunctor; intros.
- eapply MonoidalCat_all_central.
- unfold eqv.
- simpl.
- *)
- admit.
- Defined.
-
- Definition Types_second c : EFunctor TypesL TypesL (fun x => c,,x ).
- admit.
- Defined.
-
- Definition Types_binoidal : BinoidalCat TypesL (@T_Branch _).
- refine
- {| bin_first := Types_first
- ; bin_second := Types_second
- |}.
- Defined.
-
- Definition TypesL_binoidal : BinoidalCat TypesL (@T_Branch _).
- admit.
- Defined.
-
- Definition Types_PreMonoidal : PreMonoidalCat TypesL_binoidal [].
- admit.
- Defined.
-
- Definition TypesEnrichedInJudgments : Enrichment.
- refine {| enr_c := TypesL |}.
- Defined.
-
- Structure HasProductTypes :=
- {
- }.
-
- (* need to prove that if we have cartesian tuples we have cartesian contexts *)
- Definition LanguagesWithProductsAreSMME : HasProductTypes -> SurjectiveMonicMonoidalEnrichment TypesEnrichedInJudgments.
- admit.
- Defined.
-
- End LanguageCategory.
-
- Structure ProgrammingLanguageSMME :=
- { plsmme_pl : ProgrammingLanguage
- ; plsmme_smme : SurjectiveMonicMonoidalEnrichment (TypesEnrichedInJudgments plsmme_pl)
- }.
- Coercion plsmme_pl : ProgrammingLanguageSMME >-> ProgrammingLanguage.
- Coercion plsmme_smme : ProgrammingLanguageSMME >-> SurjectiveMonicMonoidalEnrichment.
-
- Section ArrowInLanguage.
- Context (Host:ProgrammingLanguageSMME).
- Context `(CC:CartesianCat (me_mon Host)).
- Context `(K:@ECategory _ _ _ _ _ _ (@car_mn _ _ _ _ _ _ _ CC) C Kehom).
- Context `(pmc:PreMonoidalCat K bobj mobj (@one _ _ _ (cartesian_terminal C))).
- (* FIXME *)
- (*
- Definition ArrowInProgrammingLanguage :=
- @FreydCategory _ _ _ _ _ _ (@car_mn _ _ _ _ _ _ _ CC) _ _ _ _ pmc.
- *)
- End ArrowInLanguage.
-
- Section GArrowInLanguage.
- Context (Guest:ProgrammingLanguageSMME).
- Context (Host :ProgrammingLanguageSMME).
- Definition GeneralizedArrowInLanguage := GeneralizedArrow Guest Host.
-
- (* FIXME
- Definition ArrowsAreGeneralizedArrows : ArrowInProgrammingLanguage -> GeneralizedArrowInLanguage.
- *)
- Definition TwoLevelLanguage := Reification Guest Host (me_i Host).
-
- Context (GuestHost:TwoLevelLanguage).
-
- Definition FlatObject (x:TypesL Host) :=
- forall y1 y2, not ((reification_r_obj GuestHost y1 y2)=x).
-
- Definition FlatSubCategory := FullSubcategory (TypesL Host) FlatObject.
-
- Section Flattening.
-
- Context (F:Retraction (TypesL Host) FlatSubCategory).
- Definition FlatteningOfReification := garrow_from_reification Guest Host GuestHost >>>> F.
- Lemma FlatteningIsNotDestructive :
- FlatteningOfReification >>>> retraction_retraction F >>>> RepresentableFunctor _ (me_i Host) ~~~~ GuestHost.
- admit.
- Qed.
-
- End Flattening.
-
- End GArrowInLanguage.
-
- Inductive NLevelLanguage : nat -> ProgrammingLanguageSMME -> Type :=
- | NLevelLanguage_zero : forall lang, NLevelLanguage O lang
- | NLevelLanguage_succ : forall (L1 L2:ProgrammingLanguageSMME) n,
- TwoLevelLanguage L1 L2 -> NLevelLanguage n L1 -> NLevelLanguage (S n) L2.
-
- Definition OmegaLevelLanguage : Type :=
- { f : nat -> ProgrammingLanguageSMME
- & forall n, TwoLevelLanguage (f n) (f (S n)) }.
-
- Close Scope temporary_scope3.
- Close Scope al_scope.
- Close Scope nd_scope.
- Close Scope pf_scope.