File: bug_6375.v

package info (click to toggle)
coq 8.20.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 44,116 kB
  • sloc: ml: 234,160; sh: 4,301; python: 3,270; ansic: 2,644; makefile: 882; lisp: 172; javascript: 63; xml: 24; sed: 2
file content (19 lines) | stat: -rw-r--r-- 740 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Goal True.
  let term := constr:(Nat.add (Nat.mul 0 1) 2 = 2) in
  let term := lazymatch (eval pattern Nat.add, Nat.mul, S in term) with
              | ?term _ _ _ => term
              end in
  let term := lazymatch term with
              | fun (a : ?A) (b : ?B) (c : ?C) => ?term
                => constr:(fun (a : A) (b : B) (c : C) => term)
              end in
  idtac term; (* (fun (_ _ : nat -> nat -> nat) (n1 : nat -> nat) =>
 n1 (n1 0 (n1 0)) (n1 (n1 0)) = n1 (n1 0)) *)
    assert (H : { T : Type & T }) by abstract (eexists; exact term).
  (* Error: Illegal application (Non-functional construction):
The expression "n1" of type "nat -> nat"
cannot be applied to the terms
 "0" : "nat"
 "n1 0" : "nat" *)
  exact I.
Defined.