mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-07 11:45:41 -05:00
refactor(proof): rename defc to stepc
This commit is contained in:
parent
d195a2fa87
commit
19e6f80b45
3 changed files with 11 additions and 10 deletions
|
|
@ -17,11 +17,12 @@ let lit_not = function
|
|||
| L_a t -> L_na t
|
||||
| L_na t -> L_a t
|
||||
|
||||
let pp_lit out = function
|
||||
| L_eq (t,u) -> Fmt.fprintf out "(@[+@ (@[=@ %a@ %a@])@])" T.pp t T.pp u
|
||||
| L_neq (t,u) -> Fmt.fprintf out "(@[-@ (@[=@ %a@ %a@])@])" T.pp t T.pp u
|
||||
| L_a t -> Fmt.fprintf out "(@[+@ %a@])" T.pp t
|
||||
| L_na t -> Fmt.fprintf out "(@[-@ %a@])" T.pp t
|
||||
let pp_lit_with ~pp_t out = function
|
||||
| L_eq (t,u) -> Fmt.fprintf out "(@[+@ (@[=@ %a@ %a@])@])" pp_t t pp_t u
|
||||
| L_neq (t,u) -> Fmt.fprintf out "(@[-@ (@[=@ %a@ %a@])@])" pp_t t pp_t u
|
||||
| L_a t -> Fmt.fprintf out "(@[+@ %a@])" pp_t t
|
||||
| L_na t -> Fmt.fprintf out "(@[-@ %a@])" pp_t t
|
||||
let pp_lit = pp_lit_with ~pp_t:Term.pp
|
||||
|
||||
let lit_a t = L_a t
|
||||
let lit_na t = L_na t
|
||||
|
|
@ -60,7 +61,7 @@ type t =
|
|||
}
|
||||
|
||||
and composite_step =
|
||||
| S_define_c of {
|
||||
| S_step_c of {
|
||||
name: string; (* name *)
|
||||
res: clause; (* result of [proof] *)
|
||||
proof: t; (* sub-proof *)
|
||||
|
|
@ -81,7 +82,7 @@ let r1 p = R1 p
|
|||
let p p ~lhs ~rhs : hres_step = P { p; lhs; rhs }
|
||||
let p1 p = P1 p
|
||||
|
||||
let defc ~name res proof : composite_step = S_define_c {proof;name;res}
|
||||
let stepc ~name res proof : composite_step = S_step_c {proof;name;res}
|
||||
let deft c rhs : composite_step = S_define_t (c,rhs)
|
||||
|
||||
let is_trivial_refl = function
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ module type PROOF = sig
|
|||
val lit_not : lit -> lit
|
||||
|
||||
type composite_step
|
||||
val defc : name:string -> lit list -> t -> composite_step
|
||||
val stepc : name:string -> lit list -> t -> composite_step
|
||||
val deft : term -> term -> composite_step (** define a (new) atomic term *)
|
||||
|
||||
val is_trivial_refl : t -> bool
|
||||
|
|
|
|||
|
|
@ -535,7 +535,7 @@ module Make(A : ARG)
|
|||
Some pp
|
||||
|
||||
(* export to proof {!P.t}, translating Msat-level proof ising:
|
||||
- [defc name cl proof] to bind [name] to given clause and proof
|
||||
- [stepc name cl proof] to bind [name] to given clause and proof
|
||||
- [deft name t] to define [name] as a shortcut for [t] (tseitin, etc.).
|
||||
Checker will always expand these. (TODO)
|
||||
- [steps <defc>+] for a structure proof with definitions, returning last one
|
||||
|
|
@ -622,7 +622,7 @@ module Make(A : ARG)
|
|||
(Iter.of_list steps |> Iter.map tr_step)
|
||||
in
|
||||
|
||||
let step = P.defc ~name concl pr_step in
|
||||
let step = P.stepc ~name concl pr_step in
|
||||
add_step step;
|
||||
)
|
||||
in
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue