Documentation

Lean.Meta.Match.Basic

Instances For
    Instances For

      Apply the free variable substitution s to the given pattern

      Instances For
        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.

          • notAltIdxs : Array Nat

            Indices of previous alternatives that this alternative expects a not-that-proofs. (When producing a splitter, and in the future also for source-level overlap hypotheses.)

          Instances For
            @[implicit_reducible]
            def Lean.Meta.Match.Alt.replaceFVarId (fvarId : FVarId) (v : Expr) (alt : Alt) :
            Instances For

              Return true if fvarId is one of the alternative pattern variables

              Instances For
                Instances For
                  Instances For
                    def Lean.Meta.Match.withGoalOf {α : Type} (p : Problem) (x : MetaM α) :
                    Instances For
                      @[reducible, inline]
                      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

                          Returns true if s is of the form congr_eq_<idx>

                          Instances For