lean4-htt/tests/lean/run/cute_binders.lean
Leonardo de Moura b7abd61579 feat(frontends/lean): change subtype notation (again)
We had conflicts with the set notation.
2016-09-21 17:02:18 -07:00

17 lines
529 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 range (lower : nat) (upper : nat) : set nat :=
λ a, lower ≤ a ∧ a ≤ upper
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