lean4-htt/old_tests/tests/lean/run/term_pred.lean
2018-04-10 12:56:55 -07:00

25 lines
599 B
Text

inductive term
| app : string → list term → term
| var : string → term
inductive bin_only : term → Prop
| leaf : ∀ x, bin_only (term.var x)
| bin_app : ∀ op a b, bin_only a → bin_only b → bin_only (term.app op [a, b])
example (op : string) (a : term) : ¬ bin_only (term.app op [a]) :=
begin
intro h,
cases h
end
example (op : string) (a b : term) (H : bin_only (term.app op [a, b])) : bin_only a :=
begin
cases H,
assumption
end
example (op : string) (a b : term) (H : bin_only (term.app op [a, b])) : bin_only b :=
begin
cases H with _ _ _ _ H1 H2,
exact H2
end