Support for decreasing_by
#
- ref : Lean.Syntax
- value : Lean.TSyntax `Lean.Parser.Tactic.tacticSeq
Instances For
Equations
- Lean.Elab.WF.instInhabitedDecreasingByTactic = { default := { ref := default, value := default } }
Equations
def
Lean.Elab.WF.expandDecreasingBy?
(decreasingBy? : Option Lean.Syntax)
(cliques : Array (Array Lake.Name))
:
This function takes a user-specified decreasing_by
clause (as Sytnax
).
If it is a decreasingByMany
(a set of clauses guarded by the function name) then
- checks that all mentioned names exist in the current declaration
- check that at most one function from each clique is mentioned and sort the entries by function name.
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Elab.WF.DecreasingBy.markAsUsed
(t : Lean.Elab.WF.DecreasingBy)
(clique : Array Lake.Name)
:
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
Support for termination_by
notation #
A single termination_by
clause
- ref : Lean.Syntax
- declName : Lake.Name
- vars : Lean.TSyntaxArray [`ident, `Lean.Parser.Term.hole]
- body : Lean.Term
- implicit : Bool
Instances For
Equations
- Lean.Elab.WF.instInhabitedTerminationByElement = { default := { ref := default, declName := default, vars := default, body := default, implicit := default } }
termination_by
clauses, grouped by clique
- elements : Array Lean.Elab.WF.TerminationByElement
- used : Bool
Instances For
A termination_by
hint, as specified by the user
- cliques : Array Lean.Elab.WF.TerminationByClique
Instances For
Equations
- Lean.Elab.WF.instInhabitedTerminationBy = { default := { cliques := default } }
@[inline, reducible]
A termination_by
hint, as applicable to a single clique
Instances For
def
Lean.Elab.WF.expandTerminationBy?
(hint? : Option Lean.Syntax)
(cliques : Array (Array Lake.Name))
:
Expands the syntax for a termination_by
clause, checking that
- each function is mentioned once
- each function mentioned actually occurs in the current declaration
- if anything is specified, then all functions have a clause
- the else-case (
_
) occurs only once, and only when needed
NB:
def terminationByElement := leading_parser ppLine >> (ident <|> hole) >> many (ident <|> hole) >> " => " >> termParser >> optional ";"
def terminationBy := leading_parser ppLine >> "termination_by " >> many1chIndent terminationByElement
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.Elab.WF.TerminationBy.markAsUsed
(t : Lean.Elab.WF.TerminationBy)
(cliqueNames : Array Lake.Name)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Elab.WF.TerminationBy.find?
(t : Lean.Elab.WF.TerminationBy)
(cliqueNames : Array Lake.Name)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Elab.WF.TerminationByClique.allImplicit c = Array.all c.elements (fun (elem : Lean.Elab.WF.TerminationByElement) => elem.implicit) 0 (Array.size c.elements)
Instances For
Equations
- Lean.Elab.WF.TerminationByClique.getExplicitElement? c = Array.find? c.elements fun (x : Lean.Elab.WF.TerminationByElement) => !x.implicit
Instances For
Equations
- One or more equations did not get rendered due to their size.