2
(* Refine and let-in's *)
4
Goal exists x : nat, x = 0.
5
refine (let y := 0 + 0 in _).
9
Goal exists x : nat, x = 0.
10
refine (let y := 0 + 0 in ex_intro _ (y + y) _).
15
refine (let y := 0 in 0 + _).
19
(* Example submitted by Yves on coqdev *)
23
Goal forall l : list nat, l = l.
27
match l return (l = l) with
34
(* Submitted by Roland Zumkeller (bug #888) *)
36
(* The Fix and CoFix rules expect a subgoal even for closed components of the
40
refine (fix f (n : nat) : nat := S _
41
with pred (n : nat) : nat := n
46
(* Submitted by Roland Zumkeller (bug #889) *)
48
(* The types of metas were in metamap and they were not updated when
49
passing through a binder *)
51
Goal forall n : nat, nat -> n = 0.
53
(fun n => fix f (i : nat) : n = 0 := match i with
59
(* Submitted by Roland Zumkeller (bug #931) *)
60
(* Don't turn dependent evar into metas *)
62
Goal (forall n : nat, n = 0 -> Prop) -> Prop.
68
(* Submitted by Jacek Chrzaszcz (bug #1102) *)
70
(* le probl�me a �t� r�solu ici par normalisation des evars pr�sentes
71
dans les types d'evars, mais le probl�me reste a priori ouvert dans
72
le cas plus g�n�ral d'evars non instanci�es dans les types d'autres
75
Goal exists n:nat, n=n.
76
refine (ex_intro _ _ _).
79
(* Used to failed with error not clean *)
82
forall x:nat, (forall y:nat, forall n:nat, {q:nat | y = q*n}) ->
83
forall n:nat, {q:nat | x = q*n}.
86
match div_rec m n with
92
(* Use to fail because sigma was not propagated to get_type_of *)
93
(* Revealed by r9310, fixed in r9359 *)
96
forall f : forall a (H:a=a), Prop,
97
(forall a (H:a = a :> nat), f a H -> True /\ True) ->
100
refine (@proj1 _ _ (H 0 _ _)).
103
(* Use to fail because let-in with metas in the body where rejected
104
because a priori considered as dependent *)
106
Require Import Peano_dec.
110
(forall m, m<n -> nat) ->
114
if eq_nat_dec n 0 then
117
let fn := fact_rec (n-1) _ in
121
(* Wish 1988: that fun forces unfold in refine *)
123
Goal (forall A : Prop, A -> ~~A).
124
Proof. refine(fun A a f => _).