Documentation

Lean.Meta.Match.MatchEqs

Helper method for proveCondEqThm. Given a goal of the form C.rec ... xMajor = rhs, apply cases xMajor.

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
      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        def Lean.Meta.Match.forallAltTelescope {α : Type} (altType : Lean.Expr) (numNonEqParams : Nat) (k : Array Lean.ExprArray Lean.ExprArray Lean.ExprArray BoolLean.ExprLean.MetaM α) :

        Similar to forallTelescopeReducing, but

        1. Eliminates arguments for named parameters and the associated equation proofs.

        2. Equality parameters associated with the h : discr notation are replaced with rfl proofs. Recall that this kind of parameter always occurs after the parameters correspoting to pattern variables. numNonEqParams is the size of the prefix.

        The continuation k takes four arguments ys args mask type.

        • ys are variables for the hypotheses that have not been eliminated.
        • eqs are variables for equality hypotheses associated with discriminants annotated with h : discr.
        • args are the arguments for the alternative alt that has type altType. ys.size <= args.size
        • mask[i] is true if the hypotheses has not been eliminated. mask.size == args.size.
        • type is the resulting type for altType.

        We use the mask to build the splitter proof. See mkSplitterProof.

        Equations
        Instances For
          partial def Lean.Meta.Match.forallAltTelescope.go {α : Type} (altType : Lean.Expr) (numNonEqParams : Nat) (k : Array Lean.ExprArray Lean.ExprArray Lean.ExprArray BoolLean.ExprLean.MetaM α) (ys : Array Lean.Expr) (eqs : Array Lean.Expr) (args : Array Lean.Expr) (mask : Array Bool) (i : Nat) (type : Lean.Expr) :
          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            State for the equational theorem hypothesis simplifier.

            Recall that each equation contains additional hypotheses to ensure the associated case does not taken by previous cases. We have one hypothesis for each previous case.

            Each hypothesis is of the form forall xs, eqsFalse

            We use tactics to minimize code duplication.

            Instances For

              Auxiliary tactic that tries to replace as many variables as possible and then apply contradiction. We use it to discard redundant hypotheses.

              Helper method for proving a conditional equational theorem associated with an alternative of the match-eliminator matchDeclName. type contains the type of the theorem.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                partial def Lean.Meta.Match.proveCondEqThm.go (matchDeclName : Lake.Name) (mvarId : Lean.MVarId) (depth : Nat) :
                @[export lean_get_match_equations_for]
                Equations
                • One or more equations did not get rendered due to their size.
                Instances For