Documentation

Lean.Meta.Match.Basic

Equations
Instances For
    Instances For
      Equations
      Instances For

        Apply the free variable substitution s to the given pattern

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

            Match alternative

            • ref : Syntax

              Syntax object for providing position information

            • idx : Nat

              Original alternative index. Alternatives can be split, this index is the original position of the alternative that generated this one.

            • rhs : Expr

              Right-hand-side of the alternative.

            • fvarDecls : List LocalDecl

              Alternative pattern variables.

            • patterns : List Pattern

              Alternative patterns.

            • cnstrs : List (Expr × Expr)

              Pending constraints lhs ≋ rhs that need to be solved before the alternative is considered acceptable. We generate them when processing inaccessible patterns. Note that lhs and rhs often have different types. After we perform additional case analysis, their types become definitionally equal.

            Instances For
              Equations
              Instances For
                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    def Lean.Meta.Match.Alt.replaceFVarId (fvarId : FVarId) (v : Expr) (alt : Alt) :
                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For

                      Return true if fvarId is one of the alternative pattern variables

                      Equations
                      Instances For
                        Instances For
                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            Instances For
                              def Lean.Meta.Match.withGoalOf {α : Type} (p : Problem) (x : MetaM α) :
                              Equations
                              Instances For
                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  Instances For

                                    Convert a expression occurring as the argument of a match motive application back into a Pattern For example, we can use this method to convert x::y::xs at

                                    ...
                                    (motive : List Nat → Sort u_1) (xs : List Nat) (h_1 : (x y : Nat) → (xs : List Nat) → motive (x :: y :: xs))
                                    ...
                                    

                                    into a pattern object

                                    Match congruence equational theorem names helper declarations and functions