Return some c
if e
is a casesOn
application.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Convert c
back to Expr
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given a casesOn
application c
of the form
casesOn As (fun is x => motive[is, xs]) is major (fun ys_1 => (alt_1 : motive (C_1[ys_1])) ... (fun ys_n => (alt_n : motive (C_n[ys_n]) remaining
and an expression e : B[is, major]
, construct the term
casesOn As (fun is x => B[is, x] → motive[i, xs]) is major (fun ys_1 (y : B[_, C_1[ys_1]]) => (alt_1 : motive (C_1[ys_1])) ... (fun ys_n (y : B[_, C_n[ys_n]]) => (alt_n : motive (C_n[ys_n]) e remaining
We use kabstract
to abstract the is
and major
from B[is, major]
.
This is used in in Lean.Elab.PreDefinition.WF.Fix
when replacing recursive calls with calls to
the argument provided by fix
to refine the termination argument, which may mention major
.
See there for how to use this function.
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
Similar to CasesOnApp.addArg
, but returns none
on failure.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given a casesOn
application c
of the form
casesOn As (fun is x => motive[is, xs]) is major (fun ys_1 => (alt_1 : motive (C_1[ys_1])) ... (fun ys_n => (alt_n : motive (C_n[ys_n]) remaining
and an expression B[is, major]
(which may not be a type, e.g. n : Nat
)
for every alternative i
, construct the expression fun ys_i => B[_, C_i[ys_i]]
This is similar to CasesOnApp.addArg
when you only have an expression to
refined, and not a type with a value.
This is used in in Lean.Elab.PreDefinition.WF.GuessFix
when constructing the context of recursive
calls to refine the functions' paramter, which may mention major
.
See there for how to use this function.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A non-failing version of CasesOnApp.refineThrough
Equations
- One or more equations did not get rendered due to their size.