Debian Codegraph @

test-suite/bugs/bug_14722.v

raw
1 Module map.
2 Class map {value} := mk {
3 rep : Type;
4 get: rep -> option value;
5 empty : rep;
6 put : rep -> value -> rep;
7 }.
8 Arguments map : clear implicits.
9 Class ok {value : Type} {map : map value}: Prop := {
10 get_put_diff : forall m v, get (put m v) = None;
11 }.
12 Arguments ok {_} _.
13
14 End map.
15
16 Axiom wordX : Set.
17 Axiom e : wordX.
18
19 Section Equiv.
20
21 Context {Registers: map.map wordX}
22 {mem: map.map Corelib.Init.Byte.byte}.
23
24 Context (Registers_ok: @map.ok wordX Registers)
25 (mem_ok: @map.ok Byte.byte mem).
26
27 (** Check that cleared variables are correctly handled *)
28 Goal map.get (map.put map.empty e) = None.
29 Proof.
30 clear -Registers_ok.
31 apply map.get_put_diff.
32 Qed.
33
34 End Equiv.