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.
import Lean

open Lean Meta MVarId Elab Tactic Term in
/-- A tactic to reduce the main goal, up to definitional equality. -/
elab "reduceGoal" : tactic => do
  let 
goal: ?m.125
goal
Lean.Elab.Tactic.getMainGoal: TacticM MVarId
Lean.Elab.Tactic.getMainGoal
withContext: {n : TypeType ?u.127} → [inst : MonadControlT MetaM n] → [inst : Monad n] → {α : Type} → MVarIdn αn α
withContext
goal: ?m.125
goal
do let
goalDecl: ?m.383
goalDecl
getDecl: MVarIdMetaM MetavarDecl
getDecl
goal: ?m.125
goal
let
goalType: ?m.386
goalType
:=
goalDecl: ?m.383
goalDecl
.
type: MetavarDeclExpr
type
let
reducedGoalType: ?m.690
reducedGoalType
Meta.withTransparency: {n : TypeType ?u.424} → [inst : MonadControlT MetaM n] → [inst : Monad n] → {α : Type} → TransparencyModen αn α
Meta.withTransparency
TransparencyMode.reducible: TransparencyMode
TransparencyMode.reducible
<| reduce (skipTypes :=
false: Bool
false
) (skipProofs :=
false: Bool
false
)
goalType: ?m.386
goalType
let
goal': ?m.750
goal'
MVarId.replaceTargetDefEq: MVarIdExprMetaM MVarId
MVarId.replaceTargetDefEq
goal: ?m.125
goal
reducedGoalType: ?m.690
reducedGoalType
replaceMainGoal: List MVarIdTacticM Unit
replaceMainGoal
[
goal': ?m.750
goal'
]