-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsample.txt
32 lines (32 loc) · 913 Bytes
/
sample.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
(* A minimal sample file for your ocaml prover.
This file does not contain everything your prover needs to do, just a small
selection:
- all functions and lemmas have only a single argument
- the only statement is a let-prove statement
- the only hint is 'axiom' (no 'induction')
*)
let (*prove*) cf_idempotent (h : int)
= (cf (cf h) = cf h)
(*hint: axiom *)
let (*prove*) inv_involution (h : int)
= (inv (inv h) = h)
(*hint: axiom *)
let (*prove*) cf_inv_commute (h : int)
= (cf (inv h) = inv (cf h))
(*hint: axiom *)
(* This should now be provable from the axioms: *)
let (*prove*) cf_inv_property (h : int)
= (cf (inv (cf (inv h))) = cf h)
(* no hints! *)
(* Output should read something like this:
Proof of cf_inv_property:
cf (inv (cf (inv h)))
= {lemma cf_inv_commute}
inv (cf (cf (inv h)))
= {lemma cf_idempotent}
inv (cf (inv h))
= {lemma cf_inv_commute}
inv (inv (cf h))
= {lemma inv_involution}
cf h
*)