Debian Codegraph @

test-suite/bugs/bug_5149.v

raw
1 Goal forall x x' : nat, x = x' -> S x = S x -> exists y, S y = S x.
2 intros.
3 eexists.
4 rewrite <- H.
5 eassumption.
6 Qed.
7
8 Goal forall (base_type_code : Type) (t : base_type_code) (flat_type : Type)
9 (t' : flat_type) (exprf interp_flat_type0 interp_flat_type1 :
10 flat_type -> Type)
11 (v v' : interp_flat_type1 t'),
12 v = v' ->
13 forall (interpf : forall t0 : flat_type, exprf t0 -> interp_flat_type1 t0)
14 (SmartVarVar : forall t0 : flat_type, interp_flat_type1 t0 ->
15 interp_flat_type0 t0)
16 (Tbase : base_type_code -> flat_type) (x : exprf (Tbase t))
17 (x' : interp_flat_type1 (Tbase t)) (T : Type)
18 (flatten_binding_list : forall t0 : flat_type,
19 interp_flat_type0 t0 -> interp_flat_type1 t0 -> list T)
20 (P : T -> list T -> Prop) (prod : Type -> Type -> Type)
21 (s : forall x0 : base_type_code, prod (exprf (Tbase x0))
22 (interp_flat_type1 (Tbase x0)) -> T)
23 (pair : forall A B : Type, A -> B -> prod A B),
24 P (s t (pair (exprf (Tbase t)) (interp_flat_type1 (Tbase t)) x x'))
25 (flatten_binding_list t' (SmartVarVar t' v') v) ->
26 (forall (t0 : base_type_code) (t'0 : flat_type) (v0 : interp_flat_type1
27 t'0)
28 (x0 : exprf (Tbase t0)) (x'0 : interp_flat_type1 (Tbase t0)),
29 P (s t0 (pair (exprf (Tbase t0)) (interp_flat_type1 (Tbase t0)) x0
30 x'0))
31 (flatten_binding_list t'0 (SmartVarVar t'0 v0) v0) -> interpf
32 (Tbase t0) x0 = x'0) ->
33 interpf (Tbase t) x = x'.
34 Proof.
35 intros ?????????????????????? interpf_SmartVarVar.
36 solve [ unshelve (subst; eapply interpf_SmartVarVar; eassumption) ] || fail
37 "too early".
38 Undo.
39 (** Implicitly at the dot. The first fails because unshelve adds a goal, and solve hence fails. The second has an ambiant unification problem that is solved after solve *)
40 Fail solve [ unshelve (eapply interpf_SmartVarVar; subst; eassumption) ].
41 solve [eapply interpf_SmartVarVar; subst; eassumption].
42 Undo.
43 Unset Solve Unification Constraints.
44 (* User control of when constraints are solved *)
45 solve [ unshelve (eapply interpf_SmartVarVar; subst; eassumption); solve_constraints ].
46 Qed.