Debian Codegraph @

test-suite/bugs/bug_17091.v

raw
1 Require Program.Tactics.
2
3 Axiom admit : False.
4
5 Axiom V : Type.
6 Axiom VSet : Type.
7 Axiom VSet_mem : V -> VSet -> bool.
8
9 Axiom DisjointAdd : V -> VSet -> VSet -> Prop.
10 Axiom EdgeOf : V -> V -> Set.
11
12 Inductive PathOf : V -> V -> Type :=
13 | pathOf_refl x : PathOf x x
14 | pathOf_step x y z : EdgeOf x y -> PathOf y z -> PathOf x z.
15
16 Arguments pathOf_step {x y z} e p.
17
18 Axiom nodes : forall {x y} (p : PathOf x y), VSet.
19
20 Inductive SPath : VSet -> V -> V -> Type :=
21 | spath_refl s x : SPath s x x
22 | spath_step s s' x y z : DisjointAdd x s s' -> EdgeOf x y
23 -> SPath s y z -> SPath s' x z.
24
25 Fixpoint is_simple {x y} (p : PathOf x y) :=
26 match p with
27 | pathOf_refl x => true
28 | @pathOf_step x y z e p => andb (negb (VSet_mem x (nodes p))) (is_simple p)
29 end.
30
31 Program Definition to_simple : forall {x y} (p : PathOf x y),
32 is_simple p = true -> SPath (nodes p) x y
33 := fix to_simple {x y} p (Hp : is_simple p = true) {struct p} :=
34 match
35 p in PathOf t t0
36 return is_simple p = true -> SPath (nodes p) t t0
37 with
38 | pathOf_refl x =>
39 fun _ => spath_refl (nodes (pathOf_refl x)) x
40 | @pathOf_step x y z e p0 =>
41 fun Hp0 => @spath_step _ _ _ _ _ _ e (to_simple p0 _)
42 end Hp.
43 Next Obligation.
44 elim admit.
45 Defined.
46
47 Final Obligation.
48 clear to_simple. elim admit.
49 Qed.