Documentation

VerifiedMBSE.Core.Specialization

Specialization, Feature Typing, Redefinition, and Interpretation #

Defines Specialization (preorder), FeatureTyping (substitution lemma), Redefinition (type refinement), Interpretation (model-theoretic semantics), and the soundness theorem.

A specializes B iff every instance of A is also an instance of B.

Specialization is a syntactic pair structure carrying only specific and general; chain evidence is kept in the propositional form specializes, not in the structure itself. If a future extension embeds a chain witness into the structure, this note should be updated.

Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Specialization is reflexive.

      Equations
      Instances For

        Propositional form of specialization.

        Equations
        Instances For
          theorem VerifiedMBSE.Core.specializes_trans {a b c : KerMLType} (_hab : specializes a b) (_hbc : specializes b c) :

          specializes is transitive.

          Because Specialization is a shallow pair carrying no chain witness, the evidence a ≤ c is constructed directly as ⟨⟨a, c⟩, rfl, rfl⟩. The hypotheses hab and hbc are accepted at the API level but not needed in the body; they preserve the signature so a future extension that embeds a chain witness into Specialization can make use of them without changing call sites.

          @[implicit_reducible]

          Preorder instance.

          Equations
          • One or more equations did not get rendered due to their size.

          FeatureTyping assigns a type to a feature, corresponding to the typing judgement f : A.

          • feature : Feature

            The feature being typed.

          • featureType : KerMLType

            The assigned type.

          Instances For
            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              TypedFeature bundles a Feature with a FeatureTyping, together with a consistency proof that the typing refers to the same feature.

              Instances For

                Type widening via the substitution lemma (subsumption): A ≤ B, f : A ⊢ f : B.

                Equations
                Instances For

                  Widening does not change the feature itself.

                  After widening, the type is the specified b.

                  theorem VerifiedMBSE.Core.FeatureTyping.widen_trans (ft : FeatureTyping) (b c : KerMLType) (hab : ft.featureType b) (hbc : b c) :
                  (ft.widen c ).feature = ((ft.widen b hab).widen c hbc).feature

                  Widening composes transitively (coherence).

                  Redefinition of a feature in a subtype context. Requires the refinement condition redefining.featureType ≤ redefined.featureType.

                  Instances For

                    Transitivity of Redefinition.

                    Equations
                    Instances For

                      Semantic interpretation: a function assigning a carrier type to each KerMLType. Denotationally, ⟦T⟧_I := I T.

                      Equations
                      Instances For

                        Extent of T under the interpretation I.

                        Equations
                        Instances For

                          Semantic specialization: under I, A ≤_sem B iff an injection I A → I B exists.

                          Equations
                          Instances For

                            Semantic specialization is reflexive.

                            Semantic specialization is transitive.

                            Semantic specialization forms a preorder.

                            Single-point interpretation (trivial model).

                            Equations
                            Instances For

                              String interpretation (for debugging).

                              Equations
                              Instances For

                                Under the trivial model, specialization always holds.

                                Soundness: syntactic specialization implies semantic specialization.

                                The trivial interpretation satisfies the model condition.

                                Corollary: under the trivial model, syntactic specialization implies semantic specialization.