Debian Codegraph @

test-suite/bugs/bug_21701.v

raw
1 Section A. Variable (F_let : nat -> nat).
2 Fixpoint f (p : nat) (m : nat) {struct m} :=
3 match m with
4 | O => S p
5 | S m' =>
6 let h := g in
7 h (S p) m'
8 end
9 with g (q : nat) (m : nat) {struct m} :=
10 match m with
11 | O => S (F_let q)
12 | S m' => f q m'
13 end.
14 End A.
15
16 Fail Fixpoint F_let (n : nat) : nat :=
17 let r :=
18 match n with
19 | O => O
20 | S k =>
21 f F_let k n
22 end in r.
23
24 (*
25 Theorem false n : n = F_let 1 -> match F_let 1 with 0 => False | S n' => n = n' end.
26 intro e.
27 cbn [F_let].
28 lazy delta [f].
29 lazy beta iota zeta head.
30 apply e.
31 Qed.
32
33 Theorem no_cycle n : match n with 0 => False | S n' => n = n' end -> False.
34 Proof. induction n; eauto. intros e. rewrite <- e in IHn. auto. Qed.
35
36 Theorem real_false : False.
37 Proof.
38 eapply no_cycle.
39 apply false.
40 reflexivity.
41 Qed.
42 *)