Type-Theoretic Signatures For Algebraic Theories And Inductive Types

1y ago
12 Views
2 Downloads
1.13 MB
202 Pages
Last View : 3d ago
Last Download : 3m ago
Upload by : Julius Prosser
Transcription

Type-Theoretic Signatures for AlgebraicTheories and Inductive TypesAndrás KovácsSubmitted in fulfillment of the requirements for thedegree of Doctor of PhilosophyEötvös Loránd UniversityDoctoral School of InformaticsMarch 2022DOI: 10.15476/ELTE.2022.070

Contents1 Introduction11.1Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21.2How to Read This Thesis . . . . . . . . . . . . . . . . . . . . . . . .31.3Formalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41.4Notation and Conventions . . . . . . . . . . . . . . . . . . . . . . .42 Simple Signatures72.1Theory of Signatures . . . . . . . . . . . . . . . . . . . . . . . . . .2.2Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.32.482.2.1Algebras . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.2.2Morphisms . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.2.3Displayed Algebras . . . . . . . . . . . . . . . . . . . . . . . 132.2.4Sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Term Algebras. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162.3.1Recursor Construction . . . . . . . . . . . . . . . . . . . . . 172.3.2Eliminator Construction . . . . . . . . . . . . . . . . . . . . 18Comparison to Endofunctors as Signatures . . . . . . . . . . . . . . 193 Semantics in Two-Level Type Theory213.1Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213.2Models of Type Theories . . . . . . . . . . . . . . . . . . . . . . . . 233.33.2.1The Algebraic View . . . . . . . . . . . . . . . . . . . . . . . 233.2.2Categories With Families . . . . . . . . . . . . . . . . . . . . 243.2.3Type formers . . . . . . . . . . . . . . . . . . . . . . . . . . 26Two-Level Type Theory . . . . . . . . . . . . . . . . . . . . . . . . 323.3.1Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323.3.2Internal Syntax and Notation . . . . . . . . . . . . . . . . . 33i

iiCONTENTS3.3.33.43.5Alternative Presentation for 2LTT. . . . . . . . . . . . . . 35Presheaf Semantics of 2LTT . . . . . . . . . . . . . . . . . . . . . . 373.4.1Presheaf Model of the Outer Layer . . . . . . . . . . . . . . 373.4.2Modeling the Inner Layer . . . . . . . . . . . . . . . . . . . 423.4.3Functions With Inner Domains . . . . . . . . . . . . . . . . 43Simple Signatures in 2LTT . . . . . . . . . . . . . . . . . . . . . . . 443.5.1Theory of Signatures . . . . . . . . . . . . . . . . . . . . . . 453.5.2Algebras . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453.5.3Morphisms . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463.5.4Displayed Algebras . . . . . . . . . . . . . . . . . . . . . . . 473.5.5Sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483.5.6Term Algebras . . . . . . . . . . . . . . . . . . . . . . . . . 483.5.7Recursor Construction . . . . . . . . . . . . . . . . . . . . . 513.5.8Eliminator Construction . . . . . . . . . . . . . . . . . . . . 523.5.9Strict Elimination . . . . . . . . . . . . . . . . . . . . . . . . 534 Finitary QII Signatures554.1Theory of Signatures . . . . . . . . . . . . . . . . . . . . . . . . . . 554.2Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614.34.44.2.1Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614.2.2Separate vs. Bundled Models . . . . . . . . . . . . . . . . . 624.2.3Finite Limit Cwfs . . . . . . . . . . . . . . . . . . . . . . . . 634.2.4The Cwf of Finite Limit Cwfs . . . . . . . . . . . . . . . . . 664.2.5Type Formers . . . . . . . . . . . . . . . . . . . . . . . . . . 704.2.6Recovering AMDS Interpretations . . . . . . . . . . . . . . . 774.2.7Left Adjoints of Substitutions . . . . . . . . . . . . . . . . . 78Discussion of Semantics. . . . . . . . . . . . . . . . . . . . . . . . 814.3.1Flcwfs For Free . . . . . . . . . . . . . . . . . . . . . . . . . 814.3.2Variations of the Semantics . . . . . . . . . . . . . . . . . . 824.3.3Substitutions . . . . . . . . . . . . . . . . . . . . . . . . . . 834.3.4Using Signatures in Implementations . . . . . . . . . . . . . 86Term Algebras. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 874.4.1Universes & Metatheory . . . . . . . . . . . . . . . . . . . . 884.4.2Signatures & Semantics . . . . . . . . . . . . . . . . . . . . 894.4.3Term Algebra Construction . . . . . . . . . . . . . . . . . . 904.4.4Recursor Construction . . . . . . . . . . . . . . . . . . . . . 93

