Built with doc-gen4, running Lean4. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑Ctrl+↓to navigate, Ctrl+🖱️to focus. On Mac, use Cmdinstead of Ctrl.
/-
Copyright (c) 2022 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison, Newell Jensen
-/
import Lean.Elab.Command
import Lean.Meta.Tactic.Constructor

open Lean Meta Elab Tactic

/--
`fconstructor` is like `constructor`
(it calls `apply` using the first matching constructor of an inductive datatype)
except that it does not reorder goals.
-/
elab "fconstructor" : tactic => 
withMainContext: {α : Type} → TacticM αTacticM α
withMainContext
do let
mvarIds': ?m.367
mvarIds'
(← getMainGoal): ?m.135
(←
getMainGoal: TacticM MVarId
getMainGoal
(← getMainGoal): ?m.135
)
.
constructor: MVarIdoptParam ApplyConfig { newGoals := ApplyNewGoals.nonDependentFirst, synthAssignedInstances := true, approx := true }MetaM (List MVarId)
constructor
{newGoals := .all}
Term.synthesizeSyntheticMVarsNoPostponing: optParam Bool falseTermElabM Unit
Term.synthesizeSyntheticMVarsNoPostponing
replaceMainGoal: List MVarIdTacticM Unit
replaceMainGoal
mvarIds': ?m.367
mvarIds'
/-- `econstructor` is like `constructor` (it calls `apply` using the first matching constructor of an inductive datatype) except only non-dependent premises are added as new goals. -/ elab "econstructor" : tactic =>
withMainContext: {α : Type} → TacticM αTacticM α
withMainContext
do let
mvarIds': ?m.2130
mvarIds'
(← getMainGoal): ?m.1898
(←
getMainGoal: TacticM MVarId
getMainGoal
(← getMainGoal): ?m.1898
)
.
constructor: MVarIdoptParam ApplyConfig { newGoals := ApplyNewGoals.nonDependentFirst, synthAssignedInstances := true, approx := true }MetaM (List MVarId)
constructor
{newGoals :=
.nonDependentOnly: ApplyNewGoals
.nonDependentOnly
}
Term.synthesizeSyntheticMVarsNoPostponing: optParam Bool falseTermElabM Unit
Term.synthesizeSyntheticMVarsNoPostponing
replaceMainGoal: List MVarIdTacticM Unit
replaceMainGoal
mvarIds': ?m.2130
mvarIds'