Debian Codegraph @

test-suite/success/rewrite_closed.v

raw
1 From Corelib Require Import Setoid Morphisms.
2
3 Axiom lattice_for : Type -> Type.
4 Axiom constant : forall {T : Type}, T -> lattice_for T.
5
6 Axiom lattice_for_rect :
7 forall [T : Type] (P : Type), (forall t : T, P) -> forall l : lattice_for T, P.
8
9 #[local]
10 Declare Instance lattice_for_rect_Proper_85 : forall {A},
11 Proper (forall_relation (fun _ => eq) ==> eq ==> Basics.flip Basics.impl)
12 (@lattice_for_rect A Prop) | 3.
13
14 Axiom lattice_rewrite :
15 forall (A T T' : Type) (x : T -> T') (c : A -> lattice_for T)
16 (v : lattice_for A),
17 lattice_for_rect T' x (lattice_for_rect (lattice_for T) c v) =
18 lattice_for_rect T' (fun x0 : A => lattice_for_rect T' x (c x0)) v.
19
20 Axiom collapse_might_be_empty : bool.
21
22 Axiom PosSet : Type.
23 Axiom PosSet_inter : PosSet -> PosSet -> PosSet.
24
25 Goal
26 forall
27 (l2 : lattice_for PosSet)
28 (l0 : lattice_for PosSet),
29 lattice_for_rect Prop
30 (fun x : PosSet =>
31 lattice_for_rect Prop
32 (fun _ : PosSet => True)
33 (lattice_for_rect (lattice_for PosSet)
34 (fun y' : PosSet =>
35 constant
36 (if collapse_might_be_empty then PosSet_inter x y' else y')) l0)) l2
37 .
38 Proof.
39 intros.
40 (* This should not capture a variable *)
41 Fail rewrite lattice_rewrite.
42 Abort.