CONTENTS4.4.54.54.7Eliminator Construction . . . . . . . . . . . . . . . . . . . . 97Levitation and Bootstrapping for Closed Signatures . . . . . . . . . 984.5.14.6iiiModels & Signatures . . . . . . . . . . . . . . . . . . . . . . 99Reductions to Basic Type Formers . . . . . . . . . . . . . . . . . . 1014.6.1Finitary QIIT Constructions . . . . . . . . . . . . . . . . . . 1024.6.2Reduction of Finitary Inductive-Inductive Types . . . . . . . 1064.6.3Reduction of Closed QIITs . . . . . . . . . . . . . . . . . . . 108Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1095 Infinitary QII Signatures1155.1Theory of Signatures . . . . . . . . . . . . . . . . . . . . . . . . . . 1155.2Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1195.2.1Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1195.2.2Model of the Theory of Signatures. . . . . . . . . . . . . . 1215.3Left Adjoints of Substitutions . . . . . . . . . . . . . . . . . . . . . 1335.4Signature-Based Semantics of Signatures . . . . . . . . . . . . . . . 1345.5Discussion of Semantics5.6Term Algebras. . . . . . . . . . . . . . . . . . . . . . . . 139. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1425.6.1Term Algebra Construction . . . . . . . . . . . . . . . . . . 1425.6.2Eliminator Construction . . . . . . . . . . . . . . . . . . . . 1465.7Levitation and Bootstrapping . . . . . . . . . . . . . . . . . . . . . 1495.8Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1506 Higher Inductive-Inductive Signatures6.1Strict Signatures . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1556.1.16.2Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156Weak Signatures . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1596.2.16.3152Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162Discussion & Related Work . . . . . . . . . . . . . . . . . . . . . . 1676.3.1Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1676.3.2Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . 167A AMDS interpretation of FQII signatures170B AMDS interpretation of strict HII signatures176

ivCONTENTS

CHAPTER1IntroductionThis thesis develops the usage of certain type theories as specification languagesfor algebraic theories and inductive types.Type theories have emerged as popular metatheoretic settings for mechanizedmathematics. One reason is that the field of type theory is generally aware of theissue of overheads in representation, and it is a common endeavor to search forconcise “synthetic” ways to talk about different areas of mathematics. In typetheory, it is a virtue to be able to directly say what we mean, and in a way suchthat simple-minded computers are able to verify it.Algebraic theories are certain mathematical structures which are especiallywell-behaved, and which are ubiquitous in mathematics, such as groups or categories. In type theories, inductive types are certain freely generated (initial) modelsof algebraic theories. Inductive types are a core feature in implementations of typetheories, widely used in mathematical formalization, but also as the primary wayto define the data structures which are used in programming.This thesis observes that if we are to specify more complicated algebraic theories, dependent type theories provide the natural tool to manage complexities. Theexpressive power of type theory which makes it suitable as a foundation for mechanized mathematics, also proves useful for the more specialized task of specifyingalgebraic signatures.There is a trade-off between the complexity of a mathematical language andthe ease of usage of the language. Minimal languages are convenient to reasonabout and develop metatheory for, but they often require an excessive amount ofboilerplate to work in. However, it is a worthwhile effort to try to move towardsthe Pareto frontier of this trade-off. We believe that the current thesis makes1

