Documentation

Lean.Meta.Tactic.Simp.Main

Return true if e is of the form ofNat n where n is a kernel Nat literal

Instances For

    If e is a raw Nat literal and OfNat.ofNat is not in the list of declarations to unfold, return an OfNat.ofNat-application.

    Instances For

      Return true if e is of the form ofScientific n b m where n and m are kernel Nat literals.

      Instances For

        Return true if e is of the form Char.ofNat n where n is a kernel Nat literals.

        Instances For
          @[implicit_reducible]
          def Lean.Meta.Simp.lambdaTelescopeDSimp {α : Type} (e : Expr) (k : Array ExprExprSimpM α) :
          Instances For
            def Lean.Meta.Simp.withNewLemmas {α : Type} (xs : Array Expr) (f : SimpM α) :

            We use withNewLemmas whenever updating the local context.

            Instances For

              Routine for simplifying let expressions.

              If it is a have, we use simpHaveTelescope to simplify entire telescopes at once, to avoid quadratic behavior arising from locally nameless expression representations.

              We assume that dependent lets are dependent, but if Config.letToHave is enabled then we attempt to transform it into a have. If that does not change it, then it is only dsimped.

              Instances For

                Process the given congruence theorem hypothesis. Return true if it made "progress".

                Instances For

                  Try to rewrite e children using the given congruence theorem

                  Instances For
                    Instances For
                      @[export lean_simp]
                      Instances For
                        @[inline]
                        Instances For
                          def Lean.Meta.Simp.mainCore (e : Expr) (ctx : Context) (s : State := { }) (methods : Methods := { }) :
                          Instances For
                            def Lean.Meta.Simp.main (e : Expr) (ctx : Context) (stats : Stats := { }) (methods : Methods := { }) :
                            Instances For
                              def Lean.Meta.Simp.dsimpMainCore (e : Expr) (ctx : Context) (s : State := { }) (methods : Methods := { }) :
                              Instances For
                                def Lean.Meta.Simp.dsimpMain (e : Expr) (ctx : Context) (stats : Stats := { }) (methods : Methods := { }) :
                                Instances For
                                  Instances For
                                    def Lean.Meta.simp (e : Expr) (ctx : Simp.Context) (simprocs : Simp.SimprocsArray := #[]) (discharge? : Option Simp.Discharge := none) (stats : Simp.Stats := { }) :
                                    Instances For
                                      def Lean.Meta.dsimp (e : Expr) (ctx : Simp.Context) (simprocs : Simp.SimprocsArray := #[]) (stats : Simp.Stats := { }) :
                                      Instances For
                                        def Lean.Meta.simpTargetCore (mvarId : MVarId) (ctx : Simp.Context) (simprocs : Simp.SimprocsArray := #[]) (discharge? : Option Simp.Discharge := none) (mayCloseGoal : Bool := true) (stats : Simp.Stats := { }) :

                                        See simpTarget. This method assumes mvarId is not assigned, and we are already using mvarIds local context.

                                        Instances For
                                          def Lean.Meta.simpTarget (mvarId : MVarId) (ctx : Simp.Context) (simprocs : Simp.SimprocsArray := #[]) (discharge? : Option Simp.Discharge := none) (mayCloseGoal : Bool := true) (stats : Simp.Stats := { }) :

                                          Simplify the given goal target (aka type). Return none if the goal was closed. Return some mvarId' otherwise, where mvarId' is the simplified new goal.

                                          Instances For
                                            def Lean.Meta.applySimpResult (mvarId : MVarId) (val type : Expr) (r : Simp.Result) (mayCloseGoal : Bool := true) :

                                            Applies the result r for type (which is inhabited by val). Returns none if the goal was closed. Returns some (val', type') otherwise, where val' : type' and type' is the simplified type.

                                            This method assumes mvarId is not assigned, and we are already using mvarIds local context.

                                            Instances For
                                              def Lean.Meta.applySimpResultToFVarId (mvarId : MVarId) (fvarId : FVarId) (r : Simp.Result) (mayCloseGoal : Bool) :
                                              Instances For
                                                def Lean.Meta.simpStep (mvarId : MVarId) (proof prop : Expr) (ctx : Simp.Context) (simprocs : Simp.SimprocsArray := #[]) (discharge? : Option Simp.Discharge := none) (mayCloseGoal : Bool := true) (stats : Simp.Stats := { }) :

                                                Simplify prop (which is inhabited by proof). Return none if the goal was closed. Return some (proof', prop') otherwise, where proof' : prop' and prop' is the simplified prop.

                                                This method assumes mvarId is not assigned, and we are already using mvarIds local context.

                                                Instances For
                                                  def Lean.Meta.applySimpResultToLocalDecl (mvarId : MVarId) (fvarId : FVarId) (r : Simp.Result) (mayCloseGoal : Bool) :

                                                  Simplify simp result to the given local declaration. Return none if the goal was closed. This method assumes mvarId is not assigned, and we are already using mvarIds local context.

                                                  Instances For
                                                    def Lean.Meta.simpLocalDecl (mvarId : MVarId) (fvarId : FVarId) (ctx : Simp.Context) (simprocs : Simp.SimprocsArray := #[]) (discharge? : Option Simp.Discharge := none) (mayCloseGoal : Bool := true) (stats : Simp.Stats := { }) :
                                                    Instances For
                                                      def Lean.Meta.simpGoal (mvarId : MVarId) (ctx : Simp.Context) (simprocs : Simp.SimprocsArray := #[]) (discharge? : Option Simp.Discharge := none) (simplifyTarget : Bool := true) (fvarIdsToSimp : Array FVarId := #[]) (stats : Simp.Stats := { }) :
                                                      Instances For
                                                        Instances For
                                                          def Lean.Meta.dsimpGoal (mvarId : MVarId) (ctx : Simp.Context) (simprocs : Simp.SimprocsArray := #[]) (simplifyTarget : Bool := true) (fvarIdsToSimp : Array FVarId := #[]) (stats : Simp.Stats := { }) :
                                                          Instances For