lean4-htt/tests/lean/run/cute_binders.lean
2016-07-08 07:50:58 -07:00

21 lines
650 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.

definition set (A : Type) := A → Prop
definition mem {A : Type} (a : A) (s : set A) : Prop :=
s a
definition range (lower : nat) (upper : nat) : set nat :=
λ a, lower ≤ a ∧ a ≤ upper
infix ` ∈ ` := mem
local notation `[` L `, ` U `]` := range L U
variables s : set nat
variables p : nat → nat → Prop
-- check a ∈ s
set_option pp.binder_types true
check ∀ b c a ∈ s, a + b + c > 0
-- ∀ (b c a : ), b ∈ s → c ∈ s → a ∈ s → a + b + c > 0 : Prop
check ∀ a < 5, p a (a+1)
-- ∀ (a : ), a < 5 → p a (a + 1) : Prop
check ∀ a b ∈ [2, 3], p a b
-- ∀ (a b : ), a ∈ [2, 3] → b ∈ [2, 3] → p a b