21.1. OVERVIEWprogress in this respect.Our signatures are useful in broader mathematical contexts, but we are alsoconcerned with potential implementation in proof assistants. Although it is unlikely that our signatures can be deployed in practice exactly as they are, theyshould be still helpful as formal bases of practical implementations.1.1OverviewIn Chapter 2, we present a minimal example of a type theory of signatures. Thisallows specifying single-sorted signatures without equations. The purpose of thechapter is didactic. We develop just enough semantics to get notions of initialityand induction for algebras. We also present a term algebra construction: this showsthat the initial algebra for each signature can be constructed from the syntax ofsignatures itself.In Chapter 3 we describe a metatheoretic setting which is often used in thethesis. This is two-level type theory [ACKS19]. It allows us to develop generalsemantics for signatures, while still working inside a convenient type theory. Asa demonstration, we generalize the semantics from Chapter 2 so that it is giveninternally to arbitrary categories-with-families. As a special case, signatures canbe interpreted in arbitrary categories with finite products.In Chapter 4 we describe finitary quotient inductive-inductive signatures.These are close to generalized algebraic theories [Car86] in expressive power. Inparticular, most type theories themselves can be specified with finitary quotientinductive-inductive signatures. We significantly expand the semantics of signatures, now for each signature we provide a category of algebras with certain extrastructure, which is equivalent to having finite limits. This allows us to prove foreach signature the equivalence of initiality and induction. Also, owing to two-leveltype theory, signatures can be interpreted internally to any category with finitelimits. Additionally We present a term algebra construction. We show that morphisms of signatures are interpreted as right adjoint functors in the semantics. We present how self-description of signatures can be exploited to minimizemetatheoretic assumptions.

CHAPTER 1. INTRODUCTION3 For certain fragments of the theory of signatures, we describe ways to construct initial algebras from simpler type formers.In Chapter 5, we describe infinitary quotient inductive-inductive signatures.These allow specification of infinitely branching trees (as initial algebras). Weadapt the semantics from the previous chapter. We also revisit term models, leftadjoints of signature morphisms and self-description of signatures. Self-descriptionin particular is significantly strengthened, since the full theories of signatures inChapters 4-5 can be now described using infinitary quotient inductive-inductivesignatures. We also describe how to build semantics of signatures internally tothe theory of signatures itself. For example, this means that for each signature,algebra morphisms are also specified with a signature. The full semantics can beinternalized in the theory of signatures in this manner; this is useful for buildingnew signatures in a generic way.In Chapter 6, we describe higher inductive-inductive signatures. These differfrom the previous signatures mostly in their intended semantics, whose contextis now homotopy type theory [Uni13], and which allows specified equalities tobe proof-relevant. The higher-dimensional generalization of types and equalitiesmakes semantics more complicated, so we only present enough semantics to specifynotions of initiality and induction for each signature. Additionally, we considertwo different notions of algebra morphisms: one preserves structure strictly (up todefinitional equality), while the other preserves structure up to paths.1.2How to Read This ThesisWe list several general references which could be helpful for readers. It is useful to have some user experience with a type-theory-based proofassistant or programming language, such as Agda, Coq, Lean or Idris. Inthe author’s view, mechanized formalization is the most effective way tobuild intuition about working in type theories. We often use categories-with-families [CCD19,Hof97,Dyb95] throughout thethesis. We use a modest amount of category theory, for which [Awo10] should be asufficient reference.

