# Proof format: LFSC

Using the flag proof-format-mode=lfsc , cvc5 outputs proofs in the LFSC proof format.

The LFSC proof format is based on the LF logical framework extended with computational side conditions, as described in [ SOR+13 ] . A high performance C++ proof checker for LFSC is available here .

For a quick start, the cvc5 repository contains a script which will download and install the LFSC proof checker, and create scripts for generating proofs with cvc5 and checking them with the LFSC proof checker.

LFSC is a meta-framework, meaning that the proof rules used by cvc5 are defined in signature files, also contained within the cvc5 repository in this directory . Based on these signatures, cvc5 provides basic support for LFSC proofs over all theories that it supports.

Note that several proof rules in the internal calculus are not yet supported in LFSC signatures, and are instead printed as trust steps in the LFSC proof. A trust step proves an arbitrary formula with no provided justification. The LFSC proof contains warnings for which proof rules from the internal calculus were recorded as trust steps in the LFSC proof.

For more fine-grained proofs, the additional option proof-granularity=theory-rewrite should be passed to cvc5. This often will result in LFSC proofs with more detail, and whose trust steps correspond only to equalities corresponding to theory rewrites.

A simple example of cvc5 producing a proof in LFSC proof format:

```
$ bin/cvc5 --dump-proofs --proof-format-mode=lfsc --proof-granularity=theory-rewrite ../test/regress/cli/regress0/proofs/qgu-fuzz-1-bool-sat.smt2
unsat
; WARNING: adding trust step for TRUST_THEORY_REWRITE
(define cvc.c (var 0 Bool))
(define cvc.b (var 1 Bool))
(define cvc.d (var 2 Bool))
(check
(@ t1 (= cvc.b cvc.d)
(@ t2 (or cvc.b (or cvc.d false))
(@ t3 (ite cvc.d cvc.c false)
(# a0 (holds (and (or cvc.d (or cvc.b false)) (and (= cvc.c cvc.d) (and (not t3) (and (= t2 t1) true)))))
(: (holds false)
(plet _ _
(reordering _ t2
(and_elim _ _ 0 a0))
(\ p1
(plet _ _
(refl f_and)
(\ p2
(plet _ _
(eq_resolve _ _
(and_elim _ _ 2 a0)
(trans _ _ _
(cong _ _ _ _
(refl f_not)
(trust (= t3 (and cvc.d (and cvc.c true)))) ; from TRUST_THEORY_REWRITE
)
(trans _ _ _
(cong _ _ _ _
(refl f_not)
(cong _ _ _ _
(cong _ _ _ _ p2
(refl cvc.d))
(cong _ _ _ _
(cong _ _ _ _ p2
(and_elim _ _ 1 a0))
(refl true))))
(cong _ _ _ _
(refl f_not)
(trust (= (and cvc.d (and cvc.d true)) cvc.d)) ; from TRUST_THEORY_REWRITE
))))
(\ p3
(resolution _ _ _
(resolution _ _ _
(reordering _ (or t1 (or (not t2) false))
(equiv_elim1 _ _
(and_elim _ _ 3 a0)))
(resolution _ _ _
(resolution _ _ _
(reordering _ (or cvc.d (or (not cvc.b) (or (not t1) false)))
(cnf_equiv_pos1 cvc.b cvc.d)) p3 tt cvc.d)
(resolution _ _ _ p1 p3 tt cvc.d) ff cvc.b) tt t1) p1 ff t2)))))))))))))
```