lean4-htt/tests/lean/run/ginductive_induction_tactic.lean
Leonardo de Moura 5189a002bf chore(tests/lean/run/ginductive_induction_tactic): remove using ...
Otherwise, we are not testing anything.
2017-03-04 15:15:39 -08:00

21 lines
506 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mutual inductive {u} foo, bla (α : Type u)
with foo : Type u
| mk₁ : α → bla → foo
with bla : Type u
| mk₂ : α → bla → bla
| mk₃ : list foo → bla
def cidx {α} : bla α → nat
| (bla.mk₂ _ _) := 1
| (bla.mk₃ _) := 2
def to_list {α} : bla α → list (foo α)
| (bla.mk₂ _ _) := []
| (bla.mk₃ ls) := ls
lemma ex {α} (b : bla α) (h : cidx b = 2) : b = bla.mk₃ (to_list b) :=
begin
induction b,
{simp [cidx] at h, exact absurd h (dec_trivial)},
{simp [to_list]}
end