41.3. FORMALIZATION For Chapter 6, the Homotopy Type Theory book [Uni13] provides contextand motivation.This thesis is mostly written in a linear fashion, as later chapters often revisit orgeneralize earlier concepts. There are some breaks from linearity though, so wesummarize dependencies between chapters as follows: Chapter 3 depends on Chapter 2. All chapters after Chapter 3 depend on it. Chapter 5 depends on Chapter 4 as it revisits most constructions from there. Chapter 6 only depends on Chapter 3.1.3FormalizationChapter 2 is fully formalized in Agda, and the semantics of weak signatures inChapter 6 is mostly formalized, with some omissions and shortcuts. The formalization can be found in [Kov22b].1.4Notation and ConventionsThroughout this thesis, we always work in some sort of type theory, although theexact flavor of the type theory will vary. We summarize here the notations andconventions that will stay consistent. Our style of notation is a mostly a mix of thehomotopy type theory book [Uni13] and the syntax of the proof assistant Agda.Σ-typesWe write a dependent pair type as (a : A) B, where B may refer to a. Pairingis (t, u), and projections are proj1 and proj2 . Iterated Σ-types can written as(a : A) (b : B) C, for example. We often silently re-associate left-nested Σtypes to the right, e.g. write (a : A) (b : B) C instead of (ab : (a : A) B) C.Field projection notation: we reuse binder names in Σ-types as field projections.For example, if we have t : (foo : A) B, then foot projects the first componentfrom t. To make this a bit more convenient, we also allow to name the lastcomponents, for example if t : (foo : A) (bar : B), then we have foot : A, and

CHAPTER 1. INTRODUCTION5bart : B[foo 7 foot ]. This notation is useful when we handle components of morecomplicated algebraic structures.Unit typeWhenever the unit type is available, we name it , and its inhabitant tt.Π-typesDependent function types are written as (a : A) B, where B may depend onthe a variable. It is possible to group multiple binders with the same type, asin (x y : A) B. For non-dependent function types, we write plainly A B.Functions are defined as λ x. t. We may group multiple binders, as in λ x y z. t,and optionally add type annotation to binders, as in λ (x : A). t.We also use Agda-like implicit arguments: a function type {a : A} Bsignals that we usually omit the argument in function applications. For example,if id : {A : Set} A A, we write id true : Bool. We can still make thesearguments explicit, by using bracketed application, as in id {Bool} true. Similarly,we may use bracketed λ, as in λ {A : Set} (x : A). x, to bind implicit arguments.Sometimes we also write pattern matching abstraction, as in λ (x, y). t for afunction with a Σ domain.We may use implicit quantification as well: argument binders and types maybe entirely omitted when it is clear where they are quantified. This resemblesthe implicit generalization in the Haskell or Idris programming languages. Forexample, the A and B types are implicitly quantified below:map : (A B) List A List Bmap : .Identity typesWe use – – and – – to denote identity types. We always use – – asa “strict” equality which satisfies uniqueness of identity proofs. Reflexivity ofidentity is always written as refl. We use – – as intensional identity in Chapter2. In later chapters, – – denotes the identity type in the inner layer of a two-leveltype theory, and – – denotes the outer identity type.

61.4. NOTATION AND CONVENTIONSDefinitionsWe give definitions using : , for example as inid : {A : Set} A Aid a : aNote that we write the function argument on the left of : , instead of writing a λon the right. We may switch between the two styles. The type signature can beomitted in a definition. We may also use pattern matching, like in foo (x, y) : .

CHAPTER2Simple SignaturesIn this chapter, we take a look at a very simple notion of algebraic signature. Themotivation for doing so is to present the basic ideas of this thesis in the easiestpossible setting, with explicit definitions. The later chapters are greatly generalizedand expanded compared to the current one, and are not feasible (and probablynot that useful) to present in full formal detail. We also include a complete Agdaformalization of the contents of this chapter, in around 250 lines.The mantra throughout this dissertation is the following: algebraic theoriesare specified by typing contexts in certain theories of signatures. For each class ofalgebraic theories, there is a corresponding theory of signatures, which is viewedas a proper type theory and comes equipped with a model theory. Semanticsof signatures is given by interpreting them in certain models of the theory ofsignatures. Semantics should at least provide a notion of induction principle foreach signature; in this chapter we provide a bit more than that, and we will dosubstantially more in Chapters 4 and 5.MetatheoryWe work in an intensional type theory which supports Π, Σ, , intensional identity – –, inductive families, and two universes Set and Set1 closed under thementioned type formers, with Set : Set1 . Since the contents of this chapter areformalized in Agda, and our notation is reminiscent of Agda too, we can think ofthe metatheory as a subset of Agda.7

