3
$\begingroup$

How can I implement a notation of the form: ∀ x ≤ y ≤ .. ≤ z ≤ t, φ in Coq?

A similar notation (but without quantifiers) appears here

Notation "x ≤ y  ≤ ..  ≤ z ≤ t" :=
    ((fun b A a => a <= b /\ A b) y 
 .. ((fun b A a => a <= b /\ A b) z (fun b => b <= t)) 
 .. x)
  (at level 70, y at next level, z at next level, t at next level).

But I was unsuccessful in putting forall quantifiers to it.

$\endgroup$
1

1 Answer 1

2
$\begingroup$

There is a binder keyword for binders in recursive notations.

Notation "'exists' x .. y , p" :=
  (ex (fun x => .. (ex (fun y => p)) ..))
  (at level 200, x binder, y binder, right associativity).

See the reference manual for details.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.