Documentation

GroupoidModel.Syntax.Typing

Typing rules #

In this file we specify typing judgments of the type theory as Prop-valued relations.

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

            The maximum l for which Γ ⊢[l] 𝒥 makes sense. When set to 0, types cannot be quantified over at all.

            Equations
            Instances For
              @[reducible, inline]
              abbrev Axioms (χ : Type u_1) :
              Type u_1

              An axiom environment is a (possibly infinite) set of closed term constants indexed by a type of names χ. χ is in general larger than necessary and not all names correspond to constants. We record the universe level and type of each constant.

              We do not support type constants directly: they are just term constants in a universe. This does mean we cannot have type constants at level univMax.

              We do not use Axioms for definitions; the native Lean Environment is used instead.

              Equations
              Instances For
                @[reducible, inline]
                abbrev Ctx (χ : Type u_1) :
                Type u_1

                A typing context consisting of type expressions and their universe levels.

                Equations
                Instances For
                  inductive Lookup {χ : Type u_1} :
                  Ctx χExpr χProp

                  Lookup Γ i A l means that A = A'[↑ⁱ⁺¹] where Γ[i] = (A', l). Together with ⊢ Γ, this implies Γ ⊢[l] .bvar i : A.

                  Instances For
                    inductive WfCtx {χ : Type u_1} (E : Axioms χ) :
                    Ctx χProp

                    All types in the given context are well-formed.

                    Instances For
                      inductive WfTp {χ : Type u_1} (E : Axioms χ) :
                      Ctx χExpr χProp

                      The type is well-formed at the specified universe level.

                      Many of the inference rules have redundant premises ("presuppositions"); these rules are postfixed with a prime ('). This makes it easier to push syntactic metatheory through. After proving inversion lemmas, we define more efficient rules with fewer premises, named the same but without the prime. This is not just for usability: it also means the Lean kernel is checking smaller derivation trees.

                      Convention on order of implicit parameters: contexts, types, terms, de Bruijn indices, universe levels.

                      Instances For
                        inductive EqTp {χ : Type u_1} (E : Axioms χ) :
                        Ctx χExpr χExpr χProp

                        The two types are equal at the specified universe level.

                        Instances For
                          inductive WfTm {χ : Type u_1} (E : Axioms χ) :
                          Ctx χExpr χExpr χProp

                          The term has the specified type at the specified universe level.

                          Note: the type is the first Expr argument.

                          Instances For
                            inductive EqTm {χ : Type u_1} (E : Axioms χ) :
                            Ctx χExpr χExpr χExpr χProp

                            The two terms are equal at the specified type and universe level.

                            Note: the type is the first Expr argument in order to make gcongr work. We still pretty-print it last following convention.

                            Instances For

                              Pretty-printers #

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

                                        Well-formed axiom environments #

                                        @[reducible, inline]
                                        abbrev Axioms.Wf {χ : Type u_1} (E : Axioms χ) :

                                        The given axiom environment is well-formed.

                                        Unlike contexts that change via substitutions, there is usually one fixed axiom environment that definitions 'live' over.

                                        Equations
                                        Instances For