lean2js

Lean2Js.Helper

source

Imports 2

The runtime helpers the generated code calls, held as a tree #

The runtime helpers the generated code calls, held as a tree rather than as a block of text.

This is a different language from Js.Expr. Js.Expr is the subset the compiler writes, and its narrowness is what lets the reader in Parse.lean take the whole file back; the helpers need loops, mutable bindings and throw, none of which the compiler ever emits. Giving them their own tree keeps the compiler's tree exactly as narrow as the roundtrip claim needs it.

The builtins the helpers reach for are named in prim and method rather than spelled into a call, so what the model has to assume about JavaScript is a table one can read off the tree.

inductive

Lean2Js.Helper.Expr

source
Instances For
    Used by
      instance

      Lean2Js.Helper.instInhabitedExpr

      source
      @[instance_reducible]
      Equations
      Used by
        partial def

        Lean2Js.Helper.instBEqExpr.beq

        source
        :
        Expr → Expr → Bool
        Used by
          instance

          Lean2Js.Helper.instBEqExpr

          source
          @[instance_reducible]
          Equations
          Used by
            inductive

            Lean2Js.Helper.Stmt

            source
            Instances For
              Used by
                instance

                Lean2Js.Helper.instInhabitedStmt

                source
                @[instance_reducible]
                Equations
                Used by
                  partial def

                  Lean2Js.Helper.instBEqStmt.beq

                  source
                  :
                  Stmt → Stmt → Bool
                  Used by
                    instance

                    Lean2Js.Helper.instBEqStmt

                    source
                    @[instance_reducible]
                    Equations
                    Used by
                      inductive

                      Lean2Js.Helper.Body

                      source
                      Instances For
                        Used by
                          instance

                          Lean2Js.Helper.instInhabitedBody

                          source
                          @[instance_reducible]
                          Equations
                          Used by
                            def

                            Lean2Js.Helper.instBEqBody.beq

                            source
                            :
                            Body → Body → Bool
                            Equations
                            Instances For
                              Used by
                                instance

                                Lean2Js.Helper.instBEqBody

                                source
                                @[instance_reducible]
                                Equations
                                Used by
                                  structure

                                  Lean2Js.Helper.Def

                                  source
                                  Instances For
                                    Used by
                                      instance

                                      Lean2Js.Helper.instInhabitedDef

                                      source
                                      @[instance_reducible]
                                      Equations
                                      Used by
                                        instance

                                        Lean2Js.Helper.instBEqDef

                                        source
                                        @[instance_reducible]
                                        Equations
                                        Used by
                                          def

                                          Lean2Js.Helper.instBEqDef.beq

                                          source
                                          :
                                          Def → Def → Bool
                                          Equations
                                          Instances For
                                            Used by

                                              The printer #

                                              def

                                              Lean2Js.Helper.renderNames

                                              source
                                              Equations
                                              Instances For
                                                Used by
                                                  def

                                                  Lean2Js.Helper.Expr.render

                                                  source
                                                  @[irreducible]
                                                  :

                                                  Parentheses are always written, without consulting precedence, for the reason Js.Expr.render writes them: a table of precedences would go on the trusted base while buying only shorter output.

                                                  Equations
                                                  Instances For
                                                    Used by
                                                      def

                                                      Lean2Js.Helper.Expr.renderList

                                                      source
                                                      @[irreducible]
                                                      Equations
                                                      Instances For
                                                        Used by
                                                          def

                                                          Lean2Js.Helper.Expr.renderFields

                                                          source
                                                          @[irreducible]
                                                          Equations
                                                          Instances For
                                                            Used by
                                                              def

                                                              Lean2Js.Helper.indentOf

                                                              source
                                                              :
                                                              Equations
                                                              Instances For
                                                                Used by
                                                                  def

                                                                  Lean2Js.Helper.Stmt.render

                                                                  source
                                                                  @[irreducible]
                                                                  (depth : Nat) :
                                                                  Equations
                                                                  Instances For
                                                                    Used by
                                                                      def

                                                                      Lean2Js.Helper.Stmt.renderAll

                                                                      source
                                                                      @[irreducible]
                                                                      (depth : Nat) :
                                                                      Equations
                                                                      Instances For
                                                                        Used by
                                                                          def

                                                                          Lean2Js.Helper.renderDoc

                                                                          source
                                                                          Equations
                                                                          Instances For
                                                                            Used by
                                                                              def

                                                                              Lean2Js.Helper.Def.render

                                                                              source
                                                                              (d : Def) :

                                                                              One top-level const per helper, so a bundler can drop the ones the entry point never reaches. treeshaking.test.ts is what holds this shape in place.

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

                                                                                  Lean2Js.Helper.renderAll

                                                                                  source
                                                                                  Equations
                                                                                  Instances For
                                                                                    Used by

                                                                                      The helpers #

                                                                                      The operations where JavaScript and Lean split on the answer are confined to these definitions.

                                                                                      def

                                                                                      Lean2Js.Helper.divByZero

                                                                                      source
                                                                                      Equations
                                                                                      Instances For
                                                                                        Used by
                                                                                          def

                                                                                          Lean2Js.Helper.outOfBounds

                                                                                          source
                                                                                          Equations
                                                                                          Instances For
                                                                                            Used by
                                                                                              def

                                                                                              Lean2Js.Helper.and2

                                                                                              source
                                                                                              :
                                                                                              Equations
                                                                                              Instances For
                                                                                                Used by
                                                                                                  def

                                                                                                  Lean2Js.Helper.or2

                                                                                                  source
                                                                                                  :
                                                                                                  Equations
                                                                                                  Instances For
                                                                                                    Used by
                                                                                                      def

                                                                                                      Lean2Js.Helper.lengthOf

                                                                                                      source
                                                                                                      (e : Expr) :
                                                                                                      Equations
                                                                                                      Instances For
                                                                                                        Used by
                                                                                                          def

                                                                                                          Lean2Js.Helper.fail

                                                                                                          source
                                                                                                          :
                                                                                                          Equations
                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                          Instances For
                                                                                                            Used by
                                                                                                              def

                                                                                                              Lean2Js.Helper.i53

                                                                                                              source
                                                                                                              :
                                                                                                              Equations
                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                              Instances For
                                                                                                                Used by
                                                                                                                  def

                                                                                                                  Lean2Js.Helper.i53div

                                                                                                                  source
                                                                                                                  :
                                                                                                                  Equations
                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                  Instances For
                                                                                                                    Used by
                                                                                                                      def

                                                                                                                      Lean2Js.Helper.i53mod

                                                                                                                      source
                                                                                                                      :
                                                                                                                      Equations
                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                      Instances For
                                                                                                                        Used by
                                                                                                                          def

                                                                                                                          Lean2Js.Helper.u32mul

                                                                                                                          source
                                                                                                                          :
                                                                                                                          Equations
                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                          Instances For
                                                                                                                            Used by
                                                                                                                              def

                                                                                                                              Lean2Js.Helper.u32div

                                                                                                                              source
                                                                                                                              :
                                                                                                                              Equations
                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                              Instances For
                                                                                                                                Used by
                                                                                                                                  def

                                                                                                                                  Lean2Js.Helper.u32mod

                                                                                                                                  source
                                                                                                                                  :
                                                                                                                                  Equations
                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                  Instances For
                                                                                                                                    Used by
                                                                                                                                      def

                                                                                                                                      Lean2Js.Helper.bigdiv

                                                                                                                                      source
                                                                                                                                      :
                                                                                                                                      Equations
                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                      Instances For
                                                                                                                                        Used by
                                                                                                                                          def

                                                                                                                                          Lean2Js.Helper.bigmod

                                                                                                                                          source
                                                                                                                                          :
                                                                                                                                          Equations
                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                          Instances For
                                                                                                                                            Used by
                                                                                                                                              def

                                                                                                                                              Lean2Js.Helper.abs

                                                                                                                                              source
                                                                                                                                              :
                                                                                                                                              Equations
                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                              Instances For
                                                                                                                                                Used by
                                                                                                                                                  def

                                                                                                                                                  Lean2Js.Helper.min

                                                                                                                                                  source
                                                                                                                                                  :
                                                                                                                                                  Equations
                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                  Instances For
                                                                                                                                                    Used by
                                                                                                                                                      def

                                                                                                                                                      Lean2Js.Helper.max

                                                                                                                                                      source
                                                                                                                                                      :
                                                                                                                                                      Equations
                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                      Instances For
                                                                                                                                                        Used by
                                                                                                                                                          def

                                                                                                                                                          Lean2Js.Helper.chars

                                                                                                                                                          source
                                                                                                                                                          :
                                                                                                                                                          Equations
                                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                                          Instances For
                                                                                                                                                            Used by
                                                                                                                                                              def

                                                                                                                                                              Lean2Js.Helper.cp

                                                                                                                                                              source
                                                                                                                                                              :
                                                                                                                                                              Equations
                                                                                                                                                              Instances For
                                                                                                                                                                Used by
                                                                                                                                                                  def

                                                                                                                                                                  Lean2Js.Helper.str

                                                                                                                                                                  source
                                                                                                                                                                  :
                                                                                                                                                                  Equations
                                                                                                                                                                  Instances For
                                                                                                                                                                    Used by
                                                                                                                                                                      def

                                                                                                                                                                      Lean2Js.Helper.toInt

                                                                                                                                                                      source
                                                                                                                                                                      :
                                                                                                                                                                      Equations
                                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                                      Instances For
                                                                                                                                                                        Used by
                                                                                                                                                                          def

                                                                                                                                                                          Lean2Js.Helper.strlen

                                                                                                                                                                          source
                                                                                                                                                                          :
                                                                                                                                                                          Equations
                                                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                                                          Instances For
                                                                                                                                                                            Used by
                                                                                                                                                                              def

                                                                                                                                                                              Lean2Js.Helper.strcmp

                                                                                                                                                                              source
                                                                                                                                                                              :
                                                                                                                                                                              Equations
                                                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                                                              Instances For
                                                                                                                                                                                Used by
                                                                                                                                                                                  def

                                                                                                                                                                                  Lean2Js.Helper.ws

                                                                                                                                                                                  source
                                                                                                                                                                                  :
                                                                                                                                                                                  Equations
                                                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                                                  Instances For
                                                                                                                                                                                    Used by
                                                                                                                                                                                      def

                                                                                                                                                                                      Lean2Js.Helper.lead

                                                                                                                                                                                      source
                                                                                                                                                                                      :
                                                                                                                                                                                      Equations
                                                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                                                      Instances For
                                                                                                                                                                                        Used by
                                                                                                                                                                                          def

                                                                                                                                                                                          Lean2Js.Helper.trim

                                                                                                                                                                                          source
                                                                                                                                                                                          :
                                                                                                                                                                                          Equations
                                                                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                                                                          Instances For
                                                                                                                                                                                            Used by
                                                                                                                                                                                              def

                                                                                                                                                                                              Lean2Js.Helper.upper

                                                                                                                                                                                              source
                                                                                                                                                                                              :
                                                                                                                                                                                              Equations
                                                                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                                                                              Instances For
                                                                                                                                                                                                Used by
                                                                                                                                                                                                  def

                                                                                                                                                                                                  Lean2Js.Helper.lower

                                                                                                                                                                                                  source
                                                                                                                                                                                                  :
                                                                                                                                                                                                  Equations
                                                                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                    Used by
                                                                                                                                                                                                      def

                                                                                                                                                                                                      Lean2Js.Helper.startsWith

                                                                                                                                                                                                      source
                                                                                                                                                                                                      :
                                                                                                                                                                                                      Equations
                                                                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                        Used by
                                                                                                                                                                                                          def

                                                                                                                                                                                                          Lean2Js.Helper.endsWith

                                                                                                                                                                                                          source
                                                                                                                                                                                                          :
                                                                                                                                                                                                          Equations
                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                            Used by
                                                                                                                                                                                                              def

                                                                                                                                                                                                              Lean2Js.Helper.includes

                                                                                                                                                                                                              source
                                                                                                                                                                                                              :
                                                                                                                                                                                                              Equations
                                                                                                                                                                                                              Instances For
                                                                                                                                                                                                                Used by
                                                                                                                                                                                                                  def

                                                                                                                                                                                                                  Lean2Js.Helper.split

                                                                                                                                                                                                                  source
                                                                                                                                                                                                                  :
                                                                                                                                                                                                                  Equations
                                                                                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                                    Used by
                                                                                                                                                                                                                      def

                                                                                                                                                                                                                      Lean2Js.Helper.startsAt

                                                                                                                                                                                                                      source
                                                                                                                                                                                                                      :
                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                                        Used by
                                                                                                                                                                                                                          def

                                                                                                                                                                                                                          Lean2Js.Helper.indexOf

                                                                                                                                                                                                                          source
                                                                                                                                                                                                                          :
                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                            Used by
                                                                                                                                                                                                                              def

                                                                                                                                                                                                                              Lean2Js.Helper.join

                                                                                                                                                                                                                              source
                                                                                                                                                                                                                              :
                                                                                                                                                                                                                              Equations
                                                                                                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                              Instances For
                                                                                                                                                                                                                                Used by
                                                                                                                                                                                                                                  def

                                                                                                                                                                                                                                  Lean2Js.Helper.repeat

                                                                                                                                                                                                                                  source
                                                                                                                                                                                                                                  :
                                                                                                                                                                                                                                  Equations
                                                                                                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                                                    Used by
                                                                                                                                                                                                                                      def

                                                                                                                                                                                                                                      Lean2Js.Helper.rep

                                                                                                                                                                                                                                      source
                                                                                                                                                                                                                                      :
                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                                                        Used by
                                                                                                                                                                                                                                          def

                                                                                                                                                                                                                                          Lean2Js.Helper.range

                                                                                                                                                                                                                                          source
                                                                                                                                                                                                                                          :
                                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                                            Used by
                                                                                                                                                                                                                                              def

                                                                                                                                                                                                                                              Lean2Js.Helper.substring

                                                                                                                                                                                                                                              source
                                                                                                                                                                                                                                              :
                                                                                                                                                                                                                                              Equations
                                                                                                                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                              Instances For
                                                                                                                                                                                                                                                Used by
                                                                                                                                                                                                                                                  def

                                                                                                                                                                                                                                                  Lean2Js.Helper.aslice

                                                                                                                                                                                                                                                  source
                                                                                                                                                                                                                                                  :
                                                                                                                                                                                                                                                  Equations
                                                                                                                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                                                                    Used by
                                                                                                                                                                                                                                                      def

                                                                                                                                                                                                                                                      Lean2Js.Helper.aconcat

                                                                                                                                                                                                                                                      source
                                                                                                                                                                                                                                                      :
                                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                                                                        Used by
                                                                                                                                                                                                                                                          def

                                                                                                                                                                                                                                                          Lean2Js.Helper.areverse

                                                                                                                                                                                                                                                          source
                                                                                                                                                                                                                                                          :
                                                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                                                            Used by
                                                                                                                                                                                                                                                              def

                                                                                                                                                                                                                                                              Lean2Js.Helper.atIdx

                                                                                                                                                                                                                                                              source
                                                                                                                                                                                                                                                              :
                                                                                                                                                                                                                                                              Equations
                                                                                                                                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                              Instances For
                                                                                                                                                                                                                                                                Used by
                                                                                                                                                                                                                                                                  def

                                                                                                                                                                                                                                                                  Lean2Js.Helper.dget

                                                                                                                                                                                                                                                                  source
                                                                                                                                                                                                                                                                  :
                                                                                                                                                                                                                                                                  Equations
                                                                                                                                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                                                                                    Used by
                                                                                                                                                                                                                                                                      def

                                                                                                                                                                                                                                                                      Lean2Js.Helper.dhas

                                                                                                                                                                                                                                                                      source
                                                                                                                                                                                                                                                                      :
                                                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                                                                                        Used by
                                                                                                                                                                                                                                                                          def

                                                                                                                                                                                                                                                                          Lean2Js.Helper.dset

                                                                                                                                                                                                                                                                          source
                                                                                                                                                                                                                                                                          :
                                                                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                                                                            Used by
                                                                                                                                                                                                                                                                              def

                                                                                                                                                                                                                                                                              Lean2Js.Helper.dkeys

                                                                                                                                                                                                                                                                              source
                                                                                                                                                                                                                                                                              :
                                                                                                                                                                                                                                                                              Equations
                                                                                                                                                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                              Instances For
                                                                                                                                                                                                                                                                                Used by
                                                                                                                                                                                                                                                                                  def

                                                                                                                                                                                                                                                                                  Lean2Js.Helper.dvalues

                                                                                                                                                                                                                                                                                  source
                                                                                                                                                                                                                                                                                  :
                                                                                                                                                                                                                                                                                  Equations
                                                                                                                                                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                                                                                                    Used by
                                                                                                                                                                                                                                                                                      def

                                                                                                                                                                                                                                                                                      Lean2Js.Helper.ddelete

                                                                                                                                                                                                                                                                                      source
                                                                                                                                                                                                                                                                                      :
                                                                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                                                                                                        Used by
                                                                                                                                                                                                                                                                                          def

                                                                                                                                                                                                                                                                                          Lean2Js.Helper.eqMaps

                                                                                                                                                                                                                                                                                          source

                                                                                                                                                                                                                                                                                          __eq on two Maps: same size, then the keys in the order the iterators hand them over.

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

                                                                                                                                                                                                                                                                                              Lean2Js.Helper.eqArrays

                                                                                                                                                                                                                                                                                              source

                                                                                                                                                                                                                                                                                              __eq on two arrays: same length, then element by element.

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

                                                                                                                                                                                                                                                                                                  Lean2Js.Helper.eq

                                                                                                                                                                                                                                                                                                  source
                                                                                                                                                                                                                                                                                                  :
                                                                                                                                                                                                                                                                                                  Equations
                                                                                                                                                                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                                                                                                                    Used by
                                                                                                                                                                                                                                                                                                      def

                                                                                                                                                                                                                                                                                                      Lean2Js.Helper.map

                                                                                                                                                                                                                                                                                                      source
                                                                                                                                                                                                                                                                                                      :
                                                                                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                                                                                                                        Used by
                                                                                                                                                                                                                                                                                                          def

                                                                                                                                                                                                                                                                                                          Lean2Js.Helper.filter

                                                                                                                                                                                                                                                                                                          source
                                                                                                                                                                                                                                                                                                          :
                                                                                                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                                                                                                            Used by
                                                                                                                                                                                                                                                                                                              def

                                                                                                                                                                                                                                                                                                              Lean2Js.Helper.find

                                                                                                                                                                                                                                                                                                              source
                                                                                                                                                                                                                                                                                                              :
                                                                                                                                                                                                                                                                                                              Equations
                                                                                                                                                                                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                                              Instances For
                                                                                                                                                                                                                                                                                                                Used by
                                                                                                                                                                                                                                                                                                                  def

                                                                                                                                                                                                                                                                                                                  Lean2Js.Helper.all

                                                                                                                                                                                                                                                                                                                  source
                                                                                                                                                                                                                                                                                                                  :
                                                                                                                                                                                                                                                                                                                  Equations
                                                                                                                                                                                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                                                                                                                                    Used by
                                                                                                                                                                                                                                                                                                                      def

                                                                                                                                                                                                                                                                                                                      Lean2Js.Helper.any

                                                                                                                                                                                                                                                                                                                      source
                                                                                                                                                                                                                                                                                                                      :
                                                                                                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                                                                                                                                        Used by
                                                                                                                                                                                                                                                                                                                          def

                                                                                                                                                                                                                                                                                                                          Lean2Js.Helper.reduce

                                                                                                                                                                                                                                                                                                                          source
                                                                                                                                                                                                                                                                                                                          :
                                                                                                                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                                                                                                                            Used by
                                                                                                                                                                                                                                                                                                                              def

                                                                                                                                                                                                                                                                                                                              Lean2Js.Helper.keyle

                                                                                                                                                                                                                                                                                                                              source
                                                                                                                                                                                                                                                                                                                              :
                                                                                                                                                                                                                                                                                                                              Equations
                                                                                                                                                                                                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                                                              Instances For
                                                                                                                                                                                                                                                                                                                                Used by
                                                                                                                                                                                                                                                                                                                                  def

                                                                                                                                                                                                                                                                                                                                  Lean2Js.Helper.mergeBody

                                                                                                                                                                                                                                                                                                                                  source

                                                                                                                                                                                                                                                                                                                                  Named rather than written into merge so that a proof about the loop can be stated about the same tree the printer writes.

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

                                                                                                                                                                                                                                                                                                                                      Lean2Js.Helper.merge

                                                                                                                                                                                                                                                                                                                                      source
                                                                                                                                                                                                                                                                                                                                      :
                                                                                                                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                                                                                                                                                        Used by
                                                                                                                                                                                                                                                                                                                                          def

                                                                                                                                                                                                                                                                                                                                          Lean2Js.Helper.msort

                                                                                                                                                                                                                                                                                                                                          source
                                                                                                                                                                                                                                                                                                                                          :
                                                                                                                                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                                                                                                                                            Used by
                                                                                                                                                                                                                                                                                                                                              def

                                                                                                                                                                                                                                                                                                                                              Lean2Js.Helper.sortBy

                                                                                                                                                                                                                                                                                                                                              source
                                                                                                                                                                                                                                                                                                                                              :
                                                                                                                                                                                                                                                                                                                                              Equations
                                                                                                                                                                                                                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                                                                              Instances For
                                                                                                                                                                                                                                                                                                                                                Used by
                                                                                                                                                                                                                                                                                                                                                  def

                                                                                                                                                                                                                                                                                                                                                  Lean2Js.Helper.isObj

                                                                                                                                                                                                                                                                                                                                                  source
                                                                                                                                                                                                                                                                                                                                                  :
                                                                                                                                                                                                                                                                                                                                                  Equations
                                                                                                                                                                                                                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                                                                                                                                                                    Used by
                                                                                                                                                                                                                                                                                                                                                      def

                                                                                                                                                                                                                                                                                                                                                      Lean2Js.Helper.hasFields

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

                                                                                                                                                                                                                                                                                                                                                          __has dispatches on the head of the descriptor, and every branch below is named so that a proof walking one of them does not pay for expanding the ten it did not take.

                                                                                                                                                                                                                                                                                                                                                          def

                                                                                                                                                                                                                                                                                                                                                          Lean2Js.Helper.hasBool

                                                                                                                                                                                                                                                                                                                                                          source
                                                                                                                                                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                                                                                                                                                            Used by
                                                                                                                                                                                                                                                                                                                                                              def

                                                                                                                                                                                                                                                                                                                                                              Lean2Js.Helper.hasInt53

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

                                                                                                                                                                                                                                                                                                                                                                  Lean2Js.Helper.hasUint32

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

                                                                                                                                                                                                                                                                                                                                                                      Lean2Js.Helper.hasString

                                                                                                                                                                                                                                                                                                                                                                      source
                                                                                                                                                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                                                                                                                                                                                        Used by
                                                                                                                                                                                                                                                                                                                                                                          def

                                                                                                                                                                                                                                                                                                                                                                          Lean2Js.Helper.hasBigint

                                                                                                                                                                                                                                                                                                                                                                          source
                                                                                                                                                                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                                                                                                                                                                            Used by
                                                                                                                                                                                                                                                                                                                                                                              def

                                                                                                                                                                                                                                                                                                                                                                              Lean2Js.Helper.hasArray

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

                                                                                                                                                                                                                                                                                                                                                                                  Lean2Js.Helper.hasDict

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

                                                                                                                                                                                                                                                                                                                                                                                      Lean2Js.Helper.hasDictObj

                                                                                                                                                                                                                                                                                                                                                                                      source

                                                                                                                                                                                                                                                                                                                                                                                      A dictionary declared to cross as a plain object. The object guard this branch sits behind has already refused everything that is not one, so what is left is that every value the object carries answers for the element type. A Map reaches this branch too — typeof calls one an object, and a declaration that hands one back is a value a caller may hand straight back in — so the values are read whichever way the argument holds them. Object.values is the twin of the Object.keys __eq walks.

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

                                                                                                                                                                                                                                                                                                                                                                                          Lean2Js.Helper.hasOption

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

                                                                                                                                                                                                                                                                                                                                                                                              Lean2Js.Helper.hasResult

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

                                                                                                                                                                                                                                                                                                                                                                                                  The key a declared type tells its constructors apart by is read off the descriptor rather than spelled in: an author chooses it per type, and the helpers are one copy for the whole package. The tags below are __find's own answer, which is an Option and not the value being checked.

                                                                                                                                                                                                                                                                                                                                                                                                  def

                                                                                                                                                                                                                                                                                                                                                                                                  Lean2Js.Helper.hasCtors

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

                                                                                                                                                                                                                                                                                                                                                                                                      A declared type that names itself is expanded once and bound: mu carries the same key and alternatives a ctors does, and binds them; a ref names the binder that many levels out. Both hand the walk the ctors node the binder holds, under the environment that node was bound in, so everything below them is the walk that was already there.

                                                                                                                                                                                                                                                                                                                                                                                                      def

                                                                                                                                                                                                                                                                                                                                                                                                      Lean2Js.Helper.pushed

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

                                                                                                                                                                                                                                                                                                                                                                                                          Lean2Js.Helper.bound

                                                                                                                                                                                                                                                                                                                                                                                                          source

                                                                                                                                                                                                                                                                                                                                                                                                          The binder the ref names, read out of the environment.

                                                                                                                                                                                                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                                                                                                                                                                                                            Used by
                                                                                                                                                                                                                                                                                                                                                                                                              def

                                                                                                                                                                                                                                                                                                                                                                                                              Lean2Js.Helper.asBoundCtors

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

                                                                                                                                                                                                                                                                                                                                                                                                                  Lean2Js.Helper.outer

                                                                                                                                                                                                                                                                                                                                                                                                                  source

                                                                                                                                                                                                                                                                                                                                                                                                                  The environment from the binder named outwards. Dropping what is nearer than it is what makes the answer the same as if the type had been expanded here rather than bound above.

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

                                                                                                                                                                                                                                                                                                                                                                                                                      Lean2Js.Helper.hasMu

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

                                                                                                                                                                                                                                                                                                                                                                                                                          Lean2Js.Helper.hasRef

                                                                                                                                                                                                                                                                                                                                                                                                                          source

                                                                                                                                                                                                                                                                                                                                                                                                                          An index no binder answers is refused rather than read: the descriptor the compiler writes never holds one, and reading past the end would throw where the model says false.

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

                                                                                                                                                                                                                                                                                                                                                                                                                              Lean2Js.Helper.hasObjKinds

                                                                                                                                                                                                                                                                                                                                                                                                                              source

                                                                                                                                                                                                                                                                                                                                                                                                                              The tail after the object guard, named for the same reason the branches are: a proof that takes an earlier branch never expands it.

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

                                                                                                                                                                                                                                                                                                                                                                                                                                  Lean2Js.Helper.hasBinders

                                                                                                                                                                                                                                                                                                                                                                                                                                  source

                                                                                                                                                                                                                                                                                                                                                                                                                                  The two that hand the walk a ctors node and carry on. They come first because they answer for a value of any shape: what a mu or a ref accepts is whatever the node it stands for accepts, and that includes refusing a value that is not an object at all.

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

                                                                                                                                                                                                                                                                                                                                                                                                                                      Lean2Js.Helper.has

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

                                                                                                                                                                                                                                                                                                                                                                                                                                          __norm rebuilds a value the entry check accepted in the shape encodeValue writes: the key the constructor's name is carried under first, then the constructor's fields in the order the descriptor names them. Keys the descriptor does not name are dropped. Branches are named for the reason __has's are.

                                                                                                                                                                                                                                                                                                                                                                                                                                          def

                                                                                                                                                                                                                                                                                                                                                                                                                                          Lean2Js.Helper.normFields

                                                                                                                                                                                                                                                                                                                                                                                                                                          source
                                                                                                                                                                                                                                                                                                                                                                                                                                          :
                                                                                                                                                                                                                                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                                                                                                                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                                                                                                                                                                                                                                            Used by
                                                                                                                                                                                                                                                                                                                                                                                                                                              def

                                                                                                                                                                                                                                                                                                                                                                                                                                              Lean2Js.Helper.normArray

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Lean2Js.Helper.normDict

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Lean2Js.Helper.normDictObj

                                                                                                                                                                                                                                                                                                                                                                                                                                                      source

                                                                                                                                                                                                                                                                                                                                                                                                                                                      The mirror of normDict for a dictionary that arrives as a plain object: the same Map, built out of whichever shape the argument arrived in. Walking the entries rather than the keys is what keeps each value normalised once: a key carried twice is a shape neither a Map nor an object has, and the Map collapses it rather than the walk having to.

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                          Lean2Js.Helper.normOption

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                              Lean2Js.Helper.normResult

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Lean2Js.Helper.normCtors

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Lean2Js.Helper.normMu

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Lean2Js.Helper.normRef

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Lean2Js.Helper.normBinders

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Lean2Js.Helper.norm

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      __out is __norm walked the other way: what the entry reads its result through on the way back out. Every branch is __norm's, save the one this helper exists for — a dictionary declared to cross as a plain object leaves as one, where __norm on the way in made the Map the body ran on. Branches are named for the reason __has's are.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      def

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Lean2Js.Helper.outFields

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      source
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      :
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Used by
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          def

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Lean2Js.Helper.outArray

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Lean2Js.Helper.outDict

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Lean2Js.Helper.outDictObj

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  source

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The branch the helper exists for: a dictionary handed back as the plain object a consumer can stringify. Inside the module a dictionary is a Map whatever it crosses as, so the guard answers for every other shape by handing it back untouched rather than by having a second arm to walk.

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Lean2Js.Helper.outOption

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Lean2Js.Helper.outResult

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Lean2Js.Helper.outCtors

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Lean2Js.Helper.outMu

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Lean2Js.Helper.outRef

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Lean2Js.Helper.outBinders

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Lean2Js.Helper.out

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              source
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              :
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Equations
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Instances For
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Used by
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  def

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Lean2Js.Helper.ck

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      __fold walks a value of a type that names itself, from the leaves up. What it hands the callback is the node itself with each field that came round replaced by what the callback answered for it, so the callback reads a node of the shape the type declares and dispatches on the key the constructor's name is carried under — which is what a match does, and what the compiler compiles the alternatives to.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      One callback rather than one per constructor is what keeps .apply at the arity it has: a constructor's field count varies, and a helper cannot apply a callback to an argument list it only has at run time.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The spec is an object keyed by the constructor's name, holding that constructor's fields in declared order as [name, kind]. The kind is read off the spec rather than off the value: which field comes round is the declared type's to say, and a value that happens to hold an object is not a node.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      def

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Lean2Js.Helper.fold

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      source
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      :
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Used by
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          def

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Lean2Js.Helper.defs

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Lean2Js.Helper.runtime

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              source
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Equations
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Instances For
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Used by