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

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
partial def Lean.Meta.Match.forallAltTelescope.go {α : Type} (altType : Lean.Expr) (numNonEqParams : Nat) (k : ) (ys : ) (eqs : ) (args : ) (mask : ) (i : Nat) (type : Lean.Expr) :
Equations
• One or more equations did not get rendered due to their size.

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, eqs → False→ False

We use tactics to minimize code duplication.

Instances For
@[inline]
Equations

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

def Lean.Meta.Match.proveCondEqThm (matchDeclName : Lean.Name) (type : Lean.Expr) :

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.
partial def Lean.Meta.Match.proveCondEqThm.go (matchDeclName : Lean.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.