82.1. THEORY OF SIGNATURES2.1Theory of SignaturesGenerally, more expressive theories of signatures can describe larger classes of theories. As we are aiming for minimalism right now, the current theory of signaturesis as follows:Definition 1. The theory of signatures, or ToS for short, is a simple typetheory equipped with the following features: An empty base type ι. A first-order function type ι –; this is a function whose domain is fixedto be ι. Moreover, first-order functions only have neutral terms: there isapplication, but no λ-abstraction.We can specify the full syntax using the following Agda-like inductive definitions.Ty: SetVar : Con Ty Setι: Tyvz : Var (Γ . A) Aι – : Ty Tyvs : Var Γ A Var (Γ . B) ACon: SetTm : Con Ty Set : Convar : Var Γ A Tm Γ A– . – : Con Ty Conapp : Tm Γ (ι A) Tm Γ ι Tm Γ AHere, Con contexts are lists of types, and Var specifies well-typed De Bruijn indices,where vz represents the zero index, and vs takes the successor of an index.Notation 1. We use capital Greek letters starting from Γ to refer to contexts,A, B, C to refer to types, and t, u, v to refer to terms. In examples, we mayuse a nameful notation instead of De Bruijn indices. For example, we may writex : Tm ( . (x : ι) . (y : ι)) ι instead of var (vs vz) : Tm ( . ι . ι) ι. Additionally, wemay write t u instead of app t u for t and u terms.Definition 2. Parallel substitutions map variables to terms.Sub : Con Con SetSub Γ {A : Ty} Var A Tm Γ A

CHAPTER 2. SIMPLE SIGNATURES9We use σ and δ to refer to substitutions. We also recursively define the action ofsubstitution on terms:–[–] : Tm A Sub Γ Tm Γ A(var x) [σ] : σ x(app t u)[σ] : app (t[σ]) (u[σ])The identity substitution id is defined simply as var. It is easy to see that t[id] tfor all t. Substitution composition is as follows.– – : Sub Ξ Sub Γ Sub Γ Ξ(σ δ) x : (σ x)[δ]Example 1. We may write signatures for natural numbers and binary trees respectively as follows.NatSig : . (zero : ι) . (suc : ι ι)TreeSig : . (leaf : ι) . (node : ι ι ι)In short, the current ToS allows signatures which are Single-sorted : this means that we have a single type constructor, corresponding to ι. Closed : signatures cannot refer to any externally existing type. For example,we cannot write a signature for lists of natural numbers in a direct fashion,since there is no way to refer to the type of natural numbers. Finitary: inductive types corresponding to signatures are always finitelybranching trees. For a counterexample, assuming N as the metatheoreticaltype of natural numbers, node : (N ι) ι would specify an infinitebranching (if such type was allowed in the ToS).Remark. We omit λ-expressions from the ToS for the sake of simplicity: thiscauses terms to be always in normal form (neutral, to be precise), and thus wecan skip talking about conversion rules. Later, starting from Chapter 4 we includeproper βη-rules in theories of signatures.

