lean4-htt/tests/lean/run/cdcl_examples.lean

20 lines
716 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.

import tools.super.cdcl
example {a} : a → ¬a → false := by cdcl
example {a} : a ¬a := by cdcl
example {a b} : a → (a → b) → b := by cdcl
example {a b c} : (a → b) → (¬a → b) → (b → c) → b ∧ c := by cdcl
open tactic monad
private meta def lit_unification : tactic unit :=
do ls ← local_context, first $ do l ← ls, [do apply l, assumption]
example {p : → Type _} : p 2 p 4 → (p (2*2) → p (2+0)) → p (1+1) :=
by cdcl_t lit_unification
example {p : → Prop} :
list.foldl (λf v, f ∧ (v ¬v)) true (map p (list.range 5)) :=
begin (target >>= whnf >>= change), cdcl end
example {a b c : Type _} : (a → b) → (b → c) → (a → c) := by cdcl