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.
Similar to forallTelescopeReducing
, but
-
Eliminates arguments for named parameters and the associated equation proofs.
-
Equality parameters associated with the
h : discr
notation are replaced withrfl
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 withh : discr
.args
are the arguments for the alternativealt
that has typealtType
.ys.size <= args.size
mask[i]
is true if the hypotheses has not been eliminated.mask.size == args.size
.type
is the resulting type foraltType
.
We use the mask
to build the splitter proof. See mkSplitterProof
.
Equations
- Lean.Meta.Match.forallAltTelescope altType numNonEqParams k = Lean.Meta.Match.forallAltTelescope.go altType numNonEqParams k #[] #[] #[] #[] 0 altType
Equations
- One or more equations did not get rendered due to their size.
- mvarId : Lean.MVarId
- xs : List Lean.FVarId
- eqs : List Lean.FVarId
- eqsNew : List Lean.FVarId
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
We use tactics to minimize code duplication.
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.
Equations
- One or more equations did not get rendered due to their size.