Documentation

Semantic.CC.Debruijn

De Bruijn indices and variable renamings for CC.

inductive CC.Kind :

Kind of a variable.

  • var : Kind

    Term variable

  • tvar : Kind

    Type variable

  • cvar : Kind

    Capture variable

Instances For
    @[reducible]

    A Sig describes the shape of a context, which is a list of variable kinds.

    Equations
    Instances For

      Extends a signature with a term variable.

      Equations
      Instances For

        Extends a signature with a type variable.

        Equations
        Instances For

          Extends a signature with a capture variable.

          Equations
          Instances For
            def CC.Sig.extend :
            SigKindSig

            Extends a signature with a variable of the given kind.

            Equations
            Instances For

              Extends a signature with multiple variables.

              Equations
              Instances For
                inductive CC.BVar :
                SigKindType

                A bound variable, de Bruijn indexed.

                Instances For
                  structure CC.Rename (s1 s2 : Sig) :

                  A Rename maps bound variables in one context to another.

                  Instances For
                    def CC.Rename.id {s : Sig} :
                    Rename s s

                    The identity Rename.

                    Equations
                    Instances For
                      def CC.Rename.comp {s1 s2 s3 : Sig} (f1 : Rename s1 s2) (f2 : Rename s2 s3) :
                      Rename s1 s3

                      Composition of two renamings.

                      Equations
                      Instances For
                        def CC.Rename.lift {s1 s2 : Sig} {k : Kind} (f : Rename s1 s2) :
                        Rename (s1,,k) (s2,,k)

                        Lifts a renaming under a binder. The newly bound variable maps to itself.

                        Equations
                        Instances For
                          def CC.Rename.liftMany {s1 s2 : Sig} (f : Rename s1 s2) (K : Sig) :
                          Rename (s1 ++ K) (s2 ++ K)

                          Lifts a renaming under multiple binders.

                          Equations
                          Instances For
                            def CC.Rename.succ {s : Sig} {k : Kind} :
                            Rename s (s,,k)

                            The "successor" renaming that weakens all variables by one level.

                            Equations
                            Instances For
                              theorem CC.Rename.funext {s1 s2 : Sig} {f1 f2 : Rename s1 s2} (hvar : ∀ {k : Kind} (x : BVar s1 k), f1.var x = f2.var x) :
                              f1 = f2

                              Function extensionality for renamings. Two renamings are equal if they map all variables equally.

                              theorem CC.Rename.succ_lift_comm {s1 s2 : Sig} {k0 : Kind} {f : Rename s1 s2} :

                              The successor renaming commutes with lifting.

                              theorem CC.Rename.lift_id {s : Sig} {k0 : Kind} :

                              Lifting the identity renaming yields the identity.

                              theorem CC.Rename.lift_comp {s1 s2 s3 : Sig} {k0 : Kind} {f1 : Rename s1 s2} {f2 : Rename s2 s3} :
                              (f1.comp f2).lift = f1.lift.comp f2.lift

                              Lifting distributes over composition of renamings.