diff --git a/src/Lean/Elab/Tactic/Induction.lean b/src/Lean/Elab/Tactic/Induction.lean index 5163585b26..9b883ad6fe 100644 --- a/src/Lean/Elab/Tactic/Induction.lean +++ b/src/Lean/Elab/Tactic/Induction.lean @@ -240,7 +240,10 @@ private def generalizeVars (stx : Syntax) (targets : Array Expr) : TacticM Nat : pure (fvarIds.size, [mvarId']) private def getAltsOfInductionAlts (inductionAlts : Syntax) : Array Syntax := - inductionAlts[1].getSepArgs + if inductionAlts.getNumArgs == 2 then + inductionAlts[1].getSepArgs -- TODO remove + else + inductionAlts[2].getSepArgs private def getAltsOfOptInductionAlts (optInductionAlts : Syntax) : Array Syntax := if optInductionAlts.isNone then #[] else getAltsOfInductionAlts optInductionAlts[0]