102.2. SEMANTICS2.2SemanticsFor each signature, we need to know what it means for a type theory to supportthe corresponding inductive type. For this, we need at least a notion of algebras,which can be viewed as a bundle of all type and value constructors, and whatit means for an algebra to support an induction principle. Additionally, we maywant to know what it means to support a recursion principle, which can be viewedas a non-dependent variant of induction. In the following, we define these notionsby induction on ToS syntax.Remark. We use “algebra” and “model” synonymously throughout this thesis.2.2.1AlgebrasFirst, we calculate types of algebras. This is simply a standard interpretation intothe Set universe. We define the following operations by induction; the – A name isoverloaded for Con, Ty and Tm.– A : Ty Set SetιAX : X(ι A)A X : X AA X– A : Con Set SetΓA X : {A : Ty} Var Γ A AA X– A : Tm Γ A {X : Set} ΓA X AA X(var x)A γ : γ x(app t u)A γ : tA γ (uA γ)– A : Sub Γ {X : Set} ΓA X A Xσ A γ x : (σ x)A γHere, types and contexts depend on some X : Set, which serves as the interpretation of ι. We define ΓA as a product: for each variable in the context, we get asemantic type. This trick, along with the definition of Sub, makes formalization

CHAPTER 2. SIMPLE SIGNATURES11a bit more compact. Terms and substitutions are interpreted as natural maps.Substitutions are interpreted by pointwise interpreting the contained terms.Notation 2. We may write values of ΓA using notation for Σ-types. For example,we may write (zero : X) (suc : X X) for the result of computing NatSigA X.Definition 3. We define algebras as follows.Alg : Con Set1Alg Γ : (X : Set) ΓA XExample 2. Alg NatSig is computed to (X : Set) (zero : X) (suc : X X).2.2.2MorphismsNow, we compute notions of morphisms of algebras. In this case, morphisms arefunctions between underlying sets which preserve all specified structure. The interpretation for calculating morphisms is a logical relation interpretation [HRR14]over the – A interpretation. The key part is the interpretation of types:– M : (A : Ty){X0 X1 : Set}(X M : X0 X1 ) AA X0 AA X1 SetιMX M α0 α1 : X M α0 α1(ι A)M X M α0 α1 : (x : X0 ) AM X M (α0 x) (α1 (X M x))We again assume an interpretation for the base type ι, as X0 , X1 and X M :X0 X1 . X M is function between underlying sets of algebras, and AM computeswhat it means that X M preserves an operation with type A. At the base type,preservation is simply equality. At the first-order function type, preservation is aquantified statement over X0 . We define morphisms for Con pointwise:– M : (Γ : Con){X0 X1 : Set} (X0 X1 ) ΓA X0 ΓA X1 SetΓM X M γ0 γ1 : {A : Ty}(x : Var Γ A) AM X M (γ0 x) (γ1 x)For terms and substitutions, we get preservation statements, which are sometimescalled fundamental lemmas in discussions of logical relations [HRR14].– M : (t : Tm Γ A) ΓM X M γ0 γ1 AM X M (tA γ0 ) (tA γ1 )(var x)M γ M : γ M x(app t u)M γ M : tM γ M (uA γ0 )

122.2. SEMANTICS– M : (σ : Sub Γ ) ΓM X M γ0 γ1 M X M (σ A γ0 ) (σ A γ1 )σ M γ M x : (σ x)M γ MThe definition of (app t u)M is well-typed by the induction hypothesis uM γ M :X M (uA γ0 ) uA γ1 .Definition 4. To get notions of algebra morphisms, we again pack up ΓM withthe interpretation of ι.Mor : {Γ : Con} Alg Γ Alg Γ SetMor {Γ} (X0 , γ0 ) (X1 , γ1 ) : (X M : X0 X1 ) ΓM X M γ0 γ1Example 3. We have the following computation:Mor {NatSig} (X0 , zero0 , suc0 ) (X1 , zero1 , suc1 ) : (X M : X0 X1 ) (X M zero0 zero1 ) ((x : X0 ) X M (suc0 x) suc1 (X M x))Definition 5. We state initiality as a predicate on algebras:Initial : {Γ : Con} Alg Γ SetInitial {Γ} γ : (γ 0 : Alg Γ) isContr (Mor γ γ 0 )Here isContr refers to unique existence [Uni13, Section 3.11]. If we drop isContrfrom the definition, we get the notion of weak initiality, which corresponds to therecursion principle for Γ. Although we call this predicate Initial, in this chapterwe do not yet show that algebras form a category. We will show this in a moregeneral setting in Chapter 4.Morphisms vs. logical relations. The – M interpretation can be viewed as aspecial case of logical relations over the – A model: every morphism is a functionallogical relation, where the chosen relation between the underlying sets happens tobe a function. Consider now a more general relational interpretation for types:– R : (A : Ty){X0 X1 : Set}(X R : X0 X1 Set) AA X0 AA X1 SetιRX R α0 α1 : X R α0 α1(ι A)R X R α0 α1 : (x0 : X0 )(x1 : X1 ) X R x0 x1 AR X R (α0 x0 ) (α1 x1 )

CHAPTER 2. SIMPLE SIGNATURES13Here, functions are related if they map related inputs to related outputs. If weknow that X M α0 α1 (f α0 α1 ) for some f function, we get(x0 : X0 )(x1 : X1 ) f x0 x1 AR X R (α0 x0 ) (α1 x1 )Now, we can simply substitute along the input equality proof in the above type,to get the previous definition for (ι A)M :(x0 : X0 ) AR X R (α0 x0 ) (α1 (f x0 ))This substitution along the equation is called “singleton contraction” in the jargonof homotopy type theory [Uni13]. The ability to perform contraction here is at theheart of the strict positivity restriction for inductive signatures. Strict positivity inour setting corresponds to only having first-order function types in signatures. Ifwe allowed function domains to be arbitrary types, in the definition of (A B)Mwe would only have a black-box AM X M : AA X0 AA X1 Set relation, whichis not known to be given as an equality.In Chapter 4 we expand on this. As a preliminary summary: although higherorder functions have relational interpretation, such relations do not generally compose. What we eventually aim to have is a category of algebras and algebra morphisms, where morphisms do compose. We need a directed model of the theoryof signatures, where every signature becomes a category of algebras. The way toachieve this is to prohibit higher-order functions, thereby avoiding the polarityissues that prevent a directed interpretation for general function types.2.2.3Displayed AlgebrasAt this point we do not yet have specification for induction principles. We usethe term displayed algebra to refer to “dependent” algebras, where every displayedalgebra component lies over corresponding components in the base algebra. Forthe purpose of specifying induction, displayed algebras can be viewed as bundlesof induction motives and methods.Displayed algebras over some γ : Alg Γ are equivalent to slices over γ in thecategory of Γ-algebras; we will show this in Chapter 4. A slice f : ΓM γ 0 γ mapselements of γ 0 ’s underlying set to elements in the base algebra. Why do we needdisplayed algebras, then? The main reason is that if we are to eventually implementinductive types in a programming language or proof assistant, we need to computeinduction principles exactly, not merely up to isomorphisms.

142.2. SEMANTICSFor more illustration of using displayed algebras in a type-theoretic setting,see [AL19]. We adapt the term “displayed algebra” from ibid. as a generalizationof displayed categories (and functors, natural transformations) to other algebraicstructures.The displayed algebra interpretation is a logical predicate interpretation, defined as follows.– D : (A : Ty){X} (X Set) AA X SetιDX D α : X D α(ι A)D X D α : (x : X)(xD : X D x) AD X D (α x)– D : (Γ : Con){X} (X Set) ΓA X SetΓD X D γ : {A : Ty}(x : Var Γ A) AD X D (γ x)– D : (t : Tm Γ A) ΓD X D γ AD X D (tA γ)(var x)D γ D : γ D x(app t u)D γ D : tD γ D (uA γ) (uD γ D )– D : (σ : Sub Γ ) ΓD X D γ D X D (σ A γ)σ D γ D x : (σ x)D γ DAnalogously to before, everything depends on a predicate interpretation X D :X Set for ι. For types, a predicate holds for a function if the function preservespredicates. The interpretation of terms is again a fundamental lemma, and weagain have pointwise definitions for contexts and substitutions.Definition 6 (displayed algebras).DispAlg : {Γ : Con} Alg Γ Set1DispAlg {Γ} (X, γ) : (X D : X Set) ΓD X D γExample 4. We have the following computation.DispAlg {NatSig} (X, zero, suc) (X D: X Set) (zero D : X D zero) (suc D : (n : X) X D n X D (suc n))

CHAPTER 2. SIMPLE SIGNATURES2.2.415SectionsSections of displayed algebras are “dependent” analogues of algebra morphisms,where the codomain is displayed over the domain.– S : (A : Ty){X X D }(X S : (x : X) X D x) (α : AA X) AD X D α SetιSX S α αD : X S α αD(ι A)S X S α αD : (x : X) AS X S (α x) (αD (X S x))ConS : (Γ : Con){X X D }(X S : (x : X) X D x) (γ : ΓA X) ΓD X D γ SetΓS X S γ0 γ1 : {A : Ty}(x : Var Γ A) AS X S (γ0 x) (γ1 x)– S : (t : Tm Γ A) ΓS X S γ γ D AS X S (tA γ) (tD γ D )(var x)S γ S : γ S x(app t u)S γ

internalized in the theory of signatures in this manner; this is useful for building new signatures in a generic way. In Chapter 6, we describe higher inductive-inductive signatures. These di er from the previous signatures mostly in their intended semantics, whose context is now homotopy type theory [Uni13], and which allows speci ed equalities to

Related Documents:

Bruksanvisning för bilstereo . Bruksanvisning for bilstereo . Instrukcja obsługi samochodowego odtwarzacza stereo . Operating Instructions for Car Stereo . 610-104 . SV . Bruksanvisning i original

Introduction to Algebraic Geometry Igor V. Dolgachev August 19, 2013. ii. Contents 1 Systems of algebraic equations1 2 A ne algebraic sets7 3 Morphisms of a ne algebraic varieties13 4 Irreducible algebraic sets and rational functions21 . is a subset of Q2 and

b. Perform operations on rational algebraic expressions correctly. c. Present creatively the solution on real – life problems involving rational algebraic expression. d.Create and present manpower plan for house construction that demonstrates understanding of rational algebraic expressions and algebraic expressions with integral exponents. 64

10 tips och tricks för att lyckas med ert sap-projekt 20 SAPSANYTT 2/2015 De flesta projektledare känner säkert till Cobb’s paradox. Martin Cobb verkade som CIO för sekretariatet för Treasury Board of Canada 1995 då han ställde frågan

service i Norge och Finland drivs inom ramen för ett enskilt företag (NRK. 1 och Yleisradio), fin ns det i Sverige tre: Ett för tv (Sveriges Television , SVT ), ett för radio (Sveriges Radio , SR ) och ett för utbildnings program (Sveriges Utbildningsradio, UR, vilket till följd av sin begränsade storlek inte återfinns bland de 25 största

Hotell För hotell anges de tre klasserna A/B, C och D. Det betyder att den "normala" standarden C är acceptabel men att motiven för en högre standard är starka. Ljudklass C motsvarar de tidigare normkraven för hotell, ljudklass A/B motsvarar kraven för moderna hotell med hög standard och ljudklass D kan användas vid

LÄS NOGGRANT FÖLJANDE VILLKOR FÖR APPLE DEVELOPER PROGRAM LICENCE . Apple Developer Program License Agreement Syfte Du vill använda Apple-mjukvara (enligt definitionen nedan) för att utveckla en eller flera Applikationer (enligt definitionen nedan) för Apple-märkta produkter. . Applikationer som utvecklas för iOS-produkter, Apple .

Pick up the Baldrige Excellence framework for education today or download free content. Become a Baldrige examiner or attend examiner training for a better understanding of the criteria. Attend a national or regional Baldrige conference. Complete a Baldrige self-assessment. The Baldrige Criteria are built on these interrelated core values and concepts. They represent beliefs and .