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

76 lines
2.1 KiB
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.

open tactic
set_option pp.implicit true
example (a b c d : nat) (f : nat → nat → nat) : a = b → b = c → d + (if b > 0 then a else b) = 0 → f (b + b) b ≠ f (a + c) c → false :=
by do intros,
s ← cc_state.mk_using_hs,
s^.pp >>= trace,
t₁ ← to_expr `(f (b + b) b),
t₂ ← to_expr `(f (a + c) c),
b ← to_expr `(b),
d ← to_expr `(d),
guard (s^.inconsistent),
guard (s^.eqc_size b = 3),
guard (not (s^.in_singlenton_eqc b)),
guard (s^.in_singlenton_eqc d),
trace ">>> Equivalence roots",
trace s^.roots,
trace ">>> b's equivalence class",
trace (s^.eqc_of b),
pr ← s^.eqv_proof t₁ t₂,
note `h pr,
contradiction
example (a b : nat) (f : nat → nat) : a = b → f a = f b :=
by cc
set_option trace.app_builder true
example (a b : nat) (f : nat → nat) : a = b → f a ≠ f b → false :=
by cc
example (a b : nat) (f : nat → nat) : a = b → f (f a) ≠ f (f b) → false :=
by cc
example (a b c : nat) (f : nat → nat) : a = b → c = b → f (f a) ≠ f (f c) → false :=
by cc
example (a b c : nat) (f : nat → nat → nat) : a = b → c = b → f (f a b) a ≠ f (f c c) c → false :=
by cc
example (a b c : nat) (f : nat → nat → nat) : a = b → c = b → f (f a b) a = f (f c c) c :=
by cc
example (a b c d : nat) : a == b → b = c → c == d → a == d :=
by cc
example (a b c d : nat) : a = b → b = c → c == d → a == d :=
by cc
example (a b c d : nat) : a = b → b == c → c == d → a == d :=
by cc
example (a b c d : nat) : a == b → b == c → c = d → a == d :=
by cc
example (a b c d : nat) : a == b → b = c → c = d → a == d :=
by cc
example (a b c d : nat) : a = b → b = c → c = d → a == d :=
by cc
example (a b c d : nat) : a = b → b == c → c = d → a == d :=
by cc
constant f {α : Type} : ααα
constant g : nat → nat
example (a b c : nat) : a = b → g a == g b :=
by cc
example (a b c : nat) : a = b → c = b → f (f a b) (g c) = f (f c a) (g b) :=
by cc
example (a b c d e x y : nat) : a = b → a = x → b = y → c = d → c = e → c = b → a = e :